]> scripts.mit.edu Git - autoinstalls/wordpress.git/commitdiff
WordPress 4.7 wordpress-4.7
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 26 Jan 2017 23:07:50 +0000 (15:07 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 26 Jan 2017 23:07:50 +0000 (15:07 -0800)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
662 files changed:
license.txt
readme.html
wp-activate.php
wp-admin/about.php
wp-admin/admin-footer.php
wp-admin/admin-header.php
wp-admin/admin.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/color-picker-rtl.css
wp-admin/css/color-picker-rtl.min.css
wp-admin/css/color-picker.css
wp-admin/css/color-picker.min.css
wp-admin/css/colors/_admin.scss
wp-admin/css/colors/_mixins.scss
wp-admin/css/colors/blue/colors-rtl.css
wp-admin/css/colors/blue/colors-rtl.min.css
wp-admin/css/colors/blue/colors.css
wp-admin/css/colors/blue/colors.min.css
wp-admin/css/colors/coffee/colors-rtl.css
wp-admin/css/colors/coffee/colors-rtl.min.css
wp-admin/css/colors/coffee/colors.css
wp-admin/css/colors/coffee/colors.min.css
wp-admin/css/colors/ectoplasm/colors-rtl.css
wp-admin/css/colors/ectoplasm/colors-rtl.min.css
wp-admin/css/colors/ectoplasm/colors.css
wp-admin/css/colors/ectoplasm/colors.min.css
wp-admin/css/colors/light/colors-rtl.css
wp-admin/css/colors/light/colors-rtl.min.css
wp-admin/css/colors/light/colors.css
wp-admin/css/colors/light/colors.min.css
wp-admin/css/colors/midnight/colors-rtl.css
wp-admin/css/colors/midnight/colors-rtl.min.css
wp-admin/css/colors/midnight/colors.css
wp-admin/css/colors/midnight/colors.min.css
wp-admin/css/colors/ocean/colors-rtl.css
wp-admin/css/colors/ocean/colors-rtl.min.css
wp-admin/css/colors/ocean/colors.css
wp-admin/css/colors/ocean/colors.min.css
wp-admin/css/colors/sunrise/colors-rtl.css
wp-admin/css/colors/sunrise/colors-rtl.min.css
wp-admin/css/colors/sunrise/colors.css
wp-admin/css/colors/sunrise/colors.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/customize-widgets-rtl.css
wp-admin/css/customize-widgets-rtl.min.css
wp-admin/css/customize-widgets.css
wp-admin/css/customize-widgets.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-rtl.min.css
wp-admin/css/ie.css
wp-admin/css/ie.min.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/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-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/themes-rtl.css
wp-admin/css/themes-rtl.min.css
wp-admin/css/themes.css
wp-admin/css/themes.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-link-form.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/import.php
wp-admin/includes/admin.php
wp-admin/includes/ajax-actions.php
wp-admin/includes/class-ftp-pure.php
wp-admin/includes/class-ftp-sockets.php
wp-admin/includes/class-ftp.php
wp-admin/includes/class-plugin-installer-skin.php
wp-admin/includes/class-plugin-upgrader.php
wp-admin/includes/class-theme-upgrader.php
wp-admin/includes/class-walker-nav-menu-edit.php
wp-admin/includes/class-wp-automatic-updater.php
wp-admin/includes/class-wp-comments-list-table.php
wp-admin/includes/class-wp-importer.php
wp-admin/includes/class-wp-links-list-table.php
wp-admin/includes/class-wp-list-table-compat.php [new file with mode: 0644]
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-skins.php
wp-admin/includes/class-wp-upgrader.php
wp-admin/includes/class-wp-users-list-table.php
wp-admin/includes/credits.php
wp-admin/includes/dashboard.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/list-table.php
wp-admin/includes/media.php
wp-admin/includes/meta-boxes.php
wp-admin/includes/misc.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/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/includes/widgets.php
wp-admin/index.php
wp-admin/install.php
wp-admin/js/bookmarklet.min.js
wp-admin/js/color-picker.js
wp-admin/js/color-picker.min.js
wp-admin/js/common.js
wp-admin/js/common.min.js
wp-admin/js/custom-background.js
wp-admin/js/custom-background.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/editor-expand.js
wp-admin/js/editor.js
wp-admin/js/editor.min.js
wp-admin/js/inline-edit-post.js
wp-admin/js/inline-edit-post.min.js
wp-admin/js/inline-edit-tax.js
wp-admin/js/iris.min.js
wp-admin/js/media-gallery.js
wp-admin/js/nav-menu.js
wp-admin/js/nav-menu.min.js
wp-admin/js/post.js
wp-admin/js/post.min.js
wp-admin/js/postbox.js
wp-admin/js/tags-box.js
wp-admin/js/tags-box.min.js
wp-admin/js/tags-suggest.js [new file with mode: 0644]
wp-admin/js/tags-suggest.min.js [new file with mode: 0644]
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/widgets.js
wp-admin/js/widgets.min.js
wp-admin/js/word-count.js
wp-admin/link-manager.php
wp-admin/link-parse-opml.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/about.php
wp-admin/network/admin.php
wp-admin/network/credits.php
wp-admin/network/edit.php
wp-admin/network/freedoms.php
wp-admin/network/index.php
wp-admin/network/menu.php
wp-admin/network/plugin-editor.php
wp-admin/network/plugin-install.php
wp-admin/network/plugins.php
wp-admin/network/profile.php
wp-admin/network/settings.php
wp-admin/network/setup.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/theme-editor.php
wp-admin/network/theme-install.php
wp-admin/network/themes.php
wp-admin/network/update-core.php
wp-admin/network/update.php
wp-admin/network/upgrade.php
wp-admin/network/user-edit.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-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/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/tools.php
wp-admin/update-core.php
wp-admin/upload.php
wp-admin/user-edit.php
wp-admin/user-new.php
wp-admin/users.php
wp-admin/widgets.php
wp-comments-post.php
wp-content/plugins/akismet/readme.txt
wp-content/themes/twentyfifteen/functions.php
wp-content/themes/twentyfifteen/readme.txt
wp-content/themes/twentyfifteen/style.css
wp-content/themes/twentyfourteen/404.php [deleted file]
wp-content/themes/twentyfourteen/archive.php [deleted file]
wp-content/themes/twentyfourteen/author.php [deleted file]
wp-content/themes/twentyfourteen/category.php [deleted file]
wp-content/themes/twentyfourteen/comments.php [deleted file]
wp-content/themes/twentyfourteen/content-aside.php [deleted file]
wp-content/themes/twentyfourteen/content-audio.php [deleted file]
wp-content/themes/twentyfourteen/content-featured-post.php [deleted file]
wp-content/themes/twentyfourteen/content-gallery.php [deleted file]
wp-content/themes/twentyfourteen/content-image.php [deleted file]
wp-content/themes/twentyfourteen/content-link.php [deleted file]
wp-content/themes/twentyfourteen/content-none.php [deleted file]
wp-content/themes/twentyfourteen/content-page.php [deleted file]
wp-content/themes/twentyfourteen/content-quote.php [deleted file]
wp-content/themes/twentyfourteen/content-video.php [deleted file]
wp-content/themes/twentyfourteen/content.php [deleted file]
wp-content/themes/twentyfourteen/css/editor-style.css [deleted file]
wp-content/themes/twentyfourteen/css/ie.css [deleted file]
wp-content/themes/twentyfourteen/featured-content.php [deleted file]
wp-content/themes/twentyfourteen/footer.php [deleted file]
wp-content/themes/twentyfourteen/functions.php [deleted file]
wp-content/themes/twentyfourteen/genericons/COPYING.txt [deleted file]
wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf [deleted file]
wp-content/themes/twentyfourteen/genericons/LICENSE.txt [deleted file]
wp-content/themes/twentyfourteen/genericons/README.txt [deleted file]
wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot [deleted file]
wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg [deleted file]
wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf [deleted file]
wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff [deleted file]
wp-content/themes/twentyfourteen/genericons/genericons.css [deleted file]
wp-content/themes/twentyfourteen/header.php [deleted file]
wp-content/themes/twentyfourteen/image.php [deleted file]
wp-content/themes/twentyfourteen/images/pattern-dark.svg [deleted file]
wp-content/themes/twentyfourteen/images/pattern-light.svg [deleted file]
wp-content/themes/twentyfourteen/inc/back-compat.php [deleted file]
wp-content/themes/twentyfourteen/inc/custom-header.php [deleted file]
wp-content/themes/twentyfourteen/inc/customizer.php [deleted file]
wp-content/themes/twentyfourteen/inc/featured-content.php [deleted file]
wp-content/themes/twentyfourteen/inc/template-tags.php [deleted file]
wp-content/themes/twentyfourteen/inc/widgets.php [deleted file]
wp-content/themes/twentyfourteen/index.php [deleted file]
wp-content/themes/twentyfourteen/js/customizer.js [deleted file]
wp-content/themes/twentyfourteen/js/featured-content-admin.js [deleted file]
wp-content/themes/twentyfourteen/js/functions.js [deleted file]
wp-content/themes/twentyfourteen/js/html5.js [deleted file]
wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js [deleted file]
wp-content/themes/twentyfourteen/js/slider.js [deleted file]
wp-content/themes/twentyfourteen/page-templates/contributors.php [deleted file]
wp-content/themes/twentyfourteen/page-templates/full-width.php [deleted file]
wp-content/themes/twentyfourteen/page.php [deleted file]
wp-content/themes/twentyfourteen/readme.txt [deleted file]
wp-content/themes/twentyfourteen/rtl.css [deleted file]
wp-content/themes/twentyfourteen/screenshot.png [deleted file]
wp-content/themes/twentyfourteen/search.php [deleted file]
wp-content/themes/twentyfourteen/sidebar-content.php [deleted file]
wp-content/themes/twentyfourteen/sidebar-footer.php [deleted file]
wp-content/themes/twentyfourteen/sidebar.php [deleted file]
wp-content/themes/twentyfourteen/single.php [deleted file]
wp-content/themes/twentyfourteen/style.css [deleted file]
wp-content/themes/twentyfourteen/tag.php [deleted file]
wp-content/themes/twentyfourteen/taxonomy-post_format.php [deleted file]
wp-content/themes/twentyseventeen/404.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/README.txt [new file with mode: 0644]
wp-content/themes/twentyseventeen/archive.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/css/colors-dark.css [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/css/editor-style.css [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/css/ie8.css [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/css/ie9.css [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/images/coffee.jpg [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/images/espresso.jpg [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/images/header.jpg [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/images/sandwich.jpg [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/images/svg-icons.svg [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/js/customize-controls.js [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/js/customize-preview.js [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/js/global.js [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/js/html5.js [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/js/navigation.js [new file with mode: 0644]
wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js [new file with mode: 0644]
wp-content/themes/twentyseventeen/comments.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/footer.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/front-page.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/functions.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/header.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/inc/back-compat.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/inc/color-patterns.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/inc/custom-header.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/inc/customizer.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/inc/icon-functions.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/inc/template-functions.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/inc/template-tags.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/index.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/page.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/rtl.css [new file with mode: 0644]
wp-content/themes/twentyseventeen/screenshot.png [new file with mode: 0644]
wp-content/themes/twentyseventeen/search.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/searchform.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/sidebar.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/single.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/style.css [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/footer/site-info.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/header/header-image.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/header/site-branding.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/navigation/navigation-top.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/page/content-page.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/post/content-audio.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/post/content-image.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/post/content-none.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/post/content-video.php [new file with mode: 0644]
wp-content/themes/twentyseventeen/template-parts/post/content.php [new file with mode: 0644]
wp-includes/IXR/class-IXR-base64.php [new file with mode: 0644]
wp-includes/IXR/class-IXR-client.php [new file with mode: 0644]
wp-includes/IXR/class-IXR-clientmulticall.php [new file with mode: 0644]
wp-includes/IXR/class-IXR-date.php [new file with mode: 0644]
wp-includes/IXR/class-IXR-error.php [new file with mode: 0644]
wp-includes/IXR/class-IXR-introspectionserver.php [new file with mode: 0644]
wp-includes/IXR/class-IXR-message.php [new file with mode: 0644]
wp-includes/IXR/class-IXR-request.php [new file with mode: 0644]
wp-includes/IXR/class-IXR-server.php [new file with mode: 0644]
wp-includes/IXR/class-IXR-value.php [new file with mode: 0644]
wp-includes/admin-bar.php
wp-includes/atomlib.php
wp-includes/author-template.php
wp-includes/bookmark.php
wp-includes/cache.php
wp-includes/capabilities.php
wp-includes/category-template.php
wp-includes/category.php
wp-includes/class-IXR.php
wp-includes/class-feed.php
wp-includes/class-http.php
wp-includes/class-oembed.php
wp-includes/class-phpmailer.php
wp-includes/class-pop3.php
wp-includes/class-smtp.php
wp-includes/class-walker-comment.php
wp-includes/class-walker-nav-menu.php
wp-includes/class-walker-page.php
wp-includes/class-wp-ajax-response.php
wp-includes/class-wp-comment-query.php
wp-includes/class-wp-comment.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-section.php
wp-includes/class-wp-customize-setting.php
wp-includes/class-wp-customize-widgets.php
wp-includes/class-wp-dependency.php [new file with mode: 0644]
wp-includes/class-wp-editor.php
wp-includes/class-wp-embed.php
wp-includes/class-wp-error.php
wp-includes/class-wp-feed-cache-transient.php [new file with mode: 0644]
wp-includes/class-wp-feed-cache.php [new file with mode: 0644]
wp-includes/class-wp-hook.php [new file with mode: 0644]
wp-includes/class-wp-http-requests-hooks.php [new file with mode: 0644]
wp-includes/class-wp-http-requests-response.php
wp-includes/class-wp-http-response.php
wp-includes/class-wp-image-editor-imagick.php
wp-includes/class-wp-image-editor.php
wp-includes/class-wp-list-util.php [new file with mode: 0644]
wp-includes/class-wp-locale-switcher.php [new file with mode: 0644]
wp-includes/class-wp-locale.php
wp-includes/class-wp-matchesmapregex.php [new file with mode: 0644]
wp-includes/class-wp-network-query.php
wp-includes/class-wp-post-type.php
wp-includes/class-wp-post.php
wp-includes/class-wp-query.php [new file with mode: 0644]
wp-includes/class-wp-rewrite.php
wp-includes/class-wp-roles.php
wp-includes/class-wp-session-tokens.php [new file with mode: 0644]
wp-includes/class-wp-simplepie-file.php [new file with mode: 0644]
wp-includes/class-wp-simplepie-sanitize-kses.php [new file with mode: 0644]
wp-includes/class-wp-site-query.php
wp-includes/class-wp-site.php
wp-includes/class-wp-taxonomy.php [new file with mode: 0644]
wp-includes/class-wp-term-query.php
wp-includes/class-wp-term.php
wp-includes/class-wp-text-diff-renderer-inline.php [new file with mode: 0644]
wp-includes/class-wp-text-diff-renderer-table.php [new file with mode: 0644]
wp-includes/class-wp-theme.php
wp-includes/class-wp-user-meta-session-tokens.php [new file with mode: 0644]
wp-includes/class-wp-user-query.php
wp-includes/class-wp-user.php
wp-includes/class-wp-widget.php
wp-includes/class-wp-xmlrpc-server.php
wp-includes/class-wp.php
wp-includes/class.wp-dependencies.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/customize-preview-rtl.css [new file with mode: 0644]
wp-includes/css/customize-preview-rtl.min.css [new file with mode: 0644]
wp-includes/css/customize-preview.css
wp-includes/css/customize-preview.min.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/wp-embed-template.css
wp-includes/customize/class-wp-customize-background-image-control.php
wp-includes/customize/class-wp-customize-background-position-control.php [new file with mode: 0644]
wp-includes/customize/class-wp-customize-color-control.php
wp-includes/customize/class-wp-customize-custom-css-setting.php [new file with mode: 0644]
wp-includes/customize/class-wp-customize-header-image-control.php
wp-includes/customize/class-wp-customize-header-image-setting.php
wp-includes/customize/class-wp-customize-nav-menu-control.php
wp-includes/customize/class-wp-customize-nav-menu-item-control.php
wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
wp-includes/customize/class-wp-customize-nav-menu-setting.php
wp-includes/customize/class-wp-customize-new-menu-section.php
wp-includes/customize/class-wp-customize-selective-refresh.php
wp-includes/customize/class-wp-customize-theme-control.php
wp-includes/customize/class-wp-widget-area-customize-control.php
wp-includes/date.php
wp-includes/default-constants.php
wp-includes/default-filters.php
wp-includes/deprecated.php
wp-includes/embed.php
wp-includes/feed-atom-comments.php
wp-includes/feed-atom.php
wp-includes/feed-rdf.php
wp-includes/feed-rss.php
wp-includes/feed-rss2-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/autosave.js
wp-includes/js/autosave.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-preview-nav-menus.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.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-models.js
wp-includes/js/media-views.js
wp-includes/js/media-views.min.js
wp-includes/js/swfupload/swfupload.js
wp-includes/js/tinymce/plugins/charmap/plugin.js
wp-includes/js/tinymce/plugins/charmap/plugin.min.js
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/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/wpeditimage/plugin.js
wp-includes/js/tinymce/plugins/wpeditimage/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/wordpress/wp-content.css
wp-includes/js/tinymce/themes/inlite/theme.js
wp-includes/js/tinymce/themes/inlite/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.js
wp-includes/js/wp-ajax-response.js
wp-includes/js/wp-ajax-response.min.js
wp-includes/js/wp-api.js [new file with mode: 0644]
wp-includes/js/wp-api.min.js [new file with mode: 0644]
wp-includes/js/wp-custom-header.js [new file with mode: 0644]
wp-includes/js/wp-custom-header.min.js [new file with mode: 0644]
wp-includes/js/wp-embed.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-lists.js
wp-includes/js/wp-lists.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-files.php
wp-includes/ms-functions.php
wp-includes/ms-load.php
wp-includes/nav-menu-template.php
wp-includes/nav-menu.php
wp-includes/option.php
wp-includes/pluggable.php
wp-includes/plugin.php
wp-includes/pomo/mo.php
wp-includes/pomo/translations.php
wp-includes/post-template.php
wp-includes/post.php
wp-includes/query.php
wp-includes/rest-api.php
wp-includes/rest-api/class-wp-rest-request.php
wp-includes/rest-api/class-wp-rest-server.php
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php [new file with mode: 0644]
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php [new file with mode: 0644]
wp-includes/rest-api/endpoints/class-wp-rest-controller.php [new file with mode: 0644]
wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php [new file with mode: 0644]
wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php [new file with mode: 0644]
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php [new file with mode: 0644]
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php [new file with mode: 0644]
wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php [new file with mode: 0644]
wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php [new file with mode: 0644]
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php [new file with mode: 0644]
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php [new file with mode: 0644]
wp-includes/rest-api/fields/class-wp-rest-comment-meta-fields.php [new file with mode: 0644]
wp-includes/rest-api/fields/class-wp-rest-meta-fields.php [new file with mode: 0644]
wp-includes/rest-api/fields/class-wp-rest-post-meta-fields.php [new file with mode: 0644]
wp-includes/rest-api/fields/class-wp-rest-term-meta-fields.php [new file with mode: 0644]
wp-includes/rest-api/fields/class-wp-rest-user-meta-fields.php [new file with mode: 0644]
wp-includes/revision.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.php
wp-includes/update.php
wp-includes/user.php
wp-includes/version.php
wp-includes/widgets.php
wp-includes/widgets/class-wp-nav-menu-widget.php
wp-includes/widgets/class-wp-widget-tag-cloud.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
wp-trackback.php
xmlrpc.php

index 5a605dac3b4a5e52e5fec6e38d94adad98281dc5..9166e6203889fc0637eebfdc48a8b79d707eef66 100644 (file)
@@ -1,6 +1,6 @@
 WordPress - Web publishing software\r
 \r
-Copyright 2011-2017 by the contributors\r
+Copyright 2011-2016 by the contributors\r
 \r
 This program is free software; you can redistribute it and/or modify\r
 it under the terms of the GNU General Public License as published by\r
index c4dee1816493bb98f05673c65d80a8245c60bb9d..11a4ca1d408f303a1c9229a4830f5a089ed843dd 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.6.3
+       <br /> Version 4.7
 </h1>
 <p style="text-align: center">Semantic Personal Publishing Platform</p>
 
 
 <h3>Recommendations</h3>
 <ul>
-       <li><a href="https://secure.php.net/">PHP</a> version <strong>5.6</strong> or higher.</li>
+       <li><a href="https://secure.php.net/">PHP</a> version <strong>7</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 href="https://wordpress.org/news/2016/12/moving-toward-ssl/">HTTPS</a> support.</li>
        <li>A link to <a href="https://wordpress.org/">wordpress.org</a> on your site.</li>
 </ul>
 
index 0f6181a5d196c46765fa95f4d5a3a162f1f68c5c..b13279af6bb6d047cad1e94183ce33ed6e70b17f 100644 (file)
@@ -125,7 +125,7 @@ get_header( 'wp-activate' );
                                <?php
                        }
                } else {
-                       $url = isset( $result['blog_id'] ) ? get_blogaddress_by_id( (int) $result['blog_id'] ) : '';
+                       $url = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
                        $user = get_userdata( (int) $result['user_id'] );
                        ?>
                        <h2><?php _e('Your account is now active!'); ?></h2>
index 5cb979df2736486e8a3aee8e667e4e20a51218e7..555903bcdefe5e8cdd1250074d3f89eb5692ee82 100644 (file)
@@ -18,38 +18,23 @@ if ( ! wp_is_mobile() ) {
        ) );
 }
 
-/**
- * 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 ) {
-       $video_url = add_query_arg( 'defaultLangCode', $locale, $video_url );
+$video_url = 'https://videopress.com/embed/AHz0Ca46?hd=true';
+$lang_code = str_replace( '_', '-', get_user_locale() );
+list( $lang_code ) = explode( '-', $lang_code );
+if ( 'en' !== $lang_code ) {
+       $video_url = add_query_arg( 'defaultLangCode', $lang_code, $video_url );
 }
 
 $title = __( 'About' );
 
-list( $display_version ) = explode( '-', $wp_version );
+list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
 ?>
        <div class="wrap about-wrap">
                <h1><?php printf( __( 'Welcome to WordPress&nbsp;%s' ), $display_version ); ?></h1>
 
-               <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>
+               <p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s helps you get your site set up the way you want it.' ), $display_version ); ?></p>
                <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
                <h2 class="nav-tab-wrapper wp-clearfix">
@@ -58,154 +43,187 @@ 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( __( '<strong>Version %s</strong> addressed some security issues.' ), '4.6.3' ); ?>
-                               <?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.3' ); ?>
-                       </p>
-                       <p><?php printf( __( '<strong>Version %s</strong> addressed some security issues.' ), '4.6.2' ); ?>
-                               <?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.2' ); ?>
-                       </p>
-                       <p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
-                               '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 15 ), '4.6.1', number_format_i18n( 15 ) ); ?>
-                               <?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.1' ); ?>
-                       </p>
-               </div>
-
                <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>
+               <hr />
+
+               <div class="feature-section one-col">
+                       <h2><?php _e( 'Presenting Twenty Seventeen' ); ?></h2>
+                       <p class="lead-description"><?php _e( 'A brand new default theme brings your site to life with immersive featured images and video headers.' ); ?></p>
+                       <picture>
+                               <source media="(min-width: 450px)" srcset="https://s.w.org/images/core/4.7/twenty-seventeen-1600.jpg?v2 1600w, https://s.w.org/images/core/4.7/twenty-seventeen-493.jpg?v2 493w, https://s.w.org/images/core/4.7/twenty-seventeen-663.jpg?v2 663w, https://s.w.org/images/core/4.7/twenty-seventeen-804.jpg?v2 804w, https://s.w.org/images/core/4.7/twenty-seventeen-928.jpg?v2 928w, https://s.w.org/images/core/4.7/twenty-seventeen-1058.jpg?v2 1058w, https://s.w.org/images/core/4.7/twenty-seventeen-1173.jpg?v2 1173w, https://s.w.org/images/core/4.7/twenty-seventeen-1299.jpg?v2 1299w, https://s.w.org/images/core/4.7/twenty-seventeen-1410.jpg?v2 1410w, https://s.w.org/images/core/4.7/twenty-seventeen-1513.jpg?v2 1513w, https://s.w.org/images/core/4.7/twenty-seventeen-1595.jpg?v2 1595w" 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">
+                               <source srcset="https://s.w.org/images/core/4.7/twenty-seventeen-mobile-564.jpg?v2 564w, https://s.w.org/images/core/4.7/twenty-seventeen-mobile-280.jpg?v2 280w, https://s.w.org/images/core/4.7/twenty-seventeen-mobile-372.jpg?v2 372w, https://s.w.org/images/core/4.7/twenty-seventeen-mobile-454.jpg?v2 454w, https://s.w.org/images/core/4.7/twenty-seventeen-mobile-541.jpg?v2 541w" sizes="calc(100vw - 40px)">
+                               <img src="https://s.w.org/images/core/4.7/twenty-seventeen-1600.jpg?v2" srcset="https://s.w.org/images/core/4.7/twenty-seventeen-1600.jpg?v2 1600w, https://s.w.org/images/core/4.7/twenty-seventeen-280.jpg?v2 280w, https://s.w.org/images/core/4.7/twenty-seventeen-493.jpg?v2 493w, https://s.w.org/images/core/4.7/twenty-seventeen-663.jpg?v2 663w, https://s.w.org/images/core/4.7/twenty-seventeen-804.jpg?v2 804w, https://s.w.org/images/core/4.7/twenty-seventeen-928.jpg?v2 928w, https://s.w.org/images/core/4.7/twenty-seventeen-1058.jpg?v2 1058w, https://s.w.org/images/core/4.7/twenty-seventeen-1173.jpg?v2 1173w, https://s.w.org/images/core/4.7/twenty-seventeen-1299.jpg?v2 1299w, https://s.w.org/images/core/4.7/twenty-seventeen-1410.jpg?v2 1410w, https://s.w.org/images/core/4.7/twenty-seventeen-1513.jpg?v2 1513w, https://s.w.org/images/core/4.7/twenty-seventeen-1595.jpg?v2 1595w" 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" alt="" />
+                       </picture>
+                       <p><?php _e( 'Twenty Seventeen focuses on business sites and features a customizable front page with multiple sections. Personalize it with widgets, navigation, social menus, a logo, custom colors, and more. Our default theme for 2017 works great in many languages, on any device, and for a wide range of users.' ); ?></p>
+               </div>
+
+               <hr />
+
+               <div class="feature-section one-col">
+                       <h2><?php _e( 'Your Site, Your Way' ); ?></h2>
+                       <p class="lead-description"><?php _e( 'WordPress 4.7 adds new features to the customizer to help take you through the initial setup of a theme, with non-destructive live previews of all your changes in one uninterrupted workflow.' ); ?></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' );
+               <div class="feature-section two-col">
+                       <div class="col">
+                               <h3><?php _e( 'Theme Starter Content' ); ?></h3>
+                               <p><?php _e( 'To help give you a solid base to build from, individual themes can provide starter content that appears when you go to customize your brand new site. This can range from placing a business information widget in the best location to providing a sample menu with social icon links to a static front page complete with beautiful images. Don&#8217;t worry - nothing new will appear on the live site until you&#8217;re ready to save and publish your initial theme setup.' ); ?></p>
+                       </div>
+                       <div class="col">
+                               <?php
                                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',
+                                       'mp4'      => 'https://s.w.org/images/core/4.7/starter-content-v1.mp4',
+                                       'poster'   => 'https://s.w.org/images/core/4.7/starter-content.jpg?v2',
                                        'loop'     => true,
                                        'autoplay' => true,
-                                       'width'    => 1050,
-                                       'height'   => 630,
-                                       'class'    => 'wp-video-shortcode feature-video',
+                                       'width'    => 1140,
+                                       'height'   => 624,
+                                       // '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>
                </div>
 
-               <hr />
+               <div class="feature-section two-col">
+                       <div class="col">
+                               <h3><?php _e( 'Edit Shortcuts' ); ?></h3>
+                               <?php
+                               echo wp_video_shortcode( array(
+                                       'mp4'      => 'https://s.w.org/images/core/4.7/edit-shortcuts-v1.mp4',
+                                       'poster'   => 'https://s.w.org/images/core/4.7/edit-shortcuts.jpg?v2',
+                                       'loop'     => true,
+                                       'autoplay' => true,
+                                       'width'    => 2520,
+                                       'height'   => 1454,
+                                       // 'class'    => 'wp-video-shortcode feature-video',
+                               ) );
+                               ?>
+                               <p><?php _e( 'Visible icons appear to show you which parts of your site can be customized while live previewing. Click on a shortcut and get straight to editing. Paired with starter content, getting started with customizing your site is faster than ever.' );?></p>
+                       </div>
+                       <div class="col">
+                               <h3><?php _e( 'Video Headers' ); ?></h3>
+                               <?php
+                               echo wp_video_shortcode( array(
+                                       'mp4'      => 'https://s.w.org/images/core/4.7/header-video-v1.mp4',
+                                       'poster'   => 'https://s.w.org/images/core/4.7/header-video.jpg?v2',
+                                       'loop'     => true,
+                                       'autoplay' => true,
+                                       'width'    => 2520,
+                                       'height'   => 1454,
+                                       // 'class'    => 'wp-video-shortcode feature-video',
+                               ) );
+                               ?>
+                               <p><?php _e( 'Sometimes a big atmospheric video as a moving header image is just what you need to showcase your wares; go ahead and try it out with Twenty Seventeen. Need some video inspiration? Try searching for sites with video headers available for download and use.' ); ?></p>
+                       </div>
+               </div>
 
-               <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 class="feature-section two-col">
+                       <div class="col">
+                               <h3><?php _e( 'Smoother Menu Building' ); ?></h3>
+                               <img src="https://s.w.org/images/core/4.7/nav-menus-760.jpg?v2" srcset="https://s.w.org/images/core/4.7/nav-menus-760.jpg?v2 760w, https://s.w.org/images/core/4.7/nav-menus-280.jpg?v2 280w, https://s.w.org/images/core/4.7/nav-menus-536.jpg?v2 536w, https://s.w.org/images/core/4.7/nav-menus-745.jpg?v2 745w" 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" alt="" />
+                               <p><?php _e( 'Many menus for sites contain links to the pages of your site, but what happens when you don&#8217;t have any pages yet? Now you can add new pages while building menus instead of leaving the customizer and abandoning your changes. Once you&#8217;ve published your customizations, you&#8217;ll have new pages ready for you to fill with content.' );?></p>
+                       </div>
+                       <div class="col">
+                               <h3><?php _e( 'Custom CSS' ); ?></h3>
+                               <img src="https://s.w.org/images/core/4.7/css-760.jpg?v2" srcset="https://s.w.org/images/core/4.7/css-760.jpg?v2 760w, https://s.w.org/images/core/4.7/css-280.jpg?v2 280w, https://s.w.org/images/core/4.7/css-547.jpg?v2 547w" 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" alt="" />
+                               <p><?php _e( 'Sometimes you just need a few visual tweaks to make your site perfect. WordPress 4.7 allows you to add custom CSS and instantly see how your changes affect your site. The live preview allows you to work quickly without page refreshes slowing you down.' ); ?></p>
+                       </div>
                </div>
 
                <hr />
 
-               <div class="feature-section two-col">
-                       <h2><?php _e( 'Editor Improvements' ); ?></h2>
+               <div class="feature-section no-heading two-col">
                        <div class="col">
-                               <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>
+                               <h3><?php _e( 'PDF Thumbnail Previews' ); ?></h3>
+                               <img src="https://s.w.org/images/core/4.7/pdf-760.jpg?v2" srcset="https://s.w.org/images/core/4.7/pdf-760.jpg?v2 760w, https://s.w.org/images/core/4.7/pdf-280.jpg?v2 280w, https://s.w.org/images/core/4.7/pdf-412.jpg?v2 412w, https://s.w.org/images/core/4.7/pdf-516.jpg?v2 516w, https://s.w.org/images/core/4.7/pdf-615.jpg?v2 615w, https://s.w.org/images/core/4.7/pdf-716.jpg?v2 716w" 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" alt="" />
+                               <p><?php _e( 'Managing your document collection is easier with WordPress 4.7. Uploading PDFs will generate thumbnail images so you can more easily distinguish between all your documents.' ); ?></p>
                        </div>
                        <div class="col">
-                               <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>
+                               <h3><?php _e( 'Dashboard in your language' ); ?></h3>
+                               <img src="https://s.w.org/images/core/4.7/language-760.jpg?v2" srcset="https://s.w.org/images/core/4.7/language-760.jpg?v2 760w, https://s.w.org/images/core/4.7/language-280.jpg?v2 280w, https://s.w.org/images/core/4.7/language-568.jpg?v2 568w" 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" alt="" />
+                               <p><?php _e( 'Just because your site is in one language doesn&#8217;t mean that everybody helping manage it prefers that language for their admin. Add more languages to your site and a user language option will show up in your user&#8217;s profiles.' );?></p>
                        </div>
                </div>
 
                <hr />
 
+               <div class="rest-api feature-section one-col">
+                       <h2><?php _e( 'Introducing REST API Content Endpoints' ); ?></h2>
+                       <p class="lead-description"><?php _e( 'WordPress 4.7 comes with REST API endpoints for posts, comments, terms, users, meta, and settings.' ); ?></p>
+                       <img src="https://s.w.org/images/core/4.7/api-1559.jpg?v2" srcset="https://s.w.org/images/core/4.7/api-2100.jpg?v2 2100w, https://s.w.org/images/core/4.7/api-280.jpg?v2 280w, https://s.w.org/images/core/4.7/api-1034.jpg?v2 1034w, https://s.w.org/images/core/4.7/api-1559.jpg?v2 1559w, https://s.w.org/images/core/4.7/api-2032.jpg?v2 2032w" 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" alt="" />
+                       <p><?php
+                               printf(
+                                       /* translators: %s: https://developer.wordpress.org/rest-api/  */
+                                       __( 'Content endpoints provide machine-readable external access to your WordPress site with a clear, standards-driven interface, paving the way for new and innovative methods of interacting with sites through plugins, themes, apps, and beyond. Ready to get started with development? <a href="%s">Check out the REST API reference.</a>' ),
+                                       'https://developer.wordpress.org/rest-api/reference/'
+                               );
+                       ?></p>
+               </div>
+
+               <hr />
+
                <div class="changelog">
-                       <h2><?php _e( 'Under the Hood' ); ?></h2>
+                       <h2><?php
+                               printf(
+                                       /* translators: %s: smiling face with smiling eyes emoji */
+                                       __( 'Even More Developer Happiness %s' ),
+                                       '&#x1F60A'
+                               );
+                       ?></h2>
 
                        <div class="under-the-hood three-col">
                                <div class="col">
-                                       <h3><?php _e( 'Resource Hints' ); ?></h3>
-                                       <p><?php
-                                               printf(
-                                                       /* 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/'
-                                               );
-                                       ?></p>
-                               </div>
-                               <div class="col">
-                                       <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>
+                                       <h3><a href="https://make.wordpress.org/core/2016/11/03/post-type-templates-in-4-7/"><?php _e( 'Post Type Templates' ); ?></a></h3>
+                                       <p><?php _e( 'By opening up the page template functionality to all post types, theme developers have even more flexibility with the WordPress template hierarchy.' ); ?></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>
+                                       <h3><?php _e( 'More Theme API Goodies' ); ?></h3>
                                        <p><?php
                                                printf(
-                                                       /* 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>'
+                                                       /* translators: %s: https://make.wordpress.org/core/2016/09/09/new-functions-hooks-and-behaviour-for-theme-developers-in-wordpress-4-7/  */
+                                                       __( 'WordPress 4.7 includes <a href="%s">new functions, hooks, and behavior</a> for theme developers.' ),
+                                                       'https://make.wordpress.org/core/2016/09/09/new-functions-hooks-and-behaviour-for-theme-developers-in-wordpress-4-7/'
                                                );
                                        ?></p>
                                </div>
+                               <div class="col">
+                                       <h3><a href="https://make.wordpress.org/core/2016/10/04/custom-bulk-actions/"><?php _e( 'Custom Bulk Actions' ); ?></a></h3>
+                                       <p><?php _e( 'List tables, now with more than bulk edit and delete.' ); ?></p>
+                               </div>
                        </div>
 
                        <div class="under-the-hood three-col">
                                <div class="col">
-                                       <h3><?php _e( 'Meta Registration API' ); ?></h3>
+                                       <h3><a href="https://make.wordpress.org/core/2016/09/08/wp_hook-next-generation-actions-and-filters/"><code>WP_Hook</code></a></h3>
                                        <p><?php
                                                printf(
-                                                       /* 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/'
+                                                       /* translators: %s: https://make.wordpress.org/core/2016/09/08/wp_hook-next-generation-actions-and-filters/  */
+                                                       __( 'The code that lies beneath actions and filters has been overhauled and modernized, fixing bugs along the way.' ),
+                                                       'https://make.wordpress.org/core/2016/09/08/wp_hook-next-generation-actions-and-filters/'
                                                );
                                        ?></p>
                                </div>
                                <div class="col">
-                                       <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>
+                                       <h3><?php _e( 'Settings Registration API' ); ?></h3>
                                        <p><?php
                                                printf(
-                                                       /* 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>'
+                                                       /* translators: 1: register_setting(), 2: https://make.wordpress.org/core/2016/10/26/registering-your-settings-in-wordpress-4-7/ */
+                                                       __( '%1$s <a href="%2$s">has been enhanced</a> to include type, description, and REST API visibility.' ),
+                                                       '<code>register_setting()</code>',
+                                                       'https://make.wordpress.org/core/2016/10/26/registering-your-settings-in-wordpress-4-7/'
                                                );
                                        ?></p>
                                </div>
+                               <div class="col">
+                                       <h3><a href="https://make.wordpress.org/core/2016/10/12/customize-changesets-technical-design-decisions/"><?php _e( 'Customize Changesets' ); ?></a></h3>
+                                       <p><?php _e( 'Customize changesets make changes in the customizer persistent, like autosave drafts. They also make exciting new features like starter content possible.' ); ?></p>
+                               </div>
                        </div>
+
                </div>
 
                <hr />
index f32ce07eaa12bd1a862f3149ab3b5d46f57ffe99..111d4d239025a5254f354528b62130524622ef7e 100644 (file)
@@ -83,7 +83,7 @@ do_action( 'admin_footer', '' );
  *
  * @param string $hook_suffix The current admin page.
  */
-do_action( "admin_print_footer_scripts-$hook_suffix" );
+do_action( "admin_print_footer_scripts-{$hook_suffix}" );
 
 /**
  * Prints any scripts and data queued for the footer.
@@ -103,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-$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 17dc162b73bebe3b88342501fb23a11415cf457a..d5ceeccd61bbc49c196aa29ea600ffd3b5d17699 100644 (file)
@@ -18,12 +18,11 @@ if ( ! defined( 'WP_ADMIN' ) )
  * @global WP_Screen $current_screen
  * @global WP_Locale $wp_locale
  * @global string    $pagenow
- * @global string    $wp_version
  * @global string    $update_title
  * @global int       $total_update_count
  * @global string    $parent_file
  */
-global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version,
+global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow,
        $update_title, $total_update_count, $parent_file;
 
 // Catch plugins that include admin-header.php before admin.php completes.
@@ -33,17 +32,23 @@ if ( empty( $current_screen ) )
 get_admin_page_title();
 $title = esc_html( strip_tags( $title ) );
 
-if ( is_network_admin() )
-       $admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_current_site()->site_name ) );
-elseif ( is_user_admin() )
-       $admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_current_site()->site_name ) );
-else
+if ( is_network_admin() ) {
+       /* translators: Network admin screen title. 1: Network name */
+       $admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_network()->site_name ) );
+} elseif ( is_user_admin() ) {
+       /* translators: User dashboard screen title. 1: Network name */
+       $admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) );
+} else {
        $admin_title = get_bloginfo( 'name' );
+}
 
-if ( $admin_title == $title )
+if ( $admin_title == $title ) {
+       /* translators: Admin screen title. 1: Admin screen name */
        $admin_title = sprintf( __( '%1$s &#8212; WordPress' ), $title );
-else
+} else {
+       /* translators: Admin screen title. 1: Admin screen name, 2: Network or site name */
        $admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $admin_title );
+}
 
 /**
  * Filters the title tag content for an admin page.
@@ -96,7 +101,7 @@ do_action( 'admin_enqueue_scripts', $hook_suffix );
  *
  * @since 2.6.0
  */
-do_action( "admin_print_styles-$hook_suffix" );
+do_action( "admin_print_styles-{$hook_suffix}" );
 
 /**
  * Fires when styles are printed for all admin pages.
@@ -110,7 +115,7 @@ do_action( 'admin_print_styles' );
  *
  * @since 2.1.0
  */
-do_action( "admin_print_scripts-$hook_suffix" );
+do_action( "admin_print_scripts-{$hook_suffix}" );
 
 /**
  * Fires when scripts are printed for all admin pages.
@@ -127,7 +132,7 @@ do_action( 'admin_print_scripts' );
  *
  * @since 2.1.0
  */
-do_action( "admin_head-$hook_suffix" );
+do_action( "admin_head-{$hook_suffix}" );
 
 /**
  * Fires in head section for all admin pages.
@@ -154,10 +159,10 @@ if ( $current_screen->post_type )
 if ( $current_screen->taxonomy )
        $admin_body_class .= ' taxonomy-' . $current_screen->taxonomy;
 
-$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) );
-$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) );
+$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( get_bloginfo( 'version' ) ) );
+$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', get_bloginfo( 'version' ) ) );
 $admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
-$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
+$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
 
 if ( wp_is_mobile() )
        $admin_body_class .= ' mobile';
index ad341c888065bb81e679308441cee5fd16f9549a..2dd315daf9d43c098d1fd7cc14c08885429c09ca 100644 (file)
@@ -209,7 +209,7 @@ if ( isset($plugin_page) ) {
                 *
                 * @since 2.1.0
                 */
-               do_action( 'load-' . $page_hook );
+               do_action( "load-{$page_hook}" );
                if (! isset($_GET['noheader']))
                        require_once(ABSPATH . 'wp-admin/admin-header.php');
 
@@ -239,7 +239,7 @@ if ( isset($plugin_page) ) {
                 *
                 * @since 1.5.0
                 */
-               do_action( 'load-' . $plugin_page );
+               do_action( "load-{$plugin_page}" );
 
                if ( !isset($_GET['noheader']))
                        require_once(ABSPATH . 'wp-admin/admin-header.php');
@@ -278,7 +278,7 @@ if ( isset($plugin_page) ) {
         *
         * @since 3.5.0
         */
-       do_action( 'load-importer-' . $importer );
+       do_action( "load-importer-{$importer}" );
 
        $parent_file = 'tools.php';
        $submenu_file = 'import.php';
@@ -326,7 +326,7 @@ if ( isset($plugin_page) ) {
         *
         * @since 2.1.0
         */
-       do_action( 'load-' . $pagenow );
+       do_action( "load-{$pagenow}" );
 
        /*
         * The following hooks are fired to ensure backward compatibility.
index aa2e0543614c4d54d6450cd6069789cdd4c66d82..c2eca11ec3b14506b314a72ff64e5bc1eea171fd 100644 (file)
@@ -48,8 +48,8 @@ case 'editcomment' :
 
        get_current_screen()->set_help_sidebar(
        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments" target="_blank">Documentation on Comments</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
+       '<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments">Documentation on Comments</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
        );
 
        wp_enqueue_script('comment');
@@ -213,7 +213,7 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
 <th scope="row"><?php /* translators: field name in comment form */ _ex('Comment', 'noun'); ?></th>
 <td class="comment-content">
        <?php comment_text( $comment ); ?>
-       <p class="edit-comment"><a href="<?php echo admin_url( "comment.php?action=editcomment&amp;c={$comment->comment_ID}" ); ?>"><?php esc_attr_e( 'Edit' ); ?></a></p>
+       <p class="edit-comment"><a href="<?php echo admin_url( "comment.php?action=editcomment&amp;c={$comment->comment_ID}" ); ?>"><?php esc_html_e( 'Edit' ); ?></a></p>
 </td>
 </tr>
 </table>
@@ -222,7 +222,7 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
 
 <p>
        <?php submit_button( $button, 'primary', 'submit', false ); ?>
-       <a href="<?php echo admin_url('edit-comments.php'); ?>" class="button-cancel"><?php esc_attr_e( 'Cancel' ); ?></a>
+       <a href="<?php echo admin_url('edit-comments.php'); ?>" class="button-cancel"><?php esc_html_e( 'Cancel' ); ?></a>
 </p>
 
 <?php wp_nonce_field( $nonce_action ); ?>
index 3f5afc9ee78d9c4269d9c38bebe19471ab5eaacd..5938e9513cea18a4d31f993de5e5e298685bf596 100644 (file)
@@ -12,7 +12,7 @@ require_once( dirname( __FILE__ ) . '/includes/credits.php' );
 
 $title = __( 'Credits' );
 
-list( $display_version ) = explode( '-', $wp_version );
+list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
 ?>
@@ -20,7 +20,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
-<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>
+<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s helps you get your site set up the way you want it.' ), $display_version ); ?></p>
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
index d9a3aa19217bba9090757366cd72e208474490fa..75bfc4b814bfaf8916f2a21f0fe7909fc4149d8d 100644 (file)
@@ -40,6 +40,7 @@
        max-width: 100%;
        height: auto;
        vertical-align: middle;
+       border: 1px solid rgba(0, 0, 0, 0.1);
 }
 
 .about-wrap .jetpack-video-wrapper {
@@ -93,7 +94,7 @@
 }
 
 .about-wrap .feature-section p {
-       max-width: 38em;
+       max-width: 55em;
        margin-right: auto;
        margin-left: auto;
 }
 }
 
 .about-wrap h2 {
-       margin: 50px 0 1em;
-       font-size: 1.8em;
+       margin: 40px 0 .6em;
+       font-size: 2.7em;
        line-height: 1.3;
        font-weight: 300;
        text-align: center;
 
 .about-wrap h3 {
        margin: 1.25em 0 .6em;
-       font-size: 1.25em;
+       font-size: 1.4em;
        line-height: 1.5;
 }
 
        color: #23282d;
 }
 
+.about-wrap .changelog h2 {
+       font-size: 1.4em;
+       font-weight: 600;
+       text-align: right;
+}
+
 .about-wrap .changelog h3 {
        margin: 1.33em 0;
        font-size: 1em;
        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;
 }
 
 /* 2.1 - Typography */
 
-.about-wrap .headline-feature h2 {
-       margin: 30px 0 30px;
-       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 .feature-section.two-col h3 {
        margin-top: 0;
 }
        margin-top: 0.6em;
 }
 
+.about-wrap .lead-description {
+       font-size: 1.5em;
+       text-align: center;
+}
+
 .about-wrap .two-col-text {
        -webkit-column-count: 2;
        -moz-column-count: 2;
        padding: 0 0 40px;
 }
 
+.about-wrap .feature-section.no-heading {
+       padding-top: 35px;
+}
+
 .about-wrap .headline-feature {
        margin: 0 auto;
        max-width: 80%;
        overflow: hidden;
 }
 
+.about-wrap .feature-section img {
+       margin-bottom: 1em;
+}
+
 .about-wrap .embed-container {
        text-align: center;
 }
index 899570bb10bc471cfffe59bd62bfc29a9a0d6b52..18931613b2e084b6f7a620e6516a4c209cb621fa 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.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
+.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;border:1px solid rgba(0,0,0,.1)}.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:55em;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:40px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.about-wrap h3{margin:1.25em 0 .6em;font-size:1.4em;line-height:1.5}.about-wrap h4{color:#23282d}.about-wrap .changelog h2{font-size:1.4em;font-weight:600;text-align:right}.about-wrap .embed-container,.about-wrap .featured-image,.about-wrap .lead-description{text-align:center}.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 .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 .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 .lead-description{font-size:1.5em}.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 .feature-section.no-heading{padding-top:35px}.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 .feature-section img{margin-bottom:1em}.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 8995e031e15fe9a029e7c91ea8de98233d460b0d..2dc72f53a605d539e8c13d97d036dc193a4a7679 100644 (file)
@@ -40,6 +40,7 @@
        max-width: 100%;
        height: auto;
        vertical-align: middle;
+       border: 1px solid rgba(0, 0, 0, 0.1);
 }
 
 .about-wrap .jetpack-video-wrapper {
@@ -93,7 +94,7 @@
 }
 
 .about-wrap .feature-section p {
-       max-width: 38em;
+       max-width: 55em;
        margin-left: auto;
        margin-right: auto;
 }
 }
 
 .about-wrap h2 {
-       margin: 50px 0 1em;
-       font-size: 1.8em;
+       margin: 40px 0 .6em;
+       font-size: 2.7em;
        line-height: 1.3;
        font-weight: 300;
        text-align: center;
 
 .about-wrap h3 {
        margin: 1.25em 0 .6em;
-       font-size: 1.25em;
+       font-size: 1.4em;
        line-height: 1.5;
 }
 
        color: #23282d;
 }
 
+.about-wrap .changelog h2 {
+       font-size: 1.4em;
+       font-weight: 600;
+       text-align: left;
+}
+
 .about-wrap .changelog h3 {
        margin: 1.33em 0;
        font-size: 1em;
        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;
 }
 
 /* 2.1 - Typography */
 
-.about-wrap .headline-feature h2 {
-       margin: 30px 0 30px;
-       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 .feature-section.two-col h3 {
        margin-top: 0;
 }
        margin-top: 0.6em;
 }
 
+.about-wrap .lead-description {
+       font-size: 1.5em;
+       text-align: center;
+}
+
 .about-wrap .two-col-text {
        -webkit-column-count: 2;
        -moz-column-count: 2;
        padding: 0 0 40px;
 }
 
+.about-wrap .feature-section.no-heading {
+       padding-top: 35px;
+}
+
 .about-wrap .headline-feature {
        margin: 0 auto;
        max-width: 80%;
        overflow: hidden;
 }
 
+.about-wrap .feature-section img {
+       margin-bottom: 1em;
+}
+
 .about-wrap .embed-container {
        text-align: center;
 }
index 7bcbe5fc638b0de3a74c17dc00842cdabfe1a857..4488c0c00862e544fe7918258e7825e3be98133a 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.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
+.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;border:1px solid rgba(0,0,0,.1)}.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:55em;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:40px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.about-wrap h3{margin:1.25em 0 .6em;font-size:1.4em;line-height:1.5}.about-wrap h4{color:#23282d}.about-wrap .changelog h2{font-size:1.4em;font-weight:600;text-align:left}.about-wrap .embed-container,.about-wrap .featured-image,.about-wrap .lead-description{text-align:center}.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 .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 .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 .lead-description{font-size:1.5em}.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 .feature-section.no-heading{padding-top:35px}.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 .feature-section img{margin-bottom:1em}.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 ac231f9cb94dfd574859141536dd034687564d9d..09f9dd023d9a8e0eeaccad55cab247b67a4bb9dd 100644 (file)
 .folded #adminmenu .wp-has-current-submenu.opensub .wp-submenu,
 .folded #adminmenu a.menu-top:focus + .wp-submenu,
 .folded #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu,
-.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu  {
+.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu {
        top: 0;
        right: 36px;
 }
@@ -547,79 +547,82 @@ ul#adminmenu > li.current > a.current:after {
        display: none;
 }
 
-#collapse-menu {
-       font-size: 13px;
+#collapse-button {
+       display: block;
+       width: 100%;
+       height: 34px;
+       margin: 0;
+       border: none;
+       padding: 0;
+       position: relative;
+       overflow: visible;
        line-height: 34px;
-       margin-top: 10px;
-       color: #a0a5aa;
-       color: rgba(240,245,250,0.6);
-       -webkit-transition: all .1s ease-in-out;
-       transition: all .1s ease-in-out;
+       background: none;
+       color: #aaa;
+       cursor: pointer;
+       outline: 0;
 }
 
-#collapse-menu:hover,
-#collapse-menu:hover #collapse-button div:after {
+#collapse-button:hover,
+#collapse-button:focus {
        color: #00b9eb;
 }
 
-.folded #collapse-menu span {
-       display: none;
+#collapse-button .collapse-button-icon,
+#collapse-button .collapse-button-label {
+       /* absolutely positioned to avoid 1px shift in IE when button is pressed */
+       display: block;
+       position: absolute;
+       top: 0;
+       right: 0;
+       line-height: 34px;
 }
 
-#collapse-button,
-#collapse-button div {
-       width: 15px;
-       height: 15px;
+#collapse-button .collapse-button-icon {
+       width: 36px;
+       height: 34px;
 }
 
-#collapse-button {
-       float: right;
-       height: 15px;
-       margin: 10px 11px 10px 8px;
-       width: 15px;
-       -webkit-border-radius: 10px;
-       border-radius: 10px;
+#collapse-button .collapse-button-label {
+       padding: 0 36px 0 0;
 }
 
-#wpwrap #collapse-button div {
-       padding: 0;
+.folded #collapse-button .collapse-button-label {
+       display: none;
 }
 
-#collapse-button div:after {
+#collapse-button .collapse-button-icon:after {
        content: "\f148";
        display: block;
-       line-height: 15px;
-       right: -3px;
-       top: -3px;
-       color: #a0a5aa;
-       color: rgba(240,245,250,0.6);
-       font: normal 20px/1 dashicons !important;
-       speak: none;
-       margin: 0 auto;
-       padding: 0 !important;
        position: relative;
+       top: 7px;
        text-align: center;
-       width: 20px;
-       -webkit-transition: all .1s ease-in-out;
-       transition: all .1s ease-in-out;
+       font: normal 20px/1 dashicons !important;
+       speak: none;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
 }
 
 /* rtl:ignore */
-.folded #collapse-button div:after,
-.rtl #collapse-button div:after {
+.folded #collapse-button .collapse-button-icon:after,
+.rtl #collapse-button .collapse-button-icon:after {
        -webkit-transform: rotate(180deg);
        -ms-transform: rotate(180deg);
        transform: rotate(180deg);
 }
 
-.rtl.folded #collapse-button div:after {
+.rtl.folded #collapse-button .collapse-button-icon:after {
        -webkit-transform: none;
        -ms-transform: none;
        transform: none;
 }
 
+#collapse-button .collapse-button-icon:after,
+#collapse-button .collapse-button-label {
+       -webkit-transition: all .1s ease-in-out;
+       transition: all .1s ease-in-out;
+}
+
 /**
  * Toolbar menu toggle
  */
@@ -652,7 +655,7 @@ li#wp-admin-bar-menu-toggle {
        .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,
        .auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu,
        .auto-fold #adminmenu a.menu-top:focus + .wp-submenu,
-       .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu  {
+       .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu {
                top: 0px;
                right: 36px;
        }
@@ -731,22 +734,18 @@ li#wp-admin-bar-menu-toggle {
                z-index: 10000;
        }
 
-       .auto-fold #collapse-menu span {
+       .auto-fold #collapse-menu .collapse-button-label {
                display: none;
        }
 
-       .auto-fold #collapse-button div {
-               background: none;
-       }
-
        /* rtl:ignore */
-       .auto-fold #collapse-button div:after {
+       .auto-fold #collapse-button .collapse-button-icon:after {
                -webkit-transform: rotate(180deg);
                -ms-transform: rotate(180deg);
                transform: rotate(180deg);
        }
 
-       .rtl.auto-fold #collapse-button div:after {
+       .rtl.auto-fold #collapse-button .collapse-button-icon:after {
                -webkit-transform: none;
                -ms-transform: none;
                transform: none;
index 4a51af5ba11e485a06c538f42b2ed96922195169..0ec7756cd6961c431a3a774e5df9bed642a3127a 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:"\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
+#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}#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 a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod{background-color:#00b9eb;color:#fff}#adminmenu li span.count-0{display:none}#collapse-button{display:block;width:100%;height:34px;margin:0;border:none;padding:0;position:relative;overflow:visible;line-height:34px;background:0 0;color:#aaa;cursor:pointer;outline:0}#collapse-button:focus,#collapse-button:hover{color:#00b9eb}#collapse-button .collapse-button-icon,#collapse-button .collapse-button-label{display:block;position:absolute;top:0;right:0;line-height:34px}#collapse-button .collapse-button-icon{width:36px;height:34px}#collapse-button .collapse-button-label{padding:0 36px 0 0}.folded #collapse-button .collapse-button-label{display:none}#collapse-button .collapse-button-icon:after{content:"\f148";display:block;position:relative;top:7px;text-align:center;font:400 20px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.folded #collapse-button .collapse-button-icon:after,.rtl #collapse-button .collapse-button-icon:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.folded #collapse-button .collapse-button-icon:after{-webkit-transform:none;-ms-transform:none;transform:none}#collapse-button .collapse-button-icon:after,#collapse-button .collapse-button-label{-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.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 .collapse-button-label{display:none}.auto-fold #collapse-button .collapse-button-icon:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.auto-fold #collapse-button .collapse-button-icon: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 2d556378b1b44d09bab82811bc18357c939e7d90..74b922ec47e55ad0c328c2c2126169e458a3f05e 100644 (file)
 .folded #adminmenu .wp-has-current-submenu.opensub .wp-submenu,
 .folded #adminmenu a.menu-top:focus + .wp-submenu,
 .folded #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu,
-.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu  {
+.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu {
        top: 0;
        left: 36px;
 }
@@ -547,79 +547,82 @@ ul#adminmenu > li.current > a.current:after {
        display: none;
 }
 
-#collapse-menu {
-       font-size: 13px;
+#collapse-button {
+       display: block;
+       width: 100%;
+       height: 34px;
+       margin: 0;
+       border: none;
+       padding: 0;
+       position: relative;
+       overflow: visible;
        line-height: 34px;
-       margin-top: 10px;
-       color: #a0a5aa;
-       color: rgba(240,245,250,0.6);
-       -webkit-transition: all .1s ease-in-out;
-       transition: all .1s ease-in-out;
+       background: none;
+       color: #aaa;
+       cursor: pointer;
+       outline: 0;
 }
 
-#collapse-menu:hover,
-#collapse-menu:hover #collapse-button div:after {
+#collapse-button:hover,
+#collapse-button:focus {
        color: #00b9eb;
 }
 
-.folded #collapse-menu span {
-       display: none;
+#collapse-button .collapse-button-icon,
+#collapse-button .collapse-button-label {
+       /* absolutely positioned to avoid 1px shift in IE when button is pressed */
+       display: block;
+       position: absolute;
+       top: 0;
+       left: 0;
+       line-height: 34px;
 }
 
-#collapse-button,
-#collapse-button div {
-       width: 15px;
-       height: 15px;
+#collapse-button .collapse-button-icon {
+       width: 36px;
+       height: 34px;
 }
 
-#collapse-button {
-       float: left;
-       height: 15px;
-       margin: 10px 8px 10px 11px;
-       width: 15px;
-       -webkit-border-radius: 10px;
-       border-radius: 10px;
+#collapse-button .collapse-button-label {
+       padding: 0 0 0 36px;
 }
 
-#wpwrap #collapse-button div {
-       padding: 0;
+.folded #collapse-button .collapse-button-label {
+       display: none;
 }
 
-#collapse-button div:after {
+#collapse-button .collapse-button-icon:after {
        content: "\f148";
        display: block;
-       line-height: 15px;
-       left: -3px;
-       top: -3px;
-       color: #a0a5aa;
-       color: rgba(240,245,250,0.6);
-       font: normal 20px/1 dashicons !important;
-       speak: none;
-       margin: 0 auto;
-       padding: 0 !important;
        position: relative;
+       top: 7px;
        text-align: center;
-       width: 20px;
-       -webkit-transition: all .1s ease-in-out;
-       transition: all .1s ease-in-out;
+       font: normal 20px/1 dashicons !important;
+       speak: none;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
 }
 
 /* rtl:ignore */
-.folded #collapse-button div:after,
-.rtl #collapse-button div:after {
+.folded #collapse-button .collapse-button-icon:after,
+.rtl #collapse-button .collapse-button-icon:after {
        -webkit-transform: rotate(180deg);
        -ms-transform: rotate(180deg);
        transform: rotate(180deg);
 }
 
-.rtl.folded #collapse-button div:after {
+.rtl.folded #collapse-button .collapse-button-icon:after {
        -webkit-transform: none;
        -ms-transform: none;
        transform: none;
 }
 
+#collapse-button .collapse-button-icon:after,
+#collapse-button .collapse-button-label {
+       -webkit-transition: all .1s ease-in-out;
+       transition: all .1s ease-in-out;
+}
+
 /**
  * Toolbar menu toggle
  */
@@ -652,7 +655,7 @@ li#wp-admin-bar-menu-toggle {
        .auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,
        .auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu,
        .auto-fold #adminmenu a.menu-top:focus + .wp-submenu,
-       .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu  {
+       .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu {
                top: 0px;
                left: 36px;
        }
@@ -731,22 +734,18 @@ li#wp-admin-bar-menu-toggle {
                z-index: 10000;
        }
 
-       .auto-fold #collapse-menu span {
+       .auto-fold #collapse-menu .collapse-button-label {
                display: none;
        }
 
-       .auto-fold #collapse-button div {
-               background: none;
-       }
-
        /* rtl:ignore */
-       .auto-fold #collapse-button div:after {
+       .auto-fold #collapse-button .collapse-button-icon:after {
                -webkit-transform: rotate(180deg);
                -ms-transform: rotate(180deg);
                transform: rotate(180deg);
        }
 
-       .rtl.auto-fold #collapse-button div:after {
+       .rtl.auto-fold #collapse-button .collapse-button-icon:after {
                -webkit-transform: none;
                -ms-transform: none;
                transform: none;
index 649eda8f8ec0c780fdd8bffd3579b8e062a5e973..4db4daae8f08a84efd51f46a4ddc049a71acda55 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:"\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
+#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}#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 a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod{background-color:#00b9eb;color:#fff}#adminmenu li span.count-0{display:none}#collapse-button{display:block;width:100%;height:34px;margin:0;border:none;padding:0;position:relative;overflow:visible;line-height:34px;background:0 0;color:#aaa;cursor:pointer;outline:0}#collapse-button:focus,#collapse-button:hover{color:#00b9eb}#collapse-button .collapse-button-icon,#collapse-button .collapse-button-label{display:block;position:absolute;top:0;left:0;line-height:34px}#collapse-button .collapse-button-icon{width:36px;height:34px}#collapse-button .collapse-button-label{padding:0 0 0 36px}.folded #collapse-button .collapse-button-label{display:none}#collapse-button .collapse-button-icon:after{content:"\f148";display:block;position:relative;top:7px;text-align:center;font:400 20px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.folded #collapse-button .collapse-button-icon:after,.rtl #collapse-button .collapse-button-icon:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.folded #collapse-button .collapse-button-icon:after{-webkit-transform:none;-ms-transform:none;transform:none}#collapse-button .collapse-button-icon:after,#collapse-button .collapse-button-label{-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.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 .collapse-button-label{display:none}.auto-fold #collapse-button .collapse-button-icon:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.auto-fold #collapse-button .collapse-button-icon: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 b502a0fd04539b46370c11614113c594fbf652fe..b69714f49171d91b9922dcbe638b80b0c4a18885 100644 (file)
        border-color: #c00;
        color: #000;
 }
+
+.iris-picker .ui-square-handle:focus,
+.iris-picker .iris-strip .ui-slider-handle: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);
+}
\ No newline at end of file
index f14e2407a4d3142c0faa1cedfd2973fa2ad101cf..62d1055c211ed52d212f1dcafc86b2f5d03e1ea4 100644 (file)
@@ -1 +1 @@
-.wp-color-picker{width:80px}.wp-picker-container .hidden{display:none}.wp-color-result{background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;cursor:pointer;height:22px;margin:0 0 6px 6px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:bottom;display:inline-block;padding-right:30px;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc;top:0}.wp-color-result:after{background:#f7f7f7;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px;border-right:1px solid #ccc;color:#555;content:attr(title);display:block;font-size:11px;line-height:22px;padding:0 6px;position:relative;left:0;text-align:center;top:0}.wp-color-result:focus,.wp-color-result:hover{background:#fafafa;border-color:#999;color:#23282d}.wp-color-result:focus:after,.wp-color-result:hover:after{color:#23282d;border-color:#a0a5aa;border-right:1px solid #999}.wp-color-result.wp-picker-open:after{content:attr(data-current)}.wp-picker-container,.wp-picker-container:active{display:inline-block;outline:0}.wp-color-result: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)}.wp-picker-open+.wp-picker-input-wrap{display:inline-block;vertical-align:top}.wp-picker-container .button{margin-right:6px}.wp-picker-container .iris-square-slider .ui-slider-handle:focus{background-color:#555}.wp-picker-container .iris-picker{-webkit-border-radius:0;border-radius:0;border-color:#ddd;margin-top:6px}.wp-picker-container input[type=text].wp-color-picker{width:65px;font-size:12px;font-family:monospace;line-height:16px;margin:0}.wp-color-picker::-webkit-input-placeholder{color:#72777c}.wp-color-picker::-moz-placeholder{color:#72777c;opacity:1}.wp-color-picker:-ms-input-placeholder{color:#72777c}.wp-picker-container input[type=text].iris-error{background-color:#ffebe8;border-color:#c00;color:#000}
\ No newline at end of file
+.wp-color-picker{width:80px}.wp-picker-container .hidden{display:none}.wp-color-result{background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;cursor:pointer;height:22px;margin:0 0 6px 6px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:bottom;display:inline-block;padding-right:30px;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc;top:0}.wp-color-result:after{background:#f7f7f7;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px;border-right:1px solid #ccc;color:#555;content:attr(title);display:block;font-size:11px;line-height:22px;padding:0 6px;position:relative;left:0;text-align:center;top:0}.wp-color-result:focus,.wp-color-result:hover{background:#fafafa;border-color:#999;color:#23282d}.wp-color-result:focus:after,.wp-color-result:hover:after{color:#23282d;border-color:#a0a5aa;border-right:1px solid #999}.wp-color-result.wp-picker-open:after{content:attr(data-current)}.wp-picker-container,.wp-picker-container:active{display:inline-block;outline:0}.wp-color-result: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)}.wp-picker-open+.wp-picker-input-wrap{display:inline-block;vertical-align:top}.wp-picker-container .button{margin-right:6px}.wp-picker-container .iris-square-slider .ui-slider-handle:focus{background-color:#555}.wp-picker-container .iris-picker{-webkit-border-radius:0;border-radius:0;border-color:#ddd;margin-top:6px}.wp-picker-container input[type=text].wp-color-picker{width:65px;font-size:12px;font-family:monospace;line-height:16px;margin:0}.wp-color-picker::-webkit-input-placeholder{color:#72777c}.wp-color-picker::-moz-placeholder{color:#72777c;opacity:1}.wp-color-picker:-ms-input-placeholder{color:#72777c}.wp-picker-container input[type=text].iris-error{background-color:#ffebe8;border-color:#c00;color:#000}.iris-picker .iris-strip .ui-slider-handle:focus,.iris-picker .ui-square-handle: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)}
\ No newline at end of file
index 50edbdadf571425738de2632d1eb637e241bc84a..baa1d94c830ea5d8216fec831df9fd4ba98c4980 100644 (file)
        border-color: #c00;
        color: #000;
 }
+
+.iris-picker .ui-square-handle:focus,
+.iris-picker .iris-strip .ui-slider-handle: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);
+}
\ No newline at end of file
index bfbcee14d1a523ea756aaf5901acdd3167d8caf6..2b96caf6b8ea8d5666db73e785a2fd7b6db911f0 100644 (file)
@@ -1 +1 @@
-.wp-color-picker{width:80px}.wp-picker-container .hidden{display:none}.wp-color-result{background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;cursor:pointer;height:22px;margin:0 6px 6px 0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:bottom;display:inline-block;padding-left:30px;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc;top:0}.wp-color-result:after{background:#f7f7f7;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0;border-left:1px solid #ccc;color:#555;content:attr(title);display:block;font-size:11px;line-height:22px;padding:0 6px;position:relative;right:0;text-align:center;top:0}.wp-color-result:focus,.wp-color-result:hover{background:#fafafa;border-color:#999;color:#23282d}.wp-color-result:focus:after,.wp-color-result:hover:after{color:#23282d;border-color:#a0a5aa;border-left:1px solid #999}.wp-color-result.wp-picker-open:after{content:attr(data-current)}.wp-picker-container,.wp-picker-container:active{display:inline-block;outline:0}.wp-color-result: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)}.wp-picker-open+.wp-picker-input-wrap{display:inline-block;vertical-align:top}.wp-picker-container .button{margin-left:6px}.wp-picker-container .iris-square-slider .ui-slider-handle:focus{background-color:#555}.wp-picker-container .iris-picker{-webkit-border-radius:0;border-radius:0;border-color:#ddd;margin-top:6px}.wp-picker-container input[type=text].wp-color-picker{width:65px;font-size:12px;font-family:monospace;line-height:16px;margin:0}.wp-color-picker::-webkit-input-placeholder{color:#72777c}.wp-color-picker::-moz-placeholder{color:#72777c;opacity:1}.wp-color-picker:-ms-input-placeholder{color:#72777c}.wp-picker-container input[type=text].iris-error{background-color:#ffebe8;border-color:#c00;color:#000}
\ No newline at end of file
+.wp-color-picker{width:80px}.wp-picker-container .hidden{display:none}.wp-color-result{background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;cursor:pointer;height:22px;margin:0 6px 6px 0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:bottom;display:inline-block;padding-left:30px;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc;top:0}.wp-color-result:after{background:#f7f7f7;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0;border-left:1px solid #ccc;color:#555;content:attr(title);display:block;font-size:11px;line-height:22px;padding:0 6px;position:relative;right:0;text-align:center;top:0}.wp-color-result:focus,.wp-color-result:hover{background:#fafafa;border-color:#999;color:#23282d}.wp-color-result:focus:after,.wp-color-result:hover:after{color:#23282d;border-color:#a0a5aa;border-left:1px solid #999}.wp-color-result.wp-picker-open:after{content:attr(data-current)}.wp-picker-container,.wp-picker-container:active{display:inline-block;outline:0}.wp-color-result: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)}.wp-picker-open+.wp-picker-input-wrap{display:inline-block;vertical-align:top}.wp-picker-container .button{margin-left:6px}.wp-picker-container .iris-square-slider .ui-slider-handle:focus{background-color:#555}.wp-picker-container .iris-picker{-webkit-border-radius:0;border-radius:0;border-color:#ddd;margin-top:6px}.wp-picker-container input[type=text].wp-color-picker{width:65px;font-size:12px;font-family:monospace;line-height:16px;margin:0}.wp-color-picker::-webkit-input-placeholder{color:#72777c}.wp-color-picker::-moz-placeholder{color:#72777c;opacity:1}.wp-color-picker:-ms-input-placeholder{color:#72777c}.wp-picker-container input[type=text].iris-error{background-color:#ffebe8;border-color:#c00;color:#000}.iris-picker .iris-strip .ui-slider-handle:focus,.iris-picker .ui-square-handle: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)}
\ No newline at end of file
index f03c211d33b0bfb521a6df146f72d9ba03cdc545..da53b00840d7c5a71c770b10662b14ac60244a0e 100644 (file)
@@ -3,7 +3,7 @@
 @import 'mixins';
 
 
-html {
+body {
        background: $body-background;
 }
 
@@ -227,23 +227,15 @@ ul#adminmenu > li.current > a.current:after {
 
 /* Admin Menu: collapse button */
 
-#collapse-menu {
+#collapse-button {
     color: $menu-collapse-text;
 }
 
-#collapse-menu:hover {
-    color: $menu-collapse-focus-text;
+#collapse-button:hover,
+#collapse-button:focus {
+    color: $menu-submenu-focus-text;
 }
 
-#collapse-button div:after {
-    color: $menu-collapse-icon;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-    color: $menu-collapse-focus-icon;
-}
-
-
 /* Admin Bar */
 
 #wpadminbar {
@@ -324,6 +316,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -474,17 +467,6 @@ body.more-filters-opened .more-filters:focus:before {
        color: $menu-highlight-text;
 }
 
-/* Customize */
-
-#customize-theme-controls .widget-area-select .selected {
-       background-color: $menu-highlight-background;
-       color: $menu-highlight-text;
-}
-
-#customize-footer-actions .devices button:focus {
-       border-bottom-color: $highlight-color;
-}
-
 /* Responsive Component */
 
 div#wp-responsive-toggle a:before {
index c8213c18c6b37cfe973ddc73a386408d0bbe360c..b9dd2efe896173e5096f4c3946ce862f528220d6 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-@mixin button( $button-color, $text-color: white ) {
+@mixin button( $button-color, $text-color: #fff ) {
        background: $button-color;
        border-color: darken( $button-color, 10% ) darken( $button-color, 15% ) darken( $button-color, 15% );
        color: $text-color;
index dd214af2ef00253acfa46760e0defe5d02544dfc..0d757dff67c28d9811c5b7b7f6c83587f4380ac9 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #e1a948;
   border-color: #d39323 #bd831f #bd831f;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #bd831f;
   box-shadow: 0 1px 0 #bd831f;
   text-shadow: 0 -1px 1px #bd831f, -1px 0 1px #bd831f, 0 1px 1px #bd831f, 1px 0 1px #bd831f;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #e3af55;
   border-color: #bd831f;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #bd831f;
   box-shadow: 0 1px 0 #bd831f;
 }
@@ -259,19 +259,12 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
-  color: #e5f8ff;
-}
-
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
+#collapse-button {
   color: #e5f8ff;
 }
 
-#collapse-menu:hover #collapse-button div:after {
+#collapse-button:hover,
+#collapse-button:focus {
   color: #fff;
 }
 
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #096484;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #096484;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #e5f8ff;
index 2bc550a83bedc12280244ea6ad4059c9cd38868f..715a331b71ab64e2f6ea6f37914de6f806367fc6 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#096484}input[type=radio]:checked:before{background:#096484}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#e1a948;border-color:#d39323 #bd831f #bd831f;color:#fff;-webkit-box-shadow:0 1px 0 #bd831f;box-shadow:0 1px 0 #bd831f;text-shadow:0 -1px 1px #bd831f,-1px 0 1px #bd831f,0 1px 1px #bd831f,1px 0 1px #bd831f}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#e3af55;border-color:#bd831f;color:#fff;-webkit-box-shadow:0 1px 0 #bd831f;box-shadow:0 1px 0 #bd831f}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #d39323,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #d39323,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#d39323;border-color:#bd831f;-webkit-box-shadow:inset 0 2px 0 #bd831f;box-shadow:inset 0 2px 0 #bd831f}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cdc7!important;background:#db9925!important;border-color:#bd831f!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #bd831f!important;box-shadow:0 2px 0 #bd831f!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #bd831f!important;box-shadow:inset 0 3px 0 #bd831f!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#52accc}.wp-core-ui .wp-ui-text-primary{color:#52accc}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#096484}.wp-core-ui .wp-ui-text-highlight{color:#096484}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#e1a948}.wp-core-ui .wp-ui-text-notification{color:#e1a948}.wp-core-ui .wp-ui-text-icon{color:#e5f8ff}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#52accc}.view-switch a.current:before{color:#52accc}.view-switch a:hover:before{color:#e1a948}#adminmenu,#adminmenuback,#adminmenuwrap{background:#52accc}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#e5f8ff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#096484}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#4796b3}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#4796b3}#adminmenu .wp-submenu .wp-submenu-head{color:#e2ecf1}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#e2ecf1}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#fff}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#096484}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#e1a948}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#4796b3}#collapse-menu{color:#e5f8ff}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#e5f8ff}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#52accc}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#e5f8ff}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#fff;background:#4796b3}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#fff}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#4796b3}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#74b6ce}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#e2ecf1}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#e5f8ff}#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:#fff}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#fff}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#e5f8ff}#wpadminbar #adminbarsearch:before{color:#e5f8ff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6eb9d4}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6eb9d4;background-color:#6eb9d4}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info .username{color:#e2ecf1}.wp-pointer .wp-pointer-content h3{background-color:#096484;border-color:#07526c}.wp-pointer .wp-pointer-content h3:before{color:#096484}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#096484}.media-item .bar,.media-progress-bar div{background-color:#096484}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #096484;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #096484}.attachment.details .check{background-color:#096484;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #096484;box-shadow:0 0 0 1px #fff,0 0 0 2px #096484}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #096484;box-shadow:0 0 0 1px #fff,0 0 0 3px #096484}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#096484}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#096484}.theme-filter.current,.theme-section.current{border-bottom-color:#52accc}body.more-filters-opened .more-filters{color:#fff;background-color:#52accc}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#096484;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#096484;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#096484}div#wp-responsive-toggle a:before{color:#e5f8ff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#096484}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#4796b3}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#e5f8ff}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#096484}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#096484}input[type=radio]:checked:before{background:#096484}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#e1a948;border-color:#d39323 #bd831f #bd831f;color:#fff;-webkit-box-shadow:0 1px 0 #bd831f;box-shadow:0 1px 0 #bd831f;text-shadow:0 -1px 1px #bd831f,-1px 0 1px #bd831f,0 1px 1px #bd831f,1px 0 1px #bd831f}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#e3af55;border-color:#bd831f;color:#fff;-webkit-box-shadow:0 1px 0 #bd831f;box-shadow:0 1px 0 #bd831f}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #d39323,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #d39323,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#d39323;border-color:#bd831f;-webkit-box-shadow:inset 0 2px 0 #bd831f;box-shadow:inset 0 2px 0 #bd831f}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cdc7!important;background:#db9925!important;border-color:#bd831f!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #bd831f!important;box-shadow:0 2px 0 #bd831f!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #bd831f!important;box-shadow:inset 0 3px 0 #bd831f!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#52accc}.wp-core-ui .wp-ui-text-primary{color:#52accc}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#096484}.wp-core-ui .wp-ui-text-highlight{color:#096484}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#e1a948}.wp-core-ui .wp-ui-text-notification{color:#e1a948}.wp-core-ui .wp-ui-text-icon{color:#e5f8ff}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#52accc}.view-switch a.current:before{color:#52accc}.view-switch a:hover:before{color:#e1a948}#adminmenu,#adminmenuback,#adminmenuwrap{background:#52accc}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#e5f8ff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#096484}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#4796b3}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#4796b3}#adminmenu .wp-submenu .wp-submenu-head{color:#e2ecf1}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#e2ecf1}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#fff}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#096484}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#e1a948}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#4796b3}#collapse-button{color:#e5f8ff}#collapse-button:focus,#collapse-button:hover{color:#fff}#wpadminbar{color:#fff;background:#52accc}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#e5f8ff}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#fff;background:#4796b3}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#fff}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#4796b3}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#74b6ce}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#e2ecf1}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#e5f8ff}#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 .ab-icon: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:#fff}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#fff}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#e5f8ff}#wpadminbar #adminbarsearch:before{color:#e5f8ff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6eb9d4}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6eb9d4;background-color:#6eb9d4}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info .username{color:#e2ecf1}.wp-pointer .wp-pointer-content h3{background-color:#096484;border-color:#07526c}.wp-pointer .wp-pointer-content h3:before{color:#096484}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#096484}.media-item .bar,.media-progress-bar div{background-color:#096484}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #096484;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #096484}.attachment.details .check{background-color:#096484;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #096484;box-shadow:0 0 0 1px #fff,0 0 0 2px #096484}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #096484;box-shadow:0 0 0 1px #fff,0 0 0 3px #096484}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#096484}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#096484}.theme-filter.current,.theme-section.current{border-bottom-color:#52accc}body.more-filters-opened .more-filters{color:#fff;background-color:#52accc}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#096484;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#096484;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#e5f8ff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#096484}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#4796b3}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#e5f8ff}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#096484}
\ No newline at end of file
index 14835f8a46e9b85f0bca2f59f4e88e8e4aef1c6e..4f79db5fa5112c9e2ff2197c4f9f3cd4efe301f5 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #e1a948;
   border-color: #d39323 #bd831f #bd831f;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #bd831f;
   box-shadow: 0 1px 0 #bd831f;
   text-shadow: 0 -1px 1px #bd831f, 1px 0 1px #bd831f, 0 1px 1px #bd831f, -1px 0 1px #bd831f;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #e3af55;
   border-color: #bd831f;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #bd831f;
   box-shadow: 0 1px 0 #bd831f;
 }
@@ -259,19 +259,12 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
-  color: #e5f8ff;
-}
-
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
+#collapse-button {
   color: #e5f8ff;
 }
 
-#collapse-menu:hover #collapse-button div:after {
+#collapse-button:hover,
+#collapse-button:focus {
   color: #fff;
 }
 
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #096484;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #096484;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #e5f8ff;
index 45d54dab5ef70e2e9969adf9088cb8b12e9ef996..c3435bc4a9b1b9d4a189ba01922c5b7dcd2d3736 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#096484}input[type=radio]:checked:before{background:#096484}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#e1a948;border-color:#d39323 #bd831f #bd831f;color:#fff;-webkit-box-shadow:0 1px 0 #bd831f;box-shadow:0 1px 0 #bd831f;text-shadow:0 -1px 1px #bd831f,1px 0 1px #bd831f,0 1px 1px #bd831f,-1px 0 1px #bd831f}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#e3af55;border-color:#bd831f;color:#fff;-webkit-box-shadow:0 1px 0 #bd831f;box-shadow:0 1px 0 #bd831f}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #d39323,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #d39323,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#d39323;border-color:#bd831f;-webkit-box-shadow:inset 0 2px 0 #bd831f;box-shadow:inset 0 2px 0 #bd831f}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cdc7!important;background:#db9925!important;border-color:#bd831f!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #bd831f!important;box-shadow:0 2px 0 #bd831f!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #bd831f!important;box-shadow:inset 0 3px 0 #bd831f!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#52accc}.wp-core-ui .wp-ui-text-primary{color:#52accc}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#096484}.wp-core-ui .wp-ui-text-highlight{color:#096484}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#e1a948}.wp-core-ui .wp-ui-text-notification{color:#e1a948}.wp-core-ui .wp-ui-text-icon{color:#e5f8ff}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#52accc}.view-switch a.current:before{color:#52accc}.view-switch a:hover:before{color:#e1a948}#adminmenu,#adminmenuback,#adminmenuwrap{background:#52accc}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#e5f8ff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#096484}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#4796b3}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#4796b3}#adminmenu .wp-submenu .wp-submenu-head{color:#e2ecf1}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#e2ecf1}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#fff}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#096484}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#e1a948}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#4796b3}#collapse-menu{color:#e5f8ff}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#e5f8ff}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#52accc}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#e5f8ff}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#fff;background:#4796b3}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#fff}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#4796b3}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#74b6ce}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#e2ecf1}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#e5f8ff}#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:#fff}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#fff}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#e5f8ff}#wpadminbar #adminbarsearch:before{color:#e5f8ff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6eb9d4}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6eb9d4;background-color:#6eb9d4}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info .username{color:#e2ecf1}.wp-pointer .wp-pointer-content h3{background-color:#096484;border-color:#07526c}.wp-pointer .wp-pointer-content h3:before{color:#096484}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#096484}.media-item .bar,.media-progress-bar div{background-color:#096484}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #096484;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #096484}.attachment.details .check{background-color:#096484;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #096484;box-shadow:0 0 0 1px #fff,0 0 0 2px #096484}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #096484;box-shadow:0 0 0 1px #fff,0 0 0 3px #096484}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#096484}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#096484}.theme-filter.current,.theme-section.current{border-bottom-color:#52accc}body.more-filters-opened .more-filters{color:#fff;background-color:#52accc}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#096484;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#096484;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#096484}div#wp-responsive-toggle a:before{color:#e5f8ff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#096484}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#4796b3}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#e5f8ff}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#096484}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#096484}input[type=radio]:checked:before{background:#096484}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#e1a948;border-color:#d39323 #bd831f #bd831f;color:#fff;-webkit-box-shadow:0 1px 0 #bd831f;box-shadow:0 1px 0 #bd831f;text-shadow:0 -1px 1px #bd831f,1px 0 1px #bd831f,0 1px 1px #bd831f,-1px 0 1px #bd831f}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#e3af55;border-color:#bd831f;color:#fff;-webkit-box-shadow:0 1px 0 #bd831f;box-shadow:0 1px 0 #bd831f}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #d39323,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #d39323,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#d39323;border-color:#bd831f;-webkit-box-shadow:inset 0 2px 0 #bd831f;box-shadow:inset 0 2px 0 #bd831f}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cdc7!important;background:#db9925!important;border-color:#bd831f!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #bd831f!important;box-shadow:0 2px 0 #bd831f!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #bd831f!important;box-shadow:inset 0 3px 0 #bd831f!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#52accc}.wp-core-ui .wp-ui-text-primary{color:#52accc}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#096484}.wp-core-ui .wp-ui-text-highlight{color:#096484}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#e1a948}.wp-core-ui .wp-ui-text-notification{color:#e1a948}.wp-core-ui .wp-ui-text-icon{color:#e5f8ff}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#52accc}.view-switch a.current:before{color:#52accc}.view-switch a:hover:before{color:#e1a948}#adminmenu,#adminmenuback,#adminmenuwrap{background:#52accc}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#e5f8ff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#096484}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#4796b3}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#4796b3}#adminmenu .wp-submenu .wp-submenu-head{color:#e2ecf1}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#e2ecf1}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#fff}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#096484}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#e1a948}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#4796b3}#collapse-button{color:#e5f8ff}#collapse-button:focus,#collapse-button:hover{color:#fff}#wpadminbar{color:#fff;background:#52accc}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#e5f8ff}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#fff;background:#4796b3}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#fff}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#4796b3}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#74b6ce}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#e2ecf1}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#e5f8ff}#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 .ab-icon: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:#fff}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#fff}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#e5f8ff}#wpadminbar #adminbarsearch:before{color:#e5f8ff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6eb9d4}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6eb9d4;background-color:#6eb9d4}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info .username{color:#e2ecf1}.wp-pointer .wp-pointer-content h3{background-color:#096484;border-color:#07526c}.wp-pointer .wp-pointer-content h3:before{color:#096484}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#096484}.media-item .bar,.media-progress-bar div{background-color:#096484}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #096484;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #096484}.attachment.details .check{background-color:#096484;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #096484;box-shadow:0 0 0 1px #fff,0 0 0 2px #096484}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #096484;box-shadow:0 0 0 1px #fff,0 0 0 3px #096484}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#096484}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#096484}.theme-filter.current,.theme-section.current{border-bottom-color:#52accc}body.more-filters-opened .more-filters{color:#fff;background-color:#52accc}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#096484;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#096484;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#e5f8ff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#096484}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#4796b3}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#e5f8ff}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#096484}
\ No newline at end of file
index d82f7af8a4dd8725a973feed0de32b7269c9502d..7cfa4f164cd8381f1979384628f3a31bccd1b21b 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #c7a589;
   border-color: #b78b66 #ae7d55 #ae7d55;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ae7d55;
   box-shadow: 0 1px 0 #ae7d55;
   text-shadow: 0 -1px 1px #ae7d55, -1px 0 1px #ae7d55, 0 1px 1px #ae7d55, 1px 0 1px #ae7d55;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #ccad93;
   border-color: #ae7d55;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ae7d55;
   box-shadow: 0 1px 0 #ae7d55;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #f3f2f1;
 }
 
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
-  color: #f3f2f1;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #fff;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #c7a589;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #c7a589;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #c7a589;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #f3f2f1;
index 4530597ff5253fac19e5d6031b5ddf8876367beb..2ef2bd098504952a9687a664750d6782851da989 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#59524c}input[type=radio]:checked:before{background:#59524c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#c7a589;border-color:#b78b66 #ae7d55 #ae7d55;color:#fff;-webkit-box-shadow:0 1px 0 #ae7d55;box-shadow:0 1px 0 #ae7d55;text-shadow:0 -1px 1px #ae7d55,-1px 0 1px #ae7d55,0 1px 1px #ae7d55,1px 0 1px #ae7d55}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#ccad93;border-color:#ae7d55;color:#fff;-webkit-box-shadow:0 1px 0 #ae7d55;box-shadow:0 1px 0 #ae7d55}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #b78b66,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #b78b66,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#b78b66;border-color:#ae7d55;-webkit-box-shadow:inset 0 2px 0 #ae7d55;box-shadow:inset 0 2px 0 #ae7d55}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1ccc7!important;background:#ba906d!important;border-color:#ae7d55!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ae7d55!important;box-shadow:0 2px 0 #ae7d55!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ae7d55!important;box-shadow:inset 0 3px 0 #ae7d55!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#59524c}.wp-core-ui .wp-ui-text-primary{color:#59524c}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#c7a589}.wp-core-ui .wp-ui-text-highlight{color:#c7a589}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#9ea476}.wp-core-ui .wp-ui-text-notification{color:#9ea476}.wp-core-ui .wp-ui-text-icon{color:#f3f2f1}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#59524c}.view-switch a.current:before{color:#59524c}.view-switch a:hover:before{color:#9ea476}#adminmenu,#adminmenuback,#adminmenuwrap{background:#59524c}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f2f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#c7a589}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#46403c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#46403c}#adminmenu .wp-submenu .wp-submenu-head{color:#cdcbc9}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cdcbc9}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#c7a589}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#c7a589}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#c7a589}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#9ea476}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#46403c}#collapse-menu{color:#f3f2f1}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f3f2f1}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#59524c}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f2f1}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#c7a589;background:#46403c}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#c7a589}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#46403c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#656463}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cdcbc9}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f2f1}#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:#c7a589}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#c7a589}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f3f2f1}#wpadminbar #adminbarsearch:before{color:#f3f2f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6c645c}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6c645c;background-color:#6c645c}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#c7a589}#wpadminbar #wp-admin-bar-user-info .username{color:#cdcbc9}.wp-pointer .wp-pointer-content h3{background-color:#c7a589;border-color:#bf9878}.wp-pointer .wp-pointer-content h3:before{color:#c7a589}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#c7a589}.media-item .bar,.media-progress-bar div{background-color:#c7a589}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #c7a589;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #c7a589}.attachment.details .check{background-color:#c7a589;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 3px #c7a589}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#c7a589}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#c7a589}.theme-filter.current,.theme-section.current{border-bottom-color:#59524c}body.more-filters-opened .more-filters{color:#fff;background-color:#59524c}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#c7a589;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#c7a589;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#c7a589}div#wp-responsive-toggle a:before{color:#f3f2f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#c7a589}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#46403c}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f3f2f1}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#c7a589}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#59524c}input[type=radio]:checked:before{background:#59524c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#c7a589;border-color:#b78b66 #ae7d55 #ae7d55;color:#fff;-webkit-box-shadow:0 1px 0 #ae7d55;box-shadow:0 1px 0 #ae7d55;text-shadow:0 -1px 1px #ae7d55,-1px 0 1px #ae7d55,0 1px 1px #ae7d55,1px 0 1px #ae7d55}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#ccad93;border-color:#ae7d55;color:#fff;-webkit-box-shadow:0 1px 0 #ae7d55;box-shadow:0 1px 0 #ae7d55}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #b78b66,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #b78b66,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#b78b66;border-color:#ae7d55;-webkit-box-shadow:inset 0 2px 0 #ae7d55;box-shadow:inset 0 2px 0 #ae7d55}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1ccc7!important;background:#ba906d!important;border-color:#ae7d55!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ae7d55!important;box-shadow:0 2px 0 #ae7d55!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ae7d55!important;box-shadow:inset 0 3px 0 #ae7d55!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#59524c}.wp-core-ui .wp-ui-text-primary{color:#59524c}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#c7a589}.wp-core-ui .wp-ui-text-highlight{color:#c7a589}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#9ea476}.wp-core-ui .wp-ui-text-notification{color:#9ea476}.wp-core-ui .wp-ui-text-icon{color:#f3f2f1}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#59524c}.view-switch a.current:before{color:#59524c}.view-switch a:hover:before{color:#9ea476}#adminmenu,#adminmenuback,#adminmenuwrap{background:#59524c}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f2f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#c7a589}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#46403c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#46403c}#adminmenu .wp-submenu .wp-submenu-head{color:#cdcbc9}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cdcbc9}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#c7a589}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#c7a589}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#c7a589}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#9ea476}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#46403c}#collapse-button{color:#f3f2f1}#collapse-button:focus,#collapse-button:hover{color:#c7a589}#wpadminbar{color:#fff;background:#59524c}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f2f1}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#c7a589;background:#46403c}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#c7a589}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#46403c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#656463}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cdcbc9}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f2f1}#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 .ab-icon: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:#c7a589}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#c7a589}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f3f2f1}#wpadminbar #adminbarsearch:before{color:#f3f2f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6c645c}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6c645c;background-color:#6c645c}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#c7a589}#wpadminbar #wp-admin-bar-user-info .username{color:#cdcbc9}.wp-pointer .wp-pointer-content h3{background-color:#c7a589;border-color:#bf9878}.wp-pointer .wp-pointer-content h3:before{color:#c7a589}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#c7a589}.media-item .bar,.media-progress-bar div{background-color:#c7a589}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #c7a589;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #c7a589}.attachment.details .check{background-color:#c7a589;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 3px #c7a589}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#c7a589}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#c7a589}.theme-filter.current,.theme-section.current{border-bottom-color:#59524c}body.more-filters-opened .more-filters{color:#fff;background-color:#59524c}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#c7a589;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#c7a589;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f3f2f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#c7a589}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#46403c}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f3f2f1}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#c7a589}
\ No newline at end of file
index 7f3a63d8a3325cb407397802c656b6ca67e16a1a..7a1557b54b5dd5e088f14fba3b1512350d3b8059 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #c7a589;
   border-color: #b78b66 #ae7d55 #ae7d55;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ae7d55;
   box-shadow: 0 1px 0 #ae7d55;
   text-shadow: 0 -1px 1px #ae7d55, 1px 0 1px #ae7d55, 0 1px 1px #ae7d55, -1px 0 1px #ae7d55;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #ccad93;
   border-color: #ae7d55;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ae7d55;
   box-shadow: 0 1px 0 #ae7d55;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #f3f2f1;
 }
 
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
-  color: #f3f2f1;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #fff;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #c7a589;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #c7a589;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #c7a589;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #f3f2f1;
index 9770f5352a1279dd2c76056febc71647e65fc66d..1a747fb14190c58287f93d216d0db7162ff24eed 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#59524c}input[type=radio]:checked:before{background:#59524c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#c7a589;border-color:#b78b66 #ae7d55 #ae7d55;color:#fff;-webkit-box-shadow:0 1px 0 #ae7d55;box-shadow:0 1px 0 #ae7d55;text-shadow:0 -1px 1px #ae7d55,1px 0 1px #ae7d55,0 1px 1px #ae7d55,-1px 0 1px #ae7d55}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#ccad93;border-color:#ae7d55;color:#fff;-webkit-box-shadow:0 1px 0 #ae7d55;box-shadow:0 1px 0 #ae7d55}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #b78b66,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #b78b66,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#b78b66;border-color:#ae7d55;-webkit-box-shadow:inset 0 2px 0 #ae7d55;box-shadow:inset 0 2px 0 #ae7d55}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1ccc7!important;background:#ba906d!important;border-color:#ae7d55!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ae7d55!important;box-shadow:0 2px 0 #ae7d55!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ae7d55!important;box-shadow:inset 0 3px 0 #ae7d55!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#59524c}.wp-core-ui .wp-ui-text-primary{color:#59524c}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#c7a589}.wp-core-ui .wp-ui-text-highlight{color:#c7a589}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#9ea476}.wp-core-ui .wp-ui-text-notification{color:#9ea476}.wp-core-ui .wp-ui-text-icon{color:#f3f2f1}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#59524c}.view-switch a.current:before{color:#59524c}.view-switch a:hover:before{color:#9ea476}#adminmenu,#adminmenuback,#adminmenuwrap{background:#59524c}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f2f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#c7a589}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#46403c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#46403c}#adminmenu .wp-submenu .wp-submenu-head{color:#cdcbc9}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cdcbc9}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#c7a589}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#c7a589}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#c7a589}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#9ea476}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#46403c}#collapse-menu{color:#f3f2f1}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f3f2f1}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#59524c}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f2f1}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#c7a589;background:#46403c}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#c7a589}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#46403c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#656463}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cdcbc9}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f2f1}#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:#c7a589}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#c7a589}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f3f2f1}#wpadminbar #adminbarsearch:before{color:#f3f2f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6c645c}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6c645c;background-color:#6c645c}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#c7a589}#wpadminbar #wp-admin-bar-user-info .username{color:#cdcbc9}.wp-pointer .wp-pointer-content h3{background-color:#c7a589;border-color:#bf9878}.wp-pointer .wp-pointer-content h3:before{color:#c7a589}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#c7a589}.media-item .bar,.media-progress-bar div{background-color:#c7a589}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #c7a589;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #c7a589}.attachment.details .check{background-color:#c7a589;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 3px #c7a589}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#c7a589}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#c7a589}.theme-filter.current,.theme-section.current{border-bottom-color:#59524c}body.more-filters-opened .more-filters{color:#fff;background-color:#59524c}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#c7a589;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#c7a589;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#c7a589}div#wp-responsive-toggle a:before{color:#f3f2f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#c7a589}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#46403c}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f3f2f1}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#c7a589}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#59524c}input[type=radio]:checked:before{background:#59524c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#c7a589;border-color:#b78b66 #ae7d55 #ae7d55;color:#fff;-webkit-box-shadow:0 1px 0 #ae7d55;box-shadow:0 1px 0 #ae7d55;text-shadow:0 -1px 1px #ae7d55,1px 0 1px #ae7d55,0 1px 1px #ae7d55,-1px 0 1px #ae7d55}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#ccad93;border-color:#ae7d55;color:#fff;-webkit-box-shadow:0 1px 0 #ae7d55;box-shadow:0 1px 0 #ae7d55}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #b78b66,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #b78b66,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#b78b66;border-color:#ae7d55;-webkit-box-shadow:inset 0 2px 0 #ae7d55;box-shadow:inset 0 2px 0 #ae7d55}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1ccc7!important;background:#ba906d!important;border-color:#ae7d55!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ae7d55!important;box-shadow:0 2px 0 #ae7d55!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ae7d55!important;box-shadow:inset 0 3px 0 #ae7d55!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#59524c}.wp-core-ui .wp-ui-text-primary{color:#59524c}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#c7a589}.wp-core-ui .wp-ui-text-highlight{color:#c7a589}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#9ea476}.wp-core-ui .wp-ui-text-notification{color:#9ea476}.wp-core-ui .wp-ui-text-icon{color:#f3f2f1}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#59524c}.view-switch a.current:before{color:#59524c}.view-switch a:hover:before{color:#9ea476}#adminmenu,#adminmenuback,#adminmenuwrap{background:#59524c}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f2f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#c7a589}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#46403c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#46403c}#adminmenu .wp-submenu .wp-submenu-head{color:#cdcbc9}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cdcbc9}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#c7a589}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#c7a589}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#c7a589}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#9ea476}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#46403c}#collapse-button{color:#f3f2f1}#collapse-button:focus,#collapse-button:hover{color:#c7a589}#wpadminbar{color:#fff;background:#59524c}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f2f1}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#c7a589;background:#46403c}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#c7a589}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#46403c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#656463}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cdcbc9}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f2f1}#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 .ab-icon: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:#c7a589}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#c7a589}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f3f2f1}#wpadminbar #adminbarsearch:before{color:#f3f2f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#6c645c}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#6c645c;background-color:#6c645c}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#c7a589}#wpadminbar #wp-admin-bar-user-info .username{color:#cdcbc9}.wp-pointer .wp-pointer-content h3{background-color:#c7a589;border-color:#bf9878}.wp-pointer .wp-pointer-content h3:before{color:#c7a589}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#c7a589}.media-item .bar,.media-progress-bar div{background-color:#c7a589}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #c7a589;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #c7a589}.attachment.details .check{background-color:#c7a589;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 2px #c7a589}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #c7a589;box-shadow:0 0 0 1px #fff,0 0 0 3px #c7a589}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#c7a589}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#c7a589}.theme-filter.current,.theme-section.current{border-bottom-color:#59524c}body.more-filters-opened .more-filters{color:#fff;background-color:#59524c}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#c7a589;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#c7a589;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f3f2f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#c7a589}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#46403c}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f3f2f1}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#c7a589}
\ No newline at end of file
index 17d5a423b65de6958734e0fe94a8e70eb67efcce..6def77ab3716e0bc98a3e653d8e0953576099854 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #a3b745;
   border-color: #829237 #727f30 #727f30;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #727f30;
   box-shadow: 0 1px 0 #727f30;
   text-shadow: 0 -1px 1px #727f30, -1px 0 1px #727f30, 0 1px 1px #727f30, 1px 0 1px #727f30;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #a9bd4f;
   border-color: #727f30;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #727f30;
   box-shadow: 0 1px 0 #727f30;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #ece6f6;
 }
 
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
-  color: #ece6f6;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #fff;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #a3b745;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #a3b745;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #a3b745;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #ece6f6;
index 2ab769bd1091699ede27a9bc9b927378d2868569..10e741e5dbb66bc01f1970b707e687fcdc5d148f 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#523f6d}input[type=radio]:checked:before{background:#523f6d}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#a3b745;border-color:#829237 #727f30 #727f30;color:#fff;-webkit-box-shadow:0 1px 0 #727f30;box-shadow:0 1px 0 #727f30;text-shadow:0 -1px 1px #727f30,-1px 0 1px #727f30,0 1px 1px #727f30,1px 0 1px #727f30}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#a9bd4f;border-color:#727f30;color:#fff;-webkit-box-shadow:0 1px 0 #727f30;box-shadow:0 1px 0 #727f30}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #829237,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #829237,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#829237;border-color:#727f30;-webkit-box-shadow:inset 0 2px 0 #727f30;box-shadow:inset 0 2px 0 #727f30}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#cfd1c7!important;background:#89993a!important;border-color:#727f30!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #727f30!important;box-shadow:0 2px 0 #727f30!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #727f30!important;box-shadow:inset 0 3px 0 #727f30!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#523f6d}.wp-core-ui .wp-ui-text-primary{color:#523f6d}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#a3b745}.wp-core-ui .wp-ui-text-highlight{color:#a3b745}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d46f15}.wp-core-ui .wp-ui-text-notification{color:#d46f15}.wp-core-ui .wp-ui-text-icon{color:#ece6f6}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#523f6d}.view-switch a.current:before{color:#523f6d}.view-switch a:hover:before{color:#d46f15}#adminmenu,#adminmenuback,#adminmenuwrap{background:#523f6d}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#ece6f6}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#a3b745}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#413256}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#413256}#adminmenu .wp-submenu .wp-submenu-head{color:#cbc5d3}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cbc5d3}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#a3b745}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#a3b745}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#a3b745}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d46f15}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#413256}#collapse-menu{color:#ece6f6}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#ece6f6}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#523f6d}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#ece6f6}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#a3b745;background:#413256}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#a3b745}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#413256}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#64537c}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cbc5d3}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#ece6f6}#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:#a3b745}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#a3b745}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#ece6f6}#wpadminbar #adminbarsearch:before{color:#ece6f6}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#634c84}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#634c84;background-color:#634c84}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#a3b745}#wpadminbar #wp-admin-bar-user-info .username{color:#cbc5d3}.wp-pointer .wp-pointer-content h3{background-color:#a3b745;border-color:#93a43e}.wp-pointer .wp-pointer-content h3:before{color:#a3b745}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#a3b745}.media-item .bar,.media-progress-bar div{background-color:#a3b745}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #a3b745;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #a3b745}.attachment.details .check{background-color:#a3b745;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 3px #a3b745}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#a3b745}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#a3b745}.theme-filter.current,.theme-section.current{border-bottom-color:#523f6d}body.more-filters-opened .more-filters{color:#fff;background-color:#523f6d}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#a3b745;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#a3b745;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#a3b745}div#wp-responsive-toggle a:before{color:#ece6f6}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#a3b745}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#413256}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#ece6f6}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#a3b745}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#523f6d}input[type=radio]:checked:before{background:#523f6d}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#a3b745;border-color:#829237 #727f30 #727f30;color:#fff;-webkit-box-shadow:0 1px 0 #727f30;box-shadow:0 1px 0 #727f30;text-shadow:0 -1px 1px #727f30,-1px 0 1px #727f30,0 1px 1px #727f30,1px 0 1px #727f30}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#a9bd4f;border-color:#727f30;color:#fff;-webkit-box-shadow:0 1px 0 #727f30;box-shadow:0 1px 0 #727f30}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #829237,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #829237,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#829237;border-color:#727f30;-webkit-box-shadow:inset 0 2px 0 #727f30;box-shadow:inset 0 2px 0 #727f30}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#cfd1c7!important;background:#89993a!important;border-color:#727f30!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #727f30!important;box-shadow:0 2px 0 #727f30!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #727f30!important;box-shadow:inset 0 3px 0 #727f30!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#523f6d}.wp-core-ui .wp-ui-text-primary{color:#523f6d}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#a3b745}.wp-core-ui .wp-ui-text-highlight{color:#a3b745}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d46f15}.wp-core-ui .wp-ui-text-notification{color:#d46f15}.wp-core-ui .wp-ui-text-icon{color:#ece6f6}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#523f6d}.view-switch a.current:before{color:#523f6d}.view-switch a:hover:before{color:#d46f15}#adminmenu,#adminmenuback,#adminmenuwrap{background:#523f6d}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#ece6f6}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#a3b745}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#413256}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#413256}#adminmenu .wp-submenu .wp-submenu-head{color:#cbc5d3}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cbc5d3}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#a3b745}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#a3b745}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#a3b745}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d46f15}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#413256}#collapse-button{color:#ece6f6}#collapse-button:focus,#collapse-button:hover{color:#a3b745}#wpadminbar{color:#fff;background:#523f6d}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#ece6f6}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#a3b745;background:#413256}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#a3b745}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#413256}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#64537c}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cbc5d3}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#ece6f6}#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 .ab-icon: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:#a3b745}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#a3b745}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#ece6f6}#wpadminbar #adminbarsearch:before{color:#ece6f6}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#634c84}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#634c84;background-color:#634c84}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#a3b745}#wpadminbar #wp-admin-bar-user-info .username{color:#cbc5d3}.wp-pointer .wp-pointer-content h3{background-color:#a3b745;border-color:#93a43e}.wp-pointer .wp-pointer-content h3:before{color:#a3b745}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#a3b745}.media-item .bar,.media-progress-bar div{background-color:#a3b745}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #a3b745;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #a3b745}.attachment.details .check{background-color:#a3b745;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 3px #a3b745}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#a3b745}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#a3b745}.theme-filter.current,.theme-section.current{border-bottom-color:#523f6d}body.more-filters-opened .more-filters{color:#fff;background-color:#523f6d}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#a3b745;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#a3b745;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#ece6f6}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#a3b745}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#413256}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#ece6f6}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#a3b745}
\ No newline at end of file
index 980a0c3b687ab71d0d0644ba2da46be6ef5ea5a8..b55ce975d52c69a398620f753ef8065268295bd9 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #a3b745;
   border-color: #829237 #727f30 #727f30;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #727f30;
   box-shadow: 0 1px 0 #727f30;
   text-shadow: 0 -1px 1px #727f30, 1px 0 1px #727f30, 0 1px 1px #727f30, -1px 0 1px #727f30;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #a9bd4f;
   border-color: #727f30;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #727f30;
   box-shadow: 0 1px 0 #727f30;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #ece6f6;
 }
 
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
-  color: #ece6f6;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #fff;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #a3b745;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #a3b745;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #a3b745;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #ece6f6;
index afbf5d0ad545d7cd3b3d1c273097f1c2af1bfffd..e56354b42d5ef78afe4478d681a5f38f3a81e390 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#523f6d}input[type=radio]:checked:before{background:#523f6d}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#a3b745;border-color:#829237 #727f30 #727f30;color:#fff;-webkit-box-shadow:0 1px 0 #727f30;box-shadow:0 1px 0 #727f30;text-shadow:0 -1px 1px #727f30,1px 0 1px #727f30,0 1px 1px #727f30,-1px 0 1px #727f30}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#a9bd4f;border-color:#727f30;color:#fff;-webkit-box-shadow:0 1px 0 #727f30;box-shadow:0 1px 0 #727f30}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #829237,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #829237,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#829237;border-color:#727f30;-webkit-box-shadow:inset 0 2px 0 #727f30;box-shadow:inset 0 2px 0 #727f30}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#cfd1c7!important;background:#89993a!important;border-color:#727f30!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #727f30!important;box-shadow:0 2px 0 #727f30!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #727f30!important;box-shadow:inset 0 3px 0 #727f30!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#523f6d}.wp-core-ui .wp-ui-text-primary{color:#523f6d}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#a3b745}.wp-core-ui .wp-ui-text-highlight{color:#a3b745}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d46f15}.wp-core-ui .wp-ui-text-notification{color:#d46f15}.wp-core-ui .wp-ui-text-icon{color:#ece6f6}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#523f6d}.view-switch a.current:before{color:#523f6d}.view-switch a:hover:before{color:#d46f15}#adminmenu,#adminmenuback,#adminmenuwrap{background:#523f6d}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#ece6f6}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#a3b745}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#413256}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#413256}#adminmenu .wp-submenu .wp-submenu-head{color:#cbc5d3}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cbc5d3}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#a3b745}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#a3b745}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#a3b745}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d46f15}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#413256}#collapse-menu{color:#ece6f6}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#ece6f6}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#523f6d}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#ece6f6}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#a3b745;background:#413256}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#a3b745}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#413256}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#64537c}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cbc5d3}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#ece6f6}#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:#a3b745}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#a3b745}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#ece6f6}#wpadminbar #adminbarsearch:before{color:#ece6f6}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#634c84}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#634c84;background-color:#634c84}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#a3b745}#wpadminbar #wp-admin-bar-user-info .username{color:#cbc5d3}.wp-pointer .wp-pointer-content h3{background-color:#a3b745;border-color:#93a43e}.wp-pointer .wp-pointer-content h3:before{color:#a3b745}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#a3b745}.media-item .bar,.media-progress-bar div{background-color:#a3b745}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #a3b745;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #a3b745}.attachment.details .check{background-color:#a3b745;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 3px #a3b745}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#a3b745}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#a3b745}.theme-filter.current,.theme-section.current{border-bottom-color:#523f6d}body.more-filters-opened .more-filters{color:#fff;background-color:#523f6d}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#a3b745;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#a3b745;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#a3b745}div#wp-responsive-toggle a:before{color:#ece6f6}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#a3b745}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#413256}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#ece6f6}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#a3b745}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#523f6d}input[type=radio]:checked:before{background:#523f6d}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#a3b745;border-color:#829237 #727f30 #727f30;color:#fff;-webkit-box-shadow:0 1px 0 #727f30;box-shadow:0 1px 0 #727f30;text-shadow:0 -1px 1px #727f30,1px 0 1px #727f30,0 1px 1px #727f30,-1px 0 1px #727f30}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#a9bd4f;border-color:#727f30;color:#fff;-webkit-box-shadow:0 1px 0 #727f30;box-shadow:0 1px 0 #727f30}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #829237,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #829237,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#829237;border-color:#727f30;-webkit-box-shadow:inset 0 2px 0 #727f30;box-shadow:inset 0 2px 0 #727f30}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#cfd1c7!important;background:#89993a!important;border-color:#727f30!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #727f30!important;box-shadow:0 2px 0 #727f30!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #727f30!important;box-shadow:inset 0 3px 0 #727f30!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#523f6d}.wp-core-ui .wp-ui-text-primary{color:#523f6d}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#a3b745}.wp-core-ui .wp-ui-text-highlight{color:#a3b745}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d46f15}.wp-core-ui .wp-ui-text-notification{color:#d46f15}.wp-core-ui .wp-ui-text-icon{color:#ece6f6}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#523f6d}.view-switch a.current:before{color:#523f6d}.view-switch a:hover:before{color:#d46f15}#adminmenu,#adminmenuback,#adminmenuwrap{background:#523f6d}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#ece6f6}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#a3b745}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#413256}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#413256}#adminmenu .wp-submenu .wp-submenu-head{color:#cbc5d3}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cbc5d3}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#a3b745}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#a3b745}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#a3b745}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d46f15}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#413256}#collapse-button{color:#ece6f6}#collapse-button:focus,#collapse-button:hover{color:#a3b745}#wpadminbar{color:#fff;background:#523f6d}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#ece6f6}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#a3b745;background:#413256}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#a3b745}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#413256}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#64537c}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cbc5d3}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#ece6f6}#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 .ab-icon: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:#a3b745}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#a3b745}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#ece6f6}#wpadminbar #adminbarsearch:before{color:#ece6f6}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#634c84}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#634c84;background-color:#634c84}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#a3b745}#wpadminbar #wp-admin-bar-user-info .username{color:#cbc5d3}.wp-pointer .wp-pointer-content h3{background-color:#a3b745;border-color:#93a43e}.wp-pointer .wp-pointer-content h3:before{color:#a3b745}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#a3b745}.media-item .bar,.media-progress-bar div{background-color:#a3b745}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #a3b745;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #a3b745}.attachment.details .check{background-color:#a3b745;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 2px #a3b745}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #a3b745;box-shadow:0 0 0 1px #fff,0 0 0 3px #a3b745}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#a3b745}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#a3b745}.theme-filter.current,.theme-section.current{border-bottom-color:#523f6d}body.more-filters-opened .more-filters{color:#fff;background-color:#523f6d}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#a3b745;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#a3b745;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#ece6f6}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#a3b745}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#413256}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#ece6f6}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#a3b745}
\ No newline at end of file
index 5822584f3a52b26e61cc6cf3114fbb164bf9aac1..25a88c0b9c7b5c8ebfb70accaf2d5fb3190b3199 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f5f5f5;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #04a4cc;
   border-color: #037c9a #036881 #036881;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #036881;
   box-shadow: 0 1px 0 #036881;
   text-shadow: 0 -1px 1px #036881, -1px 0 1px #036881, 0 1px 1px #036881, 1px 0 1px #036881;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #04b0db;
   border-color: #036881;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #036881;
   box-shadow: 0 1px 0 #036881;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #777;
 }
 
-#collapse-menu:hover {
-  color: #333;
-}
-
-#collapse-button div:after {
-  color: #999;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #555;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #04a4cc;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #888;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #04a4cc;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #999;
index d0f6603652316b4b940ebb6f3f7d48c704bfba5f..31e644cd5cf5d378793c9b3cb620014b03dffb93 100644 (file)
@@ -1 +1 @@
-html{background:#f5f5f5}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#04a4cc}input[type=radio]:checked:before{background:#04a4cc}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#04a4cc;border-color:#037c9a #036881 #036881;color:#fff;-webkit-box-shadow:0 1px 0 #036881;box-shadow:0 1px 0 #036881;text-shadow:0 -1px 1px #036881,-1px 0 1px #036881,0 1px 1px #036881,1px 0 1px #036881}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#04b0db;border-color:#036881;color:#fff;-webkit-box-shadow:0 1px 0 #036881;box-shadow:0 1px 0 #036881}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #037c9a,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #037c9a,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#037c9a;border-color:#036881;-webkit-box-shadow:inset 0 2px 0 #036881;box-shadow:inset 0 2px 0 #036881}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7cfd1!important;background:#0384a4!important;border-color:#036881!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #036881!important;box-shadow:0 2px 0 #036881!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #036881!important;box-shadow:inset 0 3px 0 #036881!important}.wp-core-ui .wp-ui-primary{color:#333;background-color:#e5e5e5}.wp-core-ui .wp-ui-text-primary{color:#e5e5e5}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#888}.wp-core-ui .wp-ui-text-highlight{color:#888}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d64e07}.wp-core-ui .wp-ui-text-notification{color:#d64e07}.wp-core-ui .wp-ui-text-icon{color:#999}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#333;background-color:#e5e5e5}.view-switch a.current:before{color:#e5e5e5}.view-switch a:hover:before{color:#d64e07}#adminmenu,#adminmenuback,#adminmenuwrap{background:#e5e5e5}#adminmenu a{color:#333}#adminmenu div.wp-menu-image:before{color:#999}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#888}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#ccc}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f5f5f5;border-bottom-color:#f5f5f5}.theme-filter.current,.theme-section.current,.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#04a4cc}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#fff}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#fff}#adminmenu .wp-submenu .wp-submenu-head{color:#686868}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#686868}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#04a4cc}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#333}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#04a4cc}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f5f5f5}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#888}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#ccc}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d64e07}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#333;background:#fff}#collapse-menu{color:#777}#collapse-menu:hover,#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#333}#collapse-button div:after{color:#999}#collapse-menu:hover #collapse-button div:after{color:#555}#wpadminbar{color:#333;background:#e5e5e5}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#999}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#04a4cc;background:#fff}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#04a4cc}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#ccc}#wpadminbar .menupop .ab-sub-wrapper{background:#fff}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#f7f7f7}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#686868}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#999}#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:#04a4cc}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#04a4cc}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#999}#wpadminbar #adminbarsearch:before{color:#999}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#333;background:#f7f7f7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#f7f7f7;background-color:#f7f7f7}#wpadminbar #wp-admin-bar-user-info .display-name{color:#333}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#04a4cc}#wpadminbar #wp-admin-bar-user-info .username{color:#686868}.wp-pointer .wp-pointer-content h3{background-color:#04a4cc;border-color:#0490b3}.wp-pointer .wp-pointer-content h3:before{color:#04a4cc}.media-item .bar,.media-progress-bar div{background-color:#04a4cc}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #04a4cc;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #04a4cc}.attachment.details .check{background-color:#04a4cc;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 3px #04a4cc}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#04a4cc}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#04a4cc}body.more-filters-opened .more-filters{color:#333;background-color:#e5e5e5}body.more-filters-opened .more-filters:before{color:#333}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#888;color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#888;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#04a4cc}div#wp-responsive-toggle a:before{color:#999}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#888}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#fff}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#999}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#04a4cc}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default li:hover span.ab-label,#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary li.hover span.ab-label{color:#333}
\ No newline at end of file
+body{background:#f5f5f5}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#04a4cc}input[type=radio]:checked:before{background:#04a4cc}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#04a4cc;border-color:#037c9a #036881 #036881;color:#fff;-webkit-box-shadow:0 1px 0 #036881;box-shadow:0 1px 0 #036881;text-shadow:0 -1px 1px #036881,-1px 0 1px #036881,0 1px 1px #036881,1px 0 1px #036881}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#04b0db;border-color:#036881;color:#fff;-webkit-box-shadow:0 1px 0 #036881;box-shadow:0 1px 0 #036881}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #037c9a,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #037c9a,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#037c9a;border-color:#036881;-webkit-box-shadow:inset 0 2px 0 #036881;box-shadow:inset 0 2px 0 #036881}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7cfd1!important;background:#0384a4!important;border-color:#036881!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #036881!important;box-shadow:0 2px 0 #036881!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #036881!important;box-shadow:inset 0 3px 0 #036881!important}.wp-core-ui .wp-ui-primary{color:#333;background-color:#e5e5e5}.wp-core-ui .wp-ui-text-primary{color:#e5e5e5}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#888}.wp-core-ui .wp-ui-text-highlight{color:#888}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d64e07}.wp-core-ui .wp-ui-text-notification{color:#d64e07}.wp-core-ui .wp-ui-text-icon{color:#999}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#333;background-color:#e5e5e5}.view-switch a.current:before{color:#e5e5e5}.view-switch a:hover:before{color:#d64e07}#adminmenu,#adminmenuback,#adminmenuwrap{background:#e5e5e5}#adminmenu a{color:#333}#adminmenu div.wp-menu-image:before{color:#999}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#888}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#ccc}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f5f5f5;border-bottom-color:#f5f5f5}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#fff}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#fff}#adminmenu .wp-submenu .wp-submenu-head{color:#686868}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#686868}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#04a4cc}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#333}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#04a4cc}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f5f5f5}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#888}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#ccc}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d64e07}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#333;background:#fff}#collapse-button{color:#777}#collapse-button:focus,#collapse-button:hover{color:#04a4cc}#wpadminbar{color:#333;background:#e5e5e5}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#333}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#999}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#04a4cc;background:#fff}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#04a4cc}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#ccc}#wpadminbar .menupop .ab-sub-wrapper{background:#fff}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#f7f7f7}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#686868}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#999}#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 .ab-icon: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:#04a4cc}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#04a4cc}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#999}#wpadminbar #adminbarsearch:before{color:#999}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#333;background:#f7f7f7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#f7f7f7;background-color:#f7f7f7}#wpadminbar #wp-admin-bar-user-info .display-name{color:#333}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#04a4cc}#wpadminbar #wp-admin-bar-user-info .username{color:#686868}.wp-pointer .wp-pointer-content h3{background-color:#04a4cc;border-color:#0490b3}.wp-pointer .wp-pointer-content h3:before{color:#04a4cc}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#04a4cc}.media-item .bar,.media-progress-bar div{background-color:#04a4cc}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #04a4cc;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #04a4cc}.attachment.details .check{background-color:#04a4cc;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 3px #04a4cc}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#04a4cc}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#04a4cc}body.more-filters-opened .more-filters{color:#333;background-color:#e5e5e5}body.more-filters-opened .more-filters:before{color:#333}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#888;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#888;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#999}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#888}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#fff}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#999}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#04a4cc}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default li:hover span.ab-label,#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary li.hover span.ab-label{color:#333}.theme-filter.current,.theme-section.current{border-bottom-color:#04a4cc}
\ No newline at end of file
index d1b05ddee3e3e89d31666e1c705a9f4e7bf4cb2a..c27ae3cb40e555dd2fa5875c66c83b529e7493f8 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f5f5f5;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #04a4cc;
   border-color: #037c9a #036881 #036881;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #036881;
   box-shadow: 0 1px 0 #036881;
   text-shadow: 0 -1px 1px #036881, 1px 0 1px #036881, 0 1px 1px #036881, -1px 0 1px #036881;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #04b0db;
   border-color: #036881;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #036881;
   box-shadow: 0 1px 0 #036881;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #777;
 }
 
-#collapse-menu:hover {
-  color: #333;
-}
-
-#collapse-button div:after {
-  color: #999;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #555;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #04a4cc;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #888;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #04a4cc;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #999;
index 108d1a3af75fb86c9c236d345ec1c400f09af7c0..75e1c7353dad2bb6c743cc36eb55d8cc7727ba3f 100644 (file)
@@ -1 +1 @@
-html{background:#f5f5f5}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#04a4cc}input[type=radio]:checked:before{background:#04a4cc}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#04a4cc;border-color:#037c9a #036881 #036881;color:#fff;-webkit-box-shadow:0 1px 0 #036881;box-shadow:0 1px 0 #036881;text-shadow:0 -1px 1px #036881,1px 0 1px #036881,0 1px 1px #036881,-1px 0 1px #036881}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#04b0db;border-color:#036881;color:#fff;-webkit-box-shadow:0 1px 0 #036881;box-shadow:0 1px 0 #036881}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #037c9a,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #037c9a,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#037c9a;border-color:#036881;-webkit-box-shadow:inset 0 2px 0 #036881;box-shadow:inset 0 2px 0 #036881}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7cfd1!important;background:#0384a4!important;border-color:#036881!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #036881!important;box-shadow:0 2px 0 #036881!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #036881!important;box-shadow:inset 0 3px 0 #036881!important}.wp-core-ui .wp-ui-primary{color:#333;background-color:#e5e5e5}.wp-core-ui .wp-ui-text-primary{color:#e5e5e5}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#888}.wp-core-ui .wp-ui-text-highlight{color:#888}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d64e07}.wp-core-ui .wp-ui-text-notification{color:#d64e07}.wp-core-ui .wp-ui-text-icon{color:#999}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#333;background-color:#e5e5e5}.view-switch a.current:before{color:#e5e5e5}.view-switch a:hover:before{color:#d64e07}#adminmenu,#adminmenuback,#adminmenuwrap{background:#e5e5e5}#adminmenu a{color:#333}#adminmenu div.wp-menu-image:before{color:#999}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#888}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#ccc}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f5f5f5;border-bottom-color:#f5f5f5}.theme-filter.current,.theme-section.current,.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#04a4cc}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#fff}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#fff}#adminmenu .wp-submenu .wp-submenu-head{color:#686868}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#686868}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#04a4cc}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#333}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#04a4cc}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f5f5f5}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#888}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#ccc}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d64e07}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#333;background:#fff}#collapse-menu{color:#777}#collapse-menu:hover,#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#333}#collapse-button div:after{color:#999}#collapse-menu:hover #collapse-button div:after{color:#555}#wpadminbar{color:#333;background:#e5e5e5}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#999}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#04a4cc;background:#fff}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#04a4cc}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#ccc}#wpadminbar .menupop .ab-sub-wrapper{background:#fff}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#f7f7f7}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#686868}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#999}#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:#04a4cc}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#04a4cc}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#999}#wpadminbar #adminbarsearch:before{color:#999}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#333;background:#f7f7f7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#f7f7f7;background-color:#f7f7f7}#wpadminbar #wp-admin-bar-user-info .display-name{color:#333}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#04a4cc}#wpadminbar #wp-admin-bar-user-info .username{color:#686868}.wp-pointer .wp-pointer-content h3{background-color:#04a4cc;border-color:#0490b3}.wp-pointer .wp-pointer-content h3:before{color:#04a4cc}.media-item .bar,.media-progress-bar div{background-color:#04a4cc}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #04a4cc;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #04a4cc}.attachment.details .check{background-color:#04a4cc;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 3px #04a4cc}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#04a4cc}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#04a4cc}body.more-filters-opened .more-filters{color:#333;background-color:#e5e5e5}body.more-filters-opened .more-filters:before{color:#333}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#888;color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#888;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#04a4cc}div#wp-responsive-toggle a:before{color:#999}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#888}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#fff}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#999}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#04a4cc}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default li:hover span.ab-label,#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary li.hover span.ab-label{color:#333}
\ No newline at end of file
+body{background:#f5f5f5}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#04a4cc}input[type=radio]:checked:before{background:#04a4cc}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#04a4cc;border-color:#037c9a #036881 #036881;color:#fff;-webkit-box-shadow:0 1px 0 #036881;box-shadow:0 1px 0 #036881;text-shadow:0 -1px 1px #036881,1px 0 1px #036881,0 1px 1px #036881,-1px 0 1px #036881}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#04b0db;border-color:#036881;color:#fff;-webkit-box-shadow:0 1px 0 #036881;box-shadow:0 1px 0 #036881}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #037c9a,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #037c9a,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#037c9a;border-color:#036881;-webkit-box-shadow:inset 0 2px 0 #036881;box-shadow:inset 0 2px 0 #036881}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7cfd1!important;background:#0384a4!important;border-color:#036881!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #036881!important;box-shadow:0 2px 0 #036881!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #036881!important;box-shadow:inset 0 3px 0 #036881!important}.wp-core-ui .wp-ui-primary{color:#333;background-color:#e5e5e5}.wp-core-ui .wp-ui-text-primary{color:#e5e5e5}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#888}.wp-core-ui .wp-ui-text-highlight{color:#888}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#d64e07}.wp-core-ui .wp-ui-text-notification{color:#d64e07}.wp-core-ui .wp-ui-text-icon{color:#999}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#333;background-color:#e5e5e5}.view-switch a.current:before{color:#e5e5e5}.view-switch a:hover:before{color:#d64e07}#adminmenu,#adminmenuback,#adminmenuwrap{background:#e5e5e5}#adminmenu a{color:#333}#adminmenu div.wp-menu-image:before{color:#999}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#888}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#ccc}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f5f5f5;border-bottom-color:#f5f5f5}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#fff}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#fff}#adminmenu .wp-submenu .wp-submenu-head{color:#686868}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#686868}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#04a4cc}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#333}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#04a4cc}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f5f5f5}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#888}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#ccc}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#d64e07}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#333;background:#fff}#collapse-button{color:#777}#collapse-button:focus,#collapse-button:hover{color:#04a4cc}#wpadminbar{color:#333;background:#e5e5e5}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#333}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#999}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#04a4cc;background:#fff}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#04a4cc}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#ccc}#wpadminbar .menupop .ab-sub-wrapper{background:#fff}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#f7f7f7}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#686868}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#999}#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 .ab-icon: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:#04a4cc}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#04a4cc}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#999}#wpadminbar #adminbarsearch:before{color:#999}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#333;background:#f7f7f7}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#f7f7f7;background-color:#f7f7f7}#wpadminbar #wp-admin-bar-user-info .display-name{color:#333}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#04a4cc}#wpadminbar #wp-admin-bar-user-info .username{color:#686868}.wp-pointer .wp-pointer-content h3{background-color:#04a4cc;border-color:#0490b3}.wp-pointer .wp-pointer-content h3:before{color:#04a4cc}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#04a4cc}.media-item .bar,.media-progress-bar div{background-color:#04a4cc}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #04a4cc;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #04a4cc}.attachment.details .check{background-color:#04a4cc;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 2px #04a4cc}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #04a4cc;box-shadow:0 0 0 1px #fff,0 0 0 3px #04a4cc}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#04a4cc}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#04a4cc}body.more-filters-opened .more-filters{color:#333;background-color:#e5e5e5}body.more-filters-opened .more-filters:before{color:#333}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#888;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#888;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#999}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#888}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#fff}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#999}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#04a4cc}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar .ab-top-menu>li:hover>.ab-item,#wpadminbar .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default li:hover span.ab-label,#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary li.hover span.ab-label{color:#333}.theme-filter.current,.theme-section.current{border-bottom-color:#04a4cc}
\ No newline at end of file
index 2e4990f65471a89daf935bdcfbcd2e267c510b97..c72bee3951b8459aa4d0787c171437a2fb7e923b 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #e14d43;
   border-color: #d02c21 #ba281e #ba281e;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ba281e;
   box-shadow: 0 1px 0 #ba281e;
   text-shadow: 0 -1px 1px #ba281e, -1px 0 1px #ba281e, 0 1px 1px #ba281e, 1px 0 1px #ba281e;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #e35950;
   border-color: #ba281e;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ba281e;
   box-shadow: 0 1px 0 #ba281e;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #f1f2f3;
 }
 
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
-  color: #f1f2f3;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #fff;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #e14d43;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #e14d43;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #e14d43;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #f1f2f3;
index fb3814358a1a49734ea73113a0f295f60a87feec..02463781a51d8c1213164d35d892003805160f4d 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#e14d43}input[type=radio]:checked:before{background:#e14d43}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#e14d43;border-color:#d02c21 #ba281e #ba281e;color:#fff;-webkit-box-shadow:0 1px 0 #ba281e;box-shadow:0 1px 0 #ba281e;text-shadow:0 -1px 1px #ba281e,-1px 0 1px #ba281e,0 1px 1px #ba281e,1px 0 1px #ba281e}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#e35950;border-color:#ba281e;color:#fff;-webkit-box-shadow:0 1px 0 #ba281e;box-shadow:0 1px 0 #ba281e}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #d02c21,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #d02c21,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#d02c21;border-color:#ba281e;-webkit-box-shadow:inset 0 2px 0 #ba281e;box-shadow:inset 0 2px 0 #ba281e}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1c8c7!important;background:#d92e23!important;border-color:#ba281e!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ba281e!important;box-shadow:0 2px 0 #ba281e!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ba281e!important;box-shadow:inset 0 3px 0 #ba281e!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#363b3f}.wp-core-ui .wp-ui-text-primary{color:#363b3f}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#e14d43}.wp-core-ui .wp-ui-text-highlight{color:#e14d43}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#69a8bb}.wp-core-ui .wp-ui-text-notification{color:#69a8bb}.wp-core-ui .wp-ui-text-icon{color:#f1f2f3}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#363b3f}.view-switch a.current:before{color:#363b3f}.view-switch a:hover:before{color:#69a8bb}#adminmenu,#adminmenuback,#adminmenuwrap{background:#363b3f}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f2f3}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#e14d43}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#26292c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#26292c}#adminmenu .wp-submenu .wp-submenu-head{color:#c3c4c5}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#c3c4c5}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#e14d43}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#e14d43}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#e14d43}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#69a8bb}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#26292c}#collapse-menu{color:#f1f2f3}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f1f2f3}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#363b3f}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f2f3}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#e14d43;background:#26292c}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#e14d43}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#26292c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#4c4c4d}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#c3c4c5}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f2f3}#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:#e14d43}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#e14d43}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f2f3}#wpadminbar #adminbarsearch:before{color:#f1f2f3}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#464d52}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#464d52;background-color:#464d52}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#e14d43}#wpadminbar #wp-admin-bar-user-info .username{color:#c3c4c5}.wp-pointer .wp-pointer-content h3{background-color:#e14d43;border-color:#dd382d}.wp-pointer .wp-pointer-content h3:before{color:#e14d43}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#e14d43}.media-item .bar,.media-progress-bar div{background-color:#e14d43}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #e14d43;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #e14d43}.attachment.details .check{background-color:#e14d43;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 3px #e14d43}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#e14d43}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#e14d43}.theme-filter.current,.theme-section.current{border-bottom-color:#363b3f}body.more-filters-opened .more-filters{color:#fff;background-color:#363b3f}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#e14d43;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#e14d43;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#e14d43}div#wp-responsive-toggle a:before{color:#f1f2f3}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#e14d43}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#26292c}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f1f2f3}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#e14d43}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#e14d43}input[type=radio]:checked:before{background:#e14d43}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#e14d43;border-color:#d02c21 #ba281e #ba281e;color:#fff;-webkit-box-shadow:0 1px 0 #ba281e;box-shadow:0 1px 0 #ba281e;text-shadow:0 -1px 1px #ba281e,-1px 0 1px #ba281e,0 1px 1px #ba281e,1px 0 1px #ba281e}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#e35950;border-color:#ba281e;color:#fff;-webkit-box-shadow:0 1px 0 #ba281e;box-shadow:0 1px 0 #ba281e}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #d02c21,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #d02c21,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#d02c21;border-color:#ba281e;-webkit-box-shadow:inset 0 2px 0 #ba281e;box-shadow:inset 0 2px 0 #ba281e}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1c8c7!important;background:#d92e23!important;border-color:#ba281e!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ba281e!important;box-shadow:0 2px 0 #ba281e!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ba281e!important;box-shadow:inset 0 3px 0 #ba281e!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#363b3f}.wp-core-ui .wp-ui-text-primary{color:#363b3f}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#e14d43}.wp-core-ui .wp-ui-text-highlight{color:#e14d43}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#69a8bb}.wp-core-ui .wp-ui-text-notification{color:#69a8bb}.wp-core-ui .wp-ui-text-icon{color:#f1f2f3}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#363b3f}.view-switch a.current:before{color:#363b3f}.view-switch a:hover:before{color:#69a8bb}#adminmenu,#adminmenuback,#adminmenuwrap{background:#363b3f}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f2f3}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#e14d43}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#26292c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#26292c}#adminmenu .wp-submenu .wp-submenu-head{color:#c3c4c5}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#c3c4c5}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#e14d43}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#e14d43}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#e14d43}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#69a8bb}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#26292c}#collapse-button{color:#f1f2f3}#collapse-button:focus,#collapse-button:hover{color:#e14d43}#wpadminbar{color:#fff;background:#363b3f}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f2f3}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#e14d43;background:#26292c}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#e14d43}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#26292c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#4c4c4d}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#c3c4c5}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f2f3}#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 .ab-icon: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:#e14d43}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#e14d43}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f2f3}#wpadminbar #adminbarsearch:before{color:#f1f2f3}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#464d52}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#464d52;background-color:#464d52}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#e14d43}#wpadminbar #wp-admin-bar-user-info .username{color:#c3c4c5}.wp-pointer .wp-pointer-content h3{background-color:#e14d43;border-color:#dd382d}.wp-pointer .wp-pointer-content h3:before{color:#e14d43}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#e14d43}.media-item .bar,.media-progress-bar div{background-color:#e14d43}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #e14d43;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #e14d43}.attachment.details .check{background-color:#e14d43;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 3px #e14d43}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#e14d43}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#e14d43}.theme-filter.current,.theme-section.current{border-bottom-color:#363b3f}body.more-filters-opened .more-filters{color:#fff;background-color:#363b3f}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#e14d43;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#e14d43;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f1f2f3}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#e14d43}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#26292c}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f1f2f3}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#e14d43}
\ No newline at end of file
index a94d472d198004a3c55c01f5490fe31b1500d791..8b0dd7cf8b583ff662b74b2f4fd50bba4a1be232 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #e14d43;
   border-color: #d02c21 #ba281e #ba281e;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ba281e;
   box-shadow: 0 1px 0 #ba281e;
   text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px #ba281e;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #e35950;
   border-color: #ba281e;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ba281e;
   box-shadow: 0 1px 0 #ba281e;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #f1f2f3;
 }
 
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
-  color: #f1f2f3;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #fff;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #e14d43;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #e14d43;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #e14d43;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #f1f2f3;
index ca119d2cc4b1fbc74e535f4cc4bb348d389ddbab..1aa82d3fcade478e01b2153856f42c50b89c6eaa 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#e14d43}input[type=radio]:checked:before{background:#e14d43}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#e14d43;border-color:#d02c21 #ba281e #ba281e;color:#fff;-webkit-box-shadow:0 1px 0 #ba281e;box-shadow:0 1px 0 #ba281e;text-shadow:0 -1px 1px #ba281e,1px 0 1px #ba281e,0 1px 1px #ba281e,-1px 0 1px #ba281e}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#e35950;border-color:#ba281e;color:#fff;-webkit-box-shadow:0 1px 0 #ba281e;box-shadow:0 1px 0 #ba281e}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #d02c21,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #d02c21,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#d02c21;border-color:#ba281e;-webkit-box-shadow:inset 0 2px 0 #ba281e;box-shadow:inset 0 2px 0 #ba281e}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1c8c7!important;background:#d92e23!important;border-color:#ba281e!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ba281e!important;box-shadow:0 2px 0 #ba281e!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ba281e!important;box-shadow:inset 0 3px 0 #ba281e!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#363b3f}.wp-core-ui .wp-ui-text-primary{color:#363b3f}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#e14d43}.wp-core-ui .wp-ui-text-highlight{color:#e14d43}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#69a8bb}.wp-core-ui .wp-ui-text-notification{color:#69a8bb}.wp-core-ui .wp-ui-text-icon{color:#f1f2f3}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#363b3f}.view-switch a.current:before{color:#363b3f}.view-switch a:hover:before{color:#69a8bb}#adminmenu,#adminmenuback,#adminmenuwrap{background:#363b3f}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f2f3}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#e14d43}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#26292c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#26292c}#adminmenu .wp-submenu .wp-submenu-head{color:#c3c4c5}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#c3c4c5}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#e14d43}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#e14d43}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#e14d43}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#69a8bb}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#26292c}#collapse-menu{color:#f1f2f3}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f1f2f3}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#363b3f}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f2f3}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#e14d43;background:#26292c}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#e14d43}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#26292c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#4c4c4d}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#c3c4c5}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f2f3}#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:#e14d43}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#e14d43}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f2f3}#wpadminbar #adminbarsearch:before{color:#f1f2f3}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#464d52}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#464d52;background-color:#464d52}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#e14d43}#wpadminbar #wp-admin-bar-user-info .username{color:#c3c4c5}.wp-pointer .wp-pointer-content h3{background-color:#e14d43;border-color:#dd382d}.wp-pointer .wp-pointer-content h3:before{color:#e14d43}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#e14d43}.media-item .bar,.media-progress-bar div{background-color:#e14d43}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #e14d43;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #e14d43}.attachment.details .check{background-color:#e14d43;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 3px #e14d43}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#e14d43}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#e14d43}.theme-filter.current,.theme-section.current{border-bottom-color:#363b3f}body.more-filters-opened .more-filters{color:#fff;background-color:#363b3f}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#e14d43;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#e14d43;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#e14d43}div#wp-responsive-toggle a:before{color:#f1f2f3}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#e14d43}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#26292c}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f1f2f3}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#e14d43}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#e14d43}input[type=radio]:checked:before{background:#e14d43}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#e14d43;border-color:#d02c21 #ba281e #ba281e;color:#fff;-webkit-box-shadow:0 1px 0 #ba281e;box-shadow:0 1px 0 #ba281e;text-shadow:0 -1px 1px #ba281e,1px 0 1px #ba281e,0 1px 1px #ba281e,-1px 0 1px #ba281e}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#e35950;border-color:#ba281e;color:#fff;-webkit-box-shadow:0 1px 0 #ba281e;box-shadow:0 1px 0 #ba281e}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #d02c21,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #d02c21,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#d02c21;border-color:#ba281e;-webkit-box-shadow:inset 0 2px 0 #ba281e;box-shadow:inset 0 2px 0 #ba281e}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1c8c7!important;background:#d92e23!important;border-color:#ba281e!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ba281e!important;box-shadow:0 2px 0 #ba281e!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ba281e!important;box-shadow:inset 0 3px 0 #ba281e!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#363b3f}.wp-core-ui .wp-ui-text-primary{color:#363b3f}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#e14d43}.wp-core-ui .wp-ui-text-highlight{color:#e14d43}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#69a8bb}.wp-core-ui .wp-ui-text-notification{color:#69a8bb}.wp-core-ui .wp-ui-text-icon{color:#f1f2f3}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#363b3f}.view-switch a.current:before{color:#363b3f}.view-switch a:hover:before{color:#69a8bb}#adminmenu,#adminmenuback,#adminmenuwrap{background:#363b3f}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f2f3}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#e14d43}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#26292c}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#26292c}#adminmenu .wp-submenu .wp-submenu-head{color:#c3c4c5}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#c3c4c5}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#e14d43}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#e14d43}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#e14d43}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#69a8bb}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#26292c}#collapse-button{color:#f1f2f3}#collapse-button:focus,#collapse-button:hover{color:#e14d43}#wpadminbar{color:#fff;background:#363b3f}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f2f3}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#e14d43;background:#26292c}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#e14d43}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#26292c}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#4c4c4d}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#c3c4c5}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f2f3}#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 .ab-icon: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:#e14d43}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#e14d43}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f2f3}#wpadminbar #adminbarsearch:before{color:#f1f2f3}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#464d52}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#464d52;background-color:#464d52}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#e14d43}#wpadminbar #wp-admin-bar-user-info .username{color:#c3c4c5}.wp-pointer .wp-pointer-content h3{background-color:#e14d43;border-color:#dd382d}.wp-pointer .wp-pointer-content h3:before{color:#e14d43}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#e14d43}.media-item .bar,.media-progress-bar div{background-color:#e14d43}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #e14d43;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #e14d43}.attachment.details .check{background-color:#e14d43;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 2px #e14d43}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #e14d43;box-shadow:0 0 0 1px #fff,0 0 0 3px #e14d43}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#e14d43}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#e14d43}.theme-filter.current,.theme-section.current{border-bottom-color:#363b3f}body.more-filters-opened .more-filters{color:#fff;background-color:#363b3f}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#e14d43;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#e14d43;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f1f2f3}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#e14d43}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#26292c}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f1f2f3}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#e14d43}
\ No newline at end of file
index 65c0ead43d24cb633228542ef2e05bc38252a7e4..e258d5a921b4a7552ae002d8cd8cff7b9c083a3d 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #9ebaa0;
   border-color: #80a583 #719a74 #719a74;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #719a74;
   box-shadow: 0 1px 0 #719a74;
   text-shadow: 0 -1px 1px #719a74, -1px 0 1px #719a74, 0 1px 1px #719a74, 1px 0 1px #719a74;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #a7c0a9;
   border-color: #719a74;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #719a74;
   box-shadow: 0 1px 0 #719a74;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #f2fcff;
 }
 
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
-  color: #f2fcff;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #fff;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #9ebaa0;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #9ebaa0;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #9ebaa0;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #f2fcff;
index 52506fc83c719811fcb57205a9396547087163fa..6471e7455351c40f230a1387822db0c7a5a5199c 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#738e96}input[type=radio]:checked:before{background:#738e96}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#9ebaa0;border-color:#80a583 #719a74 #719a74;color:#fff;-webkit-box-shadow:0 1px 0 #719a74;box-shadow:0 1px 0 #719a74;text-shadow:0 -1px 1px #719a74,-1px 0 1px #719a74,0 1px 1px #719a74,1px 0 1px #719a74}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#a7c0a9;border-color:#719a74;color:#fff;-webkit-box-shadow:0 1px 0 #719a74;box-shadow:0 1px 0 #719a74}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #80a583,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #80a583,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#80a583;border-color:#719a74;-webkit-box-shadow:inset 0 2px 0 #719a74;box-shadow:inset 0 2px 0 #719a74}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1c8!important;background:#86a989!important;border-color:#719a74!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #719a74!important;box-shadow:0 2px 0 #719a74!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #719a74!important;box-shadow:inset 0 3px 0 #719a74!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#738e96}.wp-core-ui .wp-ui-text-primary{color:#738e96}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#9ebaa0}.wp-core-ui .wp-ui-text-highlight{color:#9ebaa0}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#aa9d88}.wp-core-ui .wp-ui-text-notification{color:#aa9d88}.wp-core-ui .wp-ui-text-icon{color:#f2fcff}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#738e96}.view-switch a.current:before{color:#738e96}.view-switch a:hover:before{color:#aa9d88}#adminmenu,#adminmenuback,#adminmenuwrap{background:#738e96}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f2fcff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#9ebaa0}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#627c83}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#627c83}#adminmenu .wp-submenu .wp-submenu-head{color:#d5dde0}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#d5dde0}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#9ebaa0}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#9ebaa0}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#9ebaa0}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#aa9d88}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#627c83}#collapse-menu{color:#f2fcff}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f2fcff}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#738e96}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f2fcff}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#9ebaa0;background:#627c83}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#9ebaa0}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#627c83}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#8f9a9e}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#d5dde0}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f2fcff}#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:#9ebaa0}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#9ebaa0}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f2fcff}#wpadminbar #adminbarsearch:before{color:#f2fcff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#879ea5}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#879ea5;background-color:#879ea5}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#9ebaa0}#wpadminbar #wp-admin-bar-user-info .username{color:#d5dde0}.wp-pointer .wp-pointer-content h3{background-color:#9ebaa0;border-color:#8faf91}.wp-pointer .wp-pointer-content h3:before{color:#9ebaa0}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#9ebaa0}.media-item .bar,.media-progress-bar div{background-color:#9ebaa0}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #9ebaa0;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #9ebaa0}.attachment.details .check{background-color:#9ebaa0;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 3px #9ebaa0}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#9ebaa0}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#9ebaa0}.theme-filter.current,.theme-section.current{border-bottom-color:#738e96}body.more-filters-opened .more-filters{color:#fff;background-color:#738e96}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#9ebaa0;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#9ebaa0;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#9ebaa0}div#wp-responsive-toggle a:before{color:#f2fcff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#9ebaa0}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#627c83}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f2fcff}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#9ebaa0}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#738e96}input[type=radio]:checked:before{background:#738e96}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#9ebaa0;border-color:#80a583 #719a74 #719a74;color:#fff;-webkit-box-shadow:0 1px 0 #719a74;box-shadow:0 1px 0 #719a74;text-shadow:0 -1px 1px #719a74,-1px 0 1px #719a74,0 1px 1px #719a74,1px 0 1px #719a74}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#a7c0a9;border-color:#719a74;color:#fff;-webkit-box-shadow:0 1px 0 #719a74;box-shadow:0 1px 0 #719a74}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #80a583,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #80a583,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#80a583;border-color:#719a74;-webkit-box-shadow:inset 0 2px 0 #719a74;box-shadow:inset 0 2px 0 #719a74}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1c8!important;background:#86a989!important;border-color:#719a74!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #719a74!important;box-shadow:0 2px 0 #719a74!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #719a74!important;box-shadow:inset 0 3px 0 #719a74!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#738e96}.wp-core-ui .wp-ui-text-primary{color:#738e96}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#9ebaa0}.wp-core-ui .wp-ui-text-highlight{color:#9ebaa0}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#aa9d88}.wp-core-ui .wp-ui-text-notification{color:#aa9d88}.wp-core-ui .wp-ui-text-icon{color:#f2fcff}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#738e96}.view-switch a.current:before{color:#738e96}.view-switch a:hover:before{color:#aa9d88}#adminmenu,#adminmenuback,#adminmenuwrap{background:#738e96}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f2fcff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#9ebaa0}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#627c83}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#627c83}#adminmenu .wp-submenu .wp-submenu-head{color:#d5dde0}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#d5dde0}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#9ebaa0}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#9ebaa0}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#9ebaa0}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#aa9d88}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#627c83}#collapse-button{color:#f2fcff}#collapse-button:focus,#collapse-button:hover{color:#9ebaa0}#wpadminbar{color:#fff;background:#738e96}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f2fcff}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#9ebaa0;background:#627c83}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#9ebaa0}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#627c83}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#8f9a9e}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#d5dde0}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f2fcff}#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 .ab-icon: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:#9ebaa0}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#9ebaa0}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f2fcff}#wpadminbar #adminbarsearch:before{color:#f2fcff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#879ea5}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#879ea5;background-color:#879ea5}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#9ebaa0}#wpadminbar #wp-admin-bar-user-info .username{color:#d5dde0}.wp-pointer .wp-pointer-content h3{background-color:#9ebaa0;border-color:#8faf91}.wp-pointer .wp-pointer-content h3:before{color:#9ebaa0}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#9ebaa0}.media-item .bar,.media-progress-bar div{background-color:#9ebaa0}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #9ebaa0;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #9ebaa0}.attachment.details .check{background-color:#9ebaa0;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 3px #9ebaa0}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#9ebaa0}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#9ebaa0}.theme-filter.current,.theme-section.current{border-bottom-color:#738e96}body.more-filters-opened .more-filters{color:#fff;background-color:#738e96}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#9ebaa0;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#9ebaa0;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f2fcff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#9ebaa0}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#627c83}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f2fcff}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#9ebaa0}
\ No newline at end of file
index c98d3bed4db3659ee859ccc5a481d5d55deb32ae..47109d712a55638afb36f145d30f120488e51e99 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #9ebaa0;
   border-color: #80a583 #719a74 #719a74;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #719a74;
   box-shadow: 0 1px 0 #719a74;
   text-shadow: 0 -1px 1px #719a74, 1px 0 1px #719a74, 0 1px 1px #719a74, -1px 0 1px #719a74;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #a7c0a9;
   border-color: #719a74;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #719a74;
   box-shadow: 0 1px 0 #719a74;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #f2fcff;
 }
 
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
-  color: #f2fcff;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #fff;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #9ebaa0;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #9ebaa0;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #9ebaa0;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #f2fcff;
index 4aaf1a23da4cbb518b9adf421d8b54d5a07d7052..9dc06cac615d86199984ead0a93942a4a9aea9d6 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#738e96}input[type=radio]:checked:before{background:#738e96}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#9ebaa0;border-color:#80a583 #719a74 #719a74;color:#fff;-webkit-box-shadow:0 1px 0 #719a74;box-shadow:0 1px 0 #719a74;text-shadow:0 -1px 1px #719a74,1px 0 1px #719a74,0 1px 1px #719a74,-1px 0 1px #719a74}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#a7c0a9;border-color:#719a74;color:#fff;-webkit-box-shadow:0 1px 0 #719a74;box-shadow:0 1px 0 #719a74}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #80a583,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #80a583,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#80a583;border-color:#719a74;-webkit-box-shadow:inset 0 2px 0 #719a74;box-shadow:inset 0 2px 0 #719a74}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1c8!important;background:#86a989!important;border-color:#719a74!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #719a74!important;box-shadow:0 2px 0 #719a74!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #719a74!important;box-shadow:inset 0 3px 0 #719a74!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#738e96}.wp-core-ui .wp-ui-text-primary{color:#738e96}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#9ebaa0}.wp-core-ui .wp-ui-text-highlight{color:#9ebaa0}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#aa9d88}.wp-core-ui .wp-ui-text-notification{color:#aa9d88}.wp-core-ui .wp-ui-text-icon{color:#f2fcff}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#738e96}.view-switch a.current:before{color:#738e96}.view-switch a:hover:before{color:#aa9d88}#adminmenu,#adminmenuback,#adminmenuwrap{background:#738e96}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f2fcff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#9ebaa0}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#627c83}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#627c83}#adminmenu .wp-submenu .wp-submenu-head{color:#d5dde0}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#d5dde0}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#9ebaa0}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#9ebaa0}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#9ebaa0}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#aa9d88}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#627c83}#collapse-menu{color:#f2fcff}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f2fcff}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#738e96}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f2fcff}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#9ebaa0;background:#627c83}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#9ebaa0}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#627c83}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#8f9a9e}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#d5dde0}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f2fcff}#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:#9ebaa0}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#9ebaa0}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f2fcff}#wpadminbar #adminbarsearch:before{color:#f2fcff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#879ea5}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#879ea5;background-color:#879ea5}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#9ebaa0}#wpadminbar #wp-admin-bar-user-info .username{color:#d5dde0}.wp-pointer .wp-pointer-content h3{background-color:#9ebaa0;border-color:#8faf91}.wp-pointer .wp-pointer-content h3:before{color:#9ebaa0}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#9ebaa0}.media-item .bar,.media-progress-bar div{background-color:#9ebaa0}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #9ebaa0;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #9ebaa0}.attachment.details .check{background-color:#9ebaa0;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 3px #9ebaa0}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#9ebaa0}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#9ebaa0}.theme-filter.current,.theme-section.current{border-bottom-color:#738e96}body.more-filters-opened .more-filters{color:#fff;background-color:#738e96}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#9ebaa0;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#9ebaa0;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#9ebaa0}div#wp-responsive-toggle a:before{color:#f2fcff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#9ebaa0}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#627c83}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f2fcff}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#9ebaa0}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#738e96}input[type=radio]:checked:before{background:#738e96}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#9ebaa0;border-color:#80a583 #719a74 #719a74;color:#fff;-webkit-box-shadow:0 1px 0 #719a74;box-shadow:0 1px 0 #719a74;text-shadow:0 -1px 1px #719a74,1px 0 1px #719a74,0 1px 1px #719a74,-1px 0 1px #719a74}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#a7c0a9;border-color:#719a74;color:#fff;-webkit-box-shadow:0 1px 0 #719a74;box-shadow:0 1px 0 #719a74}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #80a583,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #80a583,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#80a583;border-color:#719a74;-webkit-box-shadow:inset 0 2px 0 #719a74;box-shadow:inset 0 2px 0 #719a74}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1c8!important;background:#86a989!important;border-color:#719a74!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #719a74!important;box-shadow:0 2px 0 #719a74!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #719a74!important;box-shadow:inset 0 3px 0 #719a74!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#738e96}.wp-core-ui .wp-ui-text-primary{color:#738e96}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#9ebaa0}.wp-core-ui .wp-ui-text-highlight{color:#9ebaa0}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#aa9d88}.wp-core-ui .wp-ui-text-notification{color:#aa9d88}.wp-core-ui .wp-ui-text-icon{color:#f2fcff}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#738e96}.view-switch a.current:before{color:#738e96}.view-switch a:hover:before{color:#aa9d88}#adminmenu,#adminmenuback,#adminmenuwrap{background:#738e96}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f2fcff}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#9ebaa0}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#627c83}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#627c83}#adminmenu .wp-submenu .wp-submenu-head{color:#d5dde0}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#d5dde0}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#9ebaa0}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#9ebaa0}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#9ebaa0}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#aa9d88}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#627c83}#collapse-button{color:#f2fcff}#collapse-button:focus,#collapse-button:hover{color:#9ebaa0}#wpadminbar{color:#fff;background:#738e96}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f2fcff}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#9ebaa0;background:#627c83}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#9ebaa0}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#627c83}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#8f9a9e}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#d5dde0}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f2fcff}#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 .ab-icon: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:#9ebaa0}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#9ebaa0}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f2fcff}#wpadminbar #adminbarsearch:before{color:#f2fcff}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#879ea5}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#879ea5;background-color:#879ea5}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#9ebaa0}#wpadminbar #wp-admin-bar-user-info .username{color:#d5dde0}.wp-pointer .wp-pointer-content h3{background-color:#9ebaa0;border-color:#8faf91}.wp-pointer .wp-pointer-content h3:before{color:#9ebaa0}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#9ebaa0}.media-item .bar,.media-progress-bar div{background-color:#9ebaa0}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #9ebaa0;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #9ebaa0}.attachment.details .check{background-color:#9ebaa0;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 2px #9ebaa0}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #9ebaa0;box-shadow:0 0 0 1px #fff,0 0 0 3px #9ebaa0}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#9ebaa0}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#9ebaa0}.theme-filter.current,.theme-section.current{border-bottom-color:#738e96}body.more-filters-opened .more-filters{color:#fff;background-color:#738e96}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#9ebaa0;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#9ebaa0;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f2fcff}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#9ebaa0}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#627c83}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f2fcff}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#9ebaa0}
\ No newline at end of file
index cd9e9eb48e81f6d796c39c70fadb8e0c0929cf5e..2837315d38e22559aefa9920427275629abf6bac 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #dd823b;
   border-color: #c36922 #ad5d1e #ad5d1e;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ad5d1e;
   box-shadow: 0 1px 0 #ad5d1e;
   text-shadow: 0 -1px 1px #ad5d1e, -1px 0 1px #ad5d1e, 0 1px 1px #ad5d1e, 1px 0 1px #ad5d1e;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #df8a48;
   border-color: #ad5d1e;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ad5d1e;
   box-shadow: 0 1px 0 #ad5d1e;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #f3f1f1;
 }
 
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
-  color: #f3f1f1;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #fff;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #f7e3d3;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #dd823b;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #dd823b;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #f3f1f1;
index aab12534740b9e0154253d8b1e1a48c4129ac216..cd9ee18d9f58e76ba63886b1f71f1462aa86da99 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#dd823b}input[type=radio]:checked:before{background:#dd823b}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#dd823b;border-color:#c36922 #ad5d1e #ad5d1e;color:#fff;-webkit-box-shadow:0 1px 0 #ad5d1e;box-shadow:0 1px 0 #ad5d1e;text-shadow:0 -1px 1px #ad5d1e,-1px 0 1px #ad5d1e,0 1px 1px #ad5d1e,1px 0 1px #ad5d1e}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#df8a48;border-color:#ad5d1e;color:#fff;-webkit-box-shadow:0 1px 0 #ad5d1e;box-shadow:0 1px 0 #ad5d1e}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #c36922,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #c36922,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#c36922;border-color:#ad5d1e;-webkit-box-shadow:inset 0 2px 0 #ad5d1e;box-shadow:inset 0 2px 0 #ad5d1e}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cbc7!important;background:#cc6d23!important;border-color:#ad5d1e!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ad5d1e!important;box-shadow:0 2px 0 #ad5d1e!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ad5d1e!important;box-shadow:inset 0 3px 0 #ad5d1e!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#cf4944}.wp-core-ui .wp-ui-text-primary{color:#cf4944}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#dd823b}.wp-core-ui .wp-ui-text-highlight{color:#dd823b}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#ccaf0b}.wp-core-ui .wp-ui-text-notification{color:#ccaf0b}.wp-core-ui .wp-ui-text-icon{color:#f3f1f1}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#cf4944}.view-switch a.current:before{color:#cf4944}.view-switch a:hover:before{color:#ccaf0b}#adminmenu,#adminmenuback,#adminmenuwrap{background:#cf4944}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f1f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#dd823b}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#be3631}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#be3631}#adminmenu .wp-submenu .wp-submenu-head{color:#f1c8c7}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#f1c8c7}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#f7e3d3}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#f7e3d3}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#dd823b}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#ccaf0b}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#be3631}#collapse-menu{color:#f3f1f1}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f3f1f1}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#cf4944}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f1f1}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#f7e3d3;background:#be3631}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#f7e3d3}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#be3631}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#cf6b67}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#f1c8c7}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f1f1}#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:#f7e3d3}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#f7e3d3}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f3f1f1}#wpadminbar #adminbarsearch:before{color:#f3f1f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#d66560}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#d66560;background-color:#d66560}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#f7e3d3}#wpadminbar #wp-admin-bar-user-info .username{color:#f1c8c7}.wp-pointer .wp-pointer-content h3{background-color:#dd823b;border-color:#d97426}.wp-pointer .wp-pointer-content h3:before{color:#dd823b}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#dd823b}.media-item .bar,.media-progress-bar div{background-color:#dd823b}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #dd823b;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #dd823b}.attachment.details .check{background-color:#dd823b;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 3px #dd823b}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#dd823b}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#dd823b}.theme-filter.current,.theme-section.current{border-bottom-color:#cf4944}body.more-filters-opened .more-filters{color:#fff;background-color:#cf4944}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#dd823b;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#dd823b;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#dd823b}div#wp-responsive-toggle a:before{color:#f3f1f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#dd823b}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#be3631}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f3f1f1}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#dd823b}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#dd823b}input[type=radio]:checked:before{background:#dd823b}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#dd823b;border-color:#c36922 #ad5d1e #ad5d1e;color:#fff;-webkit-box-shadow:0 1px 0 #ad5d1e;box-shadow:0 1px 0 #ad5d1e;text-shadow:0 -1px 1px #ad5d1e,-1px 0 1px #ad5d1e,0 1px 1px #ad5d1e,1px 0 1px #ad5d1e}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#df8a48;border-color:#ad5d1e;color:#fff;-webkit-box-shadow:0 1px 0 #ad5d1e;box-shadow:0 1px 0 #ad5d1e}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #c36922,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #c36922,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#c36922;border-color:#ad5d1e;-webkit-box-shadow:inset 0 2px 0 #ad5d1e;box-shadow:inset 0 2px 0 #ad5d1e}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cbc7!important;background:#cc6d23!important;border-color:#ad5d1e!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ad5d1e!important;box-shadow:0 2px 0 #ad5d1e!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ad5d1e!important;box-shadow:inset 0 3px 0 #ad5d1e!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#cf4944}.wp-core-ui .wp-ui-text-primary{color:#cf4944}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#dd823b}.wp-core-ui .wp-ui-text-highlight{color:#dd823b}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#ccaf0b}.wp-core-ui .wp-ui-text-notification{color:#ccaf0b}.wp-core-ui .wp-ui-text-icon{color:#f3f1f1}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#cf4944}.view-switch a.current:before{color:#cf4944}.view-switch a:hover:before{color:#ccaf0b}#adminmenu,#adminmenuback,#adminmenuwrap{background:#cf4944}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f1f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#dd823b}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#be3631}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#be3631}#adminmenu .wp-submenu .wp-submenu-head{color:#f1c8c7}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#f1c8c7}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#f7e3d3}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#f7e3d3}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#dd823b}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#ccaf0b}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#be3631}#collapse-button{color:#f3f1f1}#collapse-button:focus,#collapse-button:hover{color:#f7e3d3}#wpadminbar{color:#fff;background:#cf4944}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f1f1}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#f7e3d3;background:#be3631}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#f7e3d3}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#be3631}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#cf6b67}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#f1c8c7}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f1f1}#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 .ab-icon: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:#f7e3d3}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#f7e3d3}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f3f1f1}#wpadminbar #adminbarsearch:before{color:#f3f1f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#d66560}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#d66560;background-color:#d66560}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#f7e3d3}#wpadminbar #wp-admin-bar-user-info .username{color:#f1c8c7}.wp-pointer .wp-pointer-content h3{background-color:#dd823b;border-color:#d97426}.wp-pointer .wp-pointer-content h3:before{color:#dd823b}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#dd823b}.media-item .bar,.media-progress-bar div{background-color:#dd823b}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #dd823b;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #dd823b}.attachment.details .check{background-color:#dd823b;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 3px #dd823b}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#dd823b}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#dd823b}.theme-filter.current,.theme-section.current{border-bottom-color:#cf4944}body.more-filters-opened .more-filters{color:#fff;background-color:#cf4944}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#dd823b;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#dd823b;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f3f1f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#dd823b}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#be3631}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f3f1f1}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#dd823b}
\ No newline at end of file
index 88cde5380e13d193e6e6324cf148d84c3355b308..38676a06d9c7eacbaca9d85f15ce9f7d76b8f1d1 100644 (file)
@@ -2,7 +2,7 @@
  * Button mixin- creates 3d-ish button effect with correct
  * highlights/shadows, based on a base color.
  */
-html {
+body {
   background: #f1f1f1;
 }
 
@@ -40,7 +40,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary {
   background: #dd823b;
   border-color: #c36922 #ad5d1e #ad5d1e;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ad5d1e;
   box-shadow: 0 1px 0 #ad5d1e;
   text-shadow: 0 -1px 1px #ad5d1e, 1px 0 1px #ad5d1e, 0 1px 1px #ad5d1e, -1px 0 1px #ad5d1e;
@@ -49,7 +49,7 @@ input[type=radio]:checked:before {
 .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus {
   background: #df8a48;
   border-color: #ad5d1e;
-  color: white;
+  color: #fff;
   -webkit-box-shadow: 0 1px 0 #ad5d1e;
   box-shadow: 0 1px 0 #ad5d1e;
 }
@@ -259,20 +259,13 @@ ul#adminmenu > li.current > a.current:after {
 }
 
 /* Admin Menu: collapse button */
-#collapse-menu {
+#collapse-button {
   color: #f3f1f1;
 }
 
-#collapse-menu:hover {
-  color: #fff;
-}
-
-#collapse-button div:after {
-  color: #f3f1f1;
-}
-
-#collapse-menu:hover #collapse-button div:after {
-  color: #fff;
+#collapse-button:hover,
+#collapse-button:focus {
+  color: #f7e3d3;
 }
 
 /* Admin Bar */
@@ -352,6 +345,7 @@ ul#adminmenu > li.current > a.current:after {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
@@ -488,16 +482,6 @@ body.more-filters-opened .more-filters:focus:before {
   color: #fff;
 }
 
-/* Customize */
-#customize-theme-controls .widget-area-select .selected {
-  background-color: #dd823b;
-  color: #fff;
-}
-
-#customize-footer-actions .devices button:focus {
-  border-bottom-color: #dd823b;
-}
-
 /* Responsive Component */
 div#wp-responsive-toggle a:before {
   color: #f3f1f1;
index 6ff5461b795ab40119d1af398652db15a31a241e..9c6ac75595912e55e413ce0c5e1d7163549f4154 100644 (file)
@@ -1 +1 @@
-html{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#dd823b}input[type=radio]:checked:before{background:#dd823b}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#dd823b;border-color:#c36922 #ad5d1e #ad5d1e;color:#fff;-webkit-box-shadow:0 1px 0 #ad5d1e;box-shadow:0 1px 0 #ad5d1e;text-shadow:0 -1px 1px #ad5d1e,1px 0 1px #ad5d1e,0 1px 1px #ad5d1e,-1px 0 1px #ad5d1e}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#df8a48;border-color:#ad5d1e;color:#fff;-webkit-box-shadow:0 1px 0 #ad5d1e;box-shadow:0 1px 0 #ad5d1e}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #c36922,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #c36922,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#c36922;border-color:#ad5d1e;-webkit-box-shadow:inset 0 2px 0 #ad5d1e;box-shadow:inset 0 2px 0 #ad5d1e}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cbc7!important;background:#cc6d23!important;border-color:#ad5d1e!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ad5d1e!important;box-shadow:0 2px 0 #ad5d1e!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ad5d1e!important;box-shadow:inset 0 3px 0 #ad5d1e!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#cf4944}.wp-core-ui .wp-ui-text-primary{color:#cf4944}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#dd823b}.wp-core-ui .wp-ui-text-highlight{color:#dd823b}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#ccaf0b}.wp-core-ui .wp-ui-text-notification{color:#ccaf0b}.wp-core-ui .wp-ui-text-icon{color:#f3f1f1}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#cf4944}.view-switch a.current:before{color:#cf4944}.view-switch a:hover:before{color:#ccaf0b}#adminmenu,#adminmenuback,#adminmenuwrap{background:#cf4944}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f1f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#dd823b}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#be3631}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#be3631}#adminmenu .wp-submenu .wp-submenu-head{color:#f1c8c7}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#f1c8c7}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#f7e3d3}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#f7e3d3}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#dd823b}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#ccaf0b}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#be3631}#collapse-menu{color:#f3f1f1}#collapse-menu:hover{color:#fff}#collapse-button div:after{color:#f3f1f1}#collapse-menu:hover #collapse-button div:after{color:#fff}#wpadminbar{color:#fff;background:#cf4944}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f1f1}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#f7e3d3;background:#be3631}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#f7e3d3}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#be3631}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#cf6b67}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#f1c8c7}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f1f1}#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:#f7e3d3}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#f7e3d3}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f3f1f1}#wpadminbar #adminbarsearch:before{color:#f3f1f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#d66560}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#d66560;background-color:#d66560}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#f7e3d3}#wpadminbar #wp-admin-bar-user-info .username{color:#f1c8c7}.wp-pointer .wp-pointer-content h3{background-color:#dd823b;border-color:#d97426}.wp-pointer .wp-pointer-content h3:before{color:#dd823b}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#dd823b}.media-item .bar,.media-progress-bar div{background-color:#dd823b}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #dd823b;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #dd823b}.attachment.details .check{background-color:#dd823b;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 3px #dd823b}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#dd823b}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#dd823b}.theme-filter.current,.theme-section.current{border-bottom-color:#cf4944}body.more-filters-opened .more-filters{color:#fff;background-color:#cf4944}#customize-theme-controls .widget-area-select .selected,.widgets-chooser li.widgets-chooser-selected{background-color:#dd823b;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#dd823b;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}#customize-footer-actions .devices button:focus{border-bottom-color:#dd823b}div#wp-responsive-toggle a:before{color:#f3f1f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#dd823b}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#be3631}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f3f1f1}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#dd823b}
\ No newline at end of file
+body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#dd823b}input[type=radio]:checked:before{background:#dd823b}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#dd823b;border-color:#c36922 #ad5d1e #ad5d1e;color:#fff;-webkit-box-shadow:0 1px 0 #ad5d1e;box-shadow:0 1px 0 #ad5d1e;text-shadow:0 -1px 1px #ad5d1e,1px 0 1px #ad5d1e,0 1px 1px #ad5d1e,-1px 0 1px #ad5d1e}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#df8a48;border-color:#ad5d1e;color:#fff;-webkit-box-shadow:0 1px 0 #ad5d1e;box-shadow:0 1px 0 #ad5d1e}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #c36922,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #c36922,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#c36922;border-color:#ad5d1e;-webkit-box-shadow:inset 0 2px 0 #ad5d1e;box-shadow:inset 0 2px 0 #ad5d1e}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#d1cbc7!important;background:#cc6d23!important;border-color:#ad5d1e!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #ad5d1e!important;box-shadow:0 2px 0 #ad5d1e!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #ad5d1e!important;box-shadow:inset 0 3px 0 #ad5d1e!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#cf4944}.wp-core-ui .wp-ui-text-primary{color:#cf4944}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#dd823b}.wp-core-ui .wp-ui-text-highlight{color:#dd823b}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#ccaf0b}.wp-core-ui .wp-ui-text-notification{color:#ccaf0b}.wp-core-ui .wp-ui-text-icon{color:#f3f1f1}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#cf4944}.view-switch a.current:before{color:#cf4944}.view-switch a:hover:before{color:#ccaf0b}#adminmenu,#adminmenuback,#adminmenuwrap{background:#cf4944}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f3f1f1}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#dd823b}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#be3631}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#be3631}#adminmenu .wp-submenu .wp-submenu-head{color:#f1c8c7}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#f1c8c7}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#f7e3d3}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#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:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#f7e3d3}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#dd823b}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#ccaf0b}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#be3631}#collapse-button{color:#f3f1f1}#collapse-button:focus,#collapse-button:hover{color:#f7e3d3}#wpadminbar{color:#fff;background:#cf4944}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f3f1f1}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#f7e3d3;background:#be3631}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#f7e3d3}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#be3631}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#cf6b67}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#f1c8c7}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f3f1f1}#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 .ab-icon: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:#f7e3d3}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#f7e3d3}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f3f1f1}#wpadminbar #adminbarsearch:before{color:#f3f1f1}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#d66560}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#d66560;background-color:#d66560}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#f7e3d3}#wpadminbar #wp-admin-bar-user-info .username{color:#f1c8c7}.wp-pointer .wp-pointer-content h3{background-color:#dd823b;border-color:#d97426}.wp-pointer .wp-pointer-content h3:before{color:#dd823b}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#dd823b}.media-item .bar,.media-progress-bar div{background-color:#dd823b}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #dd823b;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #dd823b}.attachment.details .check{background-color:#dd823b;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 2px #dd823b}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #dd823b;box-shadow:0 0 0 1px #fff,0 0 0 3px #dd823b}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#dd823b}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#dd823b}.theme-filter.current,.theme-section.current{border-bottom-color:#cf4944}body.more-filters-opened .more-filters{color:#fff;background-color:#cf4944}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#dd823b;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#dd823b;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f3f1f1}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#dd823b}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#be3631}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f3f1f1}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#dd823b}
\ No newline at end of file
index e660523da3bcbe02e1fb82ceeae3633ea5728375..e7a5f54b9fcd5165c392886417cf85017e9734e3 100644 (file)
@@ -572,10 +572,20 @@ code {
        font-size: 23px;
        font-weight: 400;
        margin: 0;
-       padding: 9px 0 4px 15px;
+       padding: 9px 0 4px 0;
        line-height: 29px;
 }
 
+.wrap h1.wp-heading-inline {
+       display: inline-block;
+       margin-left: 5px;
+}
+
+.wp-header-end {
+       visibility: hidden;
+       margin: -2px 0 0;
+}
+
 .subtitle {
        margin: 0;
        padding-right: 25px;
@@ -608,6 +618,10 @@ code {
        outline: 0;
 }
 
+.wrap .wp-heading-inline + .page-title-action {
+       margin-right: 0;
+}
+
 .wrap .add-new-h2:hover, /* deprecated */
 .wrap .page-title-action:hover {
        border-color: #008EC2;
@@ -680,7 +694,7 @@ ul.striped > :nth-child(odd),
 }
 
 .wp-ui-highlight {
-       color: white;
+       color: #fff;
        background-color: #1e8cbe;
 }
 .wp-ui-text-highlight {
@@ -759,7 +773,7 @@ img.emoji {
 
 /* @todo can we combine these into a class or use an existing dashicon one? */
 .welcome-panel .welcome-panel-close:before,
-.tagchecklist span a:before,
+.tagchecklist .ntdelbutton .remove-tag-icon:before,
 #bulk-titles div a:before,
 .notice-dismiss:before {
        background: none;
@@ -779,18 +793,41 @@ img.emoji {
        margin: 0;
 }
 
-.tagchecklist span a:before,
 #bulk-titles div a:before {
        margin: 1px 0;
 }
 
+.tagchecklist .ntdelbutton .remove-tag-icon:before {
+       margin-right: 2px;
+       -webkit-border-radius: 50%;
+       border-radius: 50%;
+       color: #0073aa;
+       /* vertically center the icon cross browsers */
+       line-height: 1.28;
+}
+
+.tagchecklist .ntdelbutton:focus {
+       outline: 0;
+}
+
 .welcome-panel .welcome-panel-close:hover:before,
 .welcome-panel .welcome-panel-close:focus:before,
-.tagchecklist span a:hover:before,
-#bulk-titles div a:hover:before {
+.tagchecklist .ntdelbutton:hover .remove-tag-icon:before,
+.tagchecklist .ntdelbutton:focus .remove-tag-icon:before,
+#bulk-titles div a:hover:before,
+#bulk-titles div a:focus:before {
        color: #c00;
 }
 
+.tagchecklist .ntdelbutton:focus .remove-tag-icon: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);
+}
+
 .key-labels label {
        line-height: 24px;
 }
@@ -826,6 +863,8 @@ hr {
        border-bottom: 1px solid #fafafa;
 }
 
+.widget-control-remove,
+.widget-control-remove:focus,
 .row-actions span.delete a,
 .row-actions span.trash a,
 .row-actions span.spam a,
@@ -842,7 +881,6 @@ hr {
 abbr.required,
 span.required,
 .file-error,
-.widget-control-remove:hover,
 .row-actions .delete a:hover,
 .row-actions .trash a:hover,
 .row-actions .spam a:hover,
@@ -854,10 +892,13 @@ span.required,
 #media-items a.delete-permanently:hover,
 #nav-menu-footer .menu-delete:hover {
        color: #f00;
-       text-decoration: none;
        border: none;
 }
 
+.widget-control-remove:hover {
+       color: #f00;
+}
+
 /*------------------------------------------------------------------------------
   3.0 - Actions
 ------------------------------------------------------------------------------*/
@@ -870,10 +911,8 @@ span.required,
 }
 
 #delete-action {
-       line-height: 28px;
-       vertical-align: middle;
-       text-align: right;
        float: right;
+       line-height: 28px;
 }
 
 #publishing-action {
@@ -1043,39 +1082,53 @@ th.action-links {
        display: inline-block;
 }
 
-.wp-filter .drawer-toggle {
-       display: inline-block;
-       margin: 0 10px;
-       padding: 4px 6px;
+.wp-filter .button.drawer-toggle {
+       margin: 10px 9px 0;
+       padding: 0 6px 0 10px;
+       border-color: transparent;
+       background-color: transparent;
        color: #666;
-       cursor: pointer;
+       vertical-align: baseline;
+       -webkit-box-shadow: none;
+       box-shadow: none;
 }
 
 .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;
+       font: normal 16px/1 dashicons;
+       vertical-align: text-bottom;
        -webkit-font-smoothing: antialiased;
+       -moz-osx-font-smoothing: grayscale;
 }
 
-.wp-filter .drawer-toggle:hover,
-.wp-filter .drawer-toggle:hover:before {
+.wp-filter .button.drawer-toggle:hover,
+.wp-filter .drawer-toggle:hover:before,
+.wp-filter .button.drawer-toggle:focus,
+.wp-filter .drawer-toggle:focus:before {
+       background-color: transparent;
        color: #00a0d2;
 }
 
+.wp-filter .button.drawer-toggle:hover,
+.wp-filter .button.drawer-toggle:focus:active {
+       border-color: transparent;
+}
+
+.wp-filter .button.drawer-toggle:focus {
+       border-color: #5b9dd9;
+}
+
+.wp-filter .button.drawer-toggle:active {
+       background: transparent;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       -webkit-transform: none;
+       -ms-transform: none;
+       transform: none;
+}
+
 .wp-filter .drawer-toggle.current:before {
        color: #fff;
 }
@@ -1090,7 +1143,7 @@ th.action-links {
        width: 100%;
 }
 
-.show-favorites-form .wp-filter .favorites-form {
+.show-favorites-form .favorites-form {
        display: block;
 }
 
@@ -1108,23 +1161,22 @@ th.action-links {
        width: 100%;
 }
 
-.show-filters .wp-filter .drawer-toggle:hover,
-.show-filters .wp-filter .drawer-toggle:focus {
-       background: rgb(46, 162, 204);
-}
-
 .show-filters .filter-links a.current {
        border-bottom: none;
 }
 
-.show-filters .wp-filter .drawer-toggle {
+.show-filters .wp-filter .button.drawer-toggle {
        -webkit-border-radius: 2px;
        border-radius: 2px;
-       border: none;
        background: #72777c;
        color: #fff;
 }
 
+.show-filters .wp-filter .drawer-toggle:hover,
+.show-filters .wp-filter .drawer-toggle:focus {
+       background: rgb(46, 162, 204);
+}
+
 .show-filters .wp-filter .drawer-toggle:before {
        color: #fff;
 }
@@ -1168,9 +1220,15 @@ th.action-links {
 }
 
 .filter-drawer .buttons {
+       clear: both;
        margin-bottom: 20px;
 }
 
+.filter-drawer .filter-group + .buttons {
+       margin-bottom: 0;
+       padding-top: 20px;
+}
+
 .filter-drawer .buttons .button span {
        display: inline-block;
        opacity: 0.8;
@@ -1183,6 +1241,21 @@ th.action-links {
        margin-right: 10px;
 }
 
+.wp-filter .button-link.edit-filters {
+       color: #0073aa;
+       text-decoration: underline;
+       padding: 0 5px;
+       line-height: 28px;
+}
+
+.wp-filter .button-link.edit-filters:hover {
+       color: #00a0d2;
+}
+
+.wp-filter .button-link.edit-filters:focus {
+       color: #124964;
+}
+
 .filtered-by {
        display: none;
        margin: 0;
@@ -1224,6 +1297,7 @@ th.action-links {
        padding: 20px;
 }
 
+.show-filters .favorites-form,
 .show-filters .content-filterable,
 .show-filters.filters-applied.loading-content .content-filterable,
 .loading-content .content-filterable,
@@ -2098,14 +2172,6 @@ html.wp-toolbar {
        font-style: italic;
 }
 
-#wpfooter a {
-       text-decoration: none;
-}
-
-#wpfooter a:hover {
-       text-decoration: underline;
-}
-
 /*------------------------------------------------------------------------------
   25.0 - Tabbed Admin Screen Interface (Experimental)
 ------------------------------------------------------------------------------*/
@@ -2160,7 +2226,7 @@ h3 .nav-tab, /* Back-compat for pre-4.4 */
 
 h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */
 .wrap h2.nav-tab-wrapper, /* higher specificity to override .wrap > h2:first-child */
-h3.nav-tab-wrapper {
+.nav-tab-wrapper {
        border-bottom: 1px solid #ccc;
        margin: 0;
        padding-top: 9px;
@@ -2823,6 +2889,11 @@ div.action-links {
        font-size: 13px;
 }
 
+/* For non-js plugin installation screen ticket #36430. */
+.update-php .button.button-primary {
+       margin-left: 1em;
+}
+
 @media screen and ( max-width: 771px ) {
        #plugin-information-title.with-banner {
                height: 100px;
@@ -2865,7 +2936,7 @@ div.action-links {
        #section-holder {
                position: static;
                margin: 0;
-               padding-bottom: 70px; /* reset from the two column height fix, plus accomodate footer */
+               padding-bottom: 70px; /* reset from the two column height fix, plus accommodate footer */
        }
 
        #plugin-information .fyi h3,
@@ -3333,7 +3404,8 @@ img {
        display: none;
 }
 
-.control-section .accordion-section-title {
+.control-section .accordion-section-title,
+.customize-pane-child .accordion-section-title {
        border-right: none;
        border-left: none;
        padding: 10px 14px 11px 10px;
@@ -3341,7 +3413,8 @@ img {
        background: #fff;
 }
 
-.control-section .accordion-section-title:after {
+.control-section .accordion-section-title:after,
+.customize-pane-child .accordion-section-title:after {
        top: 11px;
 }
 
@@ -3535,9 +3608,7 @@ img {
        .sidebar-name-arrow,
        .sidebar-name:hover .sidebar-name-arrow,
        .meta-box-sortables .postbox:hover .handlediv,
-       .tagchecklist span a,
        #bulk-titles div a,
-       .tagchecklist span a:hover,
        #bulk-titles div a:hover {
                background: none !important;
        }
@@ -3597,6 +3668,10 @@ img {
                display: none !important;
        }
 
+       .wrap h1.wp-heading-inline {
+               margin-bottom: 0.5em;
+       }
+
        .wrap .add-new-h2, /* deprecated */
        .wrap .add-new-h2:active, /* deprecated */
        .wrap .page-title-action,
@@ -3722,6 +3797,12 @@ img {
        .filter-drawer .filter-group-feature label {
                line-height: 25px;
        }
+
+       .wp-filter .button.drawer-toggle {
+               font-size: 13px;
+               line-height: 26px;
+               height: 28px;
+       }
 }
 
 /* Smartphone */
@@ -3747,7 +3828,7 @@ img {
 
        h1.nav-tab-wrapper,
        .wrap h2.nav-tab-wrapper,
-       h3.nav-tab-wrapper {
+       .nav-tab-wrapper {
                border-bottom: 0;
        }
 
index 139b6b626284f0b5ead702296fbac3c374e1d396..2fb455e1b5900be6b93e8aec8d93a7183c5f3cd5 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-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"}/*!
+.subsubsub a,.widefat a,.wp-filter a{text-decoration:none}#ajax-loading,#screen-meta .screen-reader-text,.ajax-feedback,.ajax-loading,.imgedit-wait-spin,.list-ajax-loading,.spinner,.wp-header-end{visibility:hidden}#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}h2,h3,p{margin:1em 0}#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}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}.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}.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 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;line-height:29px}.wrap h1.wp-heading-inline{display:inline-block;margin-left:5px}.wp-header-end{margin:-2px 0 0}.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 .wp-heading-inline+.page-title-action{margin-right: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}#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 .ntdelbutton .remove-tag-icon: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{margin:1px 0}.tagchecklist .ntdelbutton .remove-tag-icon:before{margin-right:2px;-webkit-border-radius:50%;border-radius:50%;color:#0073aa;line-height:1.28}.tagchecklist .ntdelbutton:focus{outline:0}#bulk-titles div a:focus:before,#bulk-titles div a:hover:before,.tagchecklist .ntdelbutton:focus .remove-tag-icon:before,.tagchecklist .ntdelbutton:hover .remove-tag-icon:before,.welcome-panel .welcome-panel-close:focus:before,.welcome-panel .welcome-panel-close:hover:before{color:#c00}.tagchecklist .ntdelbutton:focus .remove-tag-icon: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)}.filter-group,.wp-filter{position:relative;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04)}.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,.widget-control-remove,.widget-control-remove:focus{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,abbr.required,span.required{color:red;border:none}.widget-control-remove:hover{color:red}#major-publishing-actions{padding:10px;clear:both;border-top:1px solid #ddd;background:#f5f5f5}#delete-action{float:right;line-height:28px}#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}.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-links li>a,.wp-filter .search-form.search-plugins{display:inline-block}.filter-items{float:right}.filter-links,.filter-links li{display:inline-block;margin:0}.filter-links li>a{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 .button.drawer-toggle{margin:10px 9px 0;padding:0 6px 0 10px;border-color:transparent;background-color:transparent;color:#666;vertical-align:baseline;-webkit-box-shadow:none;box-shadow:none}.wp-filter .drawer-toggle:before{content:"\f111";margin:0 0 0 5px;color:#72777c;font:400 16px/1 dashicons;vertical-align:text-bottom;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-filter .button.drawer-toggle:focus,.wp-filter .button.drawer-toggle:hover,.wp-filter .drawer-toggle:focus:before,.wp-filter .drawer-toggle:hover:before{background-color:transparent;color:#00a0d2}.wp-filter .button.drawer-toggle:focus:active,.wp-filter .button.drawer-toggle:hover{border-color:transparent}.wp-filter .button.drawer-toggle:focus{border-color:#5b9dd9}.wp-filter .button.drawer-toggle:active{background:0 0;-webkit-box-shadow:none;box-shadow:none;-webkit-transform:none;-ms-transform:none;transform:none}.filter-drawer,.wp-filter .favorites-form{margin:0 -20px;padding:20px;border-top:1px solid #eee;background:#fafafa}.wp-filter .drawer-toggle.current:before{color:#fff}.wp-filter .favorites-form{display:none;overflow:hidden;width:100%}.show-favorites-form .favorites-form{display:block}.filter-drawer{display:none}.show-filters .filter-drawer{display:block;overflow:hidden;width:100%}.show-filters .filter-links a.current{border-bottom:none}.show-filters .wp-filter .button.drawer-toggle{-webkit-border-radius:2px;border-radius:2px;background:#72777c;color:#fff}.filter-group,.filtered-by .tag{border:1px solid #e5e5e5;background:#fff}.show-filters .wp-filter .drawer-toggle:focus,.show-filters .wp-filter .drawer-toggle:hover{background:#2ea2cc}.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{clear:both;margin-bottom:20px}.filter-drawer .filter-group+.buttons{margin-bottom:0;padding-top: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}.wp-filter .button-link.edit-filters{color:#0073aa;text-decoration:underline;padding:0 5px;line-height:28px}.wp-filter .button-link.edit-filters:hover{color:#00a0d2}.wp-filter .button-link.edit-filters:focus{color:#124964}.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 .favorites-form,.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-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-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,.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}.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}.nav-tab-wrapper,.wrap h2.nav-tab-wrapper,h1.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;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}.update-php .button.button-primary{margin-left:1em}@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 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
+ */.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,.customize-pane-child .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,.customize-pane-child .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,.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 h1.wp-heading-inline{margin-bottom:.5em}.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}.wp-filter .button.drawer-toggle{font-size:13px;line-height:26px;height:28px}}@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}.nav-tab-wrapper,.wrap h2.nav-tab-wrapper,h1.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 42c4c7be46e45ede577baf66cdf3d9616e453aa1..9b127c5195235979d04fd0a5fd90f43aac09a267 100644 (file)
@@ -572,10 +572,20 @@ code {
        font-size: 23px;
        font-weight: 400;
        margin: 0;
-       padding: 9px 15px 4px 0;
+       padding: 9px 0 4px 0;
        line-height: 29px;
 }
 
+.wrap h1.wp-heading-inline {
+       display: inline-block;
+       margin-right: 5px;
+}
+
+.wp-header-end {
+       visibility: hidden;
+       margin: -2px 0 0;
+}
+
 .subtitle {
        margin: 0;
        padding-left: 25px;
@@ -608,6 +618,10 @@ code {
        outline: 0;
 }
 
+.wrap .wp-heading-inline + .page-title-action {
+       margin-left: 0;
+}
+
 .wrap .add-new-h2:hover, /* deprecated */
 .wrap .page-title-action:hover {
        border-color: #008EC2;
@@ -680,7 +694,7 @@ ul.striped > :nth-child(odd),
 }
 
 .wp-ui-highlight {
-       color: white;
+       color: #fff;
        background-color: #1e8cbe;
 }
 .wp-ui-text-highlight {
@@ -759,7 +773,7 @@ img.emoji {
 
 /* @todo can we combine these into a class or use an existing dashicon one? */
 .welcome-panel .welcome-panel-close:before,
-.tagchecklist span a:before,
+.tagchecklist .ntdelbutton .remove-tag-icon:before,
 #bulk-titles div a:before,
 .notice-dismiss:before {
        background: none;
@@ -779,18 +793,41 @@ img.emoji {
        margin: 0;
 }
 
-.tagchecklist span a:before,
 #bulk-titles div a:before {
        margin: 1px 0;
 }
 
+.tagchecklist .ntdelbutton .remove-tag-icon:before {
+       margin-left: 2px;
+       -webkit-border-radius: 50%;
+       border-radius: 50%;
+       color: #0073aa;
+       /* vertically center the icon cross browsers */
+       line-height: 1.28;
+}
+
+.tagchecklist .ntdelbutton:focus {
+       outline: 0;
+}
+
 .welcome-panel .welcome-panel-close:hover:before,
 .welcome-panel .welcome-panel-close:focus:before,
-.tagchecklist span a:hover:before,
-#bulk-titles div a:hover:before {
+.tagchecklist .ntdelbutton:hover .remove-tag-icon:before,
+.tagchecklist .ntdelbutton:focus .remove-tag-icon:before,
+#bulk-titles div a:hover:before,
+#bulk-titles div a:focus:before {
        color: #c00;
 }
 
+.tagchecklist .ntdelbutton:focus .remove-tag-icon: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);
+}
+
 .key-labels label {
        line-height: 24px;
 }
@@ -826,6 +863,8 @@ hr {
        border-bottom: 1px solid #fafafa;
 }
 
+.widget-control-remove,
+.widget-control-remove:focus,
 .row-actions span.delete a,
 .row-actions span.trash a,
 .row-actions span.spam a,
@@ -842,7 +881,6 @@ hr {
 abbr.required,
 span.required,
 .file-error,
-.widget-control-remove:hover,
 .row-actions .delete a:hover,
 .row-actions .trash a:hover,
 .row-actions .spam a:hover,
@@ -854,10 +892,13 @@ span.required,
 #media-items a.delete-permanently:hover,
 #nav-menu-footer .menu-delete:hover {
        color: #f00;
-       text-decoration: none;
        border: none;
 }
 
+.widget-control-remove:hover {
+       color: #f00;
+}
+
 /*------------------------------------------------------------------------------
   3.0 - Actions
 ------------------------------------------------------------------------------*/
@@ -870,10 +911,8 @@ span.required,
 }
 
 #delete-action {
-       line-height: 28px;
-       vertical-align: middle;
-       text-align: left;
        float: left;
+       line-height: 28px;
 }
 
 #publishing-action {
@@ -1043,39 +1082,53 @@ th.action-links {
        display: inline-block;
 }
 
-.wp-filter .drawer-toggle {
-       display: inline-block;
-       margin: 0 10px;
-       padding: 4px 6px;
+.wp-filter .button.drawer-toggle {
+       margin: 10px 9px 0;
+       padding: 0 10px 0 6px;
+       border-color: transparent;
+       background-color: transparent;
        color: #666;
-       cursor: pointer;
+       vertical-align: baseline;
+       -webkit-box-shadow: none;
+       box-shadow: none;
 }
 
 .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;
+       font: normal 16px/1 dashicons;
+       vertical-align: text-bottom;
        -webkit-font-smoothing: antialiased;
+       -moz-osx-font-smoothing: grayscale;
 }
 
-.wp-filter .drawer-toggle:hover,
-.wp-filter .drawer-toggle:hover:before {
+.wp-filter .button.drawer-toggle:hover,
+.wp-filter .drawer-toggle:hover:before,
+.wp-filter .button.drawer-toggle:focus,
+.wp-filter .drawer-toggle:focus:before {
+       background-color: transparent;
        color: #00a0d2;
 }
 
+.wp-filter .button.drawer-toggle:hover,
+.wp-filter .button.drawer-toggle:focus:active {
+       border-color: transparent;
+}
+
+.wp-filter .button.drawer-toggle:focus {
+       border-color: #5b9dd9;
+}
+
+.wp-filter .button.drawer-toggle:active {
+       background: transparent;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       -webkit-transform: none;
+       -ms-transform: none;
+       transform: none;
+}
+
 .wp-filter .drawer-toggle.current:before {
        color: #fff;
 }
@@ -1090,7 +1143,7 @@ th.action-links {
        width: 100%;
 }
 
-.show-favorites-form .wp-filter .favorites-form {
+.show-favorites-form .favorites-form {
        display: block;
 }
 
@@ -1108,23 +1161,22 @@ th.action-links {
        width: 100%;
 }
 
-.show-filters .wp-filter .drawer-toggle:hover,
-.show-filters .wp-filter .drawer-toggle:focus {
-       background: rgb(46, 162, 204);
-}
-
 .show-filters .filter-links a.current {
        border-bottom: none;
 }
 
-.show-filters .wp-filter .drawer-toggle {
+.show-filters .wp-filter .button.drawer-toggle {
        -webkit-border-radius: 2px;
        border-radius: 2px;
-       border: none;
        background: #72777c;
        color: #fff;
 }
 
+.show-filters .wp-filter .drawer-toggle:hover,
+.show-filters .wp-filter .drawer-toggle:focus {
+       background: rgb(46, 162, 204);
+}
+
 .show-filters .wp-filter .drawer-toggle:before {
        color: #fff;
 }
@@ -1168,9 +1220,15 @@ th.action-links {
 }
 
 .filter-drawer .buttons {
+       clear: both;
        margin-bottom: 20px;
 }
 
+.filter-drawer .filter-group + .buttons {
+       margin-bottom: 0;
+       padding-top: 20px;
+}
+
 .filter-drawer .buttons .button span {
        display: inline-block;
        opacity: 0.8;
@@ -1183,6 +1241,21 @@ th.action-links {
        margin-left: 10px;
 }
 
+.wp-filter .button-link.edit-filters {
+       color: #0073aa;
+       text-decoration: underline;
+       padding: 0 5px;
+       line-height: 28px;
+}
+
+.wp-filter .button-link.edit-filters:hover {
+       color: #00a0d2;
+}
+
+.wp-filter .button-link.edit-filters:focus {
+       color: #124964;
+}
+
 .filtered-by {
        display: none;
        margin: 0;
@@ -1224,6 +1297,7 @@ th.action-links {
        padding: 20px;
 }
 
+.show-filters .favorites-form,
 .show-filters .content-filterable,
 .show-filters.filters-applied.loading-content .content-filterable,
 .loading-content .content-filterable,
@@ -2098,14 +2172,6 @@ html.wp-toolbar {
        font-style: italic;
 }
 
-#wpfooter a {
-       text-decoration: none;
-}
-
-#wpfooter a:hover {
-       text-decoration: underline;
-}
-
 /*------------------------------------------------------------------------------
   25.0 - Tabbed Admin Screen Interface (Experimental)
 ------------------------------------------------------------------------------*/
@@ -2160,7 +2226,7 @@ h3 .nav-tab, /* Back-compat for pre-4.4 */
 
 h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */
 .wrap h2.nav-tab-wrapper, /* higher specificity to override .wrap > h2:first-child */
-h3.nav-tab-wrapper {
+.nav-tab-wrapper {
        border-bottom: 1px solid #ccc;
        margin: 0;
        padding-top: 9px;
@@ -2823,6 +2889,11 @@ div.action-links {
        font-size: 13px;
 }
 
+/* For non-js plugin installation screen ticket #36430. */
+.update-php .button.button-primary {
+       margin-right: 1em;
+}
+
 @media screen and ( max-width: 771px ) {
        #plugin-information-title.with-banner {
                height: 100px;
@@ -2865,7 +2936,7 @@ div.action-links {
        #section-holder {
                position: static;
                margin: 0;
-               padding-bottom: 70px; /* reset from the two column height fix, plus accomodate footer */
+               padding-bottom: 70px; /* reset from the two column height fix, plus accommodate footer */
        }
 
        #plugin-information .fyi h3,
@@ -3333,7 +3404,8 @@ img {
        display: none;
 }
 
-.control-section .accordion-section-title {
+.control-section .accordion-section-title,
+.customize-pane-child .accordion-section-title {
        border-left: none;
        border-right: none;
        padding: 10px 10px 11px 14px;
@@ -3341,7 +3413,8 @@ img {
        background: #fff;
 }
 
-.control-section .accordion-section-title:after {
+.control-section .accordion-section-title:after,
+.customize-pane-child .accordion-section-title:after {
        top: 11px;
 }
 
@@ -3535,9 +3608,7 @@ img {
        .sidebar-name-arrow,
        .sidebar-name:hover .sidebar-name-arrow,
        .meta-box-sortables .postbox:hover .handlediv,
-       .tagchecklist span a,
        #bulk-titles div a,
-       .tagchecklist span a:hover,
        #bulk-titles div a:hover {
                background: none !important;
        }
@@ -3597,6 +3668,10 @@ img {
                display: none !important;
        }
 
+       .wrap h1.wp-heading-inline {
+               margin-bottom: 0.5em;
+       }
+
        .wrap .add-new-h2, /* deprecated */
        .wrap .add-new-h2:active, /* deprecated */
        .wrap .page-title-action,
@@ -3722,6 +3797,12 @@ img {
        .filter-drawer .filter-group-feature label {
                line-height: 25px;
        }
+
+       .wp-filter .button.drawer-toggle {
+               font-size: 13px;
+               line-height: 26px;
+               height: 28px;
+       }
 }
 
 /* Smartphone */
@@ -3747,7 +3828,7 @@ img {
 
        h1.nav-tab-wrapper,
        .wrap h2.nav-tab-wrapper,
-       h3.nav-tab-wrapper {
+       .nav-tab-wrapper {
                border-bottom: 0;
        }
 
index ffa633b2331a6c39684ad72aeac5c4d45e5b7a51..fa9b93ca40e3c0163d8b1cc9be8b0593e46cf542 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-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"}/*!
+.subsubsub a,.widefat a,.wp-filter a{text-decoration:none}#ajax-loading,#screen-meta .screen-reader-text,.ajax-feedback,.ajax-loading,.imgedit-wait-spin,.list-ajax-loading,.spinner,.wp-header-end{visibility:hidden}#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}h2,h3,p{margin:1em 0}#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}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}.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}.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 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 0 4px;line-height:29px}.wrap h1.wp-heading-inline{display:inline-block;margin-right:5px}.wp-header-end{margin:-2px 0 0}.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 .wp-heading-inline+.page-title-action{margin-left: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}#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 .ntdelbutton .remove-tag-icon: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{margin:1px 0}.tagchecklist .ntdelbutton .remove-tag-icon:before{margin-left:2px;-webkit-border-radius:50%;border-radius:50%;color:#0073aa;line-height:1.28}.tagchecklist .ntdelbutton:focus{outline:0}#bulk-titles div a:focus:before,#bulk-titles div a:hover:before,.tagchecklist .ntdelbutton:focus .remove-tag-icon:before,.tagchecklist .ntdelbutton:hover .remove-tag-icon:before,.welcome-panel .welcome-panel-close:focus:before,.welcome-panel .welcome-panel-close:hover:before{color:#c00}.tagchecklist .ntdelbutton:focus .remove-tag-icon: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)}.filter-group,.wp-filter{position:relative;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04)}.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,.widget-control-remove,.widget-control-remove:focus{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,abbr.required,span.required{color:red;border:none}.widget-control-remove:hover{color:red}#major-publishing-actions{padding:10px;clear:both;border-top:1px solid #ddd;background:#f5f5f5}#delete-action{float:left;line-height:28px}#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}.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-links li>a,.wp-filter .search-form.search-plugins{display:inline-block}.filter-items{float:left}.filter-links,.filter-links li{display:inline-block;margin:0}.filter-links li>a{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 .button.drawer-toggle{margin:10px 9px 0;padding:0 10px 0 6px;border-color:transparent;background-color:transparent;color:#666;vertical-align:baseline;-webkit-box-shadow:none;box-shadow:none}.wp-filter .drawer-toggle:before{content:"\f111";margin:0 5px 0 0;color:#72777c;font:400 16px/1 dashicons;vertical-align:text-bottom;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-filter .button.drawer-toggle:focus,.wp-filter .button.drawer-toggle:hover,.wp-filter .drawer-toggle:focus:before,.wp-filter .drawer-toggle:hover:before{background-color:transparent;color:#00a0d2}.wp-filter .button.drawer-toggle:focus:active,.wp-filter .button.drawer-toggle:hover{border-color:transparent}.wp-filter .button.drawer-toggle:focus{border-color:#5b9dd9}.wp-filter .button.drawer-toggle:active{background:0 0;-webkit-box-shadow:none;box-shadow:none;-webkit-transform:none;-ms-transform:none;transform:none}.filter-drawer,.wp-filter .favorites-form{margin:0 -20px;padding:20px;border-top:1px solid #eee;background:#fafafa}.wp-filter .drawer-toggle.current:before{color:#fff}.wp-filter .favorites-form{display:none;overflow:hidden;width:100%}.show-favorites-form .favorites-form{display:block}.filter-drawer{display:none}.show-filters .filter-drawer{display:block;overflow:hidden;width:100%}.show-filters .filter-links a.current{border-bottom:none}.show-filters .wp-filter .button.drawer-toggle{-webkit-border-radius:2px;border-radius:2px;background:#72777c;color:#fff}.filter-group,.filtered-by .tag{border:1px solid #e5e5e5;background:#fff}.show-filters .wp-filter .drawer-toggle:focus,.show-filters .wp-filter .drawer-toggle:hover{background:#2ea2cc}.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{clear:both;margin-bottom:20px}.filter-drawer .filter-group+.buttons{margin-bottom:0;padding-top: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}.wp-filter .button-link.edit-filters{color:#0073aa;text-decoration:underline;padding:0 5px;line-height:28px}.wp-filter .button-link.edit-filters:hover{color:#00a0d2}.wp-filter .button-link.edit-filters:focus{color:#124964}.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 .favorites-form,.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-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-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,.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}.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}.nav-tab-wrapper,.wrap h2.nav-tab-wrapper,h1.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;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}.update-php .button.button-primary{margin-right:1em}@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 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
+ */.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,.customize-pane-child .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,.customize-pane-child .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,.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 h1.wp-heading-inline{margin-bottom:.5em}.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}.wp-filter .button.drawer-toggle{font-size:13px;line-height:26px;height:28px}}@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}.nav-tab-wrapper,.wrap h2.nav-tab-wrapper,h1.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 a0f4c0b402c14026bb53d186e312751dc39eed64..f0d7220c645cce1d0623c39f482cd2d4df5d0d78 100644 (file)
@@ -3,7 +3,8 @@ body {
        -webkit-text-size-adjust: 100%;
 }
 
-#customize-controls a {
+.customize-controls-close,
+.widget-control-actions a {
        text-decoration: none;
 }
 
@@ -20,7 +21,7 @@ body {
 }
 
 #customize-controls .description {
-       color: #555;
+       color: #555d66;
 }
 
 #customize-header-actions .button-primary {
@@ -48,14 +49,40 @@ body {
 
 #customize-controls .customize-info {
        border: none;
-       border-top: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        margin-bottom: 15px;
 }
 
+#customize-controls .customize-info.section-meta {
+       margin-bottom: 15px;
+}
+
+#customize-controls .customize-info.is-in-view,
+#customize-controls .customize-section-title.is-in-view {
+       position: absolute;
+       z-index: 9;
+       width: 100%;
+       -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
+       box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
+}
+
+#customize-controls .customize-section-title.is-in-view {
+       margin-top: 0;
+}
+
+#customize-controls .customize-info.is-in-view + .accordion-section {
+       margin-top: 15px;
+}
+
+#customize-controls .customize-info.is-sticky,
+#customize-controls .customize-section-title.is-sticky {
+       position: fixed;
+       top: 46px;
+}
+
 #customize-controls .customize-info .accordion-section-title {
        background: #fff;
-       color: #555;
+       color: #555d66;
        border-right: none;
        border-left: none;
        border-bottom: none;
@@ -65,7 +92,7 @@ body {
 #customize-controls .customize-info.open .accordion-section-title:after,
 #customize-controls .customize-info .accordion-section-title:hover:after,
 #customize-controls .customize-info .accordion-section-title:focus:after {
-       color: #333;
+       color: #32373c;
 }
 
 #customize-controls .customize-info .accordion-section-title:after {
@@ -77,8 +104,8 @@ body {
        line-height: 24px;
 }
 
-#customize-controls .control-section .customize-section-title h3,
-#customize-controls .control-section h3.customize-section-title,
+#customize-controls .customize-pane-child .customize-section-title h3,
+#customize-controls .customize-pane-child h3.customize-section-title,
 #customize-controls .customize-info .panel-title {
        font-size: 20px;
        font-weight: 200;
@@ -107,7 +134,7 @@ body {
        box-shadow: none;
        -webkit-appearance: none;
        background: transparent;
-       color: #555;
+       color: #555d66;
        border: none;
 }
 
@@ -124,22 +151,30 @@ body {
 }
 
 #customize-controls .customize-info .customize-panel-description,
+#customize-controls .customize-info .customize-section-description,
 #customize-controls .no-widget-areas-rendered-notice {
-       color: #555;
+       color: #555d66;
        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 {
+#customize-controls .customize-info .customize-section-description {
+       margin-bottom: 15px;
+}
+
+#customize-controls .customize-info .customize-panel-description p:first-child,
+#customize-controls .customize-info .customize-section-description p:first-child {
        margin-top: 0;
 }
 
-#customize-controls .customize-info .customize-panel-description p:last-child {
+#customize-controls .customize-info .customize-panel-description p:last-child,
+#customize-controls .customize-info .customize-section-description p:last-child {
        margin-bottom: 0;
 }
 
@@ -152,9 +187,22 @@ body {
 }
 
 #customize-theme-controls .accordion-section-title {
+       color: #555d66;
+       background-color: #fff;
+       border-bottom: 1px solid #ddd;
+       border-right: 4px solid #fff;
+       -webkit-transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
+       transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
+}
+
+#customize-controls #customize-theme-controls .customize-themes-panel .accordion-section-title {
        color: #555;
        background-color: #fff;
-       border-bottom: 1px solid #eee;
+       border-right: 4px solid #fff;
 }
 
 #customize-theme-controls .accordion-section-title:after {
@@ -163,7 +211,7 @@ body {
 }
 
 #customize-theme-controls .accordion-section-content {
-       color: #555;
+       color: #555d66;
        background: transparent;
 }
 
@@ -171,22 +219,27 @@ body {
 #customize-controls .control-section .accordion-section-title:hover,
 #customize-controls .control-section.open .accordion-section-title,
 #customize-controls .control-section .accordion-section-title:focus {
-       color: #23282d;
-       background: #f5f5f5;
+       color: #0073aa;
+       background: #f3f3f5;
+       border-right-color: #0073aa;
+}
+
+#accordion-section-themes + .control-section {
+       border-top: 1px solid #ddd;
 }
 
 .js .control-section:hover .accordion-section-title,
 .js .control-section .accordion-section-title:hover,
 .js .control-section.open .accordion-section-title,
 .js .control-section .accordion-section-title:focus {
-       background: #f5f5f5;
+       background: #f3f3f5;
 }
 
 #customize-theme-controls .control-section:hover > .accordion-section-title: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 .accordion-section-title:focus:after {
-       color: #23282d;
+       color: #0073aa;
 }
 
 #customize-theme-controls .control-section.open {
@@ -202,6 +255,11 @@ body {
        border-bottom-color: #ddd;
 }
 
+#customize-theme-controls .control-panel-content .control-section:nth-child(2),
+#customize-theme-controls .control-panel-nav_menus .control-section:nth-child(3) {
+       border-top: 1px solid #ddd;
+}
+
 #customize-theme-controls > ul {
        margin: 0;
 }
@@ -218,6 +276,109 @@ body {
        box-sizing: border-box;
 }
 
+#customize-info,
+#customize-theme-controls .customize-pane-parent,
+#customize-theme-controls .customize-pane-child {
+       overflow: visible;
+       width: 100%;
+       margin: 0;
+       padding: 0;
+       -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+       box-sizing: border-box;
+       -webkit-transition: 0.18s -webkit-transform cubic-bezier(0.645, 0.045, 0.355, 1);
+       transition: 0.18s -webkit-transform cubic-bezier(0.645, 0.045, 0.355, 1);
+       -webkit-transition: 0.18s transform cubic-bezier(0.645, 0.045, 0.355, 1);
+       transition: 0.18s transform cubic-bezier(0.645, 0.045, 0.355, 1);
+       -webkit-transition: 0.18s transform cubic-bezier(0.645, 0.045, 0.355, 1), 0.18s -webkit-transform cubic-bezier(0.645, 0.045, 0.355, 1);
+       transition: 0.18s transform cubic-bezier(0.645, 0.045, 0.355, 1), 0.18s -webkit-transform cubic-bezier(0.645, 0.045, 0.355, 1); /* easeInOutCubic */
+}
+
+#customize-info,
+#customize-theme-controls .customize-pane-parent {
+       position: relative;
+       visibility: visible;
+       height: auto;
+       max-height: none;
+       overflow: auto;
+       -webkit-transform: none;
+       -ms-transform: none;
+       transform: none;
+}
+
+#customize-theme-controls .customize-pane-child {
+       position: absolute;
+       top: 0;
+       right: 0;
+       visibility: hidden;
+       height: 0;
+       max-height: none;
+       overflow: hidden;
+       -webkit-transform: translateX(-100%);
+       -ms-transform: translateX(-100%);
+       transform: translateX(-100%);
+}
+
+#customize-theme-controls .customize-pane-child.open,
+#customize-theme-controls .customize-pane-child.current-panel,
+#customize-theme-controls .customize-themes-panel.customize-pane-child.current-panel {
+       -webkit-transform: none;
+       -ms-transform: none;
+       transform: none;
+}
+
+#customize-theme-controls .customize-themes-panel.customize-pane-child,
+.section-open #customize-theme-controls .customize-pane-parent,
+.in-sub-panel #customize-theme-controls .customize-pane-parent,
+.section-open #customize-info,
+.in-sub-panel #customize-info,
+.in-sub-panel.section-open #customize-theme-controls .customize-pane-child.current-panel,
+.in-themes-panel #customize-theme-controls .customize-pane-parent,
+.in-themes-panel #customize-info {
+       visibility: hidden;
+       height: 0;
+       overflow: hidden;
+       -webkit-transform: translateX(100%);
+       -ms-transform: translateX(100%);
+       transform: translateX(100%);
+}
+
+.section-open #customize-theme-controls .customize-pane-parent.busy,
+.in-sub-panel #customize-theme-controls .customize-pane-parent.busy,
+.in-themes-panel #customize-theme-controls .customize-pane-parent.busy,
+.section-open #customize-info.busy,
+.in-sub-panel #customize-info.busy,
+.in-themes-panel #customize-info.busy,
+.busy.section-open.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel,
+#customize-theme-controls .customize-pane-child.open,
+#customize-theme-controls .customize-pane-child.current-panel,
+#customize-theme-controls .customize-pane-child.busy {
+       visibility: visible;
+       height: auto;
+       overflow: auto;
+}
+
+.in-themes-panel #customize-theme-controls .customize-pane-parent,
+.in-themes-panel #customize-info {
+       -webkit-transform: translateX(-100%);
+       -ms-transform: translateX(-100%);
+       transform: translateX(-100%);
+}
+
+#customize-theme-controls .customize-pane-child.accordion-section-content,
+#customize-theme-controls .customize-pane-child.accordion-sub-container {
+       display: block;
+       overflow-x: hidden;
+}
+
+#customize-theme-controls .customize-pane-child.accordion-section-content {
+       padding: 12px;
+}
+
+#customize-theme-controls .customize-pane-child.menu li {
+       position: static;
+}
+
 .customize-section-description-container {
        margin-bottom: 15px;
 }
@@ -232,6 +393,10 @@ div.customize-section-description {
        margin-top: 22px;
 }
 
+.customize-info div.customize-section-description {
+       margin-top: 0;
+}
+
 div.customize-section-description p:first-child {
        margin-top: 0;
 }
@@ -254,42 +419,17 @@ 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%;
+       color: #555d66;
 }
 
 .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 {
+.accordion-sub-container.control-panel-content.busy {
        display: block;
 }
 
@@ -303,16 +443,21 @@ h3.customize-section-title {
        top: 0;
        right: 0;
        width: 45px;
-       height: 45px;
+       height: 41px;
        padding: 0 0 0 2px;
        background: #eee;
        border: none;
+       border-top: 4px solid #eee;
        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-transition: color .15s ease-in-out,
+                   border-color .15s ease-in-out,
+                   background .15s ease-in-out;
+       transition: color .15s ease-in-out,
+                   border-color .15s ease-in-out,
+                   background .15s ease-in-out;
        -webkit-box-sizing: content-box;
        -moz-box-sizing: content-box;
        box-sizing: content-box;
@@ -329,23 +474,22 @@ h3.customize-section-title {
        background: #fff;
        border: none;
        border-left: 1px solid #ddd;
+       border-right: 4px solid #fff;
        -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;
+       -webkit-transition: color .15s ease-in-out,
+                   border-color .15s ease-in-out,
+                   background .15s ease-in-out;
+       transition: color .15s ease-in-out,
+                   border-color .15s ease-in-out,
+                   background .15s 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;
 }
@@ -354,33 +498,38 @@ h3.customize-section-title {
        display: block;
 }
 
-.panel-meta.customize-info .accordion-section-title {
+#customize-controls .panel-meta.customize-info .accordion-section-title {
        margin-right: 48px;
+       border-right: none;
 }
 
-#customize-controls .panel-meta.customize-info .accordion-section-title:hover {
+#customize-controls .panel-meta.customize-info .accordion-section-title:hover,
+#customize-controls .cannot-expand:hover .accordion-section-title {
        background: #fff;
-       color: #555;
+       color: #555d66;
+       border-right-color: #fff;
 }
 
 .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;
+       background: #fff;
+       color: #0073aa;
+       border-top-color: #0073aa;
        outline: none;
        -webkit-box-shadow: none;
        box-shadow: none;
 }
 
+
 .customize-panel-back:hover,
 .customize-panel-back:focus,
 .customize-section-back:hover,
 .customize-section-back:focus {
-       color: #23282d;
-       background: #f5f5f5;
+       color: #0073aa;
+       background: #f3f3f5;
+       border-right-color: #0073aa;
        outline: none;
        -webkit-box-shadow: none;
        box-shadow: none;
@@ -390,7 +539,7 @@ h3.customize-section-title {
        font: normal 22px/45px dashicons;
        content: "\f335";
        position: relative;
-       top: 1px;
+       top: -3px;
        right: 13px;
 }
 
@@ -399,10 +548,11 @@ h3.customize-section-title {
        font: normal 20px/72px dashicons;
        content: "\f345";
        position: relative;
-       right: 13px;
+       right: 9px;
 }
 
 .wp-full-overlay-sidebar .wp-full-overlay-header {
+       background-color: #eee;
        -webkit-transition: padding ease-in-out .18s;
        transition: padding ease-in-out .18s;
 }
@@ -411,63 +561,6 @@ h3.customize-section-title {
        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;
@@ -509,8 +602,8 @@ p.customize-section-description {
 }
 
 .customize-control select {
-       min-width: 50%;
-       max-width: 100%;
+       width: 100%;
+       max-width: 300px;
        height: 28px;
        line-height: 28px;
 }
@@ -531,9 +624,20 @@ p.customize-section-description {
        display: block;
        font-style: italic;
        line-height: 18px;
+       margin-top: 0;
        margin-bottom: 5px;
 }
 
+.customize-section-description a.external-link:after {
+       font: 16px/11px dashicons;
+       content: "\f310";
+       top: 3px;
+       position: relative;
+       padding-right: 3px;
+       display: inline-block;
+       text-decoration: none;
+}
+
 .customize-control-color .color-picker,
 .customize-control-upload div {
        line-height: 28px;
@@ -608,6 +712,71 @@ p.customize-section-description {
        float: right;
 }
 
+#available-menu-items .accordion-section-content .new-content-item,
+.customize-control-dropdown-pages .new-content-item {
+       width: -webkit-calc(100% - 30px);
+       width: calc(100% - 30px);
+       padding: 8px 15px;
+       position: absolute;
+       bottom: 0;
+       z-index: 10;
+       background: #eee;
+       display: -webkit-box;
+       display: -moz-box;
+       display: -ms-flexbox;
+       display: -webkit-flex;
+       display: flex;
+}
+
+.customize-control-dropdown-pages .new-content-item {
+       width: 100%;
+       max-width: 300px;
+       padding: 5px 1px 5px 0;
+       position: relative;
+}
+
+#available-menu-items .new-content-item .create-item-input,
+.customize-control-dropdown-pages .new-content-item .create-item-input {
+       -webkit-box-flex: 10;
+       -webkit-flex-grow: 10;
+       -moz-box-flex: 10;
+       -ms-flex-positive: 10;
+       -ms-flex: 10;
+       flex-grow: 10;
+}
+
+#available-menu-items .new-content-item .add-content,
+.customize-control-dropdown-pages .new-content-item .add-content {
+       margin: 2px 6px 2px 0;
+       -webkit-box-flex: 10;
+       -webkit-flex-grow: 10;
+       -moz-box-flex: 10;
+       -ms-flex-positive: 10;
+       -ms-flex: 10;
+       flex-grow: 1;
+}
+
+.customize-control-dropdown-pages .new-content-item .create-item-input.invalid {
+       border: 1px solid #f00;
+}
+
+.customize-control-dropdown-pages .add-new-toggle {
+       margin-right: 1px;
+       color: #0073aa;
+       font-weight: 600;
+       line-height: 28px;
+       text-decoration: underline;
+}
+
+.customize-control-dropdown-pages .add-new-toggle:hover,
+.customize-control-dropdown-pages .add-new-toggle:active {
+       color: #00a0d2;
+}
+
+.customize-control-dropdown-pages .add-new-toggle:focus {
+       color: #124964;
+}
+
 #customize-preview iframe {
        width: 100%;
        height: 100%;
@@ -739,7 +908,7 @@ p.customize-section-description {
 }
 
 .customize-control-color .dropdown .dropdown-content {
-       background-color: #555;
+       background-color: #555d66;
        border: 1px solid rgba(0, 0, 0, 0.15);
 }
 
@@ -770,6 +939,7 @@ p.customize-section-description {
        margin-bottom: 8px;
 }
 
+.customize-control-header .actions,
 .customize-control-header .uploaded {
        margin-bottom: 18px;
 }
@@ -822,7 +992,7 @@ p.customize-section-description {
        display: none;
        position: absolute;
        width: 100%;
-       color: #555;
+       color: #555d66;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
@@ -853,6 +1023,11 @@ p.customize-section-description {
 .customize-control-header .header-view:after {
        border: 0;
 }
+
+.customize-control-header .header-view.selected .choice:focus {
+       outline: none;
+}
+
 .customize-control-header .header-view.selected:after {
        content: '';
        position: absolute;
@@ -862,6 +1037,7 @@ p.customize-section-description {
        -webkit-border-radius: 2px;
        border-radius: 2px;
 }
+
 .customize-control-header .header-view.button.selected {
        border: 0;
 }
@@ -871,11 +1047,11 @@ p.customize-section-description {
 .customize-control-header .uploaded .header-view .close {
        font-size: 20px;
        color: #fff;
-       background: #555;
+       background: #555d66;
        background: rgba(0, 0, 0, 0.5);
        position: absolute;
        top: 10px;
-       left: -999px;
+       right: -999px;
        z-index: 1;
        width: 26px;
        height: 26px;
@@ -884,9 +1060,14 @@ p.customize-section-description {
 
 .customize-control-header .header-view:hover .close,
 .customize-control-header .header-view .close:focus {
+       right: auto;
        left: 10px;
 }
 
+.customize-control-header .header-view .close:focus {
+       outline: 1px solid #5b9dd9;
+}
+
 /* Header control: randomiz(s)er */
 
 .customize-control-header .random.placeholder {
@@ -933,6 +1114,16 @@ p.customize-section-description {
        margin-bottom: 9px;
 }
 
+.customize-control-header .choice:focus {
+       outline: none;
+       -webkit-box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 3px 1px rgba(30, 140, 190, .8);
+       box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 3px 1px rgba(30, 140, 190, .8);
+}
+
 .customize-control-header .uploaded div:last-child > .choice {
        margin-bottom: 0;
 }
@@ -954,6 +1145,64 @@ p.customize-section-description {
        float: left;
 }
 
+/* Background position control */
+.customize-control-background_position .background-position-control .button-group {
+       display: block;
+}
+
+/**
+ * Custom CSS Section
+ *
+ * Modifications to the Section Container to make the textarea full-width and
+ * full-height, if the control is the only control in the section.
+ */
+
+#customize-controls .customize-section-description-container.section-meta.customize-info {
+       border-bottom: none;
+}
+
+#sub-accordion-section-custom_css .customize-control-notifications-container {
+       margin-bottom: 15px;
+}
+
+#customize-control-custom_css textarea {
+       display: block;
+       font-family: Consolas, Monaco, monospace;
+       font-size: 12px;
+       padding: 6px 8px;
+       height: 500px;
+       -moz-tab-size: 4;
+       -o-tab-size: 4;
+       tab-size: 4;
+}
+
+.customize-section-description-container + #customize-control-custom_css:last-child textarea {
+       border-left: 0;
+       border-right: 0;
+       height: -webkit-calc( 100vh - 185px );
+       height: calc( 100vh - 185px );
+       resize: none;
+}
+.customize-section-description-container + #customize-control-custom_css:last-child {
+       margin-right: -12px;
+       width: 299px;
+       margin-bottom: -12px;
+}
+
+@media screen and ( max-width: 640px ) {
+       .customize-section-description-container + #customize-control-custom_css:last-child {
+               margin-right: 0;
+               margin-left: 0;
+               width: 100%;
+       }
+       .customize-section-description-container + #customize-control-custom_css:last-child textarea {
+               height: -webkit-calc( 100vh - 140px );
+               height: calc( 100vh - 140px );
+               width: 100%;
+               border: solid 1px #ddd;
+       }
+}
+
 /**
  * Themes
  */
@@ -975,37 +1224,46 @@ p.customize-section-description {
        animation: customize-reload .75s;
 }
 
-.control-section-themes .accordion-section-title {
+#customize-theme-controls .control-section-themes .accordion-section-title:hover, /* Not a focusable element. */
+#customize-theme-controls .control-section-themes .accordion-section-title {
        cursor: default;
+       background: #fff;
+       color: #555d66;
+       border-top: 1px solid #ddd;
+       border-bottom: 1px solid #ddd;
+       border-right: none;
+       margin-top: 0;
 }
 
-#customize-theme-controls .control-section-themes .accordion-section-title:hover,
-#customize-theme-controls .control-section-themes .accordion-section-title:focus {
-       color: #555;
-       background-color: #fff;
+#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child:hover, /* Not a focusable element. */
+#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child {
+       border-top: 0;
 }
 
-.control-section-themes .accordion-section-title {
-       margin: 15px 0;
+#customize-theme-controls .control-section-themes > .accordion-section-title:hover, /* Not a focusable element. */
+#customize-theme-controls .control-section-themes > .accordion-section-title {
+       margin: 0 0 15px;
 }
 
-.customize-themes-panel .accordion-section-title {
+#customize-controls .customize-themes-panel .accordion-section-title:hover,
+#customize-controls .customize-themes-panel .accordion-section-title {
        margin: 15px -8px;
 }
 
-.control-section-themes .accordion-section-title {
+#customize-controls .control-section-themes .accordion-section-title,
+#customize-controls .customize-themes-panel .accordion-section-title {
        padding-left: 100px; /* Space for the button */
 }
 
-.control-section-themes .accordion-section-title span.customize-action,
+#customize-controls .control-section-themes .accordion-section-title span.customize-action,
 #customize-controls .customize-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 {
+#customize-controls .control-section-themes .accordion-section-title .change-theme,
+#customize-controls .customize-themes-panel .accordion-section-title .customize-theme {
        position: absolute;
        left: 10px;
        top: 50%;
@@ -1013,12 +1271,11 @@ p.customize-section-description {
        font-weight: 400;
 }
 
-.control-section-themes .accordion-section-title:before {
+#customize-controls .control-section-themes .accordion-section-title:before {
        display: none;
 }
 
-.customize-themes-panel {
-       display: none;
+#customize-controls .customize-themes-panel {
        padding: 0 8px;
        background: #f1f1f1;
        -webkit-box-sizing: border-box;
@@ -1026,7 +1283,7 @@ p.customize-section-description {
        box-sizing: border-box;
 }
 
-.customize-themes-panel .accordion-section-title:first-child {
+#customize-controls .customize-themes-panel .accordion-section-title:first-child {
        margin-top: 0;
 }
 
@@ -1035,14 +1292,10 @@ p.customize-section-description {
        font-weight: 600;
 }
 
-.customize-themes-panel > h2 {
+#customize-controls .customize-themes-panel > h2 {
        padding: 15px 8px 0 8px;
 }
 
-.control-section.open .customize-themes-panel {
-       display: block;
-}
-
 #customize-theme-controls .customize-themes-panel .accordion-section-content {
        background: transparent;
        display: block;
@@ -1088,27 +1341,15 @@ p.customize-section-description {
        width: 100%;
 }
 
-#accordion-section-themes .accordion-section-title:after {
+.control-section-themes .accordion-section-title:after,
+.customize-themes-panel .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%;
-}
-
 /* Details View */
 .wp-customizer .theme-overlay {
        display: none;
@@ -1142,10 +1383,6 @@ p.customize-section-description {
        text-align: left; /* Because there's only one action, match the pattern of media modals and right-align the action. */
 }
 
-.modal-open .in-themes-panel #customize-controls .wp-full-overlay-sidebar-content {
-       overflow: visible; /* Prevent the top-level Customizer controls from becoming visible when elements on the right of the details modal are focused. */
-}
-
 .ie8 .wp-customizer .theme-overlay .theme-header,
 .ie8 .wp-customizer .theme-overlay .theme-about,
 .ie8 .wp-customizer .theme-overlay .theme-actions {
@@ -1196,7 +1433,7 @@ body.cheatin p {
  * Widgets and Menus common styles
  */
 
-/* higher specificity than .wp-core-ui .button-secondary */
+/* higher specificity than .wp-core-ui .button */
 #customize-theme-controls .add-new-widget,
 #customize-theme-controls .add-new-menu-item {
        cursor: pointer;
@@ -1219,7 +1456,8 @@ body.cheatin p {
 }
 
 .add-new-widget:before,
-.add-new-menu-item:before {
+.add-new-menu-item:before,
+#available-menu-items .new-content-item .add-content:before {
        content: "\f132";
        display: inline-block;
        position: relative;
@@ -1400,6 +1638,11 @@ body.adding-widget .add-new-widget:before,
        overflow: auto;
        bottom: 0;
        width: 100%;
+       border-top: 1px solid #ddd;
+}
+
+.no-widgets-found #available-widgets-list {
+       border-top: none;
 }
 
 #available-widgets-filter {
@@ -1408,13 +1651,12 @@ body.adding-widget .add-new-widget:before,
        z-index: 1;
        width: 300px;
        background: #eee;
-       border-bottom: 1px solid #e5e5e5;
 }
 
 /* search field container */
 #available-widgets-filter,
 #available-menu-items-search .accordion-section-title {
-       padding: 12px 15px;
+       padding: 13px 15px;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
@@ -1422,8 +1664,101 @@ body.adding-widget .add-new-widget:before,
 
 #available-widgets-filter input,
 #available-menu-items-search input {
-       padding: 6px 10px;
        width: 100%;
+       height: 32px;
+       margin: 1px 0;
+       padding: 6px 30px;
+}
+
+#available-widgets-filter input::-ms-clear,
+#available-menu-items-search input::-ms-clear {
+       display: none; /* remove the "x" in IE, which conflicts with the "x" icon on button.clear-results */
+}
+
+#available-menu-items-search .search-icon,
+#available-widgets-filter .search-icon {
+       display: block;
+       position: absolute;
+       top: 15px; /* 13 container padding +1 input margin +1 input border */
+       right: 16px;
+       width: 30px;
+       height: 30px;
+       line-height: 28px;
+       text-align: center;
+       color: #72777c;
+}
+
+#available-widgets-filter .clear-results,
+#available-menu-items-search .clear-results {
+       position: absolute;
+       top: 15px; /* 13 container padding +1 input margin +1 input border */
+       left: 16px;
+       width: 30px;
+       height: 30px;
+       padding: 0;
+       border: 0;
+       cursor: pointer;
+       background: none;
+       color: #a00;
+       text-decoration: none;
+       outline: 0;
+}
+
+#available-widgets-filter .clear-results,
+#available-menu-items-search .clear-results,
+#available-menu-items-search.loading .clear-results.is-visible {
+       display: none;
+}
+
+#available-widgets-filter .clear-results.is-visible,
+#available-menu-items-search .clear-results.is-visible {
+       display: block;
+}
+
+#available-widgets-filter .clear-results:before,
+#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-widgets-filter .clear-results:hover,
+#available-widgets-filter .clear-results:focus,
+#available-menu-items-search .clear-results:hover,
+#available-menu-items-search .clear-results:focus {
+       color: #dc3232;
+}
+
+#available-widgets-filter .clear-results:focus,
+#available-menu-items-search .clear-results: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);
+}
+
+#available-menu-items-search .search-icon:after,
+#available-widgets-filter .search-icon:after {
+       content: "\f179";
+       font: normal 20px/1 dashicons;
+       vertical-align: middle;
+       -webkit-font-smoothing: antialiased;
+       -moz-osx-font-smoothing: grayscale;
+}
+
+.no-widgets-found-message {
+       display: none;
+       margin: 0;
+       padding: 0 15px;
+       line-height: inherit;
+}
+
+.no-widgets-found .no-widgets-found-message {
+       display: block;
 }
 
 #available-widgets .widget-top,
@@ -1441,7 +1776,14 @@ body.adding-widget .add-new-widget:before,
        position: relative;
        padding: 20px 60px 20px 15px;
        background: #fff;
-       border-bottom: 1px solid #e5e5e5;
+       border-bottom: 1px solid #ddd;
+       border-right: 4px solid #fff;
+       -webkit-transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
+       transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
        cursor: pointer;
        display: none;
 }
@@ -1517,7 +1859,7 @@ body.adding-widget .add-new-widget:before,
                background: #eee;
                border: 0;
                border-left: 1px solid #ddd;
-               color: #444;
+               color: #555d66;
                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;
@@ -1598,7 +1940,7 @@ body.adding-widget .add-new-widget:before,
                padding: 9px 14px 12px 10px;
                margin: 0;
                line-height: 24px;
-               color: #555;
+               color: #555d66;
                display: block;
                overflow: hidden;
                white-space: nowrap;
@@ -1618,12 +1960,15 @@ body.adding-widget .add-new-widget:before,
        #available-widgets-filter {
                position: relative;
                width: 100%;
-               background: #fff;
                height: auto;
-               padding: 10px 15px;
        }
 
        #available-widgets-list {
-               top: 140px;
+               top: 130px;
+       }
+
+       #available-menu-items-search .clear-results,
+       #available-menu-items-search .search-icon {
+               top: 85px; /* 70 section title height + 13 container padding +1 input margin +1 input border */
        }
 }
index a668fa328e128e7bfaaf1d27a333865283209cc8..d34a20cc7a0dd98c752431ee4afb72c85dcef818 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: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
+#customize-controls .customize-info .customize-section-description,#customize-controls .customize-info.section-meta{margin-bottom:15px}body{overflow:hidden;-webkit-text-size-adjust:100%}.customize-controls-close,.widget-control-actions 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:#555d66}#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-bottom:1px solid #ddd;margin-bottom:15px}#customize-controls .customize-info.is-in-view,#customize-controls .customize-section-title.is-in-view{position:absolute;z-index:9;width:100%;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 0 rgba(0,0,0,.1)}#customize-controls .customize-section-title.is-in-view{margin-top:0}#customize-controls .customize-info.is-in-view+.accordion-section{margin-top:15px}#customize-controls .customize-info.is-sticky,#customize-controls .customize-section-title.is-sticky{position:fixed;top:46px}#customize-controls .customize-info .accordion-section-title{background:#fff;color:#555d66;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:#32373c}#customize-controls .customize-info .accordion-section-title:after{display:none}#customize-controls .customize-info .preview-notice{font-size:13px;line-height:24px}#customize-controls .customize-info .panel-title,#customize-controls .customize-pane-child .customize-section-title h3,#customize-controls .customize-pane-child h3.customize-section-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:#555d66;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 .customize-info .customize-section-description,#customize-controls .no-widget-areas-rendered-notice{color:#555d66;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,#customize-controls .customize-info .customize-section-description p:first-child{margin-top:0}#customize-controls .customize-info .customize-panel-description p:last-child,#customize-controls .customize-info .customize-section-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:#555d66;background-color:#fff;border-bottom:1px solid #ddd;border-right:4px solid #fff;-webkit-transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out}#customize-controls #customize-theme-controls .customize-themes-panel .accordion-section-title{color:#555;background-color:#fff;border-right:4px solid #fff}#customize-theme-controls .accordion-section-title:after{content:"\f341";color:#a0a5aa}#customize-theme-controls .accordion-section-content{color:#555d66;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:#0073aa;background:#f3f3f5;border-right-color:#0073aa}#accordion-section-themes+.control-section{border-top:1px solid #ddd}.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:#f3f3f5}#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:#0073aa}#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 .control-panel-content .control-section:nth-child(2),#customize-theme-controls .control-panel-nav_menus .control-section:nth-child(3){border-top:1px solid #ddd}#customize-theme-controls>ul{margin:0}#customize-info,#customize-theme-controls .customize-pane-child,#customize-theme-controls .customize-pane-parent{width:100%;margin:0;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:.18s transform cubic-bezier(.645,.045,.355,1),.18s -webkit-transform cubic-bezier(.645,.045,.355,1);transition:.18s transform cubic-bezier(.645,.045,.355,1),.18s -webkit-transform cubic-bezier(.645,.045,.355,1)}#customize-info,#customize-theme-controls .customize-pane-parent{position:relative;visibility:visible;height:auto;max-height:none;overflow:auto;-webkit-transform:none;-ms-transform:none;transform:none}#customize-theme-controls .customize-pane-child{position:absolute;top:0;right:0;visibility:hidden;height:0;max-height:none;overflow:hidden;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}#customize-theme-controls .customize-pane-child.current-panel,#customize-theme-controls .customize-pane-child.open,#customize-theme-controls .customize-themes-panel.customize-pane-child.current-panel{-webkit-transform:none;-ms-transform:none;transform:none}#customize-theme-controls .customize-themes-panel.customize-pane-child,.in-sub-panel #customize-info,.in-sub-panel #customize-theme-controls .customize-pane-parent,.in-sub-panel.section-open #customize-theme-controls .customize-pane-child.current-panel,.in-themes-panel #customize-info,.in-themes-panel #customize-theme-controls .customize-pane-parent,.section-open #customize-info,.section-open #customize-theme-controls .customize-pane-parent{visibility:hidden;height:0;overflow:hidden;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}#customize-theme-controls .customize-pane-child.busy,#customize-theme-controls .customize-pane-child.current-panel,#customize-theme-controls .customize-pane-child.open,.busy.section-open.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel,.in-sub-panel #customize-info.busy,.in-sub-panel #customize-theme-controls .customize-pane-parent.busy,.in-themes-panel #customize-info.busy,.in-themes-panel #customize-theme-controls .customize-pane-parent.busy,.section-open #customize-info.busy,.section-open #customize-theme-controls .customize-pane-parent.busy{visibility:visible;height:auto;overflow:auto}.in-themes-panel #customize-info,.in-themes-panel #customize-theme-controls .customize-pane-parent{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}#customize-theme-controls .customize-pane-child.accordion-section-content,#customize-theme-controls .customize-pane-child.accordion-sub-container{display:block;overflow-x:hidden}#customize-theme-controls .customize-pane-child.accordion-section-content{padding:12px}#customize-theme-controls .customize-pane-child.menu li{position:static}.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}.customize-info div.customize-section-description,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:#555d66}.accordion-sub-container.control-panel-content{display:none;position:absolute;top:0;width:100%}.accordion-sub-container.control-panel-content.busy{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:41px;padding:0 0 0 2px;background:#eee;border:none;border-top:4px solid #eee;border-left:1px solid #ddd;color:#444;text-align:right;cursor:pointer;-webkit-transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s 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;border-right:4px solid #fff;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;-webkit-transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out}.customize-section-back{height:74px}.ios .customize-panel-back{display:none}.ios .expanded.in-sub-panel .customize-panel-back{display:block}#customize-controls .panel-meta.customize-info .accordion-section-title{margin-right:48px;border-right:none}#customize-controls .cannot-expand:hover .accordion-section-title,#customize-controls .panel-meta.customize-info .accordion-section-title:hover{background:#fff;color:#555d66;border-right-color:#fff}.customize-controls-close:focus,.customize-controls-close:hover,.customize-controls-preview-toggle:focus,.customize-controls-preview-toggle:hover{background:#fff;color:#0073aa;border-top-color:#0073aa;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:#0073aa;background:#f3f3f5;border-right-color:#0073aa;outline:0;-webkit-box-shadow:none;box-shadow:none}.customize-controls-close:before{font:400 22px/45px dashicons;content:"\f335";position:relative;top:-3px;right:13px}.customize-panel-back:before,.customize-section-back:before{font:400 20px/72px dashicons;content:"\f345";position:relative;right:9px}.wp-full-overlay-sidebar .wp-full-overlay-header{background-color:#eee;-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}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{width:100%;max-width:300px;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-top:0;margin-bottom:5px}.customize-section-description a.external-link:after{font:16px/11px dashicons;content:"\f310";top:3px;position:relative;padding-right:3px;display:inline-block;text-decoration:none}.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}#available-menu-items .accordion-section-content .new-content-item,.customize-control-dropdown-pages .new-content-item{width:-webkit-calc(100% - 30px);width:calc(100% - 30px);padding:8px 15px;position:absolute;bottom:0;z-index:10;background:#eee;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.customize-control-dropdown-pages .new-content-item{width:100%;max-width:300px;padding:5px 1px 5px 0;position:relative}#available-menu-items .new-content-item .create-item-input,.customize-control-dropdown-pages .new-content-item .create-item-input{-webkit-box-flex:10;-webkit-flex-grow:10;-moz-box-flex:10;-ms-flex-positive:10;-ms-flex:10;flex-grow:10}#available-menu-items .new-content-item .add-content,.customize-control-dropdown-pages .new-content-item .add-content{margin:2px 6px 2px 0;-webkit-box-flex:10;-webkit-flex-grow:10;-moz-box-flex:10;-ms-flex-positive:10;-ms-flex:10;flex-grow:1}.customize-control-dropdown-pages .new-content-item .create-item-input.invalid{border:1px solid red}.customize-control-dropdown-pages .add-new-toggle{margin-right:1px;color:#0073aa;font-weight:600;line-height:28px;text-decoration:underline}.customize-control-dropdown-pages .add-new-toggle:active,.customize-control-dropdown-pages .add-new-toggle:hover{color:#00a0d2}.customize-control-dropdown-pages .add-new-toggle:focus{color:#124964}#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:#555d66;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 .actions,.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:#555d66;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 .choice:focus{outline: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:#555d66;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:auto;left:10px}.customize-control-header .header-view .close:focus{outline:#5b9dd9 solid 1px}.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 .choice:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 3px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 3px 1px rgba(30,140,190,.8)}.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}.customize-control-background_position .background-position-control .button-group{display:block}#customize-controls .customize-section-description-container.section-meta.customize-info{border-bottom:none}#sub-accordion-section-custom_css .customize-control-notifications-container{margin-bottom:15px}#customize-control-custom_css textarea{display:block;font-family:Consolas,Monaco,monospace;font-size:12px;padding:6px 8px;height:500px;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.customize-section-description-container+#customize-control-custom_css:last-child textarea{border-left:0;border-right:0;height:-webkit-calc(100vh - 185px);height:calc(100vh - 185px);resize:none}.customize-section-description-container+#customize-control-custom_css:last-child{margin-right:-12px;width:299px;margin-bottom:-12px}@media screen and (max-width:640px){.customize-section-description-container+#customize-control-custom_css:last-child{margin-right:0;margin-left:0;width:100%}.customize-section-description-container+#customize-control-custom_css:last-child textarea{height:-webkit-calc(100vh - 140px);height:calc(100vh - 140px);width:100%;border:1px solid #ddd}}@-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}#customize-theme-controls .control-section-themes .accordion-section-title,#customize-theme-controls .control-section-themes .accordion-section-title:hover{cursor:default;background:#fff;color:#555d66;border-top:1px solid #ddd;border-bottom:1px solid #ddd;border-right:none;margin-top:0}#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child,#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child:hover{border-top:0}#customize-theme-controls .control-section-themes>.accordion-section-title,#customize-theme-controls .control-section-themes>.accordion-section-title:hover{margin:0 0 15px}#customize-controls .customize-themes-panel .accordion-section-title,#customize-controls .customize-themes-panel .accordion-section-title:hover{margin:15px -8px}#customize-controls .control-section-themes .accordion-section-title,#customize-controls .customize-themes-panel .accordion-section-title{padding-left:100px}#customize-controls .control-section-themes .accordion-section-title span.customize-action,#customize-controls .customize-section-title span.customize-action{font-size:13px;display:block;font-weight:400}#customize-controls .control-section-themes .accordion-section-title .change-theme,#customize-controls .customize-themes-panel .accordion-section-title .customize-theme{position:absolute;left:10px;top:50%;margin-top:-14px;font-weight:400}#customize-controls .control-section-themes .accordion-section-title:before{display:none}#customize-controls .customize-themes-panel{padding:0 8px;background:#f1f1f1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#customize-controls .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-controls .customize-themes-panel>h2{padding:15px 8px 0}#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%}.control-section-themes .accordion-section-title:after,.customize-themes-panel .accordion-section-title:after{display:none}.customize-themes-panel.control-panel-content{border-top:1px solid #ddd}.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}.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}#available-menu-items .new-content-item .add-content:before,.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}.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-menu-items .customize-section-title,#available-widgets .customize-section-title{display:none}#available-widgets-list{top:60px;position:absolute;overflow:auto;bottom:0;width:100%;border-top:1px solid #ddd}.no-widgets-found #available-widgets-list{border-top:none}#available-widgets-filter{position:fixed;top:0;z-index:1;width:300px;background:#eee}#available-menu-items-search .accordion-section-title,#available-widgets-filter{padding:13px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-menu-items-search input,#available-widgets-filter input{width:100%;height:32px;margin:1px 0;padding:6px 30px}#available-menu-items-search input::-ms-clear,#available-widgets-filter input::-ms-clear{display:none}#available-menu-items-search .search-icon,#available-widgets-filter .search-icon{display:block;position:absolute;top:15px;right:16px;width:30px;height:30px;line-height:28px;text-align:center;color:#72777c}#available-menu-items-search .clear-results,#available-widgets-filter .clear-results{position:absolute;top:15px;left:16px;width:30px;height:30px;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,#available-widgets-filter .clear-results{display:none}#available-menu-items-search .clear-results.is-visible,#available-widgets-filter .clear-results.is-visible{display:block}#available-menu-items-search .clear-results:before,#available-widgets-filter .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,#available-widgets-filter .clear-results:focus,#available-widgets-filter .clear-results:hover{color:#dc3232}#available-menu-items-search .clear-results:focus,#available-widgets-filter .clear-results: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)}#available-menu-items-search .search-icon:after,#available-widgets-filter .search-icon:after{content:"\f179";font:400 20px/1 dashicons;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.no-widgets-found-message{display:none;margin:0;padding:0 15px;line-height:inherit}.no-widgets-found .no-widgets-found-message{display:block}#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 #ddd;border-right:4px solid #fff;-webkit-transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;cursor:pointer;display:none}#available-menu-items .item,#available-widgets .widget{position:static}.customize-controls-preview-toggle{display:none}@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:#555d66;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:#555d66;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%;height:auto}#available-widgets-list{top:130px}#available-menu-items-search .clear-results,#available-menu-items-search .search-icon{top:85px}}
\ No newline at end of file
index d2eef49a5b403b36854fd8ac653bbdce02faf3ee..716dfbb62fd73e8018c2c0f9ef8a0a092a7ca1fd 100644 (file)
@@ -3,7 +3,8 @@ body {
        -webkit-text-size-adjust: 100%;
 }
 
-#customize-controls a {
+.customize-controls-close,
+.widget-control-actions a {
        text-decoration: none;
 }
 
@@ -20,7 +21,7 @@ body {
 }
 
 #customize-controls .description {
-       color: #555;
+       color: #555d66;
 }
 
 #customize-header-actions .button-primary {
@@ -48,14 +49,40 @@ body {
 
 #customize-controls .customize-info {
        border: none;
-       border-top: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        margin-bottom: 15px;
 }
 
+#customize-controls .customize-info.section-meta {
+       margin-bottom: 15px;
+}
+
+#customize-controls .customize-info.is-in-view,
+#customize-controls .customize-section-title.is-in-view {
+       position: absolute;
+       z-index: 9;
+       width: 100%;
+       -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
+       box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
+}
+
+#customize-controls .customize-section-title.is-in-view {
+       margin-top: 0;
+}
+
+#customize-controls .customize-info.is-in-view + .accordion-section {
+       margin-top: 15px;
+}
+
+#customize-controls .customize-info.is-sticky,
+#customize-controls .customize-section-title.is-sticky {
+       position: fixed;
+       top: 46px;
+}
+
 #customize-controls .customize-info .accordion-section-title {
        background: #fff;
-       color: #555;
+       color: #555d66;
        border-left: none;
        border-right: none;
        border-bottom: none;
@@ -65,7 +92,7 @@ body {
 #customize-controls .customize-info.open .accordion-section-title:after,
 #customize-controls .customize-info .accordion-section-title:hover:after,
 #customize-controls .customize-info .accordion-section-title:focus:after {
-       color: #333;
+       color: #32373c;
 }
 
 #customize-controls .customize-info .accordion-section-title:after {
@@ -77,8 +104,8 @@ body {
        line-height: 24px;
 }
 
-#customize-controls .control-section .customize-section-title h3,
-#customize-controls .control-section h3.customize-section-title,
+#customize-controls .customize-pane-child .customize-section-title h3,
+#customize-controls .customize-pane-child h3.customize-section-title,
 #customize-controls .customize-info .panel-title {
        font-size: 20px;
        font-weight: 200;
@@ -107,7 +134,7 @@ body {
        box-shadow: none;
        -webkit-appearance: none;
        background: transparent;
-       color: #555;
+       color: #555d66;
        border: none;
 }
 
@@ -124,22 +151,30 @@ body {
 }
 
 #customize-controls .customize-info .customize-panel-description,
+#customize-controls .customize-info .customize-section-description,
 #customize-controls .no-widget-areas-rendered-notice {
-       color: #555;
+       color: #555d66;
        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 {
+#customize-controls .customize-info .customize-section-description {
+       margin-bottom: 15px;
+}
+
+#customize-controls .customize-info .customize-panel-description p:first-child,
+#customize-controls .customize-info .customize-section-description p:first-child {
        margin-top: 0;
 }
 
-#customize-controls .customize-info .customize-panel-description p:last-child {
+#customize-controls .customize-info .customize-panel-description p:last-child,
+#customize-controls .customize-info .customize-section-description p:last-child {
        margin-bottom: 0;
 }
 
@@ -152,9 +187,22 @@ body {
 }
 
 #customize-theme-controls .accordion-section-title {
+       color: #555d66;
+       background-color: #fff;
+       border-bottom: 1px solid #ddd;
+       border-left: 4px solid #fff;
+       -webkit-transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
+       transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
+}
+
+#customize-controls #customize-theme-controls .customize-themes-panel .accordion-section-title {
        color: #555;
        background-color: #fff;
-       border-bottom: 1px solid #eee;
+       border-left: 4px solid #fff;
 }
 
 #customize-theme-controls .accordion-section-title:after {
@@ -163,7 +211,7 @@ body {
 }
 
 #customize-theme-controls .accordion-section-content {
-       color: #555;
+       color: #555d66;
        background: transparent;
 }
 
@@ -171,22 +219,27 @@ body {
 #customize-controls .control-section .accordion-section-title:hover,
 #customize-controls .control-section.open .accordion-section-title,
 #customize-controls .control-section .accordion-section-title:focus {
-       color: #23282d;
-       background: #f5f5f5;
+       color: #0073aa;
+       background: #f3f3f5;
+       border-left-color: #0073aa;
+}
+
+#accordion-section-themes + .control-section {
+       border-top: 1px solid #ddd;
 }
 
 .js .control-section:hover .accordion-section-title,
 .js .control-section .accordion-section-title:hover,
 .js .control-section.open .accordion-section-title,
 .js .control-section .accordion-section-title:focus {
-       background: #f5f5f5;
+       background: #f3f3f5;
 }
 
 #customize-theme-controls .control-section:hover > .accordion-section-title: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 .accordion-section-title:focus:after {
-       color: #23282d;
+       color: #0073aa;
 }
 
 #customize-theme-controls .control-section.open {
@@ -202,6 +255,11 @@ body {
        border-bottom-color: #ddd;
 }
 
+#customize-theme-controls .control-panel-content .control-section:nth-child(2),
+#customize-theme-controls .control-panel-nav_menus .control-section:nth-child(3) {
+       border-top: 1px solid #ddd;
+}
+
 #customize-theme-controls > ul {
        margin: 0;
 }
@@ -218,6 +276,109 @@ body {
        box-sizing: border-box;
 }
 
+#customize-info,
+#customize-theme-controls .customize-pane-parent,
+#customize-theme-controls .customize-pane-child {
+       overflow: visible;
+       width: 100%;
+       margin: 0;
+       padding: 0;
+       -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+       box-sizing: border-box;
+       -webkit-transition: 0.18s -webkit-transform cubic-bezier(0.645, 0.045, 0.355, 1);
+       transition: 0.18s -webkit-transform cubic-bezier(0.645, 0.045, 0.355, 1);
+       -webkit-transition: 0.18s transform cubic-bezier(0.645, 0.045, 0.355, 1);
+       transition: 0.18s transform cubic-bezier(0.645, 0.045, 0.355, 1);
+       -webkit-transition: 0.18s transform cubic-bezier(0.645, 0.045, 0.355, 1), 0.18s -webkit-transform cubic-bezier(0.645, 0.045, 0.355, 1);
+       transition: 0.18s transform cubic-bezier(0.645, 0.045, 0.355, 1), 0.18s -webkit-transform cubic-bezier(0.645, 0.045, 0.355, 1); /* easeInOutCubic */
+}
+
+#customize-info,
+#customize-theme-controls .customize-pane-parent {
+       position: relative;
+       visibility: visible;
+       height: auto;
+       max-height: none;
+       overflow: auto;
+       -webkit-transform: none;
+       -ms-transform: none;
+       transform: none;
+}
+
+#customize-theme-controls .customize-pane-child {
+       position: absolute;
+       top: 0;
+       left: 0;
+       visibility: hidden;
+       height: 0;
+       max-height: none;
+       overflow: hidden;
+       -webkit-transform: translateX(100%);
+       -ms-transform: translateX(100%);
+       transform: translateX(100%);
+}
+
+#customize-theme-controls .customize-pane-child.open,
+#customize-theme-controls .customize-pane-child.current-panel,
+#customize-theme-controls .customize-themes-panel.customize-pane-child.current-panel {
+       -webkit-transform: none;
+       -ms-transform: none;
+       transform: none;
+}
+
+#customize-theme-controls .customize-themes-panel.customize-pane-child,
+.section-open #customize-theme-controls .customize-pane-parent,
+.in-sub-panel #customize-theme-controls .customize-pane-parent,
+.section-open #customize-info,
+.in-sub-panel #customize-info,
+.in-sub-panel.section-open #customize-theme-controls .customize-pane-child.current-panel,
+.in-themes-panel #customize-theme-controls .customize-pane-parent,
+.in-themes-panel #customize-info {
+       visibility: hidden;
+       height: 0;
+       overflow: hidden;
+       -webkit-transform: translateX(-100%);
+       -ms-transform: translateX(-100%);
+       transform: translateX(-100%);
+}
+
+.section-open #customize-theme-controls .customize-pane-parent.busy,
+.in-sub-panel #customize-theme-controls .customize-pane-parent.busy,
+.in-themes-panel #customize-theme-controls .customize-pane-parent.busy,
+.section-open #customize-info.busy,
+.in-sub-panel #customize-info.busy,
+.in-themes-panel #customize-info.busy,
+.busy.section-open.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel,
+#customize-theme-controls .customize-pane-child.open,
+#customize-theme-controls .customize-pane-child.current-panel,
+#customize-theme-controls .customize-pane-child.busy {
+       visibility: visible;
+       height: auto;
+       overflow: auto;
+}
+
+.in-themes-panel #customize-theme-controls .customize-pane-parent,
+.in-themes-panel #customize-info {
+       -webkit-transform: translateX(100%);
+       -ms-transform: translateX(100%);
+       transform: translateX(100%);
+}
+
+#customize-theme-controls .customize-pane-child.accordion-section-content,
+#customize-theme-controls .customize-pane-child.accordion-sub-container {
+       display: block;
+       overflow-x: hidden;
+}
+
+#customize-theme-controls .customize-pane-child.accordion-section-content {
+       padding: 12px;
+}
+
+#customize-theme-controls .customize-pane-child.menu li {
+       position: static;
+}
+
 .customize-section-description-container {
        margin-bottom: 15px;
 }
@@ -232,6 +393,10 @@ div.customize-section-description {
        margin-top: 22px;
 }
 
+.customize-info div.customize-section-description {
+       margin-top: 0;
+}
+
 div.customize-section-description p:first-child {
        margin-top: 0;
 }
@@ -254,42 +419,17 @@ 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%;
+       color: #555d66;
 }
 
 .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 {
+.accordion-sub-container.control-panel-content.busy {
        display: block;
 }
 
@@ -303,16 +443,21 @@ h3.customize-section-title {
        top: 0;
        left: 0;
        width: 45px;
-       height: 45px;
+       height: 41px;
        padding: 0 2px 0 0;
        background: #eee;
        border: none;
+       border-top: 4px solid #eee;
        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-transition: color .15s ease-in-out,
+                   border-color .15s ease-in-out,
+                   background .15s ease-in-out;
+       transition: color .15s ease-in-out,
+                   border-color .15s ease-in-out,
+                   background .15s ease-in-out;
        -webkit-box-sizing: content-box;
        -moz-box-sizing: content-box;
        box-sizing: content-box;
@@ -329,23 +474,22 @@ h3.customize-section-title {
        background: #fff;
        border: none;
        border-right: 1px solid #ddd;
+       border-left: 4px solid #fff;
        -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;
+       -webkit-transition: color .15s ease-in-out,
+                   border-color .15s ease-in-out,
+                   background .15s ease-in-out;
+       transition: color .15s ease-in-out,
+                   border-color .15s ease-in-out,
+                   background .15s 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;
 }
@@ -354,33 +498,38 @@ h3.customize-section-title {
        display: block;
 }
 
-.panel-meta.customize-info .accordion-section-title {
+#customize-controls .panel-meta.customize-info .accordion-section-title {
        margin-left: 48px;
+       border-left: none;
 }
 
-#customize-controls .panel-meta.customize-info .accordion-section-title:hover {
+#customize-controls .panel-meta.customize-info .accordion-section-title:hover,
+#customize-controls .cannot-expand:hover .accordion-section-title {
        background: #fff;
-       color: #555;
+       color: #555d66;
+       border-left-color: #fff;
 }
 
 .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;
+       background: #fff;
+       color: #0073aa;
+       border-top-color: #0073aa;
        outline: none;
        -webkit-box-shadow: none;
        box-shadow: none;
 }
 
+
 .customize-panel-back:hover,
 .customize-panel-back:focus,
 .customize-section-back:hover,
 .customize-section-back:focus {
-       color: #23282d;
-       background: #f5f5f5;
+       color: #0073aa;
+       background: #f3f3f5;
+       border-left-color: #0073aa;
        outline: none;
        -webkit-box-shadow: none;
        box-shadow: none;
@@ -390,7 +539,7 @@ h3.customize-section-title {
        font: normal 22px/45px dashicons;
        content: "\f335";
        position: relative;
-       top: 1px;
+       top: -3px;
        left: 13px;
 }
 
@@ -399,10 +548,11 @@ h3.customize-section-title {
        font: normal 20px/72px dashicons;
        content: "\f341";
        position: relative;
-       left: 13px;
+       left: 9px;
 }
 
 .wp-full-overlay-sidebar .wp-full-overlay-header {
+       background-color: #eee;
        -webkit-transition: padding ease-in-out .18s;
        transition: padding ease-in-out .18s;
 }
@@ -411,63 +561,6 @@ h3.customize-section-title {
        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;
@@ -509,8 +602,8 @@ p.customize-section-description {
 }
 
 .customize-control select {
-       min-width: 50%;
-       max-width: 100%;
+       width: 100%;
+       max-width: 300px;
        height: 28px;
        line-height: 28px;
 }
@@ -531,9 +624,20 @@ p.customize-section-description {
        display: block;
        font-style: italic;
        line-height: 18px;
+       margin-top: 0;
        margin-bottom: 5px;
 }
 
+.customize-section-description a.external-link:after {
+       font: 16px/11px dashicons;
+       content: "\f310";
+       top: 3px;
+       position: relative;
+       padding-left: 3px;
+       display: inline-block;
+       text-decoration: none;
+}
+
 .customize-control-color .color-picker,
 .customize-control-upload div {
        line-height: 28px;
@@ -608,6 +712,71 @@ p.customize-section-description {
        float: left;
 }
 
+#available-menu-items .accordion-section-content .new-content-item,
+.customize-control-dropdown-pages .new-content-item {
+       width: -webkit-calc(100% - 30px);
+       width: calc(100% - 30px);
+       padding: 8px 15px;
+       position: absolute;
+       bottom: 0;
+       z-index: 10;
+       background: #eee;
+       display: -webkit-box;
+       display: -moz-box;
+       display: -ms-flexbox;
+       display: -webkit-flex;
+       display: flex;
+}
+
+.customize-control-dropdown-pages .new-content-item {
+       width: 100%;
+       max-width: 300px;
+       padding: 5px 0 5px 1px;
+       position: relative;
+}
+
+#available-menu-items .new-content-item .create-item-input,
+.customize-control-dropdown-pages .new-content-item .create-item-input {
+       -webkit-box-flex: 10;
+       -webkit-flex-grow: 10;
+       -moz-box-flex: 10;
+       -ms-flex-positive: 10;
+       -ms-flex: 10;
+       flex-grow: 10;
+}
+
+#available-menu-items .new-content-item .add-content,
+.customize-control-dropdown-pages .new-content-item .add-content {
+       margin: 2px 0 2px 6px;
+       -webkit-box-flex: 10;
+       -webkit-flex-grow: 10;
+       -moz-box-flex: 10;
+       -ms-flex-positive: 10;
+       -ms-flex: 10;
+       flex-grow: 1;
+}
+
+.customize-control-dropdown-pages .new-content-item .create-item-input.invalid {
+       border: 1px solid #f00;
+}
+
+.customize-control-dropdown-pages .add-new-toggle {
+       margin-left: 1px;
+       color: #0073aa;
+       font-weight: 600;
+       line-height: 28px;
+       text-decoration: underline;
+}
+
+.customize-control-dropdown-pages .add-new-toggle:hover,
+.customize-control-dropdown-pages .add-new-toggle:active {
+       color: #00a0d2;
+}
+
+.customize-control-dropdown-pages .add-new-toggle:focus {
+       color: #124964;
+}
+
 #customize-preview iframe {
        width: 100%;
        height: 100%;
@@ -739,7 +908,7 @@ p.customize-section-description {
 }
 
 .customize-control-color .dropdown .dropdown-content {
-       background-color: #555;
+       background-color: #555d66;
        border: 1px solid rgba(0, 0, 0, 0.15);
 }
 
@@ -770,6 +939,7 @@ p.customize-section-description {
        margin-bottom: 8px;
 }
 
+.customize-control-header .actions,
 .customize-control-header .uploaded {
        margin-bottom: 18px;
 }
@@ -822,7 +992,7 @@ p.customize-section-description {
        display: none;
        position: absolute;
        width: 100%;
-       color: #555;
+       color: #555d66;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
@@ -853,6 +1023,11 @@ p.customize-section-description {
 .customize-control-header .header-view:after {
        border: 0;
 }
+
+.customize-control-header .header-view.selected .choice:focus {
+       outline: none;
+}
+
 .customize-control-header .header-view.selected:after {
        content: '';
        position: absolute;
@@ -862,6 +1037,7 @@ p.customize-section-description {
        -webkit-border-radius: 2px;
        border-radius: 2px;
 }
+
 .customize-control-header .header-view.button.selected {
        border: 0;
 }
@@ -871,11 +1047,11 @@ p.customize-section-description {
 .customize-control-header .uploaded .header-view .close {
        font-size: 20px;
        color: #fff;
-       background: #555;
+       background: #555d66;
        background: rgba(0, 0, 0, 0.5);
        position: absolute;
        top: 10px;
-       right: -999px;
+       left: -999px;
        z-index: 1;
        width: 26px;
        height: 26px;
@@ -884,9 +1060,14 @@ p.customize-section-description {
 
 .customize-control-header .header-view:hover .close,
 .customize-control-header .header-view .close:focus {
+       left: auto;
        right: 10px;
 }
 
+.customize-control-header .header-view .close:focus {
+       outline: 1px solid #5b9dd9;
+}
+
 /* Header control: randomiz(s)er */
 
 .customize-control-header .random.placeholder {
@@ -933,6 +1114,16 @@ p.customize-section-description {
        margin-bottom: 9px;
 }
 
+.customize-control-header .choice:focus {
+       outline: none;
+       -webkit-box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 3px 1px rgba(30, 140, 190, .8);
+       box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 3px 1px rgba(30, 140, 190, .8);
+}
+
 .customize-control-header .uploaded div:last-child > .choice {
        margin-bottom: 0;
 }
@@ -954,6 +1145,64 @@ p.customize-section-description {
        float: right;
 }
 
+/* Background position control */
+.customize-control-background_position .background-position-control .button-group {
+       display: block;
+}
+
+/**
+ * Custom CSS Section
+ *
+ * Modifications to the Section Container to make the textarea full-width and
+ * full-height, if the control is the only control in the section.
+ */
+
+#customize-controls .customize-section-description-container.section-meta.customize-info {
+       border-bottom: none;
+}
+
+#sub-accordion-section-custom_css .customize-control-notifications-container {
+       margin-bottom: 15px;
+}
+
+#customize-control-custom_css textarea {
+       display: block;
+       font-family: Consolas, Monaco, monospace;
+       font-size: 12px;
+       padding: 6px 8px;
+       height: 500px;
+       -moz-tab-size: 4;
+       -o-tab-size: 4;
+       tab-size: 4;
+}
+
+.customize-section-description-container + #customize-control-custom_css:last-child textarea {
+       border-right: 0;
+       border-left: 0;
+       height: -webkit-calc( 100vh - 185px );
+       height: calc( 100vh - 185px );
+       resize: none;
+}
+.customize-section-description-container + #customize-control-custom_css:last-child {
+       margin-left: -12px;
+       width: 299px;
+       margin-bottom: -12px;
+}
+
+@media screen and ( max-width: 640px ) {
+       .customize-section-description-container + #customize-control-custom_css:last-child {
+               margin-left: 0;
+               margin-right: 0;
+               width: 100%;
+       }
+       .customize-section-description-container + #customize-control-custom_css:last-child textarea {
+               height: -webkit-calc( 100vh - 140px );
+               height: calc( 100vh - 140px );
+               width: 100%;
+               border: solid 1px #ddd;
+       }
+}
+
 /**
  * Themes
  */
@@ -975,37 +1224,46 @@ p.customize-section-description {
        animation: customize-reload .75s;
 }
 
-.control-section-themes .accordion-section-title {
+#customize-theme-controls .control-section-themes .accordion-section-title:hover, /* Not a focusable element. */
+#customize-theme-controls .control-section-themes .accordion-section-title {
        cursor: default;
+       background: #fff;
+       color: #555d66;
+       border-top: 1px solid #ddd;
+       border-bottom: 1px solid #ddd;
+       border-left: none;
+       margin-top: 0;
 }
 
-#customize-theme-controls .control-section-themes .accordion-section-title:hover,
-#customize-theme-controls .control-section-themes .accordion-section-title:focus {
-       color: #555;
-       background-color: #fff;
+#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child:hover, /* Not a focusable element. */
+#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child {
+       border-top: 0;
 }
 
-.control-section-themes .accordion-section-title {
-       margin: 15px 0;
+#customize-theme-controls .control-section-themes > .accordion-section-title:hover, /* Not a focusable element. */
+#customize-theme-controls .control-section-themes > .accordion-section-title {
+       margin: 0 0 15px;
 }
 
-.customize-themes-panel .accordion-section-title {
+#customize-controls .customize-themes-panel .accordion-section-title:hover,
+#customize-controls .customize-themes-panel .accordion-section-title {
        margin: 15px -8px;
 }
 
-.control-section-themes .accordion-section-title {
+#customize-controls .control-section-themes .accordion-section-title,
+#customize-controls .customize-themes-panel .accordion-section-title {
        padding-right: 100px; /* Space for the button */
 }
 
-.control-section-themes .accordion-section-title span.customize-action,
+#customize-controls .control-section-themes .accordion-section-title span.customize-action,
 #customize-controls .customize-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 {
+#customize-controls .control-section-themes .accordion-section-title .change-theme,
+#customize-controls .customize-themes-panel .accordion-section-title .customize-theme {
        position: absolute;
        right: 10px;
        top: 50%;
@@ -1013,12 +1271,11 @@ p.customize-section-description {
        font-weight: 400;
 }
 
-.control-section-themes .accordion-section-title:before {
+#customize-controls .control-section-themes .accordion-section-title:before {
        display: none;
 }
 
-.customize-themes-panel {
-       display: none;
+#customize-controls .customize-themes-panel {
        padding: 0 8px;
        background: #f1f1f1;
        -webkit-box-sizing: border-box;
@@ -1026,7 +1283,7 @@ p.customize-section-description {
        box-sizing: border-box;
 }
 
-.customize-themes-panel .accordion-section-title:first-child {
+#customize-controls .customize-themes-panel .accordion-section-title:first-child {
        margin-top: 0;
 }
 
@@ -1035,14 +1292,10 @@ p.customize-section-description {
        font-weight: 600;
 }
 
-.customize-themes-panel > h2 {
+#customize-controls .customize-themes-panel > h2 {
        padding: 15px 8px 0 8px;
 }
 
-.control-section.open .customize-themes-panel {
-       display: block;
-}
-
 #customize-theme-controls .customize-themes-panel .accordion-section-content {
        background: transparent;
        display: block;
@@ -1088,27 +1341,15 @@ p.customize-section-description {
        width: 100%;
 }
 
-#accordion-section-themes .accordion-section-title:after {
+.control-section-themes .accordion-section-title:after,
+.customize-themes-panel .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%;
-}
-
 /* Details View */
 .wp-customizer .theme-overlay {
        display: none;
@@ -1142,10 +1383,6 @@ p.customize-section-description {
        text-align: right; /* Because there's only one action, match the pattern of media modals and right-align the action. */
 }
 
-.modal-open .in-themes-panel #customize-controls .wp-full-overlay-sidebar-content {
-       overflow: visible; /* Prevent the top-level Customizer controls from becoming visible when elements on the right of the details modal are focused. */
-}
-
 .ie8 .wp-customizer .theme-overlay .theme-header,
 .ie8 .wp-customizer .theme-overlay .theme-about,
 .ie8 .wp-customizer .theme-overlay .theme-actions {
@@ -1196,7 +1433,7 @@ body.cheatin p {
  * Widgets and Menus common styles
  */
 
-/* higher specificity than .wp-core-ui .button-secondary */
+/* higher specificity than .wp-core-ui .button */
 #customize-theme-controls .add-new-widget,
 #customize-theme-controls .add-new-menu-item {
        cursor: pointer;
@@ -1219,7 +1456,8 @@ body.cheatin p {
 }
 
 .add-new-widget:before,
-.add-new-menu-item:before {
+.add-new-menu-item:before,
+#available-menu-items .new-content-item .add-content:before {
        content: "\f132";
        display: inline-block;
        position: relative;
@@ -1400,6 +1638,11 @@ body.adding-widget .add-new-widget:before,
        overflow: auto;
        bottom: 0;
        width: 100%;
+       border-top: 1px solid #ddd;
+}
+
+.no-widgets-found #available-widgets-list {
+       border-top: none;
 }
 
 #available-widgets-filter {
@@ -1408,13 +1651,12 @@ body.adding-widget .add-new-widget:before,
        z-index: 1;
        width: 300px;
        background: #eee;
-       border-bottom: 1px solid #e5e5e5;
 }
 
 /* search field container */
 #available-widgets-filter,
 #available-menu-items-search .accordion-section-title {
-       padding: 12px 15px;
+       padding: 13px 15px;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
@@ -1422,8 +1664,101 @@ body.adding-widget .add-new-widget:before,
 
 #available-widgets-filter input,
 #available-menu-items-search input {
-       padding: 6px 10px;
        width: 100%;
+       height: 32px;
+       margin: 1px 0;
+       padding: 6px 30px;
+}
+
+#available-widgets-filter input::-ms-clear,
+#available-menu-items-search input::-ms-clear {
+       display: none; /* remove the "x" in IE, which conflicts with the "x" icon on button.clear-results */
+}
+
+#available-menu-items-search .search-icon,
+#available-widgets-filter .search-icon {
+       display: block;
+       position: absolute;
+       top: 15px; /* 13 container padding +1 input margin +1 input border */
+       left: 16px;
+       width: 30px;
+       height: 30px;
+       line-height: 28px;
+       text-align: center;
+       color: #72777c;
+}
+
+#available-widgets-filter .clear-results,
+#available-menu-items-search .clear-results {
+       position: absolute;
+       top: 15px; /* 13 container padding +1 input margin +1 input border */
+       right: 16px;
+       width: 30px;
+       height: 30px;
+       padding: 0;
+       border: 0;
+       cursor: pointer;
+       background: none;
+       color: #a00;
+       text-decoration: none;
+       outline: 0;
+}
+
+#available-widgets-filter .clear-results,
+#available-menu-items-search .clear-results,
+#available-menu-items-search.loading .clear-results.is-visible {
+       display: none;
+}
+
+#available-widgets-filter .clear-results.is-visible,
+#available-menu-items-search .clear-results.is-visible {
+       display: block;
+}
+
+#available-widgets-filter .clear-results:before,
+#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-widgets-filter .clear-results:hover,
+#available-widgets-filter .clear-results:focus,
+#available-menu-items-search .clear-results:hover,
+#available-menu-items-search .clear-results:focus {
+       color: #dc3232;
+}
+
+#available-widgets-filter .clear-results:focus,
+#available-menu-items-search .clear-results: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);
+}
+
+#available-menu-items-search .search-icon:after,
+#available-widgets-filter .search-icon:after {
+       content: "\f179";
+       font: normal 20px/1 dashicons;
+       vertical-align: middle;
+       -webkit-font-smoothing: antialiased;
+       -moz-osx-font-smoothing: grayscale;
+}
+
+.no-widgets-found-message {
+       display: none;
+       margin: 0;
+       padding: 0 15px;
+       line-height: inherit;
+}
+
+.no-widgets-found .no-widgets-found-message {
+       display: block;
 }
 
 #available-widgets .widget-top,
@@ -1441,7 +1776,14 @@ body.adding-widget .add-new-widget:before,
        position: relative;
        padding: 20px 15px 20px 60px;
        background: #fff;
-       border-bottom: 1px solid #e5e5e5;
+       border-bottom: 1px solid #ddd;
+       border-left: 4px solid #fff;
+       -webkit-transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
+       transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
        cursor: pointer;
        display: none;
 }
@@ -1517,7 +1859,7 @@ body.adding-widget .add-new-widget:before,
                background: #eee;
                border: 0;
                border-right: 1px solid #ddd;
-               color: #444;
+               color: #555d66;
                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;
@@ -1598,7 +1940,7 @@ body.adding-widget .add-new-widget:before,
                padding: 9px 10px 12px 14px;
                margin: 0;
                line-height: 24px;
-               color: #555;
+               color: #555d66;
                display: block;
                overflow: hidden;
                white-space: nowrap;
@@ -1618,12 +1960,15 @@ body.adding-widget .add-new-widget:before,
        #available-widgets-filter {
                position: relative;
                width: 100%;
-               background: #fff;
                height: auto;
-               padding: 10px 15px;
        }
 
        #available-widgets-list {
-               top: 140px;
+               top: 130px;
+       }
+
+       #available-menu-items-search .clear-results,
+       #available-menu-items-search .search-icon {
+               top: 85px; /* 70 section title height + 13 container padding +1 input margin +1 input border */
        }
 }
index cf42cc97400b46829b08de8883b5036150d2c40a..d5d48fb774dcf1c289f22ccb44e7d09e83e58bd1 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: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
+#customize-controls .customize-info .customize-section-description,#customize-controls .customize-info.section-meta{margin-bottom:15px}body{overflow:hidden;-webkit-text-size-adjust:100%}.customize-controls-close,.widget-control-actions 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:#555d66}#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-bottom:1px solid #ddd;margin-bottom:15px}#customize-controls .customize-info.is-in-view,#customize-controls .customize-section-title.is-in-view{position:absolute;z-index:9;width:100%;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 0 rgba(0,0,0,.1)}#customize-controls .customize-section-title.is-in-view{margin-top:0}#customize-controls .customize-info.is-in-view+.accordion-section{margin-top:15px}#customize-controls .customize-info.is-sticky,#customize-controls .customize-section-title.is-sticky{position:fixed;top:46px}#customize-controls .customize-info .accordion-section-title{background:#fff;color:#555d66;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:#32373c}#customize-controls .customize-info .accordion-section-title:after{display:none}#customize-controls .customize-info .preview-notice{font-size:13px;line-height:24px}#customize-controls .customize-info .panel-title,#customize-controls .customize-pane-child .customize-section-title h3,#customize-controls .customize-pane-child h3.customize-section-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:#555d66;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 .customize-info .customize-section-description,#customize-controls .no-widget-areas-rendered-notice{color:#555d66;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,#customize-controls .customize-info .customize-section-description p:first-child{margin-top:0}#customize-controls .customize-info .customize-panel-description p:last-child,#customize-controls .customize-info .customize-section-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:#555d66;background-color:#fff;border-bottom:1px solid #ddd;border-left:4px solid #fff;-webkit-transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out}#customize-controls #customize-theme-controls .customize-themes-panel .accordion-section-title{color:#555;background-color:#fff;border-left:4px solid #fff}#customize-theme-controls .accordion-section-title:after{content:"\f345";color:#a0a5aa}#customize-theme-controls .accordion-section-content{color:#555d66;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:#0073aa;background:#f3f3f5;border-left-color:#0073aa}#accordion-section-themes+.control-section{border-top:1px solid #ddd}.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:#f3f3f5}#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:#0073aa}#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 .control-panel-content .control-section:nth-child(2),#customize-theme-controls .control-panel-nav_menus .control-section:nth-child(3){border-top:1px solid #ddd}#customize-theme-controls>ul{margin:0}#customize-info,#customize-theme-controls .customize-pane-child,#customize-theme-controls .customize-pane-parent{width:100%;margin:0;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:.18s transform cubic-bezier(.645,.045,.355,1),.18s -webkit-transform cubic-bezier(.645,.045,.355,1);transition:.18s transform cubic-bezier(.645,.045,.355,1),.18s -webkit-transform cubic-bezier(.645,.045,.355,1)}#customize-info,#customize-theme-controls .customize-pane-parent{position:relative;visibility:visible;height:auto;max-height:none;overflow:auto;-webkit-transform:none;-ms-transform:none;transform:none}#customize-theme-controls .customize-pane-child{position:absolute;top:0;left:0;visibility:hidden;height:0;max-height:none;overflow:hidden;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}#customize-theme-controls .customize-pane-child.current-panel,#customize-theme-controls .customize-pane-child.open,#customize-theme-controls .customize-themes-panel.customize-pane-child.current-panel{-webkit-transform:none;-ms-transform:none;transform:none}#customize-theme-controls .customize-themes-panel.customize-pane-child,.in-sub-panel #customize-info,.in-sub-panel #customize-theme-controls .customize-pane-parent,.in-sub-panel.section-open #customize-theme-controls .customize-pane-child.current-panel,.in-themes-panel #customize-info,.in-themes-panel #customize-theme-controls .customize-pane-parent,.section-open #customize-info,.section-open #customize-theme-controls .customize-pane-parent{visibility:hidden;height:0;overflow:hidden;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}#customize-theme-controls .customize-pane-child.busy,#customize-theme-controls .customize-pane-child.current-panel,#customize-theme-controls .customize-pane-child.open,.busy.section-open.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel,.in-sub-panel #customize-info.busy,.in-sub-panel #customize-theme-controls .customize-pane-parent.busy,.in-themes-panel #customize-info.busy,.in-themes-panel #customize-theme-controls .customize-pane-parent.busy,.section-open #customize-info.busy,.section-open #customize-theme-controls .customize-pane-parent.busy{visibility:visible;height:auto;overflow:auto}.in-themes-panel #customize-info,.in-themes-panel #customize-theme-controls .customize-pane-parent{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}#customize-theme-controls .customize-pane-child.accordion-section-content,#customize-theme-controls .customize-pane-child.accordion-sub-container{display:block;overflow-x:hidden}#customize-theme-controls .customize-pane-child.accordion-section-content{padding:12px}#customize-theme-controls .customize-pane-child.menu li{position:static}.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}.customize-info div.customize-section-description,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:#555d66}.accordion-sub-container.control-panel-content{display:none;position:absolute;top:0;width:100%}.accordion-sub-container.control-panel-content.busy{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:41px;padding:0 2px 0 0;background:#eee;border:none;border-top:4px solid #eee;border-right:1px solid #ddd;color:#444;text-align:left;cursor:pointer;-webkit-transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s 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;border-left:4px solid #fff;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;-webkit-transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out}.customize-section-back{height:74px}.ios .customize-panel-back{display:none}.ios .expanded.in-sub-panel .customize-panel-back{display:block}#customize-controls .panel-meta.customize-info .accordion-section-title{margin-left:48px;border-left:none}#customize-controls .cannot-expand:hover .accordion-section-title,#customize-controls .panel-meta.customize-info .accordion-section-title:hover{background:#fff;color:#555d66;border-left-color:#fff}.customize-controls-close:focus,.customize-controls-close:hover,.customize-controls-preview-toggle:focus,.customize-controls-preview-toggle:hover{background:#fff;color:#0073aa;border-top-color:#0073aa;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:#0073aa;background:#f3f3f5;border-left-color:#0073aa;outline:0;-webkit-box-shadow:none;box-shadow:none}.customize-controls-close:before{font:400 22px/45px dashicons;content:"\f335";position:relative;top:-3px;left:13px}.customize-panel-back:before,.customize-section-back:before{font:400 20px/72px dashicons;content:"\f341";position:relative;left:9px}.wp-full-overlay-sidebar .wp-full-overlay-header{background-color:#eee;-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}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{width:100%;max-width:300px;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-top:0;margin-bottom:5px}.customize-section-description a.external-link:after{font:16px/11px dashicons;content:"\f310";top:3px;position:relative;padding-left:3px;display:inline-block;text-decoration:none}.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}#available-menu-items .accordion-section-content .new-content-item,.customize-control-dropdown-pages .new-content-item{width:-webkit-calc(100% - 30px);width:calc(100% - 30px);padding:8px 15px;position:absolute;bottom:0;z-index:10;background:#eee;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.customize-control-dropdown-pages .new-content-item{width:100%;max-width:300px;padding:5px 0 5px 1px;position:relative}#available-menu-items .new-content-item .create-item-input,.customize-control-dropdown-pages .new-content-item .create-item-input{-webkit-box-flex:10;-webkit-flex-grow:10;-moz-box-flex:10;-ms-flex-positive:10;-ms-flex:10;flex-grow:10}#available-menu-items .new-content-item .add-content,.customize-control-dropdown-pages .new-content-item .add-content{margin:2px 0 2px 6px;-webkit-box-flex:10;-webkit-flex-grow:10;-moz-box-flex:10;-ms-flex-positive:10;-ms-flex:10;flex-grow:1}.customize-control-dropdown-pages .new-content-item .create-item-input.invalid{border:1px solid red}.customize-control-dropdown-pages .add-new-toggle{margin-left:1px;color:#0073aa;font-weight:600;line-height:28px;text-decoration:underline}.customize-control-dropdown-pages .add-new-toggle:active,.customize-control-dropdown-pages .add-new-toggle:hover{color:#00a0d2}.customize-control-dropdown-pages .add-new-toggle:focus{color:#124964}#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:#555d66;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 .actions,.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:#555d66;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 .choice:focus{outline: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:#555d66;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:auto;right:10px}.customize-control-header .header-view .close:focus{outline:#5b9dd9 solid 1px}.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 .choice:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 3px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 3px 1px rgba(30,140,190,.8)}.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}.customize-control-background_position .background-position-control .button-group{display:block}#customize-controls .customize-section-description-container.section-meta.customize-info{border-bottom:none}#sub-accordion-section-custom_css .customize-control-notifications-container{margin-bottom:15px}#customize-control-custom_css textarea{display:block;font-family:Consolas,Monaco,monospace;font-size:12px;padding:6px 8px;height:500px;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.customize-section-description-container+#customize-control-custom_css:last-child textarea{border-right:0;border-left:0;height:-webkit-calc(100vh - 185px);height:calc(100vh - 185px);resize:none}.customize-section-description-container+#customize-control-custom_css:last-child{margin-left:-12px;width:299px;margin-bottom:-12px}@media screen and (max-width:640px){.customize-section-description-container+#customize-control-custom_css:last-child{margin-left:0;margin-right:0;width:100%}.customize-section-description-container+#customize-control-custom_css:last-child textarea{height:-webkit-calc(100vh - 140px);height:calc(100vh - 140px);width:100%;border:1px solid #ddd}}@-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}#customize-theme-controls .control-section-themes .accordion-section-title,#customize-theme-controls .control-section-themes .accordion-section-title:hover{cursor:default;background:#fff;color:#555d66;border-top:1px solid #ddd;border-bottom:1px solid #ddd;border-left:none;margin-top:0}#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child,#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child:hover{border-top:0}#customize-theme-controls .control-section-themes>.accordion-section-title,#customize-theme-controls .control-section-themes>.accordion-section-title:hover{margin:0 0 15px}#customize-controls .customize-themes-panel .accordion-section-title,#customize-controls .customize-themes-panel .accordion-section-title:hover{margin:15px -8px}#customize-controls .control-section-themes .accordion-section-title,#customize-controls .customize-themes-panel .accordion-section-title{padding-right:100px}#customize-controls .control-section-themes .accordion-section-title span.customize-action,#customize-controls .customize-section-title span.customize-action{font-size:13px;display:block;font-weight:400}#customize-controls .control-section-themes .accordion-section-title .change-theme,#customize-controls .customize-themes-panel .accordion-section-title .customize-theme{position:absolute;right:10px;top:50%;margin-top:-14px;font-weight:400}#customize-controls .control-section-themes .accordion-section-title:before{display:none}#customize-controls .customize-themes-panel{padding:0 8px;background:#f1f1f1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#customize-controls .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-controls .customize-themes-panel>h2{padding:15px 8px 0}#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%}.control-section-themes .accordion-section-title:after,.customize-themes-panel .accordion-section-title:after{display:none}.customize-themes-panel.control-panel-content{border-top:1px solid #ddd}.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}.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}#available-menu-items .new-content-item .add-content:before,.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}.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-menu-items .customize-section-title,#available-widgets .customize-section-title{display:none}#available-widgets-list{top:60px;position:absolute;overflow:auto;bottom:0;width:100%;border-top:1px solid #ddd}.no-widgets-found #available-widgets-list{border-top:none}#available-widgets-filter{position:fixed;top:0;z-index:1;width:300px;background:#eee}#available-menu-items-search .accordion-section-title,#available-widgets-filter{padding:13px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-menu-items-search input,#available-widgets-filter input{width:100%;height:32px;margin:1px 0;padding:6px 30px}#available-menu-items-search input::-ms-clear,#available-widgets-filter input::-ms-clear{display:none}#available-menu-items-search .search-icon,#available-widgets-filter .search-icon{display:block;position:absolute;top:15px;left:16px;width:30px;height:30px;line-height:28px;text-align:center;color:#72777c}#available-menu-items-search .clear-results,#available-widgets-filter .clear-results{position:absolute;top:15px;right:16px;width:30px;height:30px;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,#available-widgets-filter .clear-results{display:none}#available-menu-items-search .clear-results.is-visible,#available-widgets-filter .clear-results.is-visible{display:block}#available-menu-items-search .clear-results:before,#available-widgets-filter .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,#available-widgets-filter .clear-results:focus,#available-widgets-filter .clear-results:hover{color:#dc3232}#available-menu-items-search .clear-results:focus,#available-widgets-filter .clear-results: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)}#available-menu-items-search .search-icon:after,#available-widgets-filter .search-icon:after{content:"\f179";font:400 20px/1 dashicons;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.no-widgets-found-message{display:none;margin:0;padding:0 15px;line-height:inherit}.no-widgets-found .no-widgets-found-message{display:block}#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 #ddd;border-left:4px solid #fff;-webkit-transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;cursor:pointer;display:none}#available-menu-items .item,#available-widgets .widget{position:static}.customize-controls-preview-toggle{display:none}@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:#555d66;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:#555d66;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%;height:auto}#available-widgets-list{top:130px}#available-menu-items-search .clear-results,#available-menu-items-search .search-icon{top:85px}}
\ No newline at end of file
index fde34051ced20eccaf8366049b20a2089aa8eea8..0d33732c1cf07eaea7e093b6454d99c80a89174e 100644 (file)
@@ -1,8 +1,12 @@
-#accordion-section-menu_locations {
+#customize-theme-controls #accordion-section-menu_locations {
        position: relative;
        margin-bottom: 15px;
 }
 
+#customize-theme-controls #accordion-section-menu_locations > .accordion-section-title {
+       border-bottom-color: #ddd;
+}
+
 .menu-in-location,
 .menu-in-locations {
        display: block;
        text-align: left;
 }
 
+.wp-customizer .menu-item-handle:hover {
+       z-index: 8;
+}
+
+.customize-control-nav_menu_item.has-notifications .menu-item-handle {
+       border-right: 4px solid #00a0d2;
+}
+
 .wp-customizer .menu-item-settings {
        max-width: 100%;
        overflow: hidden;
+       z-index: 8;
        padding: 10px;
        background: #eee;
        border: 1px solid #999;
        text-decoration: none !important;
 }
 
-#accordion-panel-nav_menus .field-link-target,
-#accordion-panel-nav_menus .field-title-attribute,
-#accordion-panel-nav_menus .field-css-classes,
-#accordion-panel-nav_menus .field-xfn,
-#accordion-panel-nav_menus .field-description {
+.control-section-nav_menu .field-link-target,
+.control-section-nav_menu .field-title-attribute,
+.control-section-nav_menu .field-css-classes,
+.control-section-nav_menu .field-xfn,
+.control-section-nav_menu .field-description {
        display: none;
 }
 
-#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-css-classes-active .field-css-classes,
-#accordion-panel-nav_menus.field-xfn-active .field-xfn,
-#accordion-panel-nav_menus.field-description-active .field-description {
+.control-section-nav_menu.field-link-target-active .field-link-target,
+.control-section-nav_menu.field-title-attribute-active .field-title-attribute,
+.control-section-nav_menu.field-css-classes-active .field-css-classes,
+.control-section-nav_menu.field-xfn-active .field-xfn,
+.control-section-nav_menu.field-description-active .field-description {
        display: block;
 }
 
 .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 {
+.control-section-nav_menu.menu .menu-item-edit-active {
        margin-right: 0;
 }
 
-.control-section-nav_menu .menu .menu-item-edit-active .menu-item-bar {
+.control-section-nav_menu.menu .menu-item-edit-active .menu-item-bar {
        margin-left: 0;
 }
 
-.control-section-nav_menu .menu .sortable-placeholder {
+.control-section-nav_menu.menu .sortable-placeholder {
        margin-top: 0;
        margin-bottom: 1px;
        max-width: -webkit-calc(100% - 2px);
        float: none;
 }
 
-.control-section-nav_menu .menu ul.menu-item-transport .menu-item-bar {
+.control-section-nav_menu.menu ul.menu-item-transport .menu-item-bar {
        margin-top: 0;
 }
 
        background: #fff;
        -webkit-transition: background-color 0.15s;
        transition: background-color 0.15s;
+       /* Reset the value inherited from the base .accordion-section-title style. Ticket #37589. */
+       -webkit-user-select: auto;
+       -moz-user-select: auto;
+       -ms-user-select: auto;
+       user-select: auto;
 }
 
 #available-menu-items .open .accordion-section-title,
        color: #23282d;
 }
 
-#available-menu-items .accordion-section-content {
+#available-menu-items .available-menu-items-list {
        overflow-y: auto;
        max-height: 200px; /* This gets set in JS to fit the screen size, and based on # of sections. */
        background: transparent;
 }
 
 #available-menu-items .accordion-section-content {
-       padding: 1px 15px 15px 15px;
-       margin: 0;
        max-height: 290px;
+       margin: 0;
+       padding: 0;
+       position: relative;
+       background: transparent;
+}
+
+#available-menu-items .accordion-section-content .available-menu-items-list {
+       margin: 0 0 45px 0;
+       padding: 1px 15px 15px 15px;
+}
+
+#available-menu-items .accordion-section-content .available-menu-items-list:only-child { /* Types that do not support new items for the current user */
+       margin-bottom: 0;
+}
+
+#new-custom-menu-item .accordion-section-content {
+       padding: 0 15px 15px 15px;
 }
 
 #available-menu-items .menu-item-tpl {
 #custom-menu-item-name.invalid,
 #custom-menu-item-url.invalid,
 .menu-name-field.invalid,
-.menu-name-field.invalid:focus {
+.menu-name-field.invalid:focus,
+#available-menu-items .new-content-item .create-item-input.invalid,
+#available-menu-items .new-content-item .create-item-input.invalid:focus {
        border: 1px solid #f00;
 }
 
        margin: 0 20px;
 }
 
-#available-menu-items-search .clear-results {
-       position: absolute;
-       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,
-#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: ""; /* 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 .clear-results:hover,
-#available-menu-items-search .clear-results:focus {
-       color: #f00;
-}
-
 #available-menu-items-search .spinner {
        position: absolute;
-       top: 18px; /* 12 container padding +1 input margin +1 input border +4 ( ( 28 input height - 20 button height ) / 2 ) */
-       left: 20px;
+       top: 20px; /* 13 container padding +1 input margin +6 ( ( 32 input height - 20 spinner height ) / 2 ) */
+       left: 21px;
        margin: 0 !important;
 }
 
 /* search results list */
 #available-menu-items #available-menu-items-search .accordion-section-content {
        position: absolute;
-       right: 1px;
+       right: 0;
        top: 60px; /* below title div / search input */
        bottom: 0px; /* 100% height that still triggers lazy load */
        max-height: none;
        box-sizing: border-box;
 }
 
+#available-menu-items-search .nothing-found {
+       /* Compensate the 1px top padding of the container. */
+       margin-top: -1px;
+}
+
 #available-menu-items-search .accordion-section-title:after {
        display: none;
 }
@@ -754,9 +753,14 @@ body.adding-menu-items #customize-preview {
 
 /* Add/delete Menus */
 
+#customize-theme-controls .control-panel-content .control-section-nav_menu:nth-last-child(2) .accordion-section-title {
+       border-bottom-color: #ddd;
+}
+
 /* @todo update selector */
 #accordion-section-add_menu {
        margin: 15px 12px;
+       overflow: hidden;
 }
 
 .new-menu-section-content {
@@ -850,7 +854,6 @@ li.assigned-to-menu-location .add-new-menu-item {
 .customize-screen-options-toggle:focus:before,
 #customize-controls .customize-info .customize-help-toggle:focus:before,
 .wp-customizer button:focus .toggle-indicator:after,
-#available-menu-items-search .clear-results:focus,
 .menu-delete:focus,
 .menu-item-bar .item-delete:focus:before,
 #available-menu-items .item-add:focus:before {
@@ -867,19 +870,10 @@ 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 ) */
+               top: 130px;
        }
 }
index 9c5e43cadc506abbca370b71e6685c89df2f1b11..4bbb6e8d9e1587a10c29568237e3bf9aac71e25e 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}.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
+#customize-theme-controls #accordion-section-menu_locations{position:relative;margin-bottom:15px}#customize-theme-controls #accordion-section-menu_locations>.accordion-section-title{border-bottom-color:#ddd}.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-handle:hover{z-index:8}.customize-control-nav_menu_item.has-notifications .menu-item-handle{border-right:4px solid #00a0d2}.wp-customizer .menu-item-settings{max-width:100%;overflow:hidden;z-index:8;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}.control-section-nav_menu .field-css-classes,.control-section-nav_menu .field-description,.control-section-nav_menu .field-link-target,.control-section-nav_menu .field-title-attribute,.control-section-nav_menu .field-xfn{display:none}.control-section-nav_menu.field-css-classes-active .field-css-classes,.control-section-nav_menu.field-description-active .field-description,.control-section-nav_menu.field-link-target-active .field-link-target,.control-section-nav_menu.field-title-attribute-active .field-title-attribute,.control-section-nav_menu.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;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}#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 .available-menu-items-list{overflow-y:auto;max-height:200px;background:0 0}#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{max-height:290px;margin:0;padding:0;position:relative;background:0 0}#available-menu-items .accordion-section-content .available-menu-items-list{margin:0 0 45px;padding:1px 15px 15px}#available-menu-items .accordion-section-content .available-menu-items-list:only-child{margin-bottom:0}#new-custom-menu-item .accordion-section-content{padding:0 15px 15px}#available-menu-items .menu-item-tpl{margin:0}#available-menu-items .new-content-item .create-item-input.invalid,#available-menu-items .new-content-item .create-item-input.invalid:focus,#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 .spinner{position:absolute;top:20px;left:21px;margin:0!important}#available-menu-items #available-menu-items-search .accordion-section-content{position:absolute;right:0;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 .nothing-found{margin-top:-1px}#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)}#customize-theme-controls .control-panel-content .control-section-nav_menu:nth-last-child(2) .accordion-section-title{border-bottom-color:#ddd}#accordion-section-add_menu{margin:15px 12px;overflow:hidden}.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,#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:130px}}
\ No newline at end of file
index afe0cbc56698e33c4c9e39b877de1117b8f0b7b1..6fe558d28fa22c8d6940284792ce1640bf214dd8 100644 (file)
@@ -1,8 +1,12 @@
-#accordion-section-menu_locations {
+#customize-theme-controls #accordion-section-menu_locations {
        position: relative;
        margin-bottom: 15px;
 }
 
+#customize-theme-controls #accordion-section-menu_locations > .accordion-section-title {
+       border-bottom-color: #ddd;
+}
+
 .menu-in-location,
 .menu-in-locations {
        display: block;
        text-align: right;
 }
 
+.wp-customizer .menu-item-handle:hover {
+       z-index: 8;
+}
+
+.customize-control-nav_menu_item.has-notifications .menu-item-handle {
+       border-left: 4px solid #00a0d2;
+}
+
 .wp-customizer .menu-item-settings {
        max-width: 100%;
        overflow: hidden;
+       z-index: 8;
        padding: 10px;
        background: #eee;
        border: 1px solid #999;
        text-decoration: none !important;
 }
 
-#accordion-panel-nav_menus .field-link-target,
-#accordion-panel-nav_menus .field-title-attribute,
-#accordion-panel-nav_menus .field-css-classes,
-#accordion-panel-nav_menus .field-xfn,
-#accordion-panel-nav_menus .field-description {
+.control-section-nav_menu .field-link-target,
+.control-section-nav_menu .field-title-attribute,
+.control-section-nav_menu .field-css-classes,
+.control-section-nav_menu .field-xfn,
+.control-section-nav_menu .field-description {
        display: none;
 }
 
-#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-css-classes-active .field-css-classes,
-#accordion-panel-nav_menus.field-xfn-active .field-xfn,
-#accordion-panel-nav_menus.field-description-active .field-description {
+.control-section-nav_menu.field-link-target-active .field-link-target,
+.control-section-nav_menu.field-title-attribute-active .field-title-attribute,
+.control-section-nav_menu.field-css-classes-active .field-css-classes,
+.control-section-nav_menu.field-xfn-active .field-xfn,
+.control-section-nav_menu.field-description-active .field-description {
        display: block;
 }
 
 .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 {
+.control-section-nav_menu.menu .menu-item-edit-active {
        margin-left: 0;
 }
 
-.control-section-nav_menu .menu .menu-item-edit-active .menu-item-bar {
+.control-section-nav_menu.menu .menu-item-edit-active .menu-item-bar {
        margin-right: 0;
 }
 
-.control-section-nav_menu .menu .sortable-placeholder {
+.control-section-nav_menu.menu .sortable-placeholder {
        margin-top: 0;
        margin-bottom: 1px;
        max-width: -webkit-calc(100% - 2px);
        float: none;
 }
 
-.control-section-nav_menu .menu ul.menu-item-transport .menu-item-bar {
+.control-section-nav_menu.menu ul.menu-item-transport .menu-item-bar {
        margin-top: 0;
 }
 
        background: #fff;
        -webkit-transition: background-color 0.15s;
        transition: background-color 0.15s;
+       /* Reset the value inherited from the base .accordion-section-title style. Ticket #37589. */
+       -webkit-user-select: auto;
+       -moz-user-select: auto;
+       -ms-user-select: auto;
+       user-select: auto;
 }
 
 #available-menu-items .open .accordion-section-title,
        color: #23282d;
 }
 
-#available-menu-items .accordion-section-content {
+#available-menu-items .available-menu-items-list {
        overflow-y: auto;
        max-height: 200px; /* This gets set in JS to fit the screen size, and based on # of sections. */
        background: transparent;
 }
 
 #available-menu-items .accordion-section-content {
-       padding: 1px 15px 15px 15px;
-       margin: 0;
        max-height: 290px;
+       margin: 0;
+       padding: 0;
+       position: relative;
+       background: transparent;
+}
+
+#available-menu-items .accordion-section-content .available-menu-items-list {
+       margin: 0 0 45px 0;
+       padding: 1px 15px 15px 15px;
+}
+
+#available-menu-items .accordion-section-content .available-menu-items-list:only-child { /* Types that do not support new items for the current user */
+       margin-bottom: 0;
+}
+
+#new-custom-menu-item .accordion-section-content {
+       padding: 0 15px 15px 15px;
 }
 
 #available-menu-items .menu-item-tpl {
 #custom-menu-item-name.invalid,
 #custom-menu-item-url.invalid,
 .menu-name-field.invalid,
-.menu-name-field.invalid:focus {
+.menu-name-field.invalid:focus,
+#available-menu-items .new-content-item .create-item-input.invalid,
+#available-menu-items .new-content-item .create-item-input.invalid:focus {
        border: 1px solid #f00;
 }
 
        margin: 0 20px;
 }
 
-#available-menu-items-search .clear-results {
-       position: absolute;
-       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,
-#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: ""; /* 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 .clear-results:hover,
-#available-menu-items-search .clear-results:focus {
-       color: #f00;
-}
-
 #available-menu-items-search .spinner {
        position: absolute;
-       top: 18px; /* 12 container padding +1 input margin +1 input border +4 ( ( 28 input height - 20 button height ) / 2 ) */
-       right: 20px;
+       top: 20px; /* 13 container padding +1 input margin +6 ( ( 32 input height - 20 spinner height ) / 2 ) */
+       right: 21px;
        margin: 0 !important;
 }
 
 /* search results list */
 #available-menu-items #available-menu-items-search .accordion-section-content {
        position: absolute;
-       left: 1px;
+       left: 0;
        top: 60px; /* below title div / search input */
        bottom: 0px; /* 100% height that still triggers lazy load */
        max-height: none;
        box-sizing: border-box;
 }
 
+#available-menu-items-search .nothing-found {
+       /* Compensate the 1px top padding of the container. */
+       margin-top: -1px;
+}
+
 #available-menu-items-search .accordion-section-title:after {
        display: none;
 }
@@ -754,9 +753,14 @@ body.adding-menu-items #customize-preview {
 
 /* Add/delete Menus */
 
+#customize-theme-controls .control-panel-content .control-section-nav_menu:nth-last-child(2) .accordion-section-title {
+       border-bottom-color: #ddd;
+}
+
 /* @todo update selector */
 #accordion-section-add_menu {
        margin: 15px 12px;
+       overflow: hidden;
 }
 
 .new-menu-section-content {
@@ -850,7 +854,6 @@ li.assigned-to-menu-location .add-new-menu-item {
 .customize-screen-options-toggle:focus:before,
 #customize-controls .customize-info .customize-help-toggle:focus:before,
 .wp-customizer button:focus .toggle-indicator:after,
-#available-menu-items-search .clear-results:focus,
 .menu-delete:focus,
 .menu-item-bar .item-delete:focus:before,
 #available-menu-items .item-add:focus:before {
@@ -867,19 +870,10 @@ 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 ) */
+               top: 130px;
        }
 }
index 4c2e208a1b0307c01f55df2df1703a003e41ed3e..7a0852375ef860e21a0c255f33cc375280a21c8c 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}.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
+#customize-theme-controls #accordion-section-menu_locations{position:relative;margin-bottom:15px}#customize-theme-controls #accordion-section-menu_locations>.accordion-section-title{border-bottom-color:#ddd}.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-handle:hover{z-index:8}.customize-control-nav_menu_item.has-notifications .menu-item-handle{border-left:4px solid #00a0d2}.wp-customizer .menu-item-settings{max-width:100%;overflow:hidden;z-index:8;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}.control-section-nav_menu .field-css-classes,.control-section-nav_menu .field-description,.control-section-nav_menu .field-link-target,.control-section-nav_menu .field-title-attribute,.control-section-nav_menu .field-xfn{display:none}.control-section-nav_menu.field-css-classes-active .field-css-classes,.control-section-nav_menu.field-description-active .field-description,.control-section-nav_menu.field-link-target-active .field-link-target,.control-section-nav_menu.field-title-attribute-active .field-title-attribute,.control-section-nav_menu.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;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}#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 .available-menu-items-list{overflow-y:auto;max-height:200px;background:0 0}#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{max-height:290px;margin:0;padding:0;position:relative;background:0 0}#available-menu-items .accordion-section-content .available-menu-items-list{margin:0 0 45px;padding:1px 15px 15px}#available-menu-items .accordion-section-content .available-menu-items-list:only-child{margin-bottom:0}#new-custom-menu-item .accordion-section-content{padding:0 15px 15px}#available-menu-items .menu-item-tpl{margin:0}#available-menu-items .new-content-item .create-item-input.invalid,#available-menu-items .new-content-item .create-item-input.invalid:focus,#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 .spinner{position:absolute;top:20px;right:21px;margin:0!important}#available-menu-items #available-menu-items-search .accordion-section-content{position:absolute;left:0;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 .nothing-found{margin-top:-1px}#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)}#customize-theme-controls .control-panel-content .control-section-nav_menu:nth-last-child(2) .accordion-section-title{border-bottom-color:#ddd}#accordion-section-add_menu{margin:15px 12px;overflow:hidden}.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,#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:130px}}
\ No newline at end of file
index 767a3e221a7a870877d5f2987d172e20c36f9127..8567da93029fe02367d7083922a325c72f48bddb 100644 (file)
 
 #available-widgets .widget-tpl:hover,
 #available-widgets .widget-tpl.selected {
-       background: #eee;
+       background: #f3f3f5;
        border-bottom-color: #ccc;
+       color: #0073aa;
+       border-right: 4px solid #0073aa;
 }
 
 #customize-controls .widget-title h3 {
index bfe8b97ccc794d4307d04c62042ebae651a0a90d..7655a2ed3b15ac04f7f68f4ee41b8e192decb850 100644 (file)
@@ -1 +1 @@
-.control-section.control-section-sidebar .accordion-section-content.ui-sortable,.wp-full-overlay-sidebar{overflow:visible}.control-section.control-section-sidebar,.customize-control-sidebar_widgets .hide-if-js,.customize-control-sidebar_widgets label{display:none}.customize-control-widget_form .widget-top{background:#fff;-webkit-transition:opacity .5s;transition:opacity .5s}.customize-control .widget-action{color:#72777c}.customize-control .widget-action:focus,.customize-control .widget-top:hover .widget-action{color:#23282d}.customize-control-widget_form:not(.widget-rendered) .widget-top{opacity:.5}.customize-control-widget_form .widget-control-save{display:none}.customize-control-widget_form .spinner{visibility:hidden;margin-top:0}.customize-control-widget_form.previewer-loading .spinner{visibility:visible}.customize-control-widget_form.widget-form-disabled .widget-content{opacity:.7;pointer-events:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.customize-control-widget_form .widget{margin-bottom:0}.customize-control-widget_form.wide-widget-control .widget-inside{position:fixed;right:299px;top:25%;border:1px solid #e5e5e5;overflow:auto}.customize-control-widget_form.wide-widget-control .widget-inside>.form{padding:20px}.customize-control-widget_form.wide-widget-control .widget-top{-webkit-transition:background-color .4s;transition:background-color .4s}.customize-control-widget_form.wide-widget-control.expanded:not(.collapsing) .widget-top,.customize-control-widget_form.wide-widget-control.expanding .widget-top{background-color:#e3e3e3}.widget-inside{padding:1px 10px 10px;border-top:none;line-height:16px}.customize-control-widget_form.expanded a.widget-action:after{content:"\f142"}.customize-control-widget_form.wide-widget-control a.widget-action:after{content:"\f141"}.customize-control-widget_form.wide-widget-control.expanded a.widget-action:after{content:"\f139"}.widget-title-action{cursor:pointer}.customize-control-widget_form .widget .customize-control-title,.widget-top{cursor:move}.control-section.accordion-section.highlighted>.accordion-section-title,.customize-control-widget_form.highlighted{outline:0;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8);position:relative;z-index:1}#widget-customizer-control-templates{display:none}#customize-theme-controls .widget-reorder-nav{display:none;float:left;background-color:#fafafa}.move-widget:before{content:"\f504"}#customize-theme-controls .move-widget-area{display:none;background:#fff;border:1px solid #ddd;border-top:none;cursor:auto}#customize-theme-controls .reordering .move-widget-area.active{display:block}#customize-theme-controls .move-widget-area .description{margin:0;padding:15px 20px;font-weight:400}#customize-theme-controls .widget-area-select{margin:0;padding:0;list-style:none}#customize-theme-controls .widget-area-select li{position:relative;margin:0;padding:13px 42px 15px 15px;color:#555;border-top:1px solid #eee;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#customize-theme-controls .widget-area-select li:before{display:none;content:"\f147";position:absolute;top:12px;right:10px;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#customize-theme-controls .widget-area-select li:last-child{border-bottom:1px solid #eee}#customize-theme-controls .widget-area-select .selected{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.4);background:#00a0d2}#customize-theme-controls .widget-area-select .selected:before{display:block}#customize-theme-controls .move-widget-actions{text-align:left;padding:12px}#customize-theme-controls .reordering .widget-title-action{display:none}#customize-theme-controls .reordering .widget-reorder-nav{display:block}#widgets-left #available-widgets .widget{float:none!important;width:auto!important}.ios #available-widgets{-webkit-transition:right 0s;transition:right 0s}#available-widgets .widget-tpl.selected,#available-widgets .widget-tpl:hover{background:#eee;border-bottom-color:#ccc}#customize-controls .widget-title h3{font-size:1em}#available-widgets .widget-title h3{padding:0 0 5px;font-size:14px}#available-widgets .widget .widget-description{padding:0;color:#72777c}#customize-preview{-webkit-transition:all .2s;transition:all .2s}body.adding-widget #available-widgets{right:0;visibility:visible}body.adding-widget .wp-full-overlay-main{right:300px}body.adding-widget #customize-preview{opacity:.4}#available-widgets .widget-title{position:relative}#available-widgets .widget-title:before{content:"\f132";position:absolute;top:-3px;left:100%;margin-left:20px;width:20px;height:20px;color:#32373c;font:400 20px/1 dashicons;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-widgets [class*=easy] .widget-title:before{content:"\f328";top:-4px}#available-widgets [class*=super] .widget-title:before,#available-widgets [class*=like] .widget-title:before{content:"\f155";top:-4px}#available-widgets [class*=meta] .widget-title:before{content:"\f120"}#available-widgets [class*=archives] .widget-title:before{content:"\f480";top:-4px}#available-widgets [class*=categor] .widget-title:before{content:"\f318";top:-4px}#available-widgets [class*=comment] .widget-title:before,#available-widgets [class*=testimonial] .widget-title:before,#available-widgets [class*=chat] .widget-title:before{content:"\f101"}#available-widgets [class*=post] .widget-title:before{content:"\f109"}#available-widgets [class*=page] .widget-title:before{content:"\f105"}#available-widgets [class*=text] .widget-title:before{content:"\f478"}#available-widgets [class*=link] .widget-title:before{content:"\f103"}#available-widgets [class*=search] .widget-title:before{content:"\f179"}#available-widgets [class*=menu] .widget-title:before,#available-widgets [class*=nav] .widget-title:before{content:"\f333"}#available-widgets [class*=tag] .widget-title:before{content:"\f479"}#available-widgets [class*=rss] .widget-title:before{content:"\f303";top:-6px}#available-widgets [class*=event] .widget-title:before,#available-widgets [class*=calendar] .widget-title:before{content:"\f145";top:-4px}#available-widgets [class*=image] .widget-title:before,#available-widgets [class*=photo] .widget-title:before,#available-widgets [class*=slide] .widget-title:before,#available-widgets [class*=instagram] .widget-title:before{content:"\f128"}#available-widgets [class*=album] .widget-title:before,#available-widgets [class*=galler] .widget-title:before{content:"\f161"}#available-widgets [class*=video] .widget-title:before,#available-widgets [class*=tube] .widget-title:before{content:"\f126"}#available-widgets [class*=music] .widget-title:before,#available-widgets [class*=radio] .widget-title:before,#available-widgets [class*=audio] .widget-title:before{content:"\f127"}#available-widgets [class*=login] .widget-title:before,#available-widgets [class*=user] .widget-title:before,#available-widgets [class*=member] .widget-title:before,#available-widgets [class*=avatar] .widget-title:before,#available-widgets [class*=subscriber] .widget-title:before,#available-widgets [class*=profile] .widget-title:before,#available-widgets [class*=grofile] .widget-title:before{content:"\f110"}#available-widgets [class*=commerce] .widget-title:before,#available-widgets [class*=shop] .widget-title:before,#available-widgets [class*=cart] .widget-title:before{content:"\f174";top:-4px}#available-widgets [class*=secur] .widget-title:before,#available-widgets [class*=firewall] .widget-title:before{content:"\f332"}#available-widgets [class*=analytic] .widget-title:before,#available-widgets [class*=stat] .widget-title:before,#available-widgets [class*=poll] .widget-title:before{content:"\f185"}#available-widgets [class*=form] .widget-title:before{content:"\f175"}#available-widgets [class*=subscribe] .widget-title:before,#available-widgets [class*=news] .widget-title:before,#available-widgets [class*=contact] .widget-title:before,#available-widgets [class*=mail] .widget-title:before{content:"\f466"}#available-widgets [class*=share] .widget-title:before,#available-widgets [class*=socia] .widget-title:before{content:"\f237"}#available-widgets [class*=lang] .widget-title:before,#available-widgets [class*=translat] .widget-title:before{content:"\f326"}#available-widgets [class*=locat] .widget-title:before,#available-widgets [class*=map] .widget-title:before{content:"\f231"}#available-widgets [class*=download] .widget-title:before{content:"\f316"}#available-widgets [class*=weather] .widget-title:before{content:"\f176";top:-4px}#available-widgets [class*=facebook] .widget-title:before{content:"\f304"}#available-widgets [class*=tweet] .widget-title:before,#available-widgets [class*=twitter] .widget-title:before{content:"\f301"}@media screen and (max-height:700px) and (min-width:981px){.customize-control-widget{margin-bottom:0}.widget-top{-webkit-box-shadow:none;box-shadow:none;margin-top:-1px}.widget-top:hover{position:relative;z-index:1}.last-widget{margin-bottom:15px}.widget-title h3{padding:13px 15px}.widget-reorder-nav span{height:39px}.widget-reorder-nav span:before{line-height:39px}#customize-theme-controls .widget-area-select li{padding:9px 42px 11px 15px}#customize-theme-controls .widget-area-select li:before{top:8px}}
\ No newline at end of file
+.control-section.control-section-sidebar .accordion-section-content.ui-sortable,.wp-full-overlay-sidebar{overflow:visible}.control-section.control-section-sidebar,.customize-control-sidebar_widgets .hide-if-js,.customize-control-sidebar_widgets label{display:none}.customize-control-widget_form .widget-top{background:#fff;-webkit-transition:opacity .5s;transition:opacity .5s}.customize-control .widget-action{color:#72777c}.customize-control .widget-action:focus,.customize-control .widget-top:hover .widget-action{color:#23282d}.customize-control-widget_form:not(.widget-rendered) .widget-top{opacity:.5}.customize-control-widget_form .widget-control-save{display:none}.customize-control-widget_form .spinner{visibility:hidden;margin-top:0}.customize-control-widget_form.previewer-loading .spinner{visibility:visible}.customize-control-widget_form.widget-form-disabled .widget-content{opacity:.7;pointer-events:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.customize-control-widget_form .widget{margin-bottom:0}.customize-control-widget_form.wide-widget-control .widget-inside{position:fixed;right:299px;top:25%;border:1px solid #e5e5e5;overflow:auto}.customize-control-widget_form.wide-widget-control .widget-inside>.form{padding:20px}.customize-control-widget_form.wide-widget-control .widget-top{-webkit-transition:background-color .4s;transition:background-color .4s}.customize-control-widget_form.wide-widget-control.expanded:not(.collapsing) .widget-top,.customize-control-widget_form.wide-widget-control.expanding .widget-top{background-color:#e3e3e3}.widget-inside{padding:1px 10px 10px;border-top:none;line-height:16px}.customize-control-widget_form.expanded a.widget-action:after{content:"\f142"}.customize-control-widget_form.wide-widget-control a.widget-action:after{content:"\f141"}.customize-control-widget_form.wide-widget-control.expanded a.widget-action:after{content:"\f139"}.widget-title-action{cursor:pointer}.customize-control-widget_form .widget .customize-control-title,.widget-top{cursor:move}.control-section.accordion-section.highlighted>.accordion-section-title,.customize-control-widget_form.highlighted{outline:0;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8);position:relative;z-index:1}#widget-customizer-control-templates{display:none}#customize-theme-controls .widget-reorder-nav{display:none;float:left;background-color:#fafafa}.move-widget:before{content:"\f504"}#customize-theme-controls .move-widget-area{display:none;background:#fff;border:1px solid #ddd;border-top:none;cursor:auto}#customize-theme-controls .reordering .move-widget-area.active{display:block}#customize-theme-controls .move-widget-area .description{margin:0;padding:15px 20px;font-weight:400}#customize-theme-controls .widget-area-select{margin:0;padding:0;list-style:none}#customize-theme-controls .widget-area-select li{position:relative;margin:0;padding:13px 42px 15px 15px;color:#555;border-top:1px solid #eee;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#customize-theme-controls .widget-area-select li:before{display:none;content:"\f147";position:absolute;top:12px;right:10px;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#customize-theme-controls .widget-area-select li:last-child{border-bottom:1px solid #eee}#customize-theme-controls .widget-area-select .selected{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.4);background:#00a0d2}#customize-theme-controls .widget-area-select .selected:before{display:block}#customize-theme-controls .move-widget-actions{text-align:left;padding:12px}#customize-theme-controls .reordering .widget-title-action{display:none}#customize-theme-controls .reordering .widget-reorder-nav{display:block}#widgets-left #available-widgets .widget{float:none!important;width:auto!important}.ios #available-widgets{-webkit-transition:right 0s;transition:right 0s}#available-widgets .widget-tpl.selected,#available-widgets .widget-tpl:hover{background:#f3f3f5;border-bottom-color:#ccc;color:#0073aa;border-right:4px solid #0073aa}#customize-controls .widget-title h3{font-size:1em}#available-widgets .widget-title h3{padding:0 0 5px;font-size:14px}#available-widgets .widget .widget-description{padding:0;color:#72777c}#customize-preview{-webkit-transition:all .2s;transition:all .2s}body.adding-widget #available-widgets{right:0;visibility:visible}body.adding-widget .wp-full-overlay-main{right:300px}body.adding-widget #customize-preview{opacity:.4}#available-widgets .widget-title{position:relative}#available-widgets .widget-title:before{content:"\f132";position:absolute;top:-3px;left:100%;margin-left:20px;width:20px;height:20px;color:#32373c;font:400 20px/1 dashicons;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-widgets [class*=easy] .widget-title:before{content:"\f328";top:-4px}#available-widgets [class*=super] .widget-title:before,#available-widgets [class*=like] .widget-title:before{content:"\f155";top:-4px}#available-widgets [class*=meta] .widget-title:before{content:"\f120"}#available-widgets [class*=archives] .widget-title:before{content:"\f480";top:-4px}#available-widgets [class*=categor] .widget-title:before{content:"\f318";top:-4px}#available-widgets [class*=comment] .widget-title:before,#available-widgets [class*=testimonial] .widget-title:before,#available-widgets [class*=chat] .widget-title:before{content:"\f101"}#available-widgets [class*=post] .widget-title:before{content:"\f109"}#available-widgets [class*=page] .widget-title:before{content:"\f105"}#available-widgets [class*=text] .widget-title:before{content:"\f478"}#available-widgets [class*=link] .widget-title:before{content:"\f103"}#available-widgets [class*=search] .widget-title:before{content:"\f179"}#available-widgets [class*=menu] .widget-title:before,#available-widgets [class*=nav] .widget-title:before{content:"\f333"}#available-widgets [class*=tag] .widget-title:before{content:"\f479"}#available-widgets [class*=rss] .widget-title:before{content:"\f303";top:-6px}#available-widgets [class*=event] .widget-title:before,#available-widgets [class*=calendar] .widget-title:before{content:"\f145";top:-4px}#available-widgets [class*=image] .widget-title:before,#available-widgets [class*=photo] .widget-title:before,#available-widgets [class*=slide] .widget-title:before,#available-widgets [class*=instagram] .widget-title:before{content:"\f128"}#available-widgets [class*=album] .widget-title:before,#available-widgets [class*=galler] .widget-title:before{content:"\f161"}#available-widgets [class*=video] .widget-title:before,#available-widgets [class*=tube] .widget-title:before{content:"\f126"}#available-widgets [class*=music] .widget-title:before,#available-widgets [class*=radio] .widget-title:before,#available-widgets [class*=audio] .widget-title:before{content:"\f127"}#available-widgets [class*=login] .widget-title:before,#available-widgets [class*=user] .widget-title:before,#available-widgets [class*=member] .widget-title:before,#available-widgets [class*=avatar] .widget-title:before,#available-widgets [class*=subscriber] .widget-title:before,#available-widgets [class*=profile] .widget-title:before,#available-widgets [class*=grofile] .widget-title:before{content:"\f110"}#available-widgets [class*=commerce] .widget-title:before,#available-widgets [class*=shop] .widget-title:before,#available-widgets [class*=cart] .widget-title:before{content:"\f174";top:-4px}#available-widgets [class*=secur] .widget-title:before,#available-widgets [class*=firewall] .widget-title:before{content:"\f332"}#available-widgets [class*=analytic] .widget-title:before,#available-widgets [class*=stat] .widget-title:before,#available-widgets [class*=poll] .widget-title:before{content:"\f185"}#available-widgets [class*=form] .widget-title:before{content:"\f175"}#available-widgets [class*=subscribe] .widget-title:before,#available-widgets [class*=news] .widget-title:before,#available-widgets [class*=contact] .widget-title:before,#available-widgets [class*=mail] .widget-title:before{content:"\f466"}#available-widgets [class*=share] .widget-title:before,#available-widgets [class*=socia] .widget-title:before{content:"\f237"}#available-widgets [class*=lang] .widget-title:before,#available-widgets [class*=translat] .widget-title:before{content:"\f326"}#available-widgets [class*=locat] .widget-title:before,#available-widgets [class*=map] .widget-title:before{content:"\f231"}#available-widgets [class*=download] .widget-title:before{content:"\f316"}#available-widgets [class*=weather] .widget-title:before{content:"\f176";top:-4px}#available-widgets [class*=facebook] .widget-title:before{content:"\f304"}#available-widgets [class*=tweet] .widget-title:before,#available-widgets [class*=twitter] .widget-title:before{content:"\f301"}@media screen and (max-height:700px) and (min-width:981px){.customize-control-widget{margin-bottom:0}.widget-top{-webkit-box-shadow:none;box-shadow:none;margin-top:-1px}.widget-top:hover{position:relative;z-index:1}.last-widget{margin-bottom:15px}.widget-title h3{padding:13px 15px}.widget-reorder-nav span{height:39px}.widget-reorder-nav span:before{line-height:39px}#customize-theme-controls .widget-area-select li{padding:9px 42px 11px 15px}#customize-theme-controls .widget-area-select li:before{top:8px}}
\ No newline at end of file
index a32f56e603ac5a3e8e7a2e1a7134478f2886edd0..687c9f85f40b924951bc16d04c812d4f527d7632 100644 (file)
 
 #available-widgets .widget-tpl:hover,
 #available-widgets .widget-tpl.selected {
-       background: #eee;
+       background: #f3f3f5;
        border-bottom-color: #ccc;
+       color: #0073aa;
+       border-left: 4px solid #0073aa;
 }
 
 #customize-controls .widget-title h3 {
index b802cdd8f1919d0eaa9e10372e2e071c914b455a..506c3f35ce891371f4f2d17367b1d809d028373e 100644 (file)
@@ -1 +1 @@
-.control-section.control-section-sidebar .accordion-section-content.ui-sortable,.wp-full-overlay-sidebar{overflow:visible}.control-section.control-section-sidebar,.customize-control-sidebar_widgets .hide-if-js,.customize-control-sidebar_widgets label{display:none}.customize-control-widget_form .widget-top{background:#fff;-webkit-transition:opacity .5s;transition:opacity .5s}.customize-control .widget-action{color:#72777c}.customize-control .widget-action:focus,.customize-control .widget-top:hover .widget-action{color:#23282d}.customize-control-widget_form:not(.widget-rendered) .widget-top{opacity:.5}.customize-control-widget_form .widget-control-save{display:none}.customize-control-widget_form .spinner{visibility:hidden;margin-top:0}.customize-control-widget_form.previewer-loading .spinner{visibility:visible}.customize-control-widget_form.widget-form-disabled .widget-content{opacity:.7;pointer-events:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.customize-control-widget_form .widget{margin-bottom:0}.customize-control-widget_form.wide-widget-control .widget-inside{position:fixed;left:299px;top:25%;border:1px solid #e5e5e5;overflow:auto}.customize-control-widget_form.wide-widget-control .widget-inside>.form{padding:20px}.customize-control-widget_form.wide-widget-control .widget-top{-webkit-transition:background-color .4s;transition:background-color .4s}.customize-control-widget_form.wide-widget-control.expanded:not(.collapsing) .widget-top,.customize-control-widget_form.wide-widget-control.expanding .widget-top{background-color:#e3e3e3}.widget-inside{padding:1px 10px 10px;border-top:none;line-height:16px}.customize-control-widget_form.expanded a.widget-action:after{content:"\f142"}.customize-control-widget_form.wide-widget-control a.widget-action:after{content:"\f139"}.customize-control-widget_form.wide-widget-control.expanded a.widget-action:after{content:"\f141"}.widget-title-action{cursor:pointer}.customize-control-widget_form .widget .customize-control-title,.widget-top{cursor:move}.control-section.accordion-section.highlighted>.accordion-section-title,.customize-control-widget_form.highlighted{outline:0;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8);position:relative;z-index:1}#widget-customizer-control-templates{display:none}#customize-theme-controls .widget-reorder-nav{display:none;float:right;background-color:#fafafa}.move-widget:before{content:"\f504"}#customize-theme-controls .move-widget-area{display:none;background:#fff;border:1px solid #ddd;border-top:none;cursor:auto}#customize-theme-controls .reordering .move-widget-area.active{display:block}#customize-theme-controls .move-widget-area .description{margin:0;padding:15px 20px;font-weight:400}#customize-theme-controls .widget-area-select{margin:0;padding:0;list-style:none}#customize-theme-controls .widget-area-select li{position:relative;margin:0;padding:13px 15px 15px 42px;color:#555;border-top:1px solid #eee;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#customize-theme-controls .widget-area-select li:before{display:none;content:"\f147";position:absolute;top:12px;left:10px;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#customize-theme-controls .widget-area-select li:last-child{border-bottom:1px solid #eee}#customize-theme-controls .widget-area-select .selected{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.4);background:#00a0d2}#customize-theme-controls .widget-area-select .selected:before{display:block}#customize-theme-controls .move-widget-actions{text-align:right;padding:12px}#customize-theme-controls .reordering .widget-title-action{display:none}#customize-theme-controls .reordering .widget-reorder-nav{display:block}#widgets-left #available-widgets .widget{float:none!important;width:auto!important}.ios #available-widgets{-webkit-transition:left 0s;transition:left 0s}#available-widgets .widget-tpl.selected,#available-widgets .widget-tpl:hover{background:#eee;border-bottom-color:#ccc}#customize-controls .widget-title h3{font-size:1em}#available-widgets .widget-title h3{padding:0 0 5px;font-size:14px}#available-widgets .widget .widget-description{padding:0;color:#72777c}#customize-preview{-webkit-transition:all .2s;transition:all .2s}body.adding-widget #available-widgets{left:0;visibility:visible}body.adding-widget .wp-full-overlay-main{left:300px}body.adding-widget #customize-preview{opacity:.4}#available-widgets .widget-title{position:relative}#available-widgets .widget-title:before{content:"\f132";position:absolute;top:-3px;right:100%;margin-right:20px;width:20px;height:20px;color:#32373c;font:400 20px/1 dashicons;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-widgets [class*=easy] .widget-title:before{content:"\f328";top:-4px}#available-widgets [class*=super] .widget-title:before,#available-widgets [class*=like] .widget-title:before{content:"\f155";top:-4px}#available-widgets [class*=meta] .widget-title:before{content:"\f120"}#available-widgets [class*=archives] .widget-title:before{content:"\f480";top:-4px}#available-widgets [class*=categor] .widget-title:before{content:"\f318";top:-4px}#available-widgets [class*=comment] .widget-title:before,#available-widgets [class*=testimonial] .widget-title:before,#available-widgets [class*=chat] .widget-title:before{content:"\f101"}#available-widgets [class*=post] .widget-title:before{content:"\f109"}#available-widgets [class*=page] .widget-title:before{content:"\f105"}#available-widgets [class*=text] .widget-title:before{content:"\f478"}#available-widgets [class*=link] .widget-title:before{content:"\f103"}#available-widgets [class*=search] .widget-title:before{content:"\f179"}#available-widgets [class*=menu] .widget-title:before,#available-widgets [class*=nav] .widget-title:before{content:"\f333"}#available-widgets [class*=tag] .widget-title:before{content:"\f479"}#available-widgets [class*=rss] .widget-title:before{content:"\f303";top:-6px}#available-widgets [class*=event] .widget-title:before,#available-widgets [class*=calendar] .widget-title:before{content:"\f145";top:-4px}#available-widgets [class*=image] .widget-title:before,#available-widgets [class*=photo] .widget-title:before,#available-widgets [class*=slide] .widget-title:before,#available-widgets [class*=instagram] .widget-title:before{content:"\f128"}#available-widgets [class*=album] .widget-title:before,#available-widgets [class*=galler] .widget-title:before{content:"\f161"}#available-widgets [class*=video] .widget-title:before,#available-widgets [class*=tube] .widget-title:before{content:"\f126"}#available-widgets [class*=music] .widget-title:before,#available-widgets [class*=radio] .widget-title:before,#available-widgets [class*=audio] .widget-title:before{content:"\f127"}#available-widgets [class*=login] .widget-title:before,#available-widgets [class*=user] .widget-title:before,#available-widgets [class*=member] .widget-title:before,#available-widgets [class*=avatar] .widget-title:before,#available-widgets [class*=subscriber] .widget-title:before,#available-widgets [class*=profile] .widget-title:before,#available-widgets [class*=grofile] .widget-title:before{content:"\f110"}#available-widgets [class*=commerce] .widget-title:before,#available-widgets [class*=shop] .widget-title:before,#available-widgets [class*=cart] .widget-title:before{content:"\f174";top:-4px}#available-widgets [class*=secur] .widget-title:before,#available-widgets [class*=firewall] .widget-title:before{content:"\f332"}#available-widgets [class*=analytic] .widget-title:before,#available-widgets [class*=stat] .widget-title:before,#available-widgets [class*=poll] .widget-title:before{content:"\f185"}#available-widgets [class*=form] .widget-title:before{content:"\f175"}#available-widgets [class*=subscribe] .widget-title:before,#available-widgets [class*=news] .widget-title:before,#available-widgets [class*=contact] .widget-title:before,#available-widgets [class*=mail] .widget-title:before{content:"\f466"}#available-widgets [class*=share] .widget-title:before,#available-widgets [class*=socia] .widget-title:before{content:"\f237"}#available-widgets [class*=lang] .widget-title:before,#available-widgets [class*=translat] .widget-title:before{content:"\f326"}#available-widgets [class*=locat] .widget-title:before,#available-widgets [class*=map] .widget-title:before{content:"\f231"}#available-widgets [class*=download] .widget-title:before{content:"\f316"}#available-widgets [class*=weather] .widget-title:before{content:"\f176";top:-4px}#available-widgets [class*=facebook] .widget-title:before{content:"\f304"}#available-widgets [class*=tweet] .widget-title:before,#available-widgets [class*=twitter] .widget-title:before{content:"\f301"}@media screen and (max-height:700px) and (min-width:981px){.customize-control-widget{margin-bottom:0}.widget-top{-webkit-box-shadow:none;box-shadow:none;margin-top:-1px}.widget-top:hover{position:relative;z-index:1}.last-widget{margin-bottom:15px}.widget-title h3{padding:13px 15px}.widget-reorder-nav span{height:39px}.widget-reorder-nav span:before{line-height:39px}#customize-theme-controls .widget-area-select li{padding:9px 15px 11px 42px}#customize-theme-controls .widget-area-select li:before{top:8px}}
\ No newline at end of file
+.control-section.control-section-sidebar .accordion-section-content.ui-sortable,.wp-full-overlay-sidebar{overflow:visible}.control-section.control-section-sidebar,.customize-control-sidebar_widgets .hide-if-js,.customize-control-sidebar_widgets label{display:none}.customize-control-widget_form .widget-top{background:#fff;-webkit-transition:opacity .5s;transition:opacity .5s}.customize-control .widget-action{color:#72777c}.customize-control .widget-action:focus,.customize-control .widget-top:hover .widget-action{color:#23282d}.customize-control-widget_form:not(.widget-rendered) .widget-top{opacity:.5}.customize-control-widget_form .widget-control-save{display:none}.customize-control-widget_form .spinner{visibility:hidden;margin-top:0}.customize-control-widget_form.previewer-loading .spinner{visibility:visible}.customize-control-widget_form.widget-form-disabled .widget-content{opacity:.7;pointer-events:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.customize-control-widget_form .widget{margin-bottom:0}.customize-control-widget_form.wide-widget-control .widget-inside{position:fixed;left:299px;top:25%;border:1px solid #e5e5e5;overflow:auto}.customize-control-widget_form.wide-widget-control .widget-inside>.form{padding:20px}.customize-control-widget_form.wide-widget-control .widget-top{-webkit-transition:background-color .4s;transition:background-color .4s}.customize-control-widget_form.wide-widget-control.expanded:not(.collapsing) .widget-top,.customize-control-widget_form.wide-widget-control.expanding .widget-top{background-color:#e3e3e3}.widget-inside{padding:1px 10px 10px;border-top:none;line-height:16px}.customize-control-widget_form.expanded a.widget-action:after{content:"\f142"}.customize-control-widget_form.wide-widget-control a.widget-action:after{content:"\f139"}.customize-control-widget_form.wide-widget-control.expanded a.widget-action:after{content:"\f141"}.widget-title-action{cursor:pointer}.customize-control-widget_form .widget .customize-control-title,.widget-top{cursor:move}.control-section.accordion-section.highlighted>.accordion-section-title,.customize-control-widget_form.highlighted{outline:0;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8);position:relative;z-index:1}#widget-customizer-control-templates{display:none}#customize-theme-controls .widget-reorder-nav{display:none;float:right;background-color:#fafafa}.move-widget:before{content:"\f504"}#customize-theme-controls .move-widget-area{display:none;background:#fff;border:1px solid #ddd;border-top:none;cursor:auto}#customize-theme-controls .reordering .move-widget-area.active{display:block}#customize-theme-controls .move-widget-area .description{margin:0;padding:15px 20px;font-weight:400}#customize-theme-controls .widget-area-select{margin:0;padding:0;list-style:none}#customize-theme-controls .widget-area-select li{position:relative;margin:0;padding:13px 15px 15px 42px;color:#555;border-top:1px solid #eee;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#customize-theme-controls .widget-area-select li:before{display:none;content:"\f147";position:absolute;top:12px;left:10px;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#customize-theme-controls .widget-area-select li:last-child{border-bottom:1px solid #eee}#customize-theme-controls .widget-area-select .selected{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.4);background:#00a0d2}#customize-theme-controls .widget-area-select .selected:before{display:block}#customize-theme-controls .move-widget-actions{text-align:right;padding:12px}#customize-theme-controls .reordering .widget-title-action{display:none}#customize-theme-controls .reordering .widget-reorder-nav{display:block}#widgets-left #available-widgets .widget{float:none!important;width:auto!important}.ios #available-widgets{-webkit-transition:left 0s;transition:left 0s}#available-widgets .widget-tpl.selected,#available-widgets .widget-tpl:hover{background:#f3f3f5;border-bottom-color:#ccc;color:#0073aa;border-left:4px solid #0073aa}#customize-controls .widget-title h3{font-size:1em}#available-widgets .widget-title h3{padding:0 0 5px;font-size:14px}#available-widgets .widget .widget-description{padding:0;color:#72777c}#customize-preview{-webkit-transition:all .2s;transition:all .2s}body.adding-widget #available-widgets{left:0;visibility:visible}body.adding-widget .wp-full-overlay-main{left:300px}body.adding-widget #customize-preview{opacity:.4}#available-widgets .widget-title{position:relative}#available-widgets .widget-title:before{content:"\f132";position:absolute;top:-3px;right:100%;margin-right:20px;width:20px;height:20px;color:#32373c;font:400 20px/1 dashicons;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-widgets [class*=easy] .widget-title:before{content:"\f328";top:-4px}#available-widgets [class*=super] .widget-title:before,#available-widgets [class*=like] .widget-title:before{content:"\f155";top:-4px}#available-widgets [class*=meta] .widget-title:before{content:"\f120"}#available-widgets [class*=archives] .widget-title:before{content:"\f480";top:-4px}#available-widgets [class*=categor] .widget-title:before{content:"\f318";top:-4px}#available-widgets [class*=comment] .widget-title:before,#available-widgets [class*=testimonial] .widget-title:before,#available-widgets [class*=chat] .widget-title:before{content:"\f101"}#available-widgets [class*=post] .widget-title:before{content:"\f109"}#available-widgets [class*=page] .widget-title:before{content:"\f105"}#available-widgets [class*=text] .widget-title:before{content:"\f478"}#available-widgets [class*=link] .widget-title:before{content:"\f103"}#available-widgets [class*=search] .widget-title:before{content:"\f179"}#available-widgets [class*=menu] .widget-title:before,#available-widgets [class*=nav] .widget-title:before{content:"\f333"}#available-widgets [class*=tag] .widget-title:before{content:"\f479"}#available-widgets [class*=rss] .widget-title:before{content:"\f303";top:-6px}#available-widgets [class*=event] .widget-title:before,#available-widgets [class*=calendar] .widget-title:before{content:"\f145";top:-4px}#available-widgets [class*=image] .widget-title:before,#available-widgets [class*=photo] .widget-title:before,#available-widgets [class*=slide] .widget-title:before,#available-widgets [class*=instagram] .widget-title:before{content:"\f128"}#available-widgets [class*=album] .widget-title:before,#available-widgets [class*=galler] .widget-title:before{content:"\f161"}#available-widgets [class*=video] .widget-title:before,#available-widgets [class*=tube] .widget-title:before{content:"\f126"}#available-widgets [class*=music] .widget-title:before,#available-widgets [class*=radio] .widget-title:before,#available-widgets [class*=audio] .widget-title:before{content:"\f127"}#available-widgets [class*=login] .widget-title:before,#available-widgets [class*=user] .widget-title:before,#available-widgets [class*=member] .widget-title:before,#available-widgets [class*=avatar] .widget-title:before,#available-widgets [class*=subscriber] .widget-title:before,#available-widgets [class*=profile] .widget-title:before,#available-widgets [class*=grofile] .widget-title:before{content:"\f110"}#available-widgets [class*=commerce] .widget-title:before,#available-widgets [class*=shop] .widget-title:before,#available-widgets [class*=cart] .widget-title:before{content:"\f174";top:-4px}#available-widgets [class*=secur] .widget-title:before,#available-widgets [class*=firewall] .widget-title:before{content:"\f332"}#available-widgets [class*=analytic] .widget-title:before,#available-widgets [class*=stat] .widget-title:before,#available-widgets [class*=poll] .widget-title:before{content:"\f185"}#available-widgets [class*=form] .widget-title:before{content:"\f175"}#available-widgets [class*=subscribe] .widget-title:before,#available-widgets [class*=news] .widget-title:before,#available-widgets [class*=contact] .widget-title:before,#available-widgets [class*=mail] .widget-title:before{content:"\f466"}#available-widgets [class*=share] .widget-title:before,#available-widgets [class*=socia] .widget-title:before{content:"\f237"}#available-widgets [class*=lang] .widget-title:before,#available-widgets [class*=translat] .widget-title:before{content:"\f326"}#available-widgets [class*=locat] .widget-title:before,#available-widgets [class*=map] .widget-title:before{content:"\f231"}#available-widgets [class*=download] .widget-title:before{content:"\f316"}#available-widgets [class*=weather] .widget-title:before{content:"\f176";top:-4px}#available-widgets [class*=facebook] .widget-title:before{content:"\f304"}#available-widgets [class*=tweet] .widget-title:before,#available-widgets [class*=twitter] .widget-title:before{content:"\f301"}@media screen and (max-height:700px) and (min-width:981px){.customize-control-widget{margin-bottom:0}.widget-top{-webkit-box-shadow:none;box-shadow:none;margin-top:-1px}.widget-top:hover{position:relative;z-index:1}.last-widget{margin-bottom:15px}.widget-title h3{padding:13px 15px}.widget-reorder-nav span{height:39px}.widget-reorder-nav span:before{line-height:39px}#customize-theme-controls .widget-area-select li{padding:9px 15px 11px 42px}#customize-theme-controls .widget-area-select li:before{top:8px}}
\ No newline at end of file
index 5e28c4ddd33f910fa4c1415c26b6d2306d2223be..e8f01145d6847c646dfa96ae6a03f9eb407498a8 100644 (file)
@@ -129,23 +129,10 @@ input#link_url {
        float: right;
 }
 
-.submitbox .submitdelete {
-       text-decoration: none;
-       padding: 1px 2px;
-}
-
 body.post-new-php .submitbox .submitdelete {
        display: none;
 }
 
-/* @todo: do we really need this? word on the street is we don't and this
-stray rule may actually be compensated for elsewhere. */
-#normal-sortables .submitbox .submitdelete:hover {
-       color: #000;
-       background-color: #f00;
-       border-bottom-color: #f00;
-}
-
 .submitbox .submit a:hover {
        text-decoration: underline;
 }
@@ -349,7 +336,7 @@ form#tags-filter {
 }
 
 #content-resize-handle {
-       background: transparent url(../images/resize.gif) no-repeat scroll right bottom;
+       background: transparent url(../images/resize.gif) no-repeat scroll left bottom;
        width: 12px;
        cursor: row-resize;
 }
@@ -464,7 +451,7 @@ form#tags-filter {
        height: auto !important;
 }
 
-#misc-publishing-actions label[for="post_status"]:before,
+#post-body .misc-pub-post-status:before,
 #post-body #visibility:before,
 .curtime #timestamp:before,
 #post-body .misc-pub-revisions:before,
@@ -472,20 +459,22 @@ span.wp-media-buttons-icon:before {
        color: #82878c;
 }
 
+#post-body .misc-pub-post-status:before,
 #post-body #visibility:before,
 .curtime #timestamp:before,
 #post-body .misc-pub-revisions:before {
        font: normal 20px/1 dashicons;
        speak: none;
        display: inline-block;
-       padding: 0 0 0 2px;
-       top: 0;
-       right: -1px;
-       position: relative;
+       margin-right: -1px;
+       padding-left: 3px;
        vertical-align: top;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
-       text-decoration: none !important;
+}
+
+#post-body .misc-pub-post-status:before {
+       content: "\f173";
 }
 
 #post-body #visibility:before {
@@ -494,6 +483,7 @@ span.wp-media-buttons-icon:before {
 
 .curtime #timestamp:before {
        content: "\f145";
+       position: relative;
        top: -1px;
 }
 
@@ -592,10 +582,9 @@ span.wp-media-buttons-icon:before {
        position: absolute;
 }
 
-.tagchecklist span {
-       margin-left: 25px;
-       display: block;
+.tagchecklist > span {
        float: right;
+       margin-left: 25px;
        font-size: 13px;
        line-height: 1.8em;
        cursor: default;
@@ -604,16 +593,16 @@ span.wp-media-buttons-icon:before {
        text-overflow: ellipsis;
 }
 
-.tagchecklist span a {
-       margin: 1px -17px 0 0;
+.tagchecklist .ntdelbutton {
+       position: absolute;
+       width: 24px;
+       height: 24px;
+       border: none;
+       margin: 0 -19px 0 0;
+       padding: 0;
+       background: none;
        cursor: pointer;
-       width: 20px;
-       height: 20px;
-       display: block;
-       float: right;
        text-indent: 0;
-       overflow: hidden;
-       position: absolute;
 }
 
 #poststuff h3.hndle, /* Back-compat for pre-4.4 */
@@ -639,11 +628,21 @@ span.wp-media-buttons-icon:before {
        width: 250px;
 }
 
+.post-attributes-label-wrapper {
+       margin-bottom: 0.5em;
+}
+
+.post-attributes-label {
+       vertical-align: baseline;
+       font-weight: 600;
+}
+
 #post-visibility-select {
        line-height: 1.5em;
        margin-top: 3px;
 }
 
+#linksubmitdiv .inside, /* Old Link Manager back-compat. */
 #poststuff #submitdiv .inside {
        margin: 0;
        padding: 0;
@@ -1036,6 +1035,25 @@ span.description,
        width: 260px;
 }
 
+.tagcloud-link.button-link {
+       color: #0073aa;
+       text-decoration: underline;
+}
+
+.tagcloud-link.button-link:hover {
+       color: #00a0d2;
+}
+
+.tagcloud-link.button-link: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);
+}
+
 #post-body-content .tagsdiv .the-tags {
        margin: 0 5px;
 }
@@ -1061,6 +1079,7 @@ p.popular-tags a {
        margin: 2px 0 12px;
 }
 
+/* Suggest.js autocomplete, no more used by core. */
 .ac_results {
        display: none;
        margin: -1px 0 0;
@@ -1300,7 +1319,7 @@ table.links-table {
   (min-resolution: 120dpi) {
        #content-resize-handle,
        #post-body .wp_themeSkin .mceStatusbar a.mceResize {
-               background: transparent url(../images/resize-2x.gif) no-repeat scroll right bottom;
+               background: transparent url(../images/resize-2x.gif) no-repeat scroll left bottom;
                -webkit-background-size: 11px 11px;
                background-size: 11px 11px;
        }
@@ -1447,7 +1466,7 @@ table.links-table {
                margin: 25px 10px;
        }
 
-       .tagchecklist span {
+       .tagchecklist span {
                font-size: 16px;
                line-height: 1.4;
        }
index af6cdf7a722c16ec8ed9f42add2a0cd0a5827c66..cf452031cab14e641b009859f1e7222f700975e0 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: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
+#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}#edit-slug-box .cancel,.submitbox .submit a:hover{text-decoration:underline}#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;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 .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) left 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}#post-body #visibility:before,#post-body .misc-pub-post-status: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-post-status:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before{font:400 20px/1 dashicons;speak:none;display:inline-block;margin-right:-1px;padding-left:3px;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#post-body .misc-pub-post-status:before{content:"\f173"}#post-body #visibility:before{content:"\f177"}.curtime #timestamp:before{content:"\f145";position:relative;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 strong{margin-right:-8px;position:absolute}.tagchecklist>span{float:right;margin-left:25px;font-size:13px;line-height:1.8em;cursor:default;max-width:100%;overflow:hidden;text-overflow:ellipsis}.tagchecklist .ntdelbutton{position:absolute;width:24px;height:24px;border:none;margin:0 -19px 0 0;padding:0;background:0 0;cursor:pointer;text-indent:0}#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-attributes-label-wrapper{margin-bottom:.5em}.post-attributes-label{vertical-align:baseline;font-weight:600}#post-visibility-select{line-height:1.5em;margin-top:3px}#linksubmitdiv .inside,#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}.tagcloud-link.button-link{color:#0073aa;text-decoration:underline}.tagcloud-link.button-link:hover{color:#00a0d2}.tagcloud-link.button-link: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)}#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) left 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 ac7649217364a65c399bef40d7a4ce0b4c0abeaf..d33f1077f993a07187089fc5c8e08b95c5e91205 100644 (file)
@@ -129,23 +129,10 @@ input#link_url {
        float: left;
 }
 
-.submitbox .submitdelete {
-       text-decoration: none;
-       padding: 1px 2px;
-}
-
 body.post-new-php .submitbox .submitdelete {
        display: none;
 }
 
-/* @todo: do we really need this? word on the street is we don't and this
-stray rule may actually be compensated for elsewhere. */
-#normal-sortables .submitbox .submitdelete:hover {
-       color: #000;
-       background-color: #f00;
-       border-bottom-color: #f00;
-}
-
 .submitbox .submit a:hover {
        text-decoration: underline;
 }
@@ -464,7 +451,7 @@ form#tags-filter {
        height: auto !important;
 }
 
-#misc-publishing-actions label[for="post_status"]:before,
+#post-body .misc-pub-post-status:before,
 #post-body #visibility:before,
 .curtime #timestamp:before,
 #post-body .misc-pub-revisions:before,
@@ -472,20 +459,22 @@ span.wp-media-buttons-icon:before {
        color: #82878c;
 }
 
+#post-body .misc-pub-post-status:before,
 #post-body #visibility:before,
 .curtime #timestamp:before,
 #post-body .misc-pub-revisions:before {
        font: normal 20px/1 dashicons;
        speak: none;
        display: inline-block;
-       padding: 0 2px 0 0;
-       top: 0;
-       left: -1px;
-       position: relative;
+       margin-left: -1px;
+       padding-right: 3px;
        vertical-align: top;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
-       text-decoration: none !important;
+}
+
+#post-body .misc-pub-post-status:before {
+       content: "\f173";
 }
 
 #post-body #visibility:before {
@@ -494,6 +483,7 @@ span.wp-media-buttons-icon:before {
 
 .curtime #timestamp:before {
        content: "\f145";
+       position: relative;
        top: -1px;
 }
 
@@ -592,10 +582,9 @@ span.wp-media-buttons-icon:before {
        position: absolute;
 }
 
-.tagchecklist span {
-       margin-right: 25px;
-       display: block;
+.tagchecklist > span {
        float: left;
+       margin-right: 25px;
        font-size: 13px;
        line-height: 1.8em;
        cursor: default;
@@ -604,16 +593,16 @@ span.wp-media-buttons-icon:before {
        text-overflow: ellipsis;
 }
 
-.tagchecklist span a {
-       margin: 1px 0 0 -17px;
+.tagchecklist .ntdelbutton {
+       position: absolute;
+       width: 24px;
+       height: 24px;
+       border: none;
+       margin: 0 0 0 -19px;
+       padding: 0;
+       background: none;
        cursor: pointer;
-       width: 20px;
-       height: 20px;
-       display: block;
-       float: left;
        text-indent: 0;
-       overflow: hidden;
-       position: absolute;
 }
 
 #poststuff h3.hndle, /* Back-compat for pre-4.4 */
@@ -639,11 +628,21 @@ span.wp-media-buttons-icon:before {
        width: 250px;
 }
 
+.post-attributes-label-wrapper {
+       margin-bottom: 0.5em;
+}
+
+.post-attributes-label {
+       vertical-align: baseline;
+       font-weight: 600;
+}
+
 #post-visibility-select {
        line-height: 1.5em;
        margin-top: 3px;
 }
 
+#linksubmitdiv .inside, /* Old Link Manager back-compat. */
 #poststuff #submitdiv .inside {
        margin: 0;
        padding: 0;
@@ -1036,6 +1035,25 @@ span.description,
        width: 260px;
 }
 
+.tagcloud-link.button-link {
+       color: #0073aa;
+       text-decoration: underline;
+}
+
+.tagcloud-link.button-link:hover {
+       color: #00a0d2;
+}
+
+.tagcloud-link.button-link: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);
+}
+
 #post-body-content .tagsdiv .the-tags {
        margin: 0 5px;
 }
@@ -1061,6 +1079,7 @@ p.popular-tags a {
        margin: 2px 0 12px;
 }
 
+/* Suggest.js autocomplete, no more used by core. */
 .ac_results {
        display: none;
        margin: -1px 0 0;
@@ -1447,7 +1466,7 @@ table.links-table {
                margin: 25px 10px;
        }
 
-       .tagchecklist span {
+       .tagchecklist span {
                font-size: 16px;
                line-height: 1.4;
        }
index 505a62abcbbbf13db3c78a3abd935a3e6ee58103..2967f643f08a7eff5f8e8fb8252a97b08755ae55 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: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
+#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}#edit-slug-box .cancel,.submitbox .submit a:hover{text-decoration:underline}#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;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 .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}#post-body #visibility:before,#post-body .misc-pub-post-status: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-post-status:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before{font:400 20px/1 dashicons;speak:none;display:inline-block;margin-left:-1px;padding-right:3px;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#post-body .misc-pub-post-status:before{content:"\f173"}#post-body #visibility:before{content:"\f177"}.curtime #timestamp:before{content:"\f145";position:relative;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 strong{margin-left:-8px;position:absolute}.tagchecklist>span{float:left;margin-right:25px;font-size:13px;line-height:1.8em;cursor:default;max-width:100%;overflow:hidden;text-overflow:ellipsis}.tagchecklist .ntdelbutton{position:absolute;width:24px;height:24px;border:none;margin:0 0 0 -19px;padding:0;background:0 0;cursor:pointer;text-indent:0}#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-attributes-label-wrapper{margin-bottom:.5em}.post-attributes-label{vertical-align:baseline;font-weight:600}#post-visibility-select{line-height:1.5em;margin-top:3px}#linksubmitdiv .inside,#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}.tagcloud-link.button-link{color:#0073aa;text-decoration:underline}.tagcloud-link.button-link:hover{color:#00a0d2}.tagcloud-link.button-link: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)}#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 b8a0956f0544adc19d470235224e8a53a97d7aa9..0633c1af2e782a0212fd1b81b8a446b8aa87701e 100644 (file)
@@ -204,6 +204,7 @@ textarea {
 
 .wp-admin input[type="file"] {
        padding: 3px 0;
+       cursor: pointer;
 }
 
 label {
@@ -297,6 +298,7 @@ input[type="range"].disabled {
        background: none;
        -webkit-box-shadow: none;
        box-shadow: none;
+       cursor: default;
 }
 
 input[type="checkbox"]:disabled,
@@ -384,7 +386,7 @@ textarea.large-text {
        width: 99%;
 }
 
-input.regular-text {
+.regular-text {
        width: 25em;
 }
 
@@ -456,21 +458,6 @@ fieldset label,
        vertical-align: baseline;
 }
 
-#misc-publishing-actions label[for="post_status"]:before {
-       content: "\f173";
-       display: inline-block;
-       font: normal 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;
-}
-
 #pass-strength-result {
        background-color: #eee;
        border: 1px solid #ddd;
@@ -607,11 +594,18 @@ ul#add-to-blog-users {
        padding: 4px 10px;
        white-space: nowrap;
        text-align: right;
+       cursor: pointer;
 }
 
-.ui-autocomplete li.ui-state-focus {
+/* Colors for the wplink toolbar autocomplete. */
+.ui-autocomplete .ui-state-focus {
        background-color: #ddd;
-       cursor: pointer;
+}
+
+/* Colors for the tags autocomplete. */
+.wp-tags-autocomplete .ui-state-focus {
+       background-color: #0073aa;
+       color: #fff;
 }
 
 /*------------------------------------------------------------------------------
index 79cb014b10a311a769e36065ab1b3bcee916a1e2..388b108283e9ce58b29174852f913633ec835b16 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: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
+#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}#pass1-text,.pw-weak,.show-password #pass1{display:none}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;cursor:pointer}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;cursor:default}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%}.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}#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;cursor:pointer}.ui-autocomplete .ui-state-focus{background-color:#ddd}.wp-tags-autocomplete .ui-state-focus{background-color:#0073aa;color:#fff}.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 15be606f8edeaa497a63d65ab6b1f5579a077b12..f0b1b372ea933d07d38d592c87f4da2be4b962ca 100644 (file)
@@ -204,6 +204,7 @@ textarea {
 
 .wp-admin input[type="file"] {
        padding: 3px 0;
+       cursor: pointer;
 }
 
 label {
@@ -297,6 +298,7 @@ input[type="range"].disabled {
        background: none;
        -webkit-box-shadow: none;
        box-shadow: none;
+       cursor: default;
 }
 
 input[type="checkbox"]:disabled,
@@ -384,7 +386,7 @@ textarea.large-text {
        width: 99%;
 }
 
-input.regular-text {
+.regular-text {
        width: 25em;
 }
 
@@ -456,21 +458,6 @@ fieldset label,
        vertical-align: baseline;
 }
 
-#misc-publishing-actions label[for="post_status"]:before {
-       content: "\f173";
-       display: inline-block;
-       font: normal 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;
-}
-
 #pass-strength-result {
        background-color: #eee;
        border: 1px solid #ddd;
@@ -607,11 +594,18 @@ ul#add-to-blog-users {
        padding: 4px 10px;
        white-space: nowrap;
        text-align: left;
+       cursor: pointer;
 }
 
-.ui-autocomplete li.ui-state-focus {
+/* Colors for the wplink toolbar autocomplete. */
+.ui-autocomplete .ui-state-focus {
        background-color: #ddd;
-       cursor: pointer;
+}
+
+/* Colors for the tags autocomplete. */
+.wp-tags-autocomplete .ui-state-focus {
+       background-color: #0073aa;
+       color: #fff;
 }
 
 /*------------------------------------------------------------------------------
index 12ee61b448870428de008ae9e86d8881d4e7049c..d6de85557f1ab69afda86c98136bf5d848a04c4a 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: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
+#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}#pass1-text,.pw-weak,.show-password #pass1{display:none}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;cursor:pointer}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;cursor:default}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%}.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}#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;cursor:pointer}.ui-autocomplete .ui-state-focus{background-color:#ddd}.wp-tags-autocomplete .ui-state-focus{background-color:#0073aa;color:#fff}.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 739374a36bad80f667ee41b9884cd8507335a296..df19f457aa4710bcdb1c6556ebecbcb225b197b7 100644 (file)
@@ -221,8 +221,7 @@ table.fixed td {
 }
 
 #wpbody-content input.button,
-#wpbody-content input.button-primary,
-#wpbody-content input.button-secondary {
+#wpbody-content input.button-primary {
        overflow: visible;
 }
 
@@ -442,13 +441,17 @@ div#dashboard-widgets {
        padding-left: 1px;
 }
 
-.tagchecklist span, .tagchecklist span a {
+.tagchecklist > span, .tagchecklist .ntdelbutton {
        display: inline-block;
        display: block;
 }
 
-.tablenav .button-secondary,
-.nav .button-secondary {
+.tagchecklist .ntdelbutton:focus .remove-tag-icon:before {
+       outline: 1px solid #5b9dd9;
+}
+
+.tablenav .button,
+.nav .button {
        padding-top: 2px;
        padding-bottom: 2px;
 }
@@ -507,7 +510,7 @@ table.ie-fixed {
        border-collapse: collapse;
 }
 
-.tablenav a.button-secondary {
+.tablenav a.button {
        display: inline-block;
        padding: 2px 5px;
 }
index d96fbaa9e9777de5a1c2a675df3a2332ced595df..9535dae715213888ec8fce4f0ecfaa0de66fc624 100644 (file)
@@ -1 +1 @@
-#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:99%}#dashboard-widgets form #title{width:98%}#wpbody-content #dashboard-widgets .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets #postbox-container-2,#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:left;width:50.5%}#dashboard-widgets #postbox-container-3 .empty-container,#dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}.wp-editor-wrap .wp-editor-container,.wp-editor-wrap .wp-editor-tabs,.wp-editor-wrap .wp-editor-tools,.wp-editor-wrap .wp-switch-editor{zoom:100%}.wp-editor-wrap .wp-editor-container textarea.wp-editor-area{width:97%}#post-body.columns-2 #postbox-container-1{padding-right:19px}.welcome-panel .wp-badge{position:absolute}.welcome-panel .welcome-panel-column:first-child{width:35%}#adminmenuback{right:0;background-image:none}#adminmenu .wp-submenu,.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open{right:110px}#adminmenuwrap{position:static}#adminmenu{position:relative}#adminmenu,#adminmenu a{cursor:pointer}#adminmenu li.wp-menu-separator,#adminmenu li.wp-menu-separator-last{font-size:1px;line-height:1}#adminmenu a.menu-top{border-bottom:0 none;border-top:1px solid #ddd}#adminmenu .separator{font-size:1px;line-height:1px}#adminmenu .wp-submenu ul{margin:0}.folded #wpcontent,.folded #wpfooter{margin-right:170px}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:150px}.folded #adminmenu .wp-submenu{border-top-color:transparent}.folded #adminmenu .wp-menu-name{display:block}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{top:-1px;position:relative}.folded #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:transparent}#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#ddd}#wpbody-content .postbox,* html .stuffbox,* html .stuffbox input,* html .stuffbox textarea,* html input{border:1px solid #ddd}.folded #adminmenu .wp-submenu ul{margin-right:5px}#adminmenu li.menu-top{margin-bottom:-2px}#adminmenu .wp-menu-arrow{display:none!important}.js.folded #adminmenu li.menu-top{display:block;zoom:100%}ul#adminmenu{z-index:99}#adminmenu li.menu-top a.menu-top{min-width:auto;width:auto}#wpcontent #adminmenu li.wp-has-current-submenu a.wp-has-submenu{font-style:normal}#wpcontent #adminmenu .wp-submenu li{padding:0}#adminmenu li.wp-has-current-submenu .wp-submenu{right:-40px}#adminmenu .wp-menu-image{display:none!important}#adminmenu a.menu-top .wp-menu-name{padding-right:8px}#collapse-menu{line-height:23px}#wpadminbar .ab-comments-icon{padding-top:7px}.theme-browser .theme{width:30%;margin:0 0 4% 3%;cursor:auto}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:auto}.theme-browser .theme .theme-screenshot{height:180px}.theme-browser .theme .theme-actions{position:static;background-color:#e8e8e8}.theme-browser .theme .more-details{display:none}.plugins td,.plugins th,table.fixed td,table.fixed th{border-top:1px solid #ddd}#wpbody-content input.button,#wpbody-content input.button-primary,#wpbody-content input.button-secondary{overflow:visible}#dashboard-widgets h3 a{height:14px;line-height:14px}#dashboard_browser_nag{color:#fff}#dashboard_browser_nag .browser-icon{position:relative}.tablenav-pages .current-page{vertical-align:middle}#wpbody-content .postbox .hndle{margin-bottom:-1px}#addcat,#editcat,#template,#template div,.major-publishing-actions,.wp-submenu,.wp-submenu li{zoom:100%}.wp-menu-arrow{height:28px}.submitbox{margin-top:10px}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:39%}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:19%}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:49%}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:29%}.inline-edit-row p.submit{zoom:100%}.inline-edit-row fieldset label span.title{display:block;float:right;width:5em}.inline-edit-row fieldset label span.input-text-wrap{margin-right:0;zoom:100%}#wpbody-content .inline-edit-row fieldset label span.input-text-wrap input{line-height:130%}#wpbody-content .inline-edit-row .input-text-wrap input{width:95%}#wpbody-content .inline-edit-row .input-text-wrap input.inline-edit-password-input{width:8em}#titlediv #title{width:98%}.button,input[type=reset],input[type=button],input[type=submit]{padding:0 8px;line-height:20px;height:auto}.button.button-large,input[type=reset].button-large,input[type=button].button-large,input[type=submit].button-large{padding:0 10px;line-height:24px;height:auto}.button.button-small,input[type=reset].button-small,input[type=button].button-small,input[type=submit].button-small{padding:0 6px;line-height:16px;height:auto}a.button{margin:1px;padding:1px 9px 2px}a.button.button-large{padding:1px 11px 2px}a.button.button-small{padding:1px 7px 2px}#screen-options-wrap{overflow:hidden}#col-container,#col-left,#col-right,#dragHelper,#editorcontainer,#post-body,#post-status-info,#postdiv,#postdivrich,#poststuff,#the-comment-list .comment-item,#titlediv,#widgets-left,#wpwrap,#wrap,.fileedit-sub,.metabox-holder,.tablenav,.tagchecklist,.widget .widget-top,.widget-control-actions,.widget-liquid-left,.widget-liquid-right,.widgets-sortables{display:block;zoom:100%}p.search-box{position:static;float:left;margin:-3px 0 4px}#submitdiv a.button,#submitdiv input,#submitdiv select,.inactive-sidebar .widget,.revisions.pinned .revisions-controls,.widget-liquid-right .widget{position:relative}#widget-list .widget{display:inline}#editorcontainer #content{overflow:auto;margin:auto;width:98%}form#template div{width:100%}.wp-editor-container .quicktags-toolbar input{overflow:visible;padding:0 4px}#poststuff h2{font-size:1.6em}#poststuff .inside #page_template,#poststuff .inside #parent_id,.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{width:250px}#bh{margin:7px 0 0 10px;float:left}div#dashboard-widgets{padding-left:1px}.tagchecklist span,.tagchecklist span a{display:inline-block;display:block}.nav .button-secondary,.tablenav .button-secondary{padding-top:2px;padding-bottom:2px}.tablenav select{font-size:13px;display:inline-block;vertical-align:top;margin-top:2px}.tablenav .actions select{width:155px}.subsubsub li{display:inline}a.post-state-format{text-indent:0;line-height:0;font-size:0}table.ie-fixed{table-layout:fixed}.widefat tfoot td,.widefat th,.widefat thead td,.widefat tr{margin-bottom:0;border-spacing:0}.widefat tfoot td input,.widefat th input,.widefat thead td input{margin:0 5px 0 0}.widefat tfoot .check-column,.widefat thead .check-column{padding-top:6px}.media.widefat tbody th.check-column,.widefat tbody th.check-column{padding:4px 0 0}.widefat{empty-cells:show;border-collapse:collapse}.tablenav a.button-secondary{display:inline-block;padding:2px 5px}.inactive-sidebar .widgets-sortables{padding-bottom:8px}#available-widgets .widget-holder{padding-bottom:65px}#widgets-left .inactive{padding-bottom:10px}.inactive-sidebar .widget{display:block;float:right}#wpcontent .button-primary-disabled{color:#9FD0D5;background:#298CBA}#the-comment-list .unapproved td,#the-comment-list .unapproved tr{background-color:#ffffe0}.imgedit-submit{width:300px}#nav-menus-frame,#wpbody,.menu li{zoom:100%}#update-nav-menu #post-body{overflow:hidden}.menu li{min-width:100%}.menu li.sortable-placeholder{min-width:400px}.available-theme{display:inline}.available-theme ul{margin:0}.available-theme .action-links li{padding-left:7px;margin-left:7px}.about-wrap .three-col.about-updates .col-2{width:15%}.about-wrap .about-password-meter input{width:98%}.revisions-tickmarks,.revisions-tooltip{display:none!important}.login form .input,input[type=password]{font-family:sans-serif}.mce-btn i.mce-i-aligncenter,.mce-btn i.mce-i-alignjustify,.mce-btn i.mce-i-alignleft,.mce-btn i.mce-i-alignright,.mce-btn i.mce-i-blockquote,.mce-btn i.mce-i-bold,.mce-btn i.mce-i-bullist,.mce-btn i.mce-i-charmap,.mce-btn i.mce-i-forecolor,.mce-btn i.mce-i-fullscreen,.mce-btn i.mce-i-help,.mce-btn i.mce-i-hr,.mce-btn i.mce-i-indent,.mce-btn i.mce-i-italic,.mce-btn i.mce-i-link,.mce-btn i.mce-i-ltr,.mce-btn i.mce-i-numlist,.mce-btn i.mce-i-outdent,.mce-btn i.mce-i-pastetext,.mce-btn i.mce-i-pasteword,.mce-btn i.mce-i-redo,.mce-btn i.mce-i-removeformat,.mce-btn i.mce-i-spellchecker,.mce-btn i.mce-i-strikethrough,.mce-btn i.mce-i-underline,.mce-btn i.mce-i-undo,.mce-btn i.mce-i-unlink,.mce-btn i.mce-i-wp-media-library,.mce-btn i.mce-i-wp_adv,.mce-btn i.mce-i-wp_fullscreen,.mce-btn i.mce-i-wp_help,.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page,.mce-close{font-family:tinymce,Arial;font-style:normal;font-weight:400;font-variant:normal;font-size:16px;margin-right:0;padding-left:0}.mce-btn i.mce-i-wp_fullscreen,.qt-fullscreen{-ie7-icon:'\e023'}.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page{-ie7-icon:'\e027'}.mce-btn i.mce-i-wp_adv{background-color:#a0a5aa}.mce-btn i.mce-i-help,.mce-btn i.mce-i-wp_help{-ie7-icon:'\e016'}* html .row-actions{visibility:visible}* html div.widget-liquid-left,* html div.widget-liquid-right{display:block;position:relative}* html #editorcontainer{padding:0}* html #poststuff h2{margin-right:0}* html div.widget-liquid-left{width:99%}* html .widgets-sortables{height:50px}* html a#content_resize{left:-2px}* html .widget-title h4{width:205px}* html #removing-widget .in-widget-title{display:none}* html .media-item .pinkynail{height:32px;width:40px}* html .describe .field input.text,* html .describe .field textarea{width:440px}* html .edit-box{display:inline}* html .postbox-container .meta-box-sortables{height:300px}* html #wpbody-content #screen-options-link-wrap{display:inline-block;width:150px;text-align:center}* html #wpbody-content #contextual-help-link-wrap{display:inline-block;width:100px;text-align:center}* html #adminmenu{margin-right:-80px}* html .folded #adminmenu{margin-right:-22px}* html #wpcontent #adminmenu li.menu-top{display:inline;padding:0;margin:0}* html #wpfooter{margin:0}* html #adminmenu div.wp-menu-image{height:29px}
\ No newline at end of file
+#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:99%}#dashboard-widgets form #title{width:98%}#wpbody-content #dashboard-widgets .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets #postbox-container-2,#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:left;width:50.5%}#dashboard-widgets #postbox-container-3 .empty-container,#dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}.wp-editor-wrap .wp-editor-container,.wp-editor-wrap .wp-editor-tabs,.wp-editor-wrap .wp-editor-tools,.wp-editor-wrap .wp-switch-editor{zoom:100%}.wp-editor-wrap .wp-editor-container textarea.wp-editor-area{width:97%}#post-body.columns-2 #postbox-container-1{padding-right:19px}.welcome-panel .wp-badge{position:absolute}.welcome-panel .welcome-panel-column:first-child{width:35%}#adminmenuback{right:0;background-image:none}#adminmenu .wp-submenu,.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open{right:110px}#adminmenuwrap{position:static}#adminmenu{position:relative}#adminmenu,#adminmenu a{cursor:pointer}#adminmenu li.wp-menu-separator,#adminmenu li.wp-menu-separator-last{font-size:1px;line-height:1}#adminmenu a.menu-top{border-bottom:0 none;border-top:1px solid #ddd}#adminmenu .separator{font-size:1px;line-height:1px}#adminmenu .wp-submenu ul{margin:0}.folded #wpcontent,.folded #wpfooter{margin-right:170px}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:150px}.folded #adminmenu .wp-submenu{border-top-color:transparent}.folded #adminmenu .wp-menu-name{display:block}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{top:-1px;position:relative}.folded #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:transparent}#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#ddd}#wpbody-content .postbox,* html .stuffbox,* html .stuffbox input,* html .stuffbox textarea,* html input{border:1px solid #ddd}.folded #adminmenu .wp-submenu ul{margin-right:5px}#adminmenu li.menu-top{margin-bottom:-2px}#adminmenu .wp-menu-arrow{display:none!important}.js.folded #adminmenu li.menu-top{display:block;zoom:100%}ul#adminmenu{z-index:99}#adminmenu li.menu-top a.menu-top{min-width:auto;width:auto}#wpcontent #adminmenu li.wp-has-current-submenu a.wp-has-submenu{font-style:normal}#wpcontent #adminmenu .wp-submenu li{padding:0}#adminmenu li.wp-has-current-submenu .wp-submenu{right:-40px}#adminmenu .wp-menu-image{display:none!important}#adminmenu a.menu-top .wp-menu-name{padding-right:8px}#collapse-menu{line-height:23px}#wpadminbar .ab-comments-icon{padding-top:7px}.theme-browser .theme{width:30%;margin:0 0 4% 3%;cursor:auto}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:auto}.theme-browser .theme .theme-screenshot{height:180px}.theme-browser .theme .theme-actions{position:static;background-color:#e8e8e8}.theme-browser .theme .more-details{display:none}.plugins td,.plugins th,table.fixed td,table.fixed th{border-top:1px solid #ddd}#wpbody-content input.button,#wpbody-content input.button-primary{overflow:visible}#dashboard-widgets h3 a{height:14px;line-height:14px}#dashboard_browser_nag{color:#fff}#dashboard_browser_nag .browser-icon{position:relative}.tablenav-pages .current-page{vertical-align:middle}#wpbody-content .postbox .hndle{margin-bottom:-1px}#addcat,#editcat,#template,#template div,.major-publishing-actions,.wp-submenu,.wp-submenu li{zoom:100%}.wp-menu-arrow{height:28px}.submitbox{margin-top:10px}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:39%}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:19%}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:49%}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:29%}.inline-edit-row p.submit{zoom:100%}.inline-edit-row fieldset label span.title{display:block;float:right;width:5em}.inline-edit-row fieldset label span.input-text-wrap{margin-right:0;zoom:100%}#wpbody-content .inline-edit-row fieldset label span.input-text-wrap input{line-height:130%}#wpbody-content .inline-edit-row .input-text-wrap input{width:95%}#wpbody-content .inline-edit-row .input-text-wrap input.inline-edit-password-input{width:8em}#titlediv #title{width:98%}.button,input[type=reset],input[type=button],input[type=submit]{padding:0 8px;line-height:20px;height:auto}.button.button-large,input[type=reset].button-large,input[type=button].button-large,input[type=submit].button-large{padding:0 10px;line-height:24px;height:auto}.button.button-small,input[type=reset].button-small,input[type=button].button-small,input[type=submit].button-small{padding:0 6px;line-height:16px;height:auto}a.button{margin:1px;padding:1px 9px 2px}a.button.button-large{padding:1px 11px 2px}a.button.button-small{padding:1px 7px 2px}#screen-options-wrap{overflow:hidden}#col-container,#col-left,#col-right,#dragHelper,#editorcontainer,#post-body,#post-status-info,#postdiv,#postdivrich,#poststuff,#the-comment-list .comment-item,#titlediv,#widgets-left,#wpwrap,#wrap,.fileedit-sub,.metabox-holder,.tablenav,.tagchecklist,.widget .widget-top,.widget-control-actions,.widget-liquid-left,.widget-liquid-right,.widgets-sortables{display:block;zoom:100%}p.search-box{position:static;float:left;margin:-3px 0 4px}#submitdiv a.button,#submitdiv input,#submitdiv select,.inactive-sidebar .widget,.revisions.pinned .revisions-controls,.widget-liquid-right .widget{position:relative}#widget-list .widget{display:inline}#editorcontainer #content{overflow:auto;margin:auto;width:98%}form#template div{width:100%}.wp-editor-container .quicktags-toolbar input{overflow:visible;padding:0 4px}#poststuff h2{font-size:1.6em}#poststuff .inside #page_template,#poststuff .inside #parent_id,.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{width:250px}#bh{margin:7px 0 0 10px;float:left}div#dashboard-widgets{padding-left:1px}.tagchecklist .ntdelbutton,.tagchecklist>span{display:inline-block;display:block}.tagchecklist .ntdelbutton:focus .remove-tag-icon:before{outline:#5b9dd9 solid 1px}.nav .button,.tablenav .button{padding-top:2px;padding-bottom:2px}.tablenav select{font-size:13px;display:inline-block;vertical-align:top;margin-top:2px}.tablenav .actions select{width:155px}.subsubsub li{display:inline}a.post-state-format{text-indent:0;line-height:0;font-size:0}table.ie-fixed{table-layout:fixed}.widefat tfoot td,.widefat th,.widefat thead td,.widefat tr{margin-bottom:0;border-spacing:0}.widefat tfoot td input,.widefat th input,.widefat thead td input{margin:0 5px 0 0}.widefat tfoot .check-column,.widefat thead .check-column{padding-top:6px}.media.widefat tbody th.check-column,.widefat tbody th.check-column{padding:4px 0 0}.widefat{empty-cells:show;border-collapse:collapse}.tablenav a.button{display:inline-block;padding:2px 5px}.inactive-sidebar .widgets-sortables{padding-bottom:8px}#available-widgets .widget-holder{padding-bottom:65px}#widgets-left .inactive{padding-bottom:10px}.inactive-sidebar .widget{display:block;float:right}#wpcontent .button-primary-disabled{color:#9FD0D5;background:#298CBA}#the-comment-list .unapproved td,#the-comment-list .unapproved tr{background-color:#ffffe0}.imgedit-submit{width:300px}#nav-menus-frame,#wpbody,.menu li{zoom:100%}#update-nav-menu #post-body{overflow:hidden}.menu li{min-width:100%}.menu li.sortable-placeholder{min-width:400px}.available-theme{display:inline}.available-theme ul{margin:0}.available-theme .action-links li{padding-left:7px;margin-left:7px}.about-wrap .three-col.about-updates .col-2{width:15%}.about-wrap .about-password-meter input{width:98%}.revisions-tickmarks,.revisions-tooltip{display:none!important}.login form .input,input[type=password]{font-family:sans-serif}.mce-btn i.mce-i-aligncenter,.mce-btn i.mce-i-alignjustify,.mce-btn i.mce-i-alignleft,.mce-btn i.mce-i-alignright,.mce-btn i.mce-i-blockquote,.mce-btn i.mce-i-bold,.mce-btn i.mce-i-bullist,.mce-btn i.mce-i-charmap,.mce-btn i.mce-i-forecolor,.mce-btn i.mce-i-fullscreen,.mce-btn i.mce-i-help,.mce-btn i.mce-i-hr,.mce-btn i.mce-i-indent,.mce-btn i.mce-i-italic,.mce-btn i.mce-i-link,.mce-btn i.mce-i-ltr,.mce-btn i.mce-i-numlist,.mce-btn i.mce-i-outdent,.mce-btn i.mce-i-pastetext,.mce-btn i.mce-i-pasteword,.mce-btn i.mce-i-redo,.mce-btn i.mce-i-removeformat,.mce-btn i.mce-i-spellchecker,.mce-btn i.mce-i-strikethrough,.mce-btn i.mce-i-underline,.mce-btn i.mce-i-undo,.mce-btn i.mce-i-unlink,.mce-btn i.mce-i-wp-media-library,.mce-btn i.mce-i-wp_adv,.mce-btn i.mce-i-wp_fullscreen,.mce-btn i.mce-i-wp_help,.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page,.mce-close{font-family:tinymce,Arial;font-style:normal;font-weight:400;font-variant:normal;font-size:16px;margin-right:0;padding-left:0}.mce-btn i.mce-i-wp_fullscreen,.qt-fullscreen{-ie7-icon:'\e023'}.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page{-ie7-icon:'\e027'}.mce-btn i.mce-i-wp_adv{background-color:#a0a5aa}.mce-btn i.mce-i-help,.mce-btn i.mce-i-wp_help{-ie7-icon:'\e016'}* html .row-actions{visibility:visible}* html div.widget-liquid-left,* html div.widget-liquid-right{display:block;position:relative}* html #editorcontainer{padding:0}* html #poststuff h2{margin-right:0}* html div.widget-liquid-left{width:99%}* html .widgets-sortables{height:50px}* html a#content_resize{left:-2px}* html .widget-title h4{width:205px}* html #removing-widget .in-widget-title{display:none}* html .media-item .pinkynail{height:32px;width:40px}* html .describe .field input.text,* html .describe .field textarea{width:440px}* html .edit-box{display:inline}* html .postbox-container .meta-box-sortables{height:300px}* html #wpbody-content #screen-options-link-wrap{display:inline-block;width:150px;text-align:center}* html #wpbody-content #contextual-help-link-wrap{display:inline-block;width:100px;text-align:center}* html #adminmenu{margin-right:-80px}* html .folded #adminmenu{margin-right:-22px}* html #wpcontent #adminmenu li.menu-top{display:inline;padding:0;margin:0}* html #wpfooter{margin:0}* html #adminmenu div.wp-menu-image{height:29px}
\ No newline at end of file
index 90cf8f341c0439579daa5b0df20e32223b766883..df8d792494cdcca1697362bea28df5eadb30686c 100644 (file)
@@ -221,8 +221,7 @@ table.fixed td {
 }
 
 #wpbody-content input.button,
-#wpbody-content input.button-primary,
-#wpbody-content input.button-secondary {
+#wpbody-content input.button-primary {
        overflow: visible;
 }
 
@@ -442,13 +441,17 @@ div#dashboard-widgets {
        padding-right: 1px;
 }
 
-.tagchecklist span, .tagchecklist span a {
+.tagchecklist > span, .tagchecklist .ntdelbutton {
        display: inline-block;
        display: block;
 }
 
-.tablenav .button-secondary,
-.nav .button-secondary {
+.tagchecklist .ntdelbutton:focus .remove-tag-icon:before {
+       outline: 1px solid #5b9dd9;
+}
+
+.tablenav .button,
+.nav .button {
        padding-top: 2px;
        padding-bottom: 2px;
 }
@@ -507,7 +510,7 @@ table.ie-fixed {
        border-collapse: collapse;
 }
 
-.tablenav a.button-secondary {
+.tablenav a.button {
        display: inline-block;
        padding: 2px 5px;
 }
index 486502d0a4f49dc79aea1d38432b51b4cc2dc74b..5cbe8b99a8045a363cde59c137d39fa50671a6d2 100644 (file)
@@ -1 +1 @@
-#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:99%}#dashboard-widgets form #title{width:98%}#wpbody-content #dashboard-widgets .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets #postbox-container-2,#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:right;width:50.5%}#dashboard-widgets #postbox-container-3 .empty-container,#dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}.wp-editor-wrap .wp-editor-container,.wp-editor-wrap .wp-editor-tabs,.wp-editor-wrap .wp-editor-tools,.wp-editor-wrap .wp-switch-editor{zoom:100%}.wp-editor-wrap .wp-editor-container textarea.wp-editor-area{width:97%}#post-body.columns-2 #postbox-container-1{padding-left:19px}.welcome-panel .wp-badge{position:absolute}.welcome-panel .welcome-panel-column:first-child{width:35%}#adminmenuback{left:0;background-image:none}#adminmenu .wp-submenu,.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open{left:110px}#adminmenuwrap{position:static}#adminmenu{position:relative}#adminmenu,#adminmenu a{cursor:pointer}#adminmenu li.wp-menu-separator,#adminmenu li.wp-menu-separator-last{font-size:1px;line-height:1}#adminmenu a.menu-top{border-bottom:0 none;border-top:1px solid #ddd}#adminmenu .separator{font-size:1px;line-height:1px}#adminmenu .wp-submenu ul{margin:0}.folded #wpcontent,.folded #wpfooter{margin-left:170px}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:150px}.folded #adminmenu .wp-submenu{border-top-color:transparent}.folded #adminmenu .wp-menu-name{display:block}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{top:-1px;position:relative}.folded #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:transparent}#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#ddd}#wpbody-content .postbox,* html .stuffbox,* html .stuffbox input,* html .stuffbox textarea,* html input{border:1px solid #ddd}.folded #adminmenu .wp-submenu ul{margin-left:5px}#adminmenu li.menu-top{margin-bottom:-2px}#adminmenu .wp-menu-arrow{display:none!important}.js.folded #adminmenu li.menu-top{display:block;zoom:100%}ul#adminmenu{z-index:99}#adminmenu li.menu-top a.menu-top{min-width:auto;width:auto}#wpcontent #adminmenu li.wp-has-current-submenu a.wp-has-submenu{font-style:normal}#wpcontent #adminmenu .wp-submenu li{padding:0}#adminmenu li.wp-has-current-submenu .wp-submenu{left:-40px}#adminmenu .wp-menu-image{display:none!important}#adminmenu a.menu-top .wp-menu-name{padding-left:8px}#collapse-menu{line-height:23px}#wpadminbar .ab-comments-icon{padding-top:7px}.theme-browser .theme{width:30%;margin:0 3% 4% 0;cursor:auto}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:auto}.theme-browser .theme .theme-screenshot{height:180px}.theme-browser .theme .theme-actions{position:static;background-color:#e8e8e8}.theme-browser .theme .more-details{display:none}.plugins td,.plugins th,table.fixed td,table.fixed th{border-top:1px solid #ddd}#wpbody-content input.button,#wpbody-content input.button-primary,#wpbody-content input.button-secondary{overflow:visible}#dashboard-widgets h3 a{height:14px;line-height:14px}#dashboard_browser_nag{color:#fff}#dashboard_browser_nag .browser-icon{position:relative}.tablenav-pages .current-page{vertical-align:middle}#wpbody-content .postbox .hndle{margin-bottom:-1px}#addcat,#editcat,#template,#template div,.major-publishing-actions,.wp-submenu,.wp-submenu li{zoom:100%}.wp-menu-arrow{height:28px}.submitbox{margin-top:10px}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:39%}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:19%}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:49%}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:29%}.inline-edit-row p.submit{zoom:100%}.inline-edit-row fieldset label span.title{display:block;float:left;width:5em}.inline-edit-row fieldset label span.input-text-wrap{margin-left:0;zoom:100%}#wpbody-content .inline-edit-row fieldset label span.input-text-wrap input{line-height:130%}#wpbody-content .inline-edit-row .input-text-wrap input{width:95%}#wpbody-content .inline-edit-row .input-text-wrap input.inline-edit-password-input{width:8em}#titlediv #title{width:98%}.button,input[type=reset],input[type=button],input[type=submit]{padding:0 8px;line-height:20px;height:auto}.button.button-large,input[type=reset].button-large,input[type=button].button-large,input[type=submit].button-large{padding:0 10px;line-height:24px;height:auto}.button.button-small,input[type=reset].button-small,input[type=button].button-small,input[type=submit].button-small{padding:0 6px;line-height:16px;height:auto}a.button{margin:1px;padding:1px 9px 2px}a.button.button-large{padding:1px 11px 2px}a.button.button-small{padding:1px 7px 2px}#screen-options-wrap{overflow:hidden}#col-container,#col-left,#col-right,#dragHelper,#editorcontainer,#post-body,#post-status-info,#postdiv,#postdivrich,#poststuff,#the-comment-list .comment-item,#titlediv,#widgets-left,#wpwrap,#wrap,.fileedit-sub,.metabox-holder,.tablenav,.tagchecklist,.widget .widget-top,.widget-control-actions,.widget-liquid-left,.widget-liquid-right,.widgets-sortables{display:block;zoom:100%}p.search-box{position:static;float:right;margin:-3px 0 4px}#submitdiv a.button,#submitdiv input,#submitdiv select,.inactive-sidebar .widget,.revisions.pinned .revisions-controls,.widget-liquid-right .widget{position:relative}#widget-list .widget{display:inline}#editorcontainer #content{overflow:auto;margin:auto;width:98%}form#template div{width:100%}.wp-editor-container .quicktags-toolbar input{overflow:visible;padding:0 4px}#poststuff h2{font-size:1.6em}#poststuff .inside #page_template,#poststuff .inside #parent_id,.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{width:250px}#bh{margin:7px 10px 0 0;float:right}div#dashboard-widgets{padding-right:1px}.tagchecklist span,.tagchecklist span a{display:inline-block;display:block}.nav .button-secondary,.tablenav .button-secondary{padding-top:2px;padding-bottom:2px}.tablenav select{font-size:13px;display:inline-block;vertical-align:top;margin-top:2px}.tablenav .actions select{width:155px}.subsubsub li{display:inline}a.post-state-format{text-indent:0;line-height:0;font-size:0}table.ie-fixed{table-layout:fixed}.widefat tfoot td,.widefat th,.widefat thead td,.widefat tr{margin-bottom:0;border-spacing:0}.widefat tfoot td input,.widefat th input,.widefat thead td input{margin:0 0 0 5px}.widefat tfoot .check-column,.widefat thead .check-column{padding-top:6px}.media.widefat tbody th.check-column,.widefat tbody th.check-column{padding:4px 0 0}.widefat{empty-cells:show;border-collapse:collapse}.tablenav a.button-secondary{display:inline-block;padding:2px 5px}.inactive-sidebar .widgets-sortables{padding-bottom:8px}#available-widgets .widget-holder{padding-bottom:65px}#widgets-left .inactive{padding-bottom:10px}.inactive-sidebar .widget{display:block;float:left}#wpcontent .button-primary-disabled{color:#9FD0D5;background:#298CBA}#the-comment-list .unapproved td,#the-comment-list .unapproved tr{background-color:#ffffe0}.imgedit-submit{width:300px}#nav-menus-frame,#wpbody,.menu li{zoom:100%}#update-nav-menu #post-body{overflow:hidden}.menu li{min-width:100%}.menu li.sortable-placeholder{min-width:400px}.available-theme{display:inline}.available-theme ul{margin:0}.available-theme .action-links li{padding-right:7px;margin-right:7px}.about-wrap .three-col.about-updates .col-2{width:15%}.about-wrap .about-password-meter input{width:98%}.revisions-tickmarks,.revisions-tooltip{display:none!important}.login form .input,input[type=password]{font-family:sans-serif}.mce-btn i.mce-i-aligncenter,.mce-btn i.mce-i-alignjustify,.mce-btn i.mce-i-alignleft,.mce-btn i.mce-i-alignright,.mce-btn i.mce-i-blockquote,.mce-btn i.mce-i-bold,.mce-btn i.mce-i-bullist,.mce-btn i.mce-i-charmap,.mce-btn i.mce-i-forecolor,.mce-btn i.mce-i-fullscreen,.mce-btn i.mce-i-help,.mce-btn i.mce-i-hr,.mce-btn i.mce-i-indent,.mce-btn i.mce-i-italic,.mce-btn i.mce-i-link,.mce-btn i.mce-i-ltr,.mce-btn i.mce-i-numlist,.mce-btn i.mce-i-outdent,.mce-btn i.mce-i-pastetext,.mce-btn i.mce-i-pasteword,.mce-btn i.mce-i-redo,.mce-btn i.mce-i-removeformat,.mce-btn i.mce-i-spellchecker,.mce-btn i.mce-i-strikethrough,.mce-btn i.mce-i-underline,.mce-btn i.mce-i-undo,.mce-btn i.mce-i-unlink,.mce-btn i.mce-i-wp-media-library,.mce-btn i.mce-i-wp_adv,.mce-btn i.mce-i-wp_fullscreen,.mce-btn i.mce-i-wp_help,.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page,.mce-close{font-family:tinymce,Arial;font-style:normal;font-weight:400;font-variant:normal;font-size:16px;margin-left:0;padding-right:0}.mce-btn i.mce-i-wp_fullscreen,.qt-fullscreen{-ie7-icon:'\e023'}.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page{-ie7-icon:'\e027'}.mce-btn i.mce-i-wp_adv{background-color:#a0a5aa}.mce-btn i.mce-i-help,.mce-btn i.mce-i-wp_help{-ie7-icon:'\e016'}* html .row-actions{visibility:visible}* html div.widget-liquid-left,* html div.widget-liquid-right{display:block;position:relative}* html #editorcontainer{padding:0}* html #poststuff h2{margin-left:0}* html div.widget-liquid-left{width:99%}* html .widgets-sortables{height:50px}* html a#content_resize{right:-2px}* html .widget-title h4{width:205px}* html #removing-widget .in-widget-title{display:none}* html .media-item .pinkynail{height:32px;width:40px}* html .describe .field input.text,* html .describe .field textarea{width:440px}* html .edit-box{display:inline}* html .postbox-container .meta-box-sortables{height:300px}* html #wpbody-content #screen-options-link-wrap{display:inline-block;width:150px;text-align:center}* html #wpbody-content #contextual-help-link-wrap{display:inline-block;width:100px;text-align:center}* html #adminmenu{margin-left:-80px}* html .folded #adminmenu{margin-left:-22px}* html #wpcontent #adminmenu li.menu-top{display:inline;padding:0;margin:0}* html #wpfooter{margin:0}* html #adminmenu div.wp-menu-image{height:29px}
\ No newline at end of file
+#dashboard-widgets form .input-text-wrap input,#dashboard-widgets form .textarea-wrap textarea{width:99%}#dashboard-widgets form #title{width:98%}#wpbody-content #dashboard-widgets .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets #postbox-container-2,#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:right;width:50.5%}#dashboard-widgets #postbox-container-3 .empty-container,#dashboard-widgets #postbox-container-4 .empty-container{border:0;height:0;min-height:0}.wp-editor-wrap .wp-editor-container,.wp-editor-wrap .wp-editor-tabs,.wp-editor-wrap .wp-editor-tools,.wp-editor-wrap .wp-switch-editor{zoom:100%}.wp-editor-wrap .wp-editor-container textarea.wp-editor-area{width:97%}#post-body.columns-2 #postbox-container-1{padding-left:19px}.welcome-panel .wp-badge{position:absolute}.welcome-panel .welcome-panel-column:first-child{width:35%}#adminmenuback{left:0;background-image:none}#adminmenu .wp-submenu,.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open{left:110px}#adminmenuwrap{position:static}#adminmenu{position:relative}#adminmenu,#adminmenu a{cursor:pointer}#adminmenu li.wp-menu-separator,#adminmenu li.wp-menu-separator-last{font-size:1px;line-height:1}#adminmenu a.menu-top{border-bottom:0 none;border-top:1px solid #ddd}#adminmenu .separator{font-size:1px;line-height:1px}#adminmenu .wp-submenu ul{margin:0}.folded #wpcontent,.folded #wpfooter{margin-left:170px}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:150px}.folded #adminmenu .wp-submenu{border-top-color:transparent}.folded #adminmenu .wp-menu-name{display:block}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{top:-1px;position:relative}.folded #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:transparent}#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#ddd}#wpbody-content .postbox,* html .stuffbox,* html .stuffbox input,* html .stuffbox textarea,* html input{border:1px solid #ddd}.folded #adminmenu .wp-submenu ul{margin-left:5px}#adminmenu li.menu-top{margin-bottom:-2px}#adminmenu .wp-menu-arrow{display:none!important}.js.folded #adminmenu li.menu-top{display:block;zoom:100%}ul#adminmenu{z-index:99}#adminmenu li.menu-top a.menu-top{min-width:auto;width:auto}#wpcontent #adminmenu li.wp-has-current-submenu a.wp-has-submenu{font-style:normal}#wpcontent #adminmenu .wp-submenu li{padding:0}#adminmenu li.wp-has-current-submenu .wp-submenu{left:-40px}#adminmenu .wp-menu-image{display:none!important}#adminmenu a.menu-top .wp-menu-name{padding-left:8px}#collapse-menu{line-height:23px}#wpadminbar .ab-comments-icon{padding-top:7px}.theme-browser .theme{width:30%;margin:0 3% 4% 0;cursor:auto}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:auto}.theme-browser .theme .theme-screenshot{height:180px}.theme-browser .theme .theme-actions{position:static;background-color:#e8e8e8}.theme-browser .theme .more-details{display:none}.plugins td,.plugins th,table.fixed td,table.fixed th{border-top:1px solid #ddd}#wpbody-content input.button,#wpbody-content input.button-primary{overflow:visible}#dashboard-widgets h3 a{height:14px;line-height:14px}#dashboard_browser_nag{color:#fff}#dashboard_browser_nag .browser-icon{position:relative}.tablenav-pages .current-page{vertical-align:middle}#wpbody-content .postbox .hndle{margin-bottom:-1px}#addcat,#editcat,#template,#template div,.major-publishing-actions,.wp-submenu,.wp-submenu li{zoom:100%}.wp-menu-arrow{height:28px}.submitbox{margin-top:10px}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:39%}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:19%}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:49%}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:29%}.inline-edit-row p.submit{zoom:100%}.inline-edit-row fieldset label span.title{display:block;float:left;width:5em}.inline-edit-row fieldset label span.input-text-wrap{margin-left:0;zoom:100%}#wpbody-content .inline-edit-row fieldset label span.input-text-wrap input{line-height:130%}#wpbody-content .inline-edit-row .input-text-wrap input{width:95%}#wpbody-content .inline-edit-row .input-text-wrap input.inline-edit-password-input{width:8em}#titlediv #title{width:98%}.button,input[type=reset],input[type=button],input[type=submit]{padding:0 8px;line-height:20px;height:auto}.button.button-large,input[type=reset].button-large,input[type=button].button-large,input[type=submit].button-large{padding:0 10px;line-height:24px;height:auto}.button.button-small,input[type=reset].button-small,input[type=button].button-small,input[type=submit].button-small{padding:0 6px;line-height:16px;height:auto}a.button{margin:1px;padding:1px 9px 2px}a.button.button-large{padding:1px 11px 2px}a.button.button-small{padding:1px 7px 2px}#screen-options-wrap{overflow:hidden}#col-container,#col-left,#col-right,#dragHelper,#editorcontainer,#post-body,#post-status-info,#postdiv,#postdivrich,#poststuff,#the-comment-list .comment-item,#titlediv,#widgets-left,#wpwrap,#wrap,.fileedit-sub,.metabox-holder,.tablenav,.tagchecklist,.widget .widget-top,.widget-control-actions,.widget-liquid-left,.widget-liquid-right,.widgets-sortables{display:block;zoom:100%}p.search-box{position:static;float:right;margin:-3px 0 4px}#submitdiv a.button,#submitdiv input,#submitdiv select,.inactive-sidebar .widget,.revisions.pinned .revisions-controls,.widget-liquid-right .widget{position:relative}#widget-list .widget{display:inline}#editorcontainer #content{overflow:auto;margin:auto;width:98%}form#template div{width:100%}.wp-editor-container .quicktags-toolbar input{overflow:visible;padding:0 4px}#poststuff h2{font-size:1.6em}#poststuff .inside #page_template,#poststuff .inside #parent_id,.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{width:250px}#bh{margin:7px 10px 0 0;float:right}div#dashboard-widgets{padding-right:1px}.tagchecklist .ntdelbutton,.tagchecklist>span{display:inline-block;display:block}.tagchecklist .ntdelbutton:focus .remove-tag-icon:before{outline:#5b9dd9 solid 1px}.nav .button,.tablenav .button{padding-top:2px;padding-bottom:2px}.tablenav select{font-size:13px;display:inline-block;vertical-align:top;margin-top:2px}.tablenav .actions select{width:155px}.subsubsub li{display:inline}a.post-state-format{text-indent:0;line-height:0;font-size:0}table.ie-fixed{table-layout:fixed}.widefat tfoot td,.widefat th,.widefat thead td,.widefat tr{margin-bottom:0;border-spacing:0}.widefat tfoot td input,.widefat th input,.widefat thead td input{margin:0 0 0 5px}.widefat tfoot .check-column,.widefat thead .check-column{padding-top:6px}.media.widefat tbody th.check-column,.widefat tbody th.check-column{padding:4px 0 0}.widefat{empty-cells:show;border-collapse:collapse}.tablenav a.button{display:inline-block;padding:2px 5px}.inactive-sidebar .widgets-sortables{padding-bottom:8px}#available-widgets .widget-holder{padding-bottom:65px}#widgets-left .inactive{padding-bottom:10px}.inactive-sidebar .widget{display:block;float:left}#wpcontent .button-primary-disabled{color:#9FD0D5;background:#298CBA}#the-comment-list .unapproved td,#the-comment-list .unapproved tr{background-color:#ffffe0}.imgedit-submit{width:300px}#nav-menus-frame,#wpbody,.menu li{zoom:100%}#update-nav-menu #post-body{overflow:hidden}.menu li{min-width:100%}.menu li.sortable-placeholder{min-width:400px}.available-theme{display:inline}.available-theme ul{margin:0}.available-theme .action-links li{padding-right:7px;margin-right:7px}.about-wrap .three-col.about-updates .col-2{width:15%}.about-wrap .about-password-meter input{width:98%}.revisions-tickmarks,.revisions-tooltip{display:none!important}.login form .input,input[type=password]{font-family:sans-serif}.mce-btn i.mce-i-aligncenter,.mce-btn i.mce-i-alignjustify,.mce-btn i.mce-i-alignleft,.mce-btn i.mce-i-alignright,.mce-btn i.mce-i-blockquote,.mce-btn i.mce-i-bold,.mce-btn i.mce-i-bullist,.mce-btn i.mce-i-charmap,.mce-btn i.mce-i-forecolor,.mce-btn i.mce-i-fullscreen,.mce-btn i.mce-i-help,.mce-btn i.mce-i-hr,.mce-btn i.mce-i-indent,.mce-btn i.mce-i-italic,.mce-btn i.mce-i-link,.mce-btn i.mce-i-ltr,.mce-btn i.mce-i-numlist,.mce-btn i.mce-i-outdent,.mce-btn i.mce-i-pastetext,.mce-btn i.mce-i-pasteword,.mce-btn i.mce-i-redo,.mce-btn i.mce-i-removeformat,.mce-btn i.mce-i-spellchecker,.mce-btn i.mce-i-strikethrough,.mce-btn i.mce-i-underline,.mce-btn i.mce-i-undo,.mce-btn i.mce-i-unlink,.mce-btn i.mce-i-wp-media-library,.mce-btn i.mce-i-wp_adv,.mce-btn i.mce-i-wp_fullscreen,.mce-btn i.mce-i-wp_help,.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page,.mce-close{font-family:tinymce,Arial;font-style:normal;font-weight:400;font-variant:normal;font-size:16px;margin-left:0;padding-right:0}.mce-btn i.mce-i-wp_fullscreen,.qt-fullscreen{-ie7-icon:'\e023'}.mce-btn i.mce-i-wp_more,.mce-btn i.mce-i-wp_page{-ie7-icon:'\e027'}.mce-btn i.mce-i-wp_adv{background-color:#a0a5aa}.mce-btn i.mce-i-help,.mce-btn i.mce-i-wp_help{-ie7-icon:'\e016'}* html .row-actions{visibility:visible}* html div.widget-liquid-left,* html div.widget-liquid-right{display:block;position:relative}* html #editorcontainer{padding:0}* html #poststuff h2{margin-left:0}* html div.widget-liquid-left{width:99%}* html .widgets-sortables{height:50px}* html a#content_resize{right:-2px}* html .widget-title h4{width:205px}* html #removing-widget .in-widget-title{display:none}* html .media-item .pinkynail{height:32px;width:40px}* html .describe .field input.text,* html .describe .field textarea{width:440px}* html .edit-box{display:inline}* html .postbox-container .meta-box-sortables{height:300px}* html #wpbody-content #screen-options-link-wrap{display:inline-block;width:150px;text-align:center}* html #wpbody-content #contextual-help-link-wrap{display:inline-block;width:100px;text-align:center}* html #adminmenu{margin-left:-80px}* html .folded #adminmenu{margin-left:-22px}* html #wpcontent #adminmenu li.menu-top{display:inline;padding:0;margin:0}* html #wpfooter{margin:0}* html #adminmenu div.wp-menu-image{height:29px}
\ No newline at end of file
index 43378fc992b49459426d8c48db8a013a799adb09..8f29fd28073b7d017ae0fc01d03663183e79fff8 100644 (file)
@@ -443,7 +443,7 @@ body.language-chooser {
        margin-left: 15px;
 }
 
-.button-secondary.hide-if-no-js,
+.button.hide-if-no-js,
 .hide-if-no-js {
        display: none;
 }
index d05100c24ab64028f3e68d1b8a4d9ac6c5cfd440..a52e5dd8d9cace09034673ec78651301886d5bed 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:-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
+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.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 d1db4ec661be12a4b75548418994b3de77f64937..9de99ee36612b58d2a0a6c9c2c4b60e3ec4861ed 100644 (file)
@@ -443,7 +443,7 @@ body.language-chooser {
        margin-right: 15px;
 }
 
-.button-secondary.hide-if-no-js,
+.button.hide-if-no-js,
 .hide-if-no-js {
        display: none;
 }
index ceac751648bd1f2b5b9d4c8ed364a60136ff79d5..714109f25ec6d8aa6a2e6dad221b10a4f3c587a9 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:-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
+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.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 079c3c34fc3322ec3dfa887da67a161e76ef6b53..250be23bbd202054c7b76f3c38aa01c6d4ae87cf 100644 (file)
@@ -555,15 +555,13 @@ tr.wp-locked .locked-indicator {
        width: 16px;
 }
 
-tr.wp-locked .locked-indicator:before {
+tr.wp-locked .locked-indicator-icon:before {
        color: #82878c;
        content: "\f160";
        display: inline-block;
-       float: right;
        font: normal 20px/1 dashicons;
        speak: none;
        vertical-align: middle;
-       margin-right: 0;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
 }
@@ -581,7 +579,7 @@ tr .locked-info {
 }
 
 tr.wp-locked .locked-info {
-       margin-top: 8px;
+       margin-top: 4px;
        height: auto;
        opacity: 1;
 }
@@ -656,6 +654,7 @@ th.asc a:focus span.sorting-indicator {
        margin-right: 2px;
 }
 
+.tablenav a.button,
 .tablenav a.button-secondary {
        display: block;
        margin: 3px 0 0 8px;
index 2523af057c671c0dcea92ae9126d4bcbd7ab3223..cc68630d01112a91166a625f3f94f6589fb0b048 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-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
+.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-icon:before{color:#82878c;content:"\f160";display:inline-block;font:400 20px/1 dashicons;speak:none;vertical-align:middle;-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:4px;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,.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 b66f0c0d8431368661b153130829c314f662e89c..05e5f82ad10c7ca2ba882c4717a170f469aa1b4a 100644 (file)
@@ -555,15 +555,13 @@ tr.wp-locked .locked-indicator {
        width: 16px;
 }
 
-tr.wp-locked .locked-indicator:before {
+tr.wp-locked .locked-indicator-icon:before {
        color: #82878c;
        content: "\f160";
        display: inline-block;
-       float: left;
        font: normal 20px/1 dashicons;
        speak: none;
        vertical-align: middle;
-       margin-left: 0;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
 }
@@ -581,7 +579,7 @@ tr .locked-info {
 }
 
 tr.wp-locked .locked-info {
-       margin-top: 8px;
+       margin-top: 4px;
        height: auto;
        opacity: 1;
 }
@@ -656,6 +654,7 @@ th.asc a:focus span.sorting-indicator {
        margin-left: 2px;
 }
 
+.tablenav a.button,
 .tablenav a.button-secondary {
        display: block;
        margin: 3px 8px 0 0;
index cb07782ac97551ea4751726664a63a17069e2073..22cd6f0e9f2257f16f16308bf11c00a00d5234c5 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-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
+.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-icon:before{color:#82878c;content:"\f160";display:inline-block;font:400 20px/1 dashicons;speak:none;vertical-align:middle;-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:4px;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,.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 c870e28c00486bd01e0e0c9e8029141f2e09ad0c..a895b1c5277887bb4119232dba6e96340695fa10 100644 (file)
@@ -216,19 +216,6 @@ p {
        width: 100%;
 }
 
-.mobile #login {
-       padding: 20px 0;
-}
-
-.mobile #login form {
-       margin-right: 0;
-}
-
-.mobile #login #nav,
-.mobile #login #backtoblog {
-       margin-right: 8px;
-}
-
 body.interim-login {
        height: auto;
 }
@@ -255,6 +242,12 @@ body.interim-login {
        width: device-width;
 }
 
+@media screen and ( max-height: 550px ) {
+       #login {
+               padding: 20px 0;
+       }
+}
+
 @media screen and ( max-width: 782px ) {
        .interim-login input[type=checkbox] {
                height: 16px;
index 7e116e62c2ff10f52cae6841bf019dce1d20bab8..64b36fa9da3f1c418bae88f279caf7cf31285e4f 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: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
+#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}.login h1 a,form p.submit a.cancel:hover{text-decoration:none}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}#pass1-text,.pw-weak,.show-password #pass1{display:none}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;cursor:pointer}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;cursor:default}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}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%}.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}#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;cursor:pointer}.ui-autocomplete .ui-state-focus{background-color:#ddd}.wp-tags-autocomplete .ui-state-focus{background-color:#0073aa;color:#fff}.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;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%}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-height:550px){#login{padding:20px 0}}@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 9f69e9c918a8d20baa9f2b47a9c66f6b0c8a0a5a..0a652d60da365a2c8da0017694bf32f1dc819d62 100644 (file)
@@ -216,19 +216,6 @@ p {
        width: 100%;
 }
 
-.mobile #login {
-       padding: 20px 0;
-}
-
-.mobile #login form {
-       margin-left: 0;
-}
-
-.mobile #login #nav,
-.mobile #login #backtoblog {
-       margin-left: 8px;
-}
-
 body.interim-login {
        height: auto;
 }
@@ -255,6 +242,12 @@ body.interim-login {
        width: device-width;
 }
 
+@media screen and ( max-height: 550px ) {
+       #login {
+               padding: 20px 0;
+       }
+}
+
 @media screen and ( max-width: 782px ) {
        .interim-login input[type=checkbox] {
                height: 16px;
index 31dd8627928db4584e450237a9ba007dc974f5a1..e2e932d7e8c1c1de8743078a8f32316f51695145 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: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
+#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}.login h1 a,form p.submit a.cancel:hover{text-decoration:none}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}#pass1-text,.pw-weak,.show-password #pass1{display:none}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;cursor:pointer}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;cursor:default}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}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%}.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}#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;cursor:pointer}.ui-autocomplete .ui-state-focus{background-color:#ddd}.wp-tags-autocomplete .ui-state-focus{background-color:#0073aa;color:#fff}.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;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%}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-height:550px){#login{padding:20px 0}}@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 4406d96eff206fce1d9c68ba2473f1b506905a0e..24e15e151ae026beb1556576fdec9d503b172bcb 100644 (file)
@@ -769,13 +769,17 @@ border color while dragging a file over the uploader drop area */
 
 .edit-attachment-frame .attachment-media-view .details-image {
        display: block;
-       margin-bottom: 16px;
+       margin: 0 auto 16px;
        max-width: 100%;
        max-height: 90%;
        max-height: -webkit-calc( 100% - 42px );
        max-height: calc( 100% - 42px ); /* leave space for actions underneath */
 }
 
+.edit-attachment-frame .attachment-media-view .attachment-actions {
+       text-align: center;
+}
+
 .edit-attachment-frame .wp-media-wrapper {
        margin-bottom: 12px;
 }
@@ -1144,7 +1148,7 @@ span.imgedit-scale-warn {
 .imgedit-settings .imgedit-crop-sel input[type="text"] {
        width: 50px;
        font-size: 14px;
-       padding: 3px 5px;
+       padding: 5px 8px;
 }
 
 .imgedit-separator {
index 8af1af5c3b113761f7fa2f02670106a40a63dd19..662346bc3f2634cf17cbf57d656982f51686d2e1 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;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
+.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:0 auto 16px;max-width:100%;max-height:90%;max-height:-webkit-calc(100% - 42px);max-height:calc(100% - 42px)}.edit-attachment-frame .attachment-media-view .attachment-actions{text-align:center}.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:5px 8px}.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 22cc406f23c787b82bcee2a2ec2e06b955bfd0e0..65d396612cf9b565a29a9042d5d5a621a3f9eabc 100644 (file)
@@ -769,13 +769,17 @@ border color while dragging a file over the uploader drop area */
 
 .edit-attachment-frame .attachment-media-view .details-image {
        display: block;
-       margin-bottom: 16px;
+       margin: 0 auto 16px;
        max-width: 100%;
        max-height: 90%;
        max-height: -webkit-calc( 100% - 42px );
        max-height: calc( 100% - 42px ); /* leave space for actions underneath */
 }
 
+.edit-attachment-frame .attachment-media-view .attachment-actions {
+       text-align: center;
+}
+
 .edit-attachment-frame .wp-media-wrapper {
        margin-bottom: 12px;
 }
@@ -1144,7 +1148,7 @@ span.imgedit-scale-warn {
 .imgedit-settings .imgedit-crop-sel input[type="text"] {
        width: 50px;
        font-size: 14px;
-       padding: 3px 5px;
+       padding: 5px 8px;
 }
 
 .imgedit-separator {
index 47395ef646ab13b325e75b9bfcd3ec4c6cb3d280..51a088f88ba397f690654012448ff1d1c706ebb5 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;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
+.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:0 auto 16px;max-width:100%;max-height:90%;max-height:-webkit-calc(100% - 42px);max-height:calc(100% - 42px)}.edit-attachment-frame .attachment-media-view .attachment-actions{text-align:center}.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:5px 8px}.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 e5496043b93a5e890d03ada89bf8b81e941add7c..8618240ba273a3cbc8a0801c09d62e4c56a53ca4 100644 (file)
@@ -27,6 +27,10 @@ ul.add-menu-item-tabs li {
        margin-bottom: 0;
 }
 
+.has-no-menu-item .button-controls {
+       display: none;
+}
+
 #nav-menus-frame {
        margin-right: 300px;
        margin-top: 23px;
@@ -105,24 +109,28 @@ ul.add-menu-item-tabs li {
        margin-top: 2em;
 }
 
-.menu-settings dl {
+.menu-settings-group {
        margin: 0 0 10px;
        overflow: hidden;
-       padding-right: 18%;
+       padding-right: 20%;
 }
 
-.menu-settings dd {
+.menu-settings-group:last-of-type {
+       margin-bottom: 0;
+}
+
+.menu-settings-input {
        float: right;
        margin: 0;
        width: 100%;
 }
 
-.menu-settings dt {
+.menu-settings-group-name {
        float: right;
        clear: both;
-       width: 21.951%;
+       width: 25%;
        padding: 3px 0 0;
-       margin-right: -21.951%;
+       margin-right: -25%; /* 20 container left padding x ( 100 container % width / 80 this % width ) */
 }
 
 .menu-settings label {
@@ -139,12 +147,15 @@ ul.add-menu-item-tabs li {
 }
 
 /* Menu Container */
+
+/* @todo: responsive view. */
 #menu-management-liquid {
        float: right;
        min-width: 100%;
        margin-top: 3px;
 }
 
+/* @todo: responsive view. */
 #menu-management {
        position: relative;
        margin-left: 20px;
@@ -284,19 +295,6 @@ ul.add-menu-item-tabs li {
        padding: 0;
 }
 
-.nav-menus-php .meta-sep,
-.nav-menus-php .submitdelete,
-.nav-menus-php .submitcancel {
-       display: block;
-       float: right;
-       margin: 6px 0;
-       line-height: 15px;
-}
-
-.meta-sep {
-       padding: 0 2px;
-}
-
 /* @todo: is this actually used? */
 #cancel-save {
        text-decoration: underline;
@@ -480,6 +478,7 @@ ul.add-menu-item-tabs li {
        font-weight: 600;
        line-height: 20px;
        display: block;
+       /* @todo: responsive view. */
        margin-left: 13em;
 }
 
@@ -651,9 +650,38 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
        box-shadow: 0 1px 1px rgba(0,0,0,0.04);
 }
 
-.menu-item-settings .field-move a {
+.menu-item-settings .field-move {
+       margin: 3px 0 5px;
+       line-height: 1.5;
+}
+
+.field-move-visual-label {
+       float: right;
+       margin-left: 4px;
+       font-style: italic;
+}
+
+.menu-item-settings .field-move .button-link {
        display: none;
        margin: 0 2px;
+       color: #0073aa;
+       font-style: italic;
+       text-decoration: underline;
+}
+
+.menu-item-settings .field-move .button-link:hover,
+.menu-item-settings .field-move .button-link:active {
+       color: #00a0d2;
+}
+
+.menu-item-settings .field-move .button-link: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);
 }
 
 .menu-item-edit-active .menu-item-settings {
@@ -665,13 +693,22 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
 }
 
 .add-menu-item-pagelinks {
-       margin: .5em auto;
+       margin: .5em -10px;
        text-align: center;
 }
 
+.add-menu-item-pagelinks .page-numbers {
+       display: inline-block;
+       min-width: 20px;
+}
+
+.add-menu-item-pagelinks .page-numbers.dots {
+       min-width: 0;
+}
+
 .link-to-original {
        display: block;
-       margin: 0 0 10px;
+       margin: 0 0 15px;
        padding: 3px 5px 5px;
        border: 1px solid #ddd;
        color: #72777c;
@@ -704,6 +741,7 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
 
 .menu-item-actions {
        padding-top: 15px;
+       padding-bottom: 7px;
 }
 
 #cancel-save {
@@ -713,7 +751,8 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
 /* Major/minor publishing actions (classes) */
 .nav-menus-php .major-publishing-actions {
        clear: both;
-       padding: 7px 0 6px;
+       padding: 10px 0;
+       line-height: 28px;
 }
 
 .nav-menus-php .major-publishing-actions .publishing-action {
@@ -725,21 +764,10 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
        display: none;
 }
 
+/* Same as the Publish Meta Box #delete-action */
 .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;
+       line-height: 28px;
 }
 
 .nav-menus-php .major-publishing-actions .form-invalid {
@@ -825,14 +853,9 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
                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;
+               line-height: 30px;
        }
 
        .menu-item-bar .menu-item-handle,
@@ -859,23 +882,26 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
                width: 25px;
        }
 
-       .menu-settings dl {
+       .menu-settings-group {
                padding-right: 0;
        }
 
-       .menu-settings dd {
+       .menu-settings-group-name {
                float: none;
-               width: 100%;
+               width: auto;
+               margin-right: 0;
                margin-bottom: 15px;
        }
 
-       .menu-settings dt {
+       .menu-settings-input {
                float: none;
-               width: auto;
-               margin-right: 0;
                margin-bottom: 15px;
        }
 
+       .menu-edit .checkbox-input {
+           margin-top: 0;
+       }
+
        .manage-menus select {
                margin: 0.5em 0;
        }
index afc8bc0bc313d600b1e75395659b4cd0680f723b..47178d1c2804f52ab7ba8b4d7d3f8f9740d16055 100644 (file)
@@ -1 +1 @@
-.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
+.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}.has-no-menu-item .button-controls{display:none}#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-group{margin:0 0 10px;overflow:hidden;padding-right:20%}.menu-settings-group:last-of-type{margin-bottom:0}.menu-settings-input{float:right;margin:0;width:100%}.menu-settings-group-name{float:right;clear:both;width:25%;padding:3px 0 0;margin-right:-25%}.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}#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{margin:3px 0 5px;line-height:1.5}.field-move-visual-label{float:right;margin-left:4px;font-style:italic}.menu-item-settings .field-move .button-link{display:none;margin:0 2px;color:#0073aa;font-style:italic;text-decoration:underline}.menu-item-settings .field-move .button-link:active,.menu-item-settings .field-move .button-link:hover{color:#00a0d2}.menu-item-settings .field-move .button-link: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)}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em -10px;text-align:center}.add-menu-item-pagelinks .page-numbers{display:inline-block;min-width:20px}.add-menu-item-pagelinks .page-numbers.dots{min-width:0}.link-to-original{display:block;margin:0 0 15px;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;padding-bottom:7px}.nav-menus-php .major-publishing-actions{clear:both;padding:10px 0;line-height:28px}.nav-menus-php .major-publishing-actions .publishing-action{text-align:left;float:left}.nav-menus-php .delete-action{float:right;line-height:28px}.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}.menu-settings-group-name,.menu-settings-input{float:none;margin-bottom:15px}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 .delete-action{font-size:14px;line-height:30px}.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-group{padding-right:0}.menu-settings-group-name{width:auto;margin-right:0}.menu-edit .checkbox-input{margin-top:0}.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 2e4ee7cbaee5133dbfeda1c75c6e98608e2128c3..b7a25a12d3a9d5734f42a15cd135d3c43e194cda 100644 (file)
@@ -27,6 +27,10 @@ ul.add-menu-item-tabs li {
        margin-bottom: 0;
 }
 
+.has-no-menu-item .button-controls {
+       display: none;
+}
+
 #nav-menus-frame {
        margin-left: 300px;
        margin-top: 23px;
@@ -105,24 +109,28 @@ ul.add-menu-item-tabs li {
        margin-top: 2em;
 }
 
-.menu-settings dl {
+.menu-settings-group {
        margin: 0 0 10px;
        overflow: hidden;
-       padding-left: 18%;
+       padding-left: 20%;
 }
 
-.menu-settings dd {
+.menu-settings-group:last-of-type {
+       margin-bottom: 0;
+}
+
+.menu-settings-input {
        float: left;
        margin: 0;
        width: 100%;
 }
 
-.menu-settings dt {
+.menu-settings-group-name {
        float: left;
        clear: both;
-       width: 21.951%;
+       width: 25%;
        padding: 3px 0 0;
-       margin-left: -21.951%;
+       margin-left: -25%; /* 20 container left padding x ( 100 container % width / 80 this % width ) */
 }
 
 .menu-settings label {
@@ -139,12 +147,15 @@ ul.add-menu-item-tabs li {
 }
 
 /* Menu Container */
+
+/* @todo: responsive view. */
 #menu-management-liquid {
        float: left;
        min-width: 100%;
        margin-top: 3px;
 }
 
+/* @todo: responsive view. */
 #menu-management {
        position: relative;
        margin-right: 20px;
@@ -284,19 +295,6 @@ ul.add-menu-item-tabs li {
        padding: 0;
 }
 
-.nav-menus-php .meta-sep,
-.nav-menus-php .submitdelete,
-.nav-menus-php .submitcancel {
-       display: block;
-       float: left;
-       margin: 6px 0;
-       line-height: 15px;
-}
-
-.meta-sep {
-       padding: 0 2px;
-}
-
 /* @todo: is this actually used? */
 #cancel-save {
        text-decoration: underline;
@@ -480,6 +478,7 @@ ul.add-menu-item-tabs li {
        font-weight: 600;
        line-height: 20px;
        display: block;
+       /* @todo: responsive view. */
        margin-right: 13em;
 }
 
@@ -651,9 +650,38 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
        box-shadow: 0 1px 1px rgba(0,0,0,0.04);
 }
 
-.menu-item-settings .field-move a {
+.menu-item-settings .field-move {
+       margin: 3px 0 5px;
+       line-height: 1.5;
+}
+
+.field-move-visual-label {
+       float: left;
+       margin-right: 4px;
+       font-style: italic;
+}
+
+.menu-item-settings .field-move .button-link {
        display: none;
        margin: 0 2px;
+       color: #0073aa;
+       font-style: italic;
+       text-decoration: underline;
+}
+
+.menu-item-settings .field-move .button-link:hover,
+.menu-item-settings .field-move .button-link:active {
+       color: #00a0d2;
+}
+
+.menu-item-settings .field-move .button-link: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);
 }
 
 .menu-item-edit-active .menu-item-settings {
@@ -665,13 +693,22 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
 }
 
 .add-menu-item-pagelinks {
-       margin: .5em auto;
+       margin: .5em -10px;
        text-align: center;
 }
 
+.add-menu-item-pagelinks .page-numbers {
+       display: inline-block;
+       min-width: 20px;
+}
+
+.add-menu-item-pagelinks .page-numbers.dots {
+       min-width: 0;
+}
+
 .link-to-original {
        display: block;
-       margin: 0 0 10px;
+       margin: 0 0 15px;
        padding: 3px 5px 5px;
        border: 1px solid #ddd;
        color: #72777c;
@@ -704,6 +741,7 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
 
 .menu-item-actions {
        padding-top: 15px;
+       padding-bottom: 7px;
 }
 
 #cancel-save {
@@ -713,7 +751,8 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
 /* Major/minor publishing actions (classes) */
 .nav-menus-php .major-publishing-actions {
        clear: both;
-       padding: 7px 0 6px;
+       padding: 10px 0;
+       line-height: 28px;
 }
 
 .nav-menus-php .major-publishing-actions .publishing-action {
@@ -725,21 +764,10 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
        display: none;
 }
 
+/* Same as the Publish Meta Box #delete-action */
 .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;
+       line-height: 28px;
 }
 
 .nav-menus-php .major-publishing-actions .form-invalid {
@@ -825,14 +853,9 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
                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;
+               line-height: 30px;
        }
 
        .menu-item-bar .menu-item-handle,
@@ -859,23 +882,26 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
                width: 25px;
        }
 
-       .menu-settings dl {
+       .menu-settings-group {
                padding-left: 0;
        }
 
-       .menu-settings dd {
+       .menu-settings-group-name {
                float: none;
-               width: 100%;
+               width: auto;
+               margin-left: 0;
                margin-bottom: 15px;
        }
 
-       .menu-settings dt {
+       .menu-settings-input {
                float: none;
-               width: auto;
-               margin-left: 0;
                margin-bottom: 15px;
        }
 
+       .menu-edit .checkbox-input {
+           margin-top: 0;
+       }
+
        .manage-menus select {
                margin: 0.5em 0;
        }
index da00a5323ecb640f85b6b49f416c6d08ab4fa79a..6880a543b7b8a55d9a1d53d116d655df05296443 100644 (file)
@@ -1 +1 @@
-.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
+.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}.has-no-menu-item .button-controls{display:none}#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-group{margin:0 0 10px;overflow:hidden;padding-left:20%}.menu-settings-group:last-of-type{margin-bottom:0}.menu-settings-input{float:left;margin:0;width:100%}.menu-settings-group-name{float:left;clear:both;width:25%;padding:3px 0 0;margin-left:-25%}.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}#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{margin:3px 0 5px;line-height:1.5}.field-move-visual-label{float:left;margin-right:4px;font-style:italic}.menu-item-settings .field-move .button-link{display:none;margin:0 2px;color:#0073aa;font-style:italic;text-decoration:underline}.menu-item-settings .field-move .button-link:active,.menu-item-settings .field-move .button-link:hover{color:#00a0d2}.menu-item-settings .field-move .button-link: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)}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em -10px;text-align:center}.add-menu-item-pagelinks .page-numbers{display:inline-block;min-width:20px}.add-menu-item-pagelinks .page-numbers.dots{min-width:0}.link-to-original{display:block;margin:0 0 15px;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;padding-bottom:7px}.nav-menus-php .major-publishing-actions{clear:both;padding:10px 0;line-height:28px}.nav-menus-php .major-publishing-actions .publishing-action{text-align:right;float:right}.nav-menus-php .delete-action{float:left;line-height:28px}.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}.menu-settings-group-name,.menu-settings-input{float:none;margin-bottom:15px}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 .delete-action{font-size:14px;line-height:30px}.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-group{padding-left:0}.menu-settings-group-name{width:auto;margin-left:0}.menu-edit .checkbox-input{margin-top:0}.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 2c471494dea7b73a2670d9b73a3bd00f4d0836cc..eba293902ae07d39bba04428fbe704457df26e43 100644 (file)
@@ -770,38 +770,6 @@ dd {
        margin: 10px 16px 6px 0;
 }
 
-
-/* Tag hint TODO needed? */
-/* Tag suggestions */
-.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: #e5e5e5;
-       background-color: #00a0d2;
-       color: #fff;
-       cursor: pointer;
-}
-
-.ac_match {
-       text-decoration: underline;
-}
-
 /* Tags */
 .tagchecklist {
        padding: 16px 28px 5px;
@@ -817,10 +785,9 @@ dd {
        clear: both;
 }
 
-.tagchecklist span {
-       display: block;
-       margin-left: 25px;
+.tagchecklist > span {
        float: right;
+       margin-left: 25px;
        font-size: 13px;
        line-height: 1.8;
        white-space: nowrap;
@@ -828,7 +795,7 @@ dd {
 }
 
 @media (max-width: 600px) {
-       .tagchecklist span {
+       .tagchecklist span {
                margin-bottom: 15px;
                font-size: 16px;
                line-height: 1.3;
@@ -836,36 +803,51 @@ dd {
 }
 
 .tagchecklist .ntdelbutton {
-       margin: 1px -17px 0 0;
+       position: absolute;
+       width: 24px;
+       height: 24px;
+       border: none;
+       margin: 0 -19px 0 0;
+       padding: 0;
+       background: none;
        cursor: pointer;
-       width: 20px;
-       height: 20px;
-       display: block;
-       float: right;
-       text-indent: 0;
-       overflow: hidden;
+       text-indent: 0;;
        position: absolute;
-       outline: 0;
 }
 
-.tagchecklist .ntdelbutton:before {
+.tagchecklist .ntdelbutton .remove-tag-icon:before {
        content: "\f153";
        display: block;
-       margin: 2px 0;
+       margin-right: 2px;
        height: 20px;
        width: 20px;
-       background: 100% 0;
-       color: #9ea7af;
-       font: 400 16px/1 dashicons;
+       -webkit-border-radius: 50%;
+       border-radius: 50%;
+       background: transparent;
+       color: #0073aa;
+       /* line-height tweak to vertically center the icon cross browsers */
+       font: 400 16px/1.28 dashicons;
        text-align: center;
-       speak: none;
        -webkit-font-smoothing: antialiased;
 }
 
-.tagchecklist .ntdelbutton:focus:before {
-       color: #00a0d2;
+.tagchecklist .ntdelbutton:focus {
+       outline: 0;
 }
 
+.tagchecklist .ntdelbutton:hover .remove-tag-icon:before,
+.tagchecklist .ntdelbutton:focus .remove-tag-icon:before {
+       color: #c00;
+}
+
+.tagchecklist .ntdelbutton:focus .remove-tag-icon: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);
+}
 
 /* THE TAG CLOUD. */
 .tagsdiv + p {
@@ -2194,6 +2176,7 @@ html {
        -webkit-box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
        box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
        background-color: #fff;
+       font-size: 14px;
 }
 
 .ui-autocomplete li {
@@ -2201,9 +2184,16 @@ html {
        padding: 4px 10px;
        white-space: nowrap;
        text-align: right;
+       cursor: pointer;
 }
 
-.ui-autocomplete li.ui-state-focus {
+/* Colors for the wplink toolbar autocomplete. */
+.ui-autocomplete .ui-state-focus {
        background-color: #ddd;
-       cursor: pointer;
+}
+
+/* Colors for the tags autocomplete. */
+.wp-tags-autocomplete .ui-state-focus {
+       background-color: #0073aa;
+       color: #fff;
 }
index 07be2b99996a79502526ebf1acc89ee2c57cd22c..c7563995417ac9e5a39dfc8db9e45505f165215c 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:-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
+body,fieldset{margin:0}.screen-reader-text,fieldset,legend,td,th{padding:0}.scan-submit,.split-button-primary,.split-button-toggle{text-decoration:none;-webkit-appearance:none;cursor:pointer}.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;white-space:nowrap}.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;white-space:nowrap;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}.tagchecklist{padding:16px 28px 5px}.tagchecklist:after,.tagchecklist:before{content:"";display:table}.tagchecklist:after{clear:both}.tagchecklist>span{float:right;margin-left:25px;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{width:24px;height:24px;border:none;margin:0 -19px 0 0;padding:0;background:0 0;cursor:pointer;text-indent:0;position:absolute}.tagchecklist .ntdelbutton .remove-tag-icon:before{content:"\f153";display:block;margin-right:2px;height:20px;width:20px;-webkit-border-radius:50%;border-radius:50%;background:0 0;color:#0073aa;font:400 16px/1.28 dashicons;text-align:center;-webkit-font-smoothing:antialiased}.tagchecklist .ntdelbutton:focus{outline:0}.tagchecklist .ntdelbutton:focus .remove-tag-icon:before,.tagchecklist .ntdelbutton:hover .remove-tag-icon:before{color:#c00}.tagchecklist .ntdelbutton:focus .remove-tag-icon: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)}.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;font-size:14px}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:right;cursor:pointer}.ui-autocomplete .ui-state-focus{background-color:#ddd}.wp-tags-autocomplete .ui-state-focus{background-color:#0073aa;color:#fff}
\ No newline at end of file
index 1ec3ba06bf431f48559330b934fff6ffcfc48448..36b988814d614d68270e621bd79d8e740e46b5fa 100644 (file)
@@ -770,38 +770,6 @@ dd {
        margin: 10px 0 6px 16px;
 }
 
-
-/* Tag hint TODO needed? */
-/* Tag suggestions */
-.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: #e5e5e5;
-       background-color: #00a0d2;
-       color: #fff;
-       cursor: pointer;
-}
-
-.ac_match {
-       text-decoration: underline;
-}
-
 /* Tags */
 .tagchecklist {
        padding: 16px 28px 5px;
@@ -817,10 +785,9 @@ dd {
        clear: both;
 }
 
-.tagchecklist span {
-       display: block;
-       margin-right: 25px;
+.tagchecklist > span {
        float: left;
+       margin-right: 25px;
        font-size: 13px;
        line-height: 1.8;
        white-space: nowrap;
@@ -828,7 +795,7 @@ dd {
 }
 
 @media (max-width: 600px) {
-       .tagchecklist span {
+       .tagchecklist span {
                margin-bottom: 15px;
                font-size: 16px;
                line-height: 1.3;
@@ -836,36 +803,51 @@ dd {
 }
 
 .tagchecklist .ntdelbutton {
-       margin: 1px 0 0 -17px;
+       position: absolute;
+       width: 24px;
+       height: 24px;
+       border: none;
+       margin: 0 0 0 -19px;
+       padding: 0;
+       background: none;
        cursor: pointer;
-       width: 20px;
-       height: 20px;
-       display: block;
-       float: left;
-       text-indent: 0;
-       overflow: hidden;
+       text-indent: 0;;
        position: absolute;
-       outline: 0;
 }
 
-.tagchecklist .ntdelbutton:before {
+.tagchecklist .ntdelbutton .remove-tag-icon:before {
        content: "\f153";
        display: block;
-       margin: 2px 0;
+       margin-left: 2px;
        height: 20px;
        width: 20px;
-       background: 0 0;
-       color: #9ea7af;
-       font: 400 16px/1 dashicons;
+       -webkit-border-radius: 50%;
+       border-radius: 50%;
+       background: transparent;
+       color: #0073aa;
+       /* line-height tweak to vertically center the icon cross browsers */
+       font: 400 16px/1.28 dashicons;
        text-align: center;
-       speak: none;
        -webkit-font-smoothing: antialiased;
 }
 
-.tagchecklist .ntdelbutton:focus:before {
-       color: #00a0d2;
+.tagchecklist .ntdelbutton:focus {
+       outline: 0;
 }
 
+.tagchecklist .ntdelbutton:hover .remove-tag-icon:before,
+.tagchecklist .ntdelbutton:focus .remove-tag-icon:before {
+       color: #c00;
+}
+
+.tagchecklist .ntdelbutton:focus .remove-tag-icon: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);
+}
 
 /* THE TAG CLOUD. */
 .tagsdiv + p {
@@ -2194,6 +2176,7 @@ html {
        -webkit-box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
        box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
        background-color: #fff;
+       font-size: 14px;
 }
 
 .ui-autocomplete li {
@@ -2201,9 +2184,16 @@ html {
        padding: 4px 10px;
        white-space: nowrap;
        text-align: left;
+       cursor: pointer;
 }
 
-.ui-autocomplete li.ui-state-focus {
+/* Colors for the wplink toolbar autocomplete. */
+.ui-autocomplete .ui-state-focus {
        background-color: #ddd;
-       cursor: pointer;
+}
+
+/* Colors for the tags autocomplete. */
+.wp-tags-autocomplete .ui-state-focus {
+       background-color: #0073aa;
+       color: #fff;
 }
index 2e3377a8b6af99dfc3fd074c4bcdd96defe240bc..a6925ea3a88ef7553e0ccbc726cf5af1776dadcf 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:-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
+body,fieldset{margin:0}.screen-reader-text,fieldset,legend,td,th{padding:0}.scan-submit,.split-button-primary,.split-button-toggle{text-decoration:none;-webkit-appearance:none;cursor:pointer}.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;white-space:nowrap}.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;white-space:nowrap;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}.tagchecklist{padding:16px 28px 5px}.tagchecklist:after,.tagchecklist:before{content:"";display:table}.tagchecklist:after{clear:both}.tagchecklist>span{float:left;margin-right:25px;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{width:24px;height:24px;border:none;margin:0 0 0 -19px;padding:0;background:0 0;cursor:pointer;text-indent:0;position:absolute}.tagchecklist .ntdelbutton .remove-tag-icon:before{content:"\f153";display:block;margin-left:2px;height:20px;width:20px;-webkit-border-radius:50%;border-radius:50%;background:0 0;color:#0073aa;font:400 16px/1.28 dashicons;text-align:center;-webkit-font-smoothing:antialiased}.tagchecklist .ntdelbutton:focus{outline:0}.tagchecklist .ntdelbutton:focus .remove-tag-icon:before,.tagchecklist .ntdelbutton:hover .remove-tag-icon:before{color:#c00}.tagchecklist .ntdelbutton:focus .remove-tag-icon: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)}.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;font-size:14px}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:left;cursor:pointer}.ui-autocomplete .ui-state-focus{background-color:#ddd}.wp-tags-autocomplete .ui-state-focus{background-color:#0073aa;color:#fff}
\ No newline at end of file
index b6202982820e385059de562425a641c498061230..0e5f8dcbe8ebeddf5bd533f305a1217608e862f5 100644 (file)
        margin-left: 3px;
 }
 
-.theme-browser .theme .theme-actions .button-secondary {
+.theme-browser .theme .theme-actions .button {
        float: none;
        margin-right: 3px;
 }
@@ -1017,7 +1017,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap {
 }
 
 .theme-install-php .wp-filter {
-       padding: 0 20px;
+       padding-right: 20px;
 }
 
 .theme-install-php a.upload,
@@ -1176,12 +1176,143 @@ div#custom-background-image img {
        max-height: 300px;
 }
 
+.background-position-control input[type="radio"]:checked ~ .button {
+       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 );
+       z-index: 1;
+}
+
+.background-position-control input[type="radio"]:focus ~ .button {
+       border-color: #5b9dd9;
+       -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, .5 ), 0 0 3px rgba( 0, 115, 170, .8 );
+       box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, .5 ), 0 0 3px rgba( 0, 115, 170, .8 );
+       color: #23282d;
+}
+
+.background-position-control .background-position-center-icon,
+.background-position-control .background-position-center-icon:before {
+       display: inline-block;
+       line-height: 1;
+       text-align: center;
+       -webkit-transition: background-color .1s ease-in 0;
+       transition: background-color .1s ease-in 0;
+}
+
+.background-position-control .background-position-center-icon {
+       height: 20px;
+       margin-top: 13px;
+       vertical-align: top;
+       width: 20px;
+}
+
+.background-position-control .background-position-center-icon:before {
+       background-color: #555;
+       -webkit-border-radius: 50%;
+       border-radius: 50%;
+       content: "";
+       height: 12px;
+       width: 12px;
+}
+
+.background-position-control .button:hover .background-position-center-icon:before,
+.background-position-control input[type="radio"]:focus ~ .button .background-position-center-icon:before {
+       background-color: #23282d;
+}
+
+.background-position-control .button-group {
+       display: block;
+}
+
+.background-position-control .button-group .button {
+       -webkit-border-radius: 0;
+       border-radius: 0;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       /* Following properties are overridden by buttons responsive styles (see: wp-includes/css/buttons.css). */
+       height: 40px !important;
+       line-height: 37px !important;
+       margin: 0 0 0 -1px !important;
+       padding: 0 10px 1px !important;
+       position: relative;
+}
+
+.background-position-control .button-group .button:active,
+.background-position-control .button-group .button:hover,
+.background-position-control .button-group .button:focus {
+       z-index: 1;
+}
+
+.background-position-control .button-group:last-child .button {
+       -webkit-box-shadow: 0 1px 0 #ccc;
+       box-shadow: 0 1px 0 #ccc;
+}
+
+.background-position-control .button-group > label {
+       margin: 0 !important;
+}
+
+.background-position-control .button-group:first-child > label:first-child .button {
+       -webkit-border-radius: 0 3px 0 0;
+       border-radius: 0 3px 0 0;
+}
+
+.background-position-control .button-group:first-child > label:first-child .dashicons {
+       -webkit-transform: rotate( -45deg );
+       -ms-transform: rotate( -45deg );
+       transform: rotate( -45deg );
+}
+
+.background-position-control .button-group:first-child > label:last-child .button {
+       -webkit-border-radius: 3px 0 0 0;
+       border-radius: 3px 0 0 0;
+}
+
+.background-position-control .button-group:first-child > label:last-child .dashicons {
+       -webkit-transform: rotate( 45deg );
+       -ms-transform: rotate( 45deg );
+       transform: rotate( 45deg );
+}
+
+.background-position-control .button-group:last-child > label:first-child .button {
+       -webkit-border-radius: 0 0 3px 0;
+       border-radius: 0 0 3px 0;
+}
+
+.background-position-control .button-group:last-child > label:first-child .dashicons {
+       -webkit-transform: rotate( 45deg );
+       -ms-transform: rotate( 45deg );
+       transform: rotate( 45deg );
+}
+
+.background-position-control .button-group:last-child > label:last-child .button {
+       -webkit-border-radius: 0 0 0 3px;
+       border-radius: 0 0 0 3px;
+}
+
+.background-position-control .button-group:last-child > label:last-child .dashicons {
+       -webkit-transform: rotate( -45deg );
+       -ms-transform: rotate( -45deg );
+       transform: rotate( -45deg );
+}
+
+.background-position-control .button-group .dashicons {
+       margin-top: 9px;
+}
+
+.background-position-control .button-group + .button-group {
+       margin-top: -1px;
+}
+
 /*------------------------------------------------------------------------------
   23.0 - Full Overlay w/ Sidebar
 ------------------------------------------------------------------------------*/
 
 body.full-overlay-active {
        overflow: hidden;
+       /* Hide all the content, the Customizer overlay is then made visible to be the only available content. */
+       visibility: hidden;
 }
 
 .wp-full-overlay {
@@ -1390,6 +1521,7 @@ body.full-overlay-active {
        box-shadow: none !important;
        -webkit-border-radius: 0 !important;
        border-radius: 0 !important;
+       z-index: -1; /* Below device buttons */
 }
 
 .wp-core-ui .wp-full-overlay .collapse-sidebar:hover,
@@ -1485,7 +1617,7 @@ body.full-overlay-active {
        position: fixed;
        bottom: 0;
        right: 0;
-       width: 300px;
+       width: 299px;
        height: 45px;
        border-top: 1px solid #ddd;
        background: #eee;
@@ -1493,6 +1625,9 @@ body.full-overlay-active {
 
 .wp-full-overlay-footer .devices {
        float: left;
+       background: #eee;
+       -webkit-box-shadow: 20px 0 10px -5px #eee;
+       box-shadow: 20px 0 10px -5px #eee;
 }
 
 .wp-full-overlay-footer .devices button {
@@ -1506,8 +1641,12 @@ body.full-overlay-active {
        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;
+       -webkit-transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
+       transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
 }
 
 .wp-full-overlay-footer .devices button:focus {
@@ -1535,15 +1674,18 @@ body.full-overlay-active {
        background-color: #fff;
 }
 
-.wp-full-overlay-footer .devices button:focus {
-       background-color: #fff;
+.wp-full-overlay-footer .devices button:focus,
+.wp-full-overlay-footer .devices button.active:hover {
        border-bottom-color: #0073aa;
 }
 
-.wp-full-overlay-footer .devices button.active:before,
+.wp-full-overlay-footer .devices button.active:before {
+       color: #191e23;
+}
+
 .wp-full-overlay-footer .devices button:hover:before,
 .wp-full-overlay-footer .devices button:focus:before {
-       color: #191e23;
+       color: #0073aa;
 }
 
 .wp-full-overlay-footer .devices .preview-desktop:before {
@@ -1613,8 +1755,10 @@ body.full-overlay-active {
        height: 100%;
 }
 
-.customize-active #customize-container {
-       display: block;
+/* Make the Customizer and Theme installer overlays the only available content. */
+#customize-container,
+.theme-install-overlay {
+       visibility: visible;
 }
 
 .customize-loading #customize-container iframe {
index cdd6a8d4b653f7ef1ed64865c6ed8d2bafb21d85..ad2797e46aa3b1339e5d79a3aabcd57237f58744 100644 (file)
@@ -1 +1 @@
-.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
+.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{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{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-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-right: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}.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}.background-position-control input[type=radio]:checked~.button{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);z-index:1}.background-position-control input[type=radio]:focus~.button{border-color:#5b9dd9;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 3px rgba(0,115,170,.8);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 3px rgba(0,115,170,.8);color:#23282d}.background-position-control .background-position-center-icon,.background-position-control .background-position-center-icon:before{display:inline-block;line-height:1;text-align:center;-webkit-transition:background-color .1s ease-in 0;transition:background-color .1s ease-in 0}.background-position-control .background-position-center-icon{height:20px;margin-top:13px;vertical-align:top;width:20px}.background-position-control .background-position-center-icon:before{background-color:#555;-webkit-border-radius:50%;border-radius:50%;content:"";height:12px;width:12px}.background-position-control .button:hover .background-position-center-icon:before,.background-position-control input[type=radio]:focus~.button .background-position-center-icon:before{background-color:#23282d}.background-position-control .button-group{display:block}.background-position-control .button-group .button{-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;height:40px!important;line-height:37px!important;margin:0 0 0 -1px!important;padding:0 10px 1px!important;position:relative}.wp-full-overlay,.wp-full-overlay-sidebar{position:fixed;top:0;height:100%;bottom:0;right:0}.background-position-control .button-group .button:active,.background-position-control .button-group .button:focus,.background-position-control .button-group .button:hover{z-index:1}.background-position-control .button-group:last-child .button{-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc}.background-position-control .button-group>label{margin:0!important}.background-position-control .button-group:first-child>label:first-child .button{-webkit-border-radius:0 3px 0 0;border-radius:0 3px 0 0}.background-position-control .button-group:first-child>label:first-child .dashicons{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.background-position-control .button-group:first-child>label:last-child .button{-webkit-border-radius:3px 0 0;border-radius:3px 0 0}.background-position-control .button-group:first-child>label:last-child .dashicons{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.background-position-control .button-group:last-child>label:first-child .button{-webkit-border-radius:0 0 3px;border-radius:0 0 3px}.background-position-control .button-group:last-child>label:first-child .dashicons{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.background-position-control .button-group:last-child>label:last-child .button{-webkit-border-radius:0 0 0 3px;border-radius:0 0 0 3px}.background-position-control .button-group:last-child>label:last-child .dashicons{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.background-position-control .button-group .dashicons{margin-top:9px}.background-position-control .button-group+.button-group{margin-top:-1px}body.full-overlay-active{overflow:hidden;visibility:hidden}.wp-full-overlay{z-index:500000;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;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;right:0;left:0;top:0;bottom:0;height:100%}.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;z-index:-1}.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:299px;height:45px;border-top:1px solid #ddd;background:#eee}.wp-full-overlay-footer .devices{float:left;background:#eee;-webkit-box-shadow:20px 0 10px -5px #eee;box-shadow:20px 0 10px -5px #eee}.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:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out}.wp-full-overlay-footer .devices button:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}.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}.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,.theme-install-overlay{display:none}.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.active:hover,.wp-full-overlay-footer .devices button:focus{border-bottom-color:#0073aa}.wp-full-overlay-footer .devices button.active:before{color:#191e23}.wp-full-overlay-footer .devices button:focus:before,.wp-full-overlay-footer .devices button:hover:before{color:#0073aa}.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-container{display:none;background:#fff;z-index:500000;position:fixed;overflow:visible;top:0;bottom:0;right:0;left:0;height:100%}#customize-container,.theme-install-overlay{visibility:visible}.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.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 ab67ad0646fcc1a89b9e76b35f7aec9eb805385f..db01ce10e17f561fbc1be6b82129253347750463 100644 (file)
        margin-right: 3px;
 }
 
-.theme-browser .theme .theme-actions .button-secondary {
+.theme-browser .theme .theme-actions .button {
        float: none;
        margin-left: 3px;
 }
@@ -1017,7 +1017,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap {
 }
 
 .theme-install-php .wp-filter {
-       padding: 0 20px;
+       padding-left: 20px;
 }
 
 .theme-install-php a.upload,
@@ -1176,12 +1176,143 @@ div#custom-background-image img {
        max-height: 300px;
 }
 
+.background-position-control input[type="radio"]:checked ~ .button {
+       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 );
+       z-index: 1;
+}
+
+.background-position-control input[type="radio"]:focus ~ .button {
+       border-color: #5b9dd9;
+       -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, .5 ), 0 0 3px rgba( 0, 115, 170, .8 );
+       box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, .5 ), 0 0 3px rgba( 0, 115, 170, .8 );
+       color: #23282d;
+}
+
+.background-position-control .background-position-center-icon,
+.background-position-control .background-position-center-icon:before {
+       display: inline-block;
+       line-height: 1;
+       text-align: center;
+       -webkit-transition: background-color .1s ease-in 0;
+       transition: background-color .1s ease-in 0;
+}
+
+.background-position-control .background-position-center-icon {
+       height: 20px;
+       margin-top: 13px;
+       vertical-align: top;
+       width: 20px;
+}
+
+.background-position-control .background-position-center-icon:before {
+       background-color: #555;
+       -webkit-border-radius: 50%;
+       border-radius: 50%;
+       content: "";
+       height: 12px;
+       width: 12px;
+}
+
+.background-position-control .button:hover .background-position-center-icon:before,
+.background-position-control input[type="radio"]:focus ~ .button .background-position-center-icon:before {
+       background-color: #23282d;
+}
+
+.background-position-control .button-group {
+       display: block;
+}
+
+.background-position-control .button-group .button {
+       -webkit-border-radius: 0;
+       border-radius: 0;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       /* Following properties are overridden by buttons responsive styles (see: wp-includes/css/buttons.css). */
+       height: 40px !important;
+       line-height: 37px !important;
+       margin: 0 -1px 0 0 !important;
+       padding: 0 10px 1px !important;
+       position: relative;
+}
+
+.background-position-control .button-group .button:active,
+.background-position-control .button-group .button:hover,
+.background-position-control .button-group .button:focus {
+       z-index: 1;
+}
+
+.background-position-control .button-group:last-child .button {
+       -webkit-box-shadow: 0 1px 0 #ccc;
+       box-shadow: 0 1px 0 #ccc;
+}
+
+.background-position-control .button-group > label {
+       margin: 0 !important;
+}
+
+.background-position-control .button-group:first-child > label:first-child .button {
+       -webkit-border-radius: 3px 0 0;
+       border-radius: 3px 0 0;
+}
+
+.background-position-control .button-group:first-child > label:first-child .dashicons {
+       -webkit-transform: rotate( 45deg );
+       -ms-transform: rotate( 45deg );
+       transform: rotate( 45deg );
+}
+
+.background-position-control .button-group:first-child > label:last-child .button {
+       -webkit-border-radius: 0 3px 0 0;
+       border-radius: 0 3px 0 0;
+}
+
+.background-position-control .button-group:first-child > label:last-child .dashicons {
+       -webkit-transform: rotate( -45deg );
+       -ms-transform: rotate( -45deg );
+       transform: rotate( -45deg );
+}
+
+.background-position-control .button-group:last-child > label:first-child .button {
+       -webkit-border-radius: 0 0 0 3px;
+       border-radius: 0 0 0 3px;
+}
+
+.background-position-control .button-group:last-child > label:first-child .dashicons {
+       -webkit-transform: rotate( -45deg );
+       -ms-transform: rotate( -45deg );
+       transform: rotate( -45deg );
+}
+
+.background-position-control .button-group:last-child > label:last-child .button {
+       -webkit-border-radius: 0 0 3px 0;
+       border-radius: 0 0 3px 0;
+}
+
+.background-position-control .button-group:last-child > label:last-child .dashicons {
+       -webkit-transform: rotate( 45deg );
+       -ms-transform: rotate( 45deg );
+       transform: rotate( 45deg );
+}
+
+.background-position-control .button-group .dashicons {
+       margin-top: 9px;
+}
+
+.background-position-control .button-group + .button-group {
+       margin-top: -1px;
+}
+
 /*------------------------------------------------------------------------------
   23.0 - Full Overlay w/ Sidebar
 ------------------------------------------------------------------------------*/
 
 body.full-overlay-active {
        overflow: hidden;
+       /* Hide all the content, the Customizer overlay is then made visible to be the only available content. */
+       visibility: hidden;
 }
 
 .wp-full-overlay {
@@ -1390,6 +1521,7 @@ body.full-overlay-active {
        box-shadow: none !important;
        -webkit-border-radius: 0 !important;
        border-radius: 0 !important;
+       z-index: -1; /* Below device buttons */
 }
 
 .wp-core-ui .wp-full-overlay .collapse-sidebar:hover,
@@ -1485,7 +1617,7 @@ body.full-overlay-active {
        position: fixed;
        bottom: 0;
        left: 0;
-       width: 300px;
+       width: 299px;
        height: 45px;
        border-top: 1px solid #ddd;
        background: #eee;
@@ -1493,6 +1625,9 @@ body.full-overlay-active {
 
 .wp-full-overlay-footer .devices {
        float: right;
+       background: #eee;
+       -webkit-box-shadow: -20px 0 10px -5px #eee;
+       box-shadow: -20px 0 10px -5px #eee;
 }
 
 .wp-full-overlay-footer .devices button {
@@ -1506,8 +1641,12 @@ body.full-overlay-active {
        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;
+       -webkit-transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
+       transition: .15s color ease-in-out,
+                   .15s background-color ease-in-out,
+                   .15s border-color ease-in-out;
 }
 
 .wp-full-overlay-footer .devices button:focus {
@@ -1535,15 +1674,18 @@ body.full-overlay-active {
        background-color: #fff;
 }
 
-.wp-full-overlay-footer .devices button:focus {
-       background-color: #fff;
+.wp-full-overlay-footer .devices button:focus,
+.wp-full-overlay-footer .devices button.active:hover {
        border-bottom-color: #0073aa;
 }
 
-.wp-full-overlay-footer .devices button.active:before,
+.wp-full-overlay-footer .devices button.active:before {
+       color: #191e23;
+}
+
 .wp-full-overlay-footer .devices button:hover:before,
 .wp-full-overlay-footer .devices button:focus:before {
-       color: #191e23;
+       color: #0073aa;
 }
 
 .wp-full-overlay-footer .devices .preview-desktop:before {
@@ -1613,8 +1755,10 @@ body.full-overlay-active {
        height: 100%;
 }
 
-.customize-active #customize-container {
-       display: block;
+/* Make the Customizer and Theme installer overlays the only available content. */
+#customize-container,
+.theme-install-overlay {
+       visibility: visible;
 }
 
 .customize-loading #customize-container iframe {
index 0dc2017ae3f42d5c47b1535098c9bf879ecb24c1..e904bb55e77ca4902dd5d5848a5f81b707cecb58 100644 (file)
@@ -1 +1 @@
-.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
+.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{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{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-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-left: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}.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}.background-position-control input[type=radio]:checked~.button{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);z-index:1}.background-position-control input[type=radio]:focus~.button{border-color:#5b9dd9;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 3px rgba(0,115,170,.8);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5),0 0 3px rgba(0,115,170,.8);color:#23282d}.background-position-control .background-position-center-icon,.background-position-control .background-position-center-icon:before{display:inline-block;line-height:1;text-align:center;-webkit-transition:background-color .1s ease-in 0;transition:background-color .1s ease-in 0}.background-position-control .background-position-center-icon{height:20px;margin-top:13px;vertical-align:top;width:20px}.background-position-control .background-position-center-icon:before{background-color:#555;-webkit-border-radius:50%;border-radius:50%;content:"";height:12px;width:12px}.background-position-control .button:hover .background-position-center-icon:before,.background-position-control input[type=radio]:focus~.button .background-position-center-icon:before{background-color:#23282d}.background-position-control .button-group{display:block}.background-position-control .button-group .button{-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;height:40px!important;line-height:37px!important;margin:0 -1px 0 0!important;padding:0 10px 1px!important;position:relative}.wp-full-overlay,.wp-full-overlay-sidebar{position:fixed;top:0;height:100%;bottom:0;left:0}.background-position-control .button-group .button:active,.background-position-control .button-group .button:focus,.background-position-control .button-group .button:hover{z-index:1}.background-position-control .button-group:last-child .button{-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc}.background-position-control .button-group>label{margin:0!important}.background-position-control .button-group:first-child>label:first-child .button{-webkit-border-radius:3px 0 0;border-radius:3px 0 0}.background-position-control .button-group:first-child>label:first-child .dashicons{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.background-position-control .button-group:first-child>label:last-child .button{-webkit-border-radius:0 3px 0 0;border-radius:0 3px 0 0}.background-position-control .button-group:first-child>label:last-child .dashicons{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.background-position-control .button-group:last-child>label:first-child .button{-webkit-border-radius:0 0 0 3px;border-radius:0 0 0 3px}.background-position-control .button-group:last-child>label:first-child .dashicons{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.background-position-control .button-group:last-child>label:last-child .button{-webkit-border-radius:0 0 3px;border-radius:0 0 3px}.background-position-control .button-group:last-child>label:last-child .dashicons{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.background-position-control .button-group .dashicons{margin-top:9px}.background-position-control .button-group+.button-group{margin-top:-1px}body.full-overlay-active{overflow:hidden;visibility:hidden}.wp-full-overlay{z-index:500000;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;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;left:0;right:0;top:0;bottom:0;height:100%}.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;z-index:-1}.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:299px;height:45px;border-top:1px solid #ddd;background:#eee}.wp-full-overlay-footer .devices{float:right;background:#eee;-webkit-box-shadow:-20px 0 10px -5px #eee;box-shadow:-20px 0 10px -5px #eee}.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:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out;transition:.15s color ease-in-out,.15s background-color ease-in-out,.15s border-color ease-in-out}.wp-full-overlay-footer .devices button:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}.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}.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,.theme-install-overlay{display:none}.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.active:hover,.wp-full-overlay-footer .devices button:focus{border-bottom-color:#0073aa}.wp-full-overlay-footer .devices button.active:before{color:#191e23}.wp-full-overlay-footer .devices button:focus:before,.wp-full-overlay-footer .devices button:hover:before{color:#0073aa}.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-container{display:none;background:#fff;z-index:500000;position:fixed;overflow:visible;top:0;bottom:0;left:0;right:0;height:100%}#customize-container,.theme-install-overlay{visibility:visible}.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.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 a03986f5949f11cb3a1763953b9c0993bc9838d1..bea4084c3058d7ce79f6e0bcce6a98ff4383d774 100644 (file)
@@ -97,8 +97,8 @@ class Custom_Background {
 
                get_current_screen()->set_help_sidebar(
                        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-                       '<p>' . __( '<a href="https://codex.wordpress.org/Appearance_Background_Screen" target="_blank">Documentation on Custom Background</a>' ) . '</p>' .
-                       '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
+                       '<p>' . __( '<a href="https://codex.wordpress.org/Appearance_Background_Screen">Documentation on Custom Background</a>' ) . '</p>' .
+                       '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
                );
 
                wp_enqueue_media();
@@ -133,31 +133,73 @@ class Custom_Background {
                        return;
                }
 
-               if ( isset($_POST['background-repeat']) ) {
-                       check_admin_referer('custom-background');
-                       if ( in_array($_POST['background-repeat'], array('repeat', 'no-repeat', 'repeat-x', 'repeat-y')) )
-                               $repeat = $_POST['background-repeat'];
-                       else
-                               $repeat = 'repeat';
-                       set_theme_mod('background_repeat', $repeat);
+               if ( isset( $_POST['background-preset'] ) ) {
+                       check_admin_referer( 'custom-background' );
+
+                       if ( in_array( $_POST['background-preset'], array( 'default', 'fill', 'fit', 'repeat', 'custom' ), true ) ) {
+                               $preset = $_POST['background-preset'];
+                       } else {
+                               $preset = 'default';
+                       }
+
+                       set_theme_mod( 'background_preset', $preset );
                }
 
-               if ( isset($_POST['background-position-x']) ) {
-                       check_admin_referer('custom-background');
-                       if ( in_array($_POST['background-position-x'], array('center', 'right', 'left')) )
-                               $position = $_POST['background-position-x'];
-                       else
-                               $position = 'left';
-                       set_theme_mod('background_position_x', $position);
+               if ( isset( $_POST['background-position'] ) ) {
+                       check_admin_referer( 'custom-background' );
+
+                       $position = explode( ' ', $_POST['background-position'] );
+
+                       if ( in_array( $position[0], array( 'left', 'center', 'right' ), true ) ) {
+                               $position_x = $position[0];
+                       } else {
+                               $position_x = 'left';
+                       }
+
+                       if ( in_array( $position[1], array( 'top', 'center', 'bottom' ), true ) ) {
+                               $position_y = $position[1];
+                       } else {
+                               $position_y = 'top';
+                       }
+
+                       set_theme_mod( 'background_position_x', $position_x );
+                       set_theme_mod( 'background_position_y', $position_y );
                }
 
-               if ( isset($_POST['background-attachment']) ) {
-                       check_admin_referer('custom-background');
-                       if ( in_array($_POST['background-attachment'], array('fixed', 'scroll')) )
-                               $attachment = $_POST['background-attachment'];
-                       else
-                               $attachment = 'fixed';
-                       set_theme_mod('background_attachment', $attachment);
+               if ( isset( $_POST['background-size'] ) ) {
+                       check_admin_referer( 'custom-background' );
+
+                       if ( in_array( $_POST['background-size'], array( 'auto', 'contain', 'cover' ), true ) ) {
+                               $size = $_POST['background-size'];
+                       } else {
+                               $size = 'auto';
+                       }
+
+                       set_theme_mod( 'background_size', $size );
+               }
+
+               if ( isset( $_POST['background-repeat'] ) ) {
+                       check_admin_referer( 'custom-background' );
+
+                       $repeat = $_POST['background-repeat'];
+
+                       if ( 'no-repeat' !== $repeat ) {
+                               $repeat = 'repeat';
+                       }
+
+                       set_theme_mod( 'background_repeat', $repeat );
+               }
+
+               if ( isset( $_POST['background-attachment'] ) ) {
+                       check_admin_referer( 'custom-background' );
+
+                       $attachment = $_POST['background-attachment'];
+
+                       if ( 'fixed' !== $attachment ) {
+                               $attachment = 'scroll';
+                       }
+
+                       set_theme_mod( 'background_attachment', $attachment );
                }
 
                if ( isset($_POST['background-color']) ) {
@@ -219,11 +261,18 @@ class Custom_Background {
                $background_image_thumb = get_background_image();
                if ( $background_image_thumb ) {
                        $background_image_thumb = esc_url( set_url_scheme( get_theme_mod( 'background_image_thumb', str_replace( '%', '%%', $background_image_thumb ) ) ) );
+                       $background_position_x = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );
+                       $background_position_y = get_theme_mod( 'background_position_y', get_theme_support( 'custom-background', 'default-position-y' ) );
+                       $background_size = get_theme_mod( 'background_size', get_theme_support( 'custom-background', 'default-size' ) );
+                       $background_repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );
+                       $background_attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );
 
                        // Background-image URL must be single quote, see below.
-                       $background_styles .= ' background-image: url(\'' . $background_image_thumb . '\');'
-                               . ' background-repeat: ' . get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) . ';'
-                               . ' background-position: top ' . get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );
+                       $background_styles .= " background-image: url('$background_image_thumb');"
+                               . " background-size: $background_size;"
+                               . " background-position: $background_position_x $background_position_y;"
+                               . " background-repeat: $background_repeat;"
+                               . " background-attachment: $background_attachment;";
                }
        ?>
        <div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // must be double quote, see above ?>
@@ -242,7 +291,7 @@ class Custom_Background {
 <td>
 <form method="post">
 <?php wp_nonce_field('custom-background-remove', '_wpnonce-custom-background-remove'); ?>
-<?php submit_button( __( 'Remove Background Image' ), 'button', 'remove-background', false ); ?><br/>
+<?php submit_button( __( 'Remove Background Image' ), '', 'remove-background', false ); ?><br/>
 <?php _e('This will remove the background image. You will not be able to restore any customizations.') ?>
 </form>
 </td>
@@ -256,7 +305,7 @@ class Custom_Background {
 <td>
 <form method="post">
 <?php wp_nonce_field('custom-background-reset', '_wpnonce-custom-background-reset'); ?>
-<?php submit_button( __( 'Restore Original Image' ), 'button', 'reset-background', false ); ?><br/>
+<?php submit_button( __( 'Restore Original Image' ), '', 'reset-background', false ); ?><br/>
 <?php _e('This will restore the original background image. You will not be able to restore any customizations.') ?>
 </form>
 </td>
@@ -272,7 +321,7 @@ class Custom_Background {
                <input type="file" id="upload" name="import" />
                <input type="hidden" name="action" value="save" />
                <?php wp_nonce_field( 'custom-background-upload', '_wpnonce-custom-background-upload' ); ?>
-               <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
+               <?php submit_button( __( 'Upload' ), '', 'submit', false ); ?>
        </p>
        <p>
                <label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
@@ -287,50 +336,81 @@ class Custom_Background {
 </tbody>
 </table>
 
-<h3><?php _e('Display Options') ?></h3>
+<h3><?php _e( 'Display Options' ); ?></h3>
 <form method="post">
 <table class="form-table">
 <tbody>
 <?php if ( get_background_image() ) : ?>
+<input name="background-preset" type="hidden" value="custom">
+
+<?php
+$background_position = sprintf(
+       '%s %s',
+       get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ),
+       get_theme_mod( 'background_position_y', get_theme_support( 'custom-background', 'default-position-y' ) )
+);
+
+$background_position_options = array(
+       array(
+               'left top'   => array( 'label' => __( 'Top Left' ), 'icon' => 'dashicons dashicons-arrow-left-alt' ),
+               'center top' => array( 'label' => __( 'Top' ), 'icon' => 'dashicons dashicons-arrow-up-alt' ),
+               'right top'  => array( 'label' => __( 'Top Right' ), 'icon' => 'dashicons dashicons-arrow-right-alt' ),
+       ),
+       array(
+               'left center'   => array( 'label' => __( 'Left' ), 'icon' => 'dashicons dashicons-arrow-left-alt' ),
+               'center center' => array( 'label' => __( 'Center' ), 'icon' => 'background-position-center-icon' ),
+               'right center'  => array( 'label' => __( 'Right' ), 'icon' => 'dashicons dashicons-arrow-right-alt' ),
+       ),
+       array(
+               'left bottom'   => array( 'label' => __( 'Bottom Left' ), 'icon' => 'dashicons dashicons-arrow-left-alt' ),
+               'center bottom' => array( 'label' => __( 'Bottom' ), 'icon' => 'dashicons dashicons-arrow-down-alt' ),
+               'right bottom'  => array( 'label' => __( 'Bottom Right' ), 'icon' => 'dashicons dashicons-arrow-right-alt' ),
+       ),
+);
+?>
+<tr>
+<th scope="row"><?php _e( 'Image Position' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Image Position' ); ?></span></legend>
+<div class="background-position-control">
+<?php foreach ( $background_position_options as $group ) : ?>
+       <div class="button-group">
+       <?php foreach ( $group as $value => $input ) : ?>
+               <label>
+                       <input class="screen-reader-text" name="background-position" type="radio" value="<?php echo esc_attr( $value ); ?>"<?php checked( $value, $background_position ); ?>>
+                       <span class="button display-options position"><span class="<?php echo esc_attr( $input['icon'] ); ?>" aria-hidden="true"></span></span>
+                       <span class="screen-reader-text"><?php echo $input['label']; ?></span>
+               </label>
+       <?php endforeach; ?>
+       </div>
+<?php endforeach; ?>
+</div>
+</fieldset></td>
+</tr>
+
 <tr>
-<th scope="row"><?php _e( 'Position' ); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Position' ); ?></span></legend>
-<label>
-<input name="background-position-x" type="radio" value="left"<?php checked( 'left', get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ) ); ?> />
-<?php _e('Left') ?>
-</label>
-<label>
-<input name="background-position-x" type="radio" value="center"<?php checked( 'center', get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ) ); ?> />
-<?php _e('Center') ?>
-</label>
-<label>
-<input name="background-position-x" type="radio" value="right"<?php checked( 'right', get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ) ); ?> />
-<?php _e('Right') ?>
-</label>
+<th scope="row"><label for="background-size"><?php _e( 'Image Size' ); ?></label></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Image Size' ); ?></span></legend>
+<select id="background-size" name="background-size">
+<option value="auto"<?php selected( 'auto', get_theme_mod( 'background_size', get_theme_support( 'custom-background', 'default-size' ) ) ); ?>><?php _ex( 'Original', 'Original Size' ); ?></option>
+<option value="contain"<?php selected( 'contain', get_theme_mod( 'background_size', get_theme_support( 'custom-background', 'default-size' ) ) ); ?>><?php _e( 'Fit to Screen' ); ?></option>
+<option value="cover"<?php selected( 'cover', get_theme_mod( 'background_size', get_theme_support( 'custom-background', 'default-size' ) ) ); ?>><?php _e( 'Fill Screen' ); ?></option>
+</select>
 </fieldset></td>
 </tr>
 
 <tr>
-<th scope="row"><?php _e( 'Repeat' ); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Repeat' ); ?></span></legend>
-<label><input type="radio" name="background-repeat" value="no-repeat"<?php checked( 'no-repeat', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) ); ?> /> <?php _e('No Repeat'); ?></label>
-       <label><input type="radio" name="background-repeat" value="repeat"<?php checked( 'repeat', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) ); ?> /> <?php _e('Tile'); ?></label>
-       <label><input type="radio" name="background-repeat" value="repeat-x"<?php checked( 'repeat-x', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) ); ?> /> <?php _e('Tile Horizontally'); ?></label>
-       <label><input type="radio" name="background-repeat" value="repeat-y"<?php checked( 'repeat-y', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) ); ?> /> <?php _e('Tile Vertically'); ?></label>
+<th scope="row"><?php _ex( 'Repeat', 'Background Repeat' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _ex( 'Repeat', 'Background Repeat' ); ?></span></legend>
+<input name="background-repeat" type="hidden" value="no-repeat">
+<label><input type="checkbox" name="background-repeat" value="repeat"<?php checked( 'repeat', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) ); ?>> <?php _e( 'Repeat Background Image' ); ?></label>
 </fieldset></td>
 </tr>
 
 <tr>
-<th scope="row"><?php _ex( 'Attachment', 'Background Attachment' ); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Attachment' ); ?></span></legend>
-<label>
-<input name="background-attachment" type="radio" value="scroll" <?php checked( 'scroll', get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) ) ); ?> />
-<?php _e( 'Scroll' ); ?>
-</label>
-<label>
-<input name="background-attachment" type="radio" value="fixed" <?php checked( 'fixed', get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) ) ); ?> />
-<?php _e( 'Fixed' ); ?>
-</label>
+<th scope="row"><?php _ex( 'Scroll', 'Background Scroll' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _ex( 'Scroll', 'Background Scroll' ); ?></span></legend>
+<input name="background-attachment" type="hidden" value="fixed">
+<label><input name="background-attachment" type="checkbox" value="scroll" <?php checked( 'scroll', get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) ) ); ?>> <?php _e( 'Scroll with Page' ); ?></label>
 </fieldset></td>
 </tr>
 <?php endif; // get_background_image() ?>
@@ -342,7 +422,7 @@ $default_color = '';
 if ( current_theme_supports( 'custom-background', 'default-color' ) )
        $default_color = ' data-default-color="#' . esc_attr( get_theme_support( 'custom-background', 'default-color' ) ) . '"';
 ?>
-<input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr( get_background_color() ); ?>"<?php echo $default_color ?> />
+<input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr( get_background_color() ); ?>"<?php echo $default_color ?>>
 </fieldset></td>
 </tr>
 </tbody>
index fc5adb670ede0b7267b34295b906f3d1ac4b66bf..5cc64ef7bfdc38d69c63b556864c9c512b023063 100644 (file)
@@ -124,8 +124,8 @@ class Custom_Image_Header {
 
                get_current_screen()->set_help_sidebar(
                        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-                       '<p>' . __( '<a href="https://codex.wordpress.org/Appearance_Header_Screen" target="_blank">Documentation on Custom Header</a>' ) . '</p>' .
-                       '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
+                       '<p>' . __( '<a href="https://codex.wordpress.org/Appearance_Header_Screen">Documentation on Custom Header</a>' ) . '</p>' .
+                       '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
                );
        }
 
@@ -576,7 +576,7 @@ class Custom_Image_Header {
                <input type="file" id="upload" name="import" />
                <input type="hidden" name="action" value="save" />
                <?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ); ?>
-               <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
+               <?php submit_button( __( 'Upload' ), '', 'submit', false ); ?>
        </p>
        <?php
                $modal_update_href = esc_url( add_query_arg( array(
@@ -634,18 +634,18 @@ class Custom_Image_Header {
 <th scope="row"><?php _e( 'Remove Image' ); ?></th>
 <td>
        <p><?php _e( 'This will remove the header image. You will not be able to restore any customizations.' ) ?></p>
-       <?php submit_button( __( 'Remove Header Image' ), 'button', 'removeheader', false ); ?>
+       <?php submit_button( __( 'Remove Header Image' ), '', 'removeheader', false ); ?>
 </td>
 </tr>
        <?php endif;
 
-       $default_image = get_theme_support( 'custom-header', 'default-image' );
+       $default_image = sprintf( get_theme_support( 'custom-header', 'default-image' ), get_template_directory_uri(), get_stylesheet_directory_uri() );
        if ( $default_image && get_header_image() != $default_image ) : ?>
 <tr>
 <th scope="row"><?php _e( 'Reset Image' ); ?></th>
 <td>
        <p><?php _e( 'This will restore the original header image. You will not be able to restore any customizations.' ) ?></p>
-       <?php submit_button( __( 'Restore Original Header Image' ), 'button', 'resetheader', false ); ?>
+       <?php submit_button( __( 'Restore Original Header Image' ), '', 'resetheader', false ); ?>
 </td>
 </tr>
        <?php endif; ?>
@@ -823,7 +823,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
        <?php submit_button( __( 'Crop and Publish' ), 'primary', 'submit', false ); ?>
        <?php
        if ( isset( $oitar ) && 1 == $oitar && ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) )
-               submit_button( __( 'Skip Cropping, Publish Image as Is' ), 'secondary', 'skip-cropping', false );
+               submit_button( __( 'Skip Cropping, Publish Image as Is' ), '', 'skip-cropping', false );
        ?>
        </p>
 </form>
index bd8e11819b895cad7bba61e5c8a2fc21f539e7ea..44654c003f7ce61fa37f092e275097aeb73adbf0 100644 (file)
@@ -20,6 +20,31 @@ if ( ! current_user_can( 'customize' ) ) {
        );
 }
 
+/**
+ * @global WP_Scripts           $wp_scripts
+ * @global WP_Customize_Manager $wp_customize
+ */
+global $wp_scripts, $wp_customize;
+
+if ( $wp_customize->changeset_post_id() ) {
+       if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $wp_customize->changeset_post_id() ) ) {
+               wp_die(
+                       '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
+                       '<p>' . __( 'Sorry, you are not allowed to edit this changeset.' ) . '</p>',
+                       403
+               );
+       }
+       if ( in_array( get_post_status( $wp_customize->changeset_post_id() ), array( 'publish', 'trash' ), true ) ) {
+               wp_die(
+                       '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
+                       '<p>' . __( 'This changeset has already been published and cannot be further modified.' ) . '</p>' .
+                       '<p><a href="' . esc_url( remove_query_arg( 'changeset_uuid' ) ) . '">' . __( 'Customize New Changes' ) . '</a></p>',
+                       403
+               );
+       }
+}
+
+
 wp_reset_vars( array( 'url', 'return', 'autofocus' ) );
 if ( ! empty( $url ) ) {
        $wp_customize->set_preview_url( wp_unslash( $url ) );
@@ -31,12 +56,6 @@ if ( ! empty( $autofocus ) && is_array( $autofocus ) ) {
        $wp_customize->set_autofocus( wp_unslash( $autofocus ) );
 }
 
-/**
- * @global WP_Scripts           $wp_scripts
- * @global WP_Customize_Manager $wp_customize
- */
-global $wp_scripts, $wp_customize;
-
 $registered = $wp_scripts->registered;
 $wp_scripts = new WP_Scripts;
 $wp_scripts->registered = $registered;
@@ -115,7 +134,11 @@ do_action( 'customize_controls_print_scripts' );
                <div id="customize-header-actions" class="wp-full-overlay-header">
                        <?php
                        $save_text = $wp_customize->is_theme_active() ? __( 'Save &amp; Publish' ) : __( 'Save &amp; Activate' );
-                       submit_button( $save_text, 'primary save', 'save', false );
+                       $save_attrs = array();
+                       if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->publish_posts ) ) {
+                               $save_attrs['style'] = 'display: none';
+                       }
+                       submit_button( $save_text, 'primary save', 'save', false, $save_attrs );
                        ?>
                        <span class="spinner"></span>
                        <button type="button" class="customize-controls-preview-toggle">
@@ -137,12 +160,12 @@ do_action( 'customize_controls_print_scripts' );
                                        <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.' );
+                                       _e( 'The Customizer allows you to preview changes to your site before publishing them. You can navigate to different pages on your site within the preview. Edit shortcuts are shown for some editable elements.' );
                                ?></div>
                        </div>
 
                        <div id="customize-theme-controls">
-                               <ul><?php // Panels and sections are managed here via JavaScript ?></ul>
+                               <ul class="customize-pane-parent"><?php // Panels and sections are managed here via JavaScript ?></ul>
                        </div>
                </div>
                </div>
@@ -168,9 +191,9 @@ do_action( 'customize_controls_print_scripts' );
                                <?php endforeach; ?>
                        </div>
                        <?php endif; ?>
-                       <button type="button" class="collapse-sidebar button-secondary" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
+                       <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php echo esc_attr( _x( 'Hide Controls', 'label for hide controls button without length constraints' ) ); ?>">
                                <span class="collapse-sidebar-arrow"></span>
-                               <span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span>
+                               <span class="collapse-sidebar-label"><?php _ex( 'Hide Controls', 'short (~12 characters) label for hide controls button' ); ?></span>
                        </button>
                </div>
        </form>
index f0ecec92e8a1909c2d4c6b53c99ec53fd7487318..a33f986b3008c5b7e7a70ddb791f936eb31f5793 100644 (file)
@@ -82,6 +82,22 @@ if ( $doaction ) {
                }
        }
 
+       if ( ! in_array( $doaction, array( 'approve', 'unapprove', 'spam', 'unspam', 'trash', 'delete' ), true ) ) {
+               /**
+                * Fires when a custom bulk action should be handled.
+                *
+                * The redirect link should be modified with success or failure feedback
+                * from the action to be used to display feedback to the user.
+                *
+                * @since 4.7.0
+                *
+                * @param string $redirect_url The redirect URL.
+                * @param string $doaction     The action being taken.
+                * @param array  $items        The items to take the action on.
+                */
+               $redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $comment_ids );
+       }
+
        wp_defer_comment_counting( false );
 
        if ( $approved )
@@ -162,10 +178,10 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments" target="_blank">Documentation on Comments</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Comment_Spam" target="_blank">Documentation on Comment Spam</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">Documentation on Keyboard Shortcuts</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
+       '<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments">Documentation on Comments</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://codex.wordpress.org/Comment_Spam">Documentation on Comment Spam</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://codex.wordpress.org/Keyboard_Shortcuts">Documentation on Keyboard Shortcuts</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
index bd229b90c9cc2ae082beab1123ad6b87638228dc..803300f40d0220cfc6edd6b090a8683e871cf489 100644 (file)
@@ -259,8 +259,9 @@ foreach ( get_object_taxonomies( $post ) as $tax_name ) {
        add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) );
 }
 
-if ( post_type_supports($post_type, 'page-attributes') )
-       add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core');
+if ( post_type_supports( $post_type, 'page-attributes' ) || count( get_page_templates( $post ) ) > 0 ) {
+       add_meta_box( 'pageparentdiv', $post_type_object->labels->attributes, 'page_attributes_meta_box', null, 'side', 'core' );
+}
 
 if ( $thumbnail_support && current_user_can( 'upload_files' ) )
        add_meta_box('postimagediv', esc_html( $post_type_object->labels->featured_image ), 'post_thumbnail_meta_box', null, 'side', 'low');
@@ -331,7 +332,7 @@ do_action( 'add_meta_boxes', $post_type, $post );
  *
  * @param WP_Post $post Post object.
  */
-do_action( 'add_meta_boxes_' . $post_type, $post );
+do_action( "add_meta_boxes_{$post_type}", $post );
 
 /**
  * Fires after meta boxes have been added.
@@ -378,8 +379,8 @@ if ( 'post' == $post_type ) {
        get_current_screen()->set_help_sidebar(
                        '<p>' . sprintf(__('You can also create posts with the <a href="%s">Press This bookmarklet</a>.'), 'tools.php') . '</p>' .
                        '<p><strong>' . __('For more information:') . '</strong></p>' .
-                       '<p>' . __('<a href="https://codex.wordpress.org/Posts_Add_New_Screen" target="_blank">Documentation on Writing and Editing Posts</a>') . '</p>' .
-                       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+                       '<p>' . __('<a href="https://codex.wordpress.org/Posts_Add_New_Screen">Documentation on Writing and Editing Posts</a>') . '</p>' .
+                       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
        );
 } elseif ( 'page' == $post_type ) {
        $about_pages = '<p>' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the &#8220;Parent&#8221; of the other, creating a group of pages.') . '</p>' .
@@ -393,9 +394,9 @@ if ( 'post' == $post_type ) {
 
        get_current_screen()->set_help_sidebar(
                        '<p><strong>' . __('For more information:') . '</strong></p>' .
-                       '<p>' . __('<a href="https://codex.wordpress.org/Pages_Add_New_Screen" target="_blank">Documentation on Adding New Pages</a>') . '</p>' .
-                       '<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen#Editing_Individual_Pages" target="_blank">Documentation on Editing Pages</a>') . '</p>' .
-                       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+                       '<p>' . __('<a href="https://codex.wordpress.org/Pages_Add_New_Screen">Documentation on Adding New Pages</a>') . '</p>' .
+                       '<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen#Editing_Individual_Pages">Documentation on Editing Pages</a>') . '</p>' .
+                       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
        );
 } elseif ( 'attachment' == $post_type ) {
        get_current_screen()->add_help_tab( array(
@@ -410,8 +411,8 @@ if ( 'post' == $post_type ) {
 
        get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media" target="_blank">Documentation on Edit Media</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media">Documentation on Edit Media</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
        );
 }
 
@@ -473,11 +474,18 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
 ?>
 
 <div class="wrap">
-<h1><?php
+<h1 class="wp-heading-inline"><?php
 echo esc_html( $title );
-if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) )
-       echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
 ?></h1>
+
+<?php
+if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) ) {
+       echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
+}
+?>
+
+<hr class="wp-header-end">
+
 <?php if ( $notice ) : ?>
 <div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div>
 <?php endif; ?>
@@ -631,8 +639,10 @@ if ( post_type_supports($post_type, 'editor') ) {
        if ( 'auto-draft' != $post->post_status ) {
                echo '<span id="last-edit">';
                if ( $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) ) ) {
+                       /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time */
                        printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
                } else {
+                       /* translators: 1: Post edited date, 2: Post edited time */
                        printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
                }
                echo '</span>';
index 9fac3e934cecee068c66e5e32750f99f652521af..2ae7957f726cce775bfc16dc3cd659a74d9c3d6e 100644 (file)
@@ -162,7 +162,7 @@ endif; ?>
 <?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "</a>\n"; ?>
 </div>
 <div id="publishing-action">
-<?php submit_button( __( 'Update' ), 'primary', 'save', false ); ?>
+<?php submit_button( __( 'Update' ), 'primary large', 'save', false ); ?>
 </div>
 <div class="clear"></div>
 </div>
index ff02e394cf7fa91f64858a43b0d9716749fd43be..e25841d3d294cad15946bebf4aefa5048f6cf16d 100644 (file)
@@ -57,13 +57,13 @@ get_current_screen()->add_help_tab( array(
        'content' =>
        '<p>' . __( 'You can add or edit links on this screen by entering information in each of the boxes. Only the link&#8217;s web address and name (the text you want to display on your site as the link) are required fields.' ) . '</p>' .
        '<p>' . __( 'The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you don&#8217;t use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.' ) . '</p>' .
-       '<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/" target="_blank">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>'
+       '<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>'
 ) );
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Links_Add_New_Screen" target="_blank">Documentation on Creating Links</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
+       '<p>' . __( '<a href="https://codex.wordpress.org/Links_Add_New_Screen">Documentation on Creating Links</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
index 7d218dd5764d2d23b4ea71c27c893c2c7568da8b..d233b3091ee36cecb6e8ae4ef130c033ac354890 100644 (file)
@@ -78,24 +78,17 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
                /* 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
-               /* translators: %s: taxonomy name */
-               printf( _x( '&larr; Back to %s', 'admin screen' ), $tax->labels->name );
-       ?></a></p>
        <?php } ?>
 </div>
 <?php endif; ?>
 
 <div id="ajax-response"></div>
 
-<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"
-<?php
+<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"<?php
 /**
  * Fires inside the Edit Term form tag.
  *
- * The dynamic portion of the hook name, `$taxonomy`, refers to
- * the taxonomy slug.
+ * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
  *
  * @since 3.7.0
  */
index dbb1f483635dca0d1e131b310e14b0768a83f6a5..e90a87f7603480eb29f85e439b7890fbf4a4e3c8 100644 (file)
@@ -18,13 +18,13 @@ if ( ! $tax )
        wp_die( __( 'Invalid taxonomy.' ) );
 
 if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) {
-   wp_die( __( 'Sorry, you are not allowed to manage these items.' ) );
+   wp_die( __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) );
 }
 
 if ( ! current_user_can( $tax->cap->manage_terms ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to manage terms in this taxonomy.' ) . '</p>',
                403
        );
 }
@@ -61,46 +61,33 @@ get_current_screen()->set_screen_reader_content( array(
 
 $location = false;
 $referer = wp_get_referer();
+if ( ! $referer ) { // For POST requests.
+       $referer = wp_unslash( $_SERVER['REQUEST_URI'] );
+}
+$referer = remove_query_arg( array( '_wp_http_referer', '_wpnonce', 'error', 'message', 'paged' ), $referer );
 
 switch ( $wp_list_table->current_action() ) {
 
 case 'add-tag':
-
        check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
 
        if ( ! current_user_can( $tax->cap->edit_terms ) ) {
                wp_die(
                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-                       '<p>' . __( 'Sorry, you are not allowed to add this item.' ) . '</p>',
+                       '<p>' . __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) . '</p>',
                        403
                );
        }
 
        $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
-       $location = 'edit-tags.php?taxonomy=' . $taxonomy;
-       if ( 'post' != $post_type )
-               $location .= '&post_type=' . $post_type;
-
-       if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) {
-               $location = $referer;
-       }
-
        if ( $ret && !is_wp_error( $ret ) )
                $location = add_query_arg( 'message', 1, $location );
        else
-               $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $location );
+               $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $referer );
 
        break;
 
 case 'delete':
-       $location = 'edit-tags.php?taxonomy=' . $taxonomy;
-       if ( 'post' != $post_type )
-               $location .= '&post_type=' . $post_type;
-
-       if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) {
-               $location = $referer;
-       }
-
        if ( ! isset( $_REQUEST['tag_ID'] ) ) {
                break;
        }
@@ -108,7 +95,7 @@ case 'delete':
        $tag_ID = (int) $_REQUEST['tag_ID'];
        check_admin_referer( 'delete-tag_' . $tag_ID );
 
-       if ( ! current_user_can( $tax->cap->delete_terms ) ) {
+       if ( ! current_user_can( 'delete_term', $tag_ID ) ) {
                wp_die(
                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
                        '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
@@ -118,7 +105,7 @@ case 'delete':
 
        wp_delete_term( $tag_ID, $taxonomy );
 
-       $location = add_query_arg( 'message', 2, $location );
+       $location = add_query_arg( 'message', 2, $referer );
 
        break;
 
@@ -138,14 +125,7 @@ case 'bulk-delete':
                wp_delete_term( $tag_ID, $taxonomy );
        }
 
-       $location = 'edit-tags.php?taxonomy=' . $taxonomy;
-       if ( 'post' != $post_type )
-               $location .= '&post_type=' . $post_type;
-       if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) {
-               $location = $referer;
-       }
-
-       $location = add_query_arg( 'message', 6, $location );
+       $location = add_query_arg( 'message', 6, $referer );
 
        break;
 
@@ -168,7 +148,7 @@ case 'editedtag':
        $tag_ID = (int) $_POST['tag_ID'];
        check_admin_referer( 'update-tag_' . $tag_ID );
 
-       if ( ! current_user_can( $tax->cap->edit_terms ) ) {
+       if ( ! current_user_can( 'edit_term', $tag_ID ) ) {
                wp_die(
                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
                        '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
@@ -182,35 +162,37 @@ case 'editedtag':
 
        $ret = wp_update_term( $tag_ID, $taxonomy, $_POST );
 
-       $location = 'edit-tags.php?taxonomy=' . $taxonomy;
-       if ( 'post' != $post_type )
-               $location .= '&post_type=' . $post_type;
-
-       if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) {
-               $location = $referer;
+       if ( $ret && ! is_wp_error( $ret ) ) {
+               $location = add_query_arg( 'message', 3, $referer );
+       } else {
+               $location = add_query_arg( array( 'error' => true, 'message' => 5 ), $referer );
        }
-
-       if ( $ret && !is_wp_error( $ret ) )
-               $location = add_query_arg( 'message', 3, $location );
-       else
-               $location = add_query_arg( array( 'error' => true, 'message' => 5 ), $location );
+       break;
+default:
+       if ( ! $wp_list_table->current_action() || ! isset( $_REQUEST['delete_tags'] ) ) {
+               break;
+       }
+       check_admin_referer( 'bulk-tags' );
+       $tags = (array) $_REQUEST['delete_tags'];
+       /** This action is documented in wp-admin/edit-comments.php */
+       $location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $wp_list_table->current_action(), $tags );
        break;
 }
 
 if ( ! $location && ! empty( $_REQUEST['_wp_http_referer'] ) ) {
-       $location = remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) );
+       $location = remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) );
 }
 
 if ( $location ) {
-       if ( ! empty( $_REQUEST['paged'] ) ) {
-               $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location );
+       if ( $pagenum > 1 ) {
+               $location = add_query_arg( 'paged', $pagenum, $location ); // $pagenum takes care of $total_pages.
        }
 
        /**
         * Filters the taxonomy redirect destination URL.
         *
         * @since 4.6.0
-        * 
+        *
         * @param string $location The destination URL.
         * @param object $tax      The taxonomy object.
         */
@@ -279,13 +261,13 @@ if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $t
        $help = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
 
        if ( 'category' == $taxonomy )
-               $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Categories_Screen" target="_blank">Documentation on Categories</a>' ) . '</p>';
+               $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Categories_Screen">Documentation on Categories</a>' ) . '</p>';
        elseif ( 'link_category' == $taxonomy )
-               $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen" target="_blank">Documentation on Link Categories</a>' ) . '</p>';
+               $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen">Documentation on Link Categories</a>' ) . '</p>';
        else
-               $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen" target="_blank">Documentation on Tags</a>' ) . '</p>';
+               $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen">Documentation on Tags</a>' ) . '</p>';
 
-       $help .= '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>';
+       $help .= '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>';
 
        get_current_screen()->set_help_sidebar( $help );
 
@@ -294,14 +276,6 @@ if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $t
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
-if ( ! current_user_can( $tax->cap->edit_terms ) ) {
-       wp_die(
-               '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
-               403
-       );
-}
-
 /** Also used by the Edit Tag  form */
 require_once( ABSPATH . 'wp-admin/includes/edit-tag-messages.php' );
 
@@ -392,10 +366,9 @@ if ( current_user_can($tax->cap->edit_terms) ) {
 
 <div class="form-wrap">
 <h2><?php echo $tax->labels->add_new_item; ?></h2>
-<form id="addtag" method="post" action="edit-tags.php" class="validate"
-<?php
+<form id="addtag" method="post" action="edit-tags.php" class="validate"<?php
 /**
- * Fires at the beginning of the Add Tag form.
+ * Fires inside the Add Tag form tag.
  *
  * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
  *
@@ -540,26 +513,7 @@ if ( 'category' == $taxonomy ) {
 do_action( "{$taxonomy}_add_form", $taxonomy );
 ?>
 </form></div>
-<?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;
-}
-
-?>
+<?php } ?>
 
 </div>
 </div><!-- /col-left -->
index 59cb4f195436362eb184a3d3e6304c6adc1232ca..3b11eb71b77ab513c3a61760081ede2eedeeab1d 100644 (file)
@@ -162,6 +162,10 @@ if ( $doaction ) {
                                }
                        }
                        break;
+               default:
+                       /** This action is documented in wp-admin/edit-comments.php */
+                       $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $post_ids );
+                       break;
        }
 
        $sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback );
@@ -221,8 +225,8 @@ if ( 'post' == $post_type ) {
 
        get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Posts_Screen" target="_blank">Documentation on Managing Posts</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Posts_Screen">Documentation on Managing Posts</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
        );
 
 } elseif ( 'page' == $post_type ) {
@@ -242,8 +246,8 @@ if ( 'post' == $post_type ) {
 
        get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen" target="_blank">Documentation on Managing Pages</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen">Documentation on Managing Pages</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
        );
 
 }
@@ -299,16 +303,22 @@ $bulk_counts = array_filter( $bulk_counts );
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
 ?>
 <div class="wrap">
-<h1><?php
+<h1 class="wp-heading-inline"><?php
 echo esc_html( $post_type_object->labels->name );
-if ( current_user_can( $post_type_object->cap->create_posts ) )
+?></h1>
+
+<?php
+if ( current_user_can( $post_type_object->cap->create_posts ) ) {
        echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
+}
 
 if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
        /* translators: %s: search keywords */
        printf( ' <span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', get_search_query() );
 }
-?></h1>
+?>
+
+<hr class="wp-header-end">
 
 <?php
 // If we have a bulk message to issue:
index ebf5a910eab0788676c52416e79b53a77243da41..c1d4d8b529b53f159a74301eefda6efc65385cea 100644 (file)
@@ -51,8 +51,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Tools_Export_Screen" target="_blank">Documentation on Export</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Tools_Export_Screen">Documentation on Export</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 // If the 'download' URL parameter is set, a WXR export file is baked and returned.
index b47465d73a4614c3eb20b7137a0ac1ebb9147eb4..2aa953721006a958964a37e541530cfdbb077f27 100644 (file)
@@ -11,7 +11,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
 
 $title = __( 'Freedoms' );
 
-list( $display_version ) = explode( '-', $wp_version );
+list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
 ?>
@@ -19,7 +19,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
-<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>
+<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s helps you get your site set up the way you want it.' ), $display_version ); ?></p>
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
@@ -42,8 +42,8 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 
 <p><?php
 
-$plugins_url = current_user_can( 'activate_plugins' ) ? admin_url( 'plugins.php' ) : 'https://wordpress.org/plugins/';
-$themes_url = current_user_can( 'switch_themes' ) ? admin_url( 'themes.php' ) : 'https://wordpress.org/themes/';
+$plugins_url = current_user_can( 'activate_plugins' ) ? admin_url( 'plugins.php' ) : __( 'https://wordpress.org/plugins/' );
+$themes_url = current_user_can( 'switch_themes' ) ? admin_url( 'themes.php' ) : __( 'https://wordpress.org/themes/' );
 
 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>
 
index 51837662305b30480d41d2be1df2ea84e0300d67..1aa682ae9bc2ee0df755aeb81879c34fce2db1f4 100644 (file)
@@ -26,8 +26,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Tools_Import_Screen" target="_blank">Documentation on Import</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Tools_Import_Screen">Documentation on Import</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 if ( current_user_can( 'install_plugins' ) ) {
index a44abba9179a6c15148abbbd31f6c18eba091199..ee197714ad231e8bba0a119efd13108a5ff6c62c 100644 (file)
@@ -61,6 +61,7 @@ require_once(ABSPATH . 'wp-admin/includes/template.php');
 
 /** WordPress List Table Administration API and base class */
 require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
+require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table-compat.php');
 require_once(ABSPATH . 'wp-admin/includes/list-table.php');
 
 /** WordPress Theme Administration API */
index dc965d63cc176df106249b2833e9f85f1fc28e64..ef89a6b8167df61e7370ec444936067f12c78758 100644 (file)
@@ -79,21 +79,19 @@ function wp_ajax_nopriv_heartbeat() {
  * Ajax handler for fetching a list table.
  *
  * @since 3.1.0
- *
- * @global WP_List_Table $wp_list_table
  */
 function wp_ajax_fetch_list() {
-       global $wp_list_table;
-
        $list_class = $_GET['list_args']['class'];
        check_ajax_referer( "fetch-list-$list_class", '_ajax_fetch_list_nonce' );
 
        $wp_list_table = _get_list_table( $list_class, array( 'screen' => $_GET['list_args']['screen']['id'] ) );
-       if ( ! $wp_list_table )
+       if ( ! $wp_list_table ) {
                wp_die( 0 );
+       }
 
-       if ( ! $wp_list_table->ajax_user_can() )
+       if ( ! $wp_list_table->ajax_user_can() ) {
                wp_die( -1 );
+       }
 
        $wp_list_table->ajax_response();
 
@@ -136,9 +134,9 @@ function wp_ajax_ajax_tag_search() {
         *
         * @since 4.0.0
         *
-        * @param int    $characters The minimum number of characters required. Default 2.
-        * @param object $tax        The taxonomy object.
-        * @param string $s          The search term.
+        * @param int         $characters The minimum number of characters required. Default 2.
+        * @param WP_Taxonomy $tax        The taxonomy object.
+        * @param string      $s          The search term.
         */
        $term_search_min_chars = (int) apply_filters( 'term_search_min_chars', 2, $tax, $s );
 
@@ -596,12 +594,11 @@ function wp_ajax_delete_tag() {
        $tag_id = (int) $_POST['tag_ID'];
        check_ajax_referer( "delete-tag_$tag_id" );
 
-       $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag';
-       $tax = get_taxonomy($taxonomy);
-
-       if ( !current_user_can( $tax->cap->delete_terms ) )
+       if ( ! current_user_can( 'delete_term', $tag_id ) ) {
                wp_die( -1 );
+       }
 
+       $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag';
        $tag = get_term( $tag_id, $taxonomy );
        if ( !$tag || is_wp_error( $tag ) )
                wp_die( 1 );
@@ -788,7 +785,7 @@ function wp_ajax_dim_comment() {
 }
 
 /**
- * Ajax handler for deleting a link category.
+ * Ajax handler for adding a link category.
  *
  * @since 3.1.0
  *
@@ -798,8 +795,10 @@ function wp_ajax_add_link_category( $action ) {
        if ( empty( $action ) )
                $action = 'add-link-category';
        check_ajax_referer( $action );
-       if ( !current_user_can( 'manage_categories' ) )
+       $tax = get_taxonomy( 'link_category' );
+       if ( ! current_user_can( $tax->cap->manage_terms ) ) {
                wp_die( -1 );
+       }
        $names = explode(',', wp_unslash( $_POST['newcat'] ) );
        $x = new WP_Ajax_Response();
        foreach ( $names as $cat_name ) {
@@ -829,12 +828,8 @@ function wp_ajax_add_link_category( $action ) {
  * Ajax handler to add a tag.
  *
  * @since 3.1.0
- *
- * @global WP_List_Table $wp_list_table
  */
 function wp_ajax_add_tag() {
-       global $wp_list_table;
-
        check_ajax_referer( 'add-tag', '_wpnonce_add-tag' );
        $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag';
        $tax = get_taxonomy($taxonomy);
@@ -933,36 +928,39 @@ function wp_ajax_get_tagcloud() {
  *
  * @since 3.1.0
  *
- * @global WP_List_Table $wp_list_table
  * @global int           $post_id
  *
  * @param string $action Action to perform.
  */
 function wp_ajax_get_comments( $action ) {
-       global $wp_list_table, $post_id;
-       if ( empty( $action ) )
+       global $post_id;
+       if ( empty( $action ) ) {
                $action = 'get-comments';
-
+       }
        check_ajax_referer( $action );
 
        if ( empty( $post_id ) && ! empty( $_REQUEST['p'] ) ) {
                $id = absint( $_REQUEST['p'] );
-               if ( ! empty( $id ) )
+               if ( ! empty( $id ) ) {
                        $post_id = $id;
+               }
        }
 
-       if ( empty( $post_id ) )
+       if ( empty( $post_id ) ) {
                wp_die( -1 );
+       }
 
        $wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table', array( 'screen' => 'edit-comments' ) );
 
-       if ( ! current_user_can( 'edit_post', $post_id ) )
+       if ( ! current_user_can( 'edit_post', $post_id ) ) {
                wp_die( -1 );
+       }
 
        $wp_list_table->prepare_items();
 
-       if ( !$wp_list_table->has_items() )
+       if ( ! $wp_list_table->has_items() ) {
                wp_die( 1 );
+       }
 
        $x = new WP_Ajax_Response();
        ob_start();
@@ -986,12 +984,9 @@ function wp_ajax_get_comments( $action ) {
  *
  * @since 3.1.0
  *
- * @global WP_List_Table $wp_list_table
- *
  * @param string $action Action to perform.
  */
 function wp_ajax_replyto_comment( $action ) {
-       global $wp_list_table;
        if ( empty( $action ) )
                $action = 'replyto-comment';
 
@@ -1108,12 +1103,8 @@ function wp_ajax_replyto_comment( $action ) {
  * Ajax handler for editing a comment.
  *
  * @since 3.1.0
- *
- * @global WP_List_Table $wp_list_table
  */
 function wp_ajax_edit_comment() {
-       global $wp_list_table;
-
        check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' );
 
        $comment_id = (int) $_POST['comment_ID'];
@@ -1257,6 +1248,7 @@ function wp_ajax_add_meta() {
                        $post_data['post_type'] = $post->post_type;
                        $post_data['post_status'] = 'draft';
                        $now = current_time('timestamp', 1);
+                       /* translators: 1: Post creation date, 2: Post creation time */
                        $post_data['post_title'] = sprintf( __( 'Draft created on %1$s at %2$s' ), date( __( 'F j, Y' ), $now ), date( __( 'g:i a' ), $now ) );
 
                        $pid = edit_post( $post_data );
@@ -1327,14 +1319,12 @@ function wp_ajax_add_meta() {
  *
  * @since 3.1.0
  *
- * @global WP_List_Table $wp_list_table
- *
  * @param string $action Action to perform.
  */
 function wp_ajax_add_user( $action ) {
-       global $wp_list_table;
-       if ( empty( $action ) )
+       if ( empty( $action ) ) {
                $action = 'add-user';
+       }
 
        check_ajax_referer( $action );
        if ( ! current_user_can('create_users') )
@@ -1608,11 +1598,9 @@ function wp_ajax_sample_permalink() {
  * Ajax handler for Quick Edit saving a post from a list table.
  *
  * @since 3.1.0
- *
- * @global WP_List_Table $wp_list_table
  */
 function wp_ajax_inline_save() {
-       global $wp_list_table, $mode;
+       global $mode;
 
        check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
 
@@ -1708,12 +1696,8 @@ function wp_ajax_inline_save() {
  * Ajax handler for quick edit saving for a term.
  *
  * @since 3.1.0
- *
- * @global WP_List_Table $wp_list_table
  */
 function wp_ajax_inline_save_tax() {
-       global $wp_list_table;
-
        check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' );
 
        $taxonomy = sanitize_key( $_POST['taxonomy'] );
@@ -1721,13 +1705,15 @@ function wp_ajax_inline_save_tax() {
        if ( ! $tax )
                wp_die( 0 );
 
-       if ( ! current_user_can( $tax->cap->edit_terms ) )
+       if ( ! isset( $_POST['tax_ID'] ) || ! ( $id = (int) $_POST['tax_ID'] ) ) {
                wp_die( -1 );
+       }
 
-       $wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => 'edit-' . $taxonomy ) );
-
-       if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) )
+       if ( ! current_user_can( 'edit_term', $id ) ) {
                wp_die( -1 );
+       }
+
+       $wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => 'edit-' . $taxonomy ) );
 
        $tag = get_term( $id, $taxonomy );
        $_POST['description'] = $tag->description;
@@ -2033,7 +2019,7 @@ function wp_ajax_upload_attachment() {
                        echo wp_json_encode( array(
                                'success' => false,
                                'data'    => array(
-                                       'message'  => __( "You don't have permission to attach files to this post." ),
+                                       'message'  => __( 'Sorry, you are not allowed to attach files to this post.' ),
                                        'filename' => $_FILES['async-upload']['name'],
                                )
                        ) );
@@ -2415,6 +2401,11 @@ function wp_ajax_query_attachments() {
        if ( current_user_can( get_post_type_object( 'attachment' )->cap->read_private_posts ) )
                $query['post_status'] .= ',private';
 
+       // Filter query clauses to include filenames.
+       if ( isset( $query['s'] ) ) {
+               add_filter( 'posts_clauses', '_filter_query_attachment_filenames' );
+       }
+
        /**
         * Filters the arguments passed to WP_Query during an Ajax
         * call for querying attachments.
@@ -3132,38 +3123,28 @@ function wp_ajax_destroy_sessions() {
  * Ajax handler for saving a post from Press This.
  *
  * @since 4.2.0
- *
- * @global WP_Press_This $wp_press_this
  */
 function wp_ajax_press_this_save_post() {
-       if ( empty( $GLOBALS['wp_press_this'] ) ) {
-               include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
-       }
-
-       $GLOBALS['wp_press_this']->save_post();
+       include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
+       $wp_press_this = new WP_Press_This();
+       $wp_press_this->save_post();
 }
 
 /**
  * Ajax handler for creating new category from Press This.
  *
  * @since 4.2.0
- *
- * @global WP_Press_This $wp_press_this
  */
 function wp_ajax_press_this_add_category() {
-       if ( empty( $GLOBALS['wp_press_this'] ) ) {
-               include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
-       }
-
-       $GLOBALS['wp_press_this']->add_category();
+       include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
+       $wp_press_this = new WP_Press_This();
+       $wp_press_this->add_category();
 }
 
 /**
  * Ajax handler for cropping an image.
  *
  * @since 4.3.0
- *
- * @global WP_Site_Icon $wp_site_icon
  */
 function wp_ajax_crop_image() {
        $attachment_id = absint( $_POST['id'] );
@@ -3184,7 +3165,7 @@ function wp_ajax_crop_image() {
        switch ( $context ) {
                case 'site-icon':
                        require_once ABSPATH . '/wp-admin/includes/class-wp-site-icon.php';
-                       global $wp_site_icon;
+                       $wp_site_icon = new WP_Site_Icon();
 
                        // Skip creating a new attachment if the attachment is a Site Icon.
                        if ( get_post_meta( $attachment_id, '_wp_attachment_context', true ) == $context ) {
@@ -3427,7 +3408,7 @@ function wp_ajax_update_theme() {
                ) );
        }
 
-       $stylesheet = sanitize_key( wp_unslash( $_POST['slug'] ) );
+       $stylesheet = preg_replace( '/[^A-z0-9_\-]/', '', wp_unslash( $_POST['slug'] ) );
        $status     = array(
                'update'     => 'theme',
                'slug'       => $stylesheet,
@@ -3512,7 +3493,7 @@ function wp_ajax_delete_theme() {
                ) );
        }
 
-       $stylesheet = sanitize_key( wp_unslash( $_POST['slug'] ) );
+       $stylesheet = preg_replace( '/[^A-z0-9_\-]/', '', wp_unslash( $_POST['slug'] ) );
        $status     = array(
                'delete' => 'theme',
                'slug'   => $stylesheet,
@@ -3641,16 +3622,20 @@ function wp_ajax_install_plugin() {
        }
 
        $install_status = install_plugin_install_status( $api );
+       $pagenow = isset( $_POST['pagenow'] ) ? sanitize_key( $_POST['pagenow'] ) : '';
+
+       // If install request is coming from import page, do not return network activation link.
+       $plugins_url = ( 'import' === $pagenow ) ? admin_url( 'plugins.php' ) : network_admin_url( 'plugins.php' );
 
        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' ) );
+               ), $plugins_url );
        }
 
-       if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
+       if ( is_multisite() && current_user_can( 'manage_network_plugins' ) && 'import' !== $pagenow ) {
                $status['activateUrl'] = add_query_arg( array( 'networkwide' => 1 ), $status['activateUrl'] );
        }
 
@@ -3698,7 +3683,7 @@ function wp_ajax_update_plugin() {
                $status['oldVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
        }
 
-       include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
+       include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
 
        wp_update_plugins();
 
index 28e56779f97edd2607b1c578ff6ef39cdaac05b3..38d348badf8b83d498f4ec6aec7f79acb398b539 100644 (file)
  * @link http://www.phpclasses.org/browse/package/1743.html Site
  * @license LGPL http://www.opensource.org/licenses/lgpl-license.html
  */
-class ftp extends ftp_base {
+class ftp_pure extends ftp_base {
 
        function __construct($verb=FALSE, $le=FALSE) {
                parent::__construct(false, $verb, $le);
        }
 
-       function ftp($verb=FALSE, $le=FALSE) {
-               $this->__construct($verb, $le);
-       }
-
 // <!-- --------------------------------------------------------------------------------------- -->
 // <!--       Private functions                                                                 -->
 // <!-- --------------------------------------------------------------------------------------- -->
index c71205e9219714ea509f4897e21de6620cf9371e..5ca4a2b579c87cdad93551a16a73976606c320df 100644 (file)
  * @link http://www.phpclasses.org/browse/package/1743.html Site
  * @license LGPL http://www.opensource.org/licenses/lgpl-license.html
  */
-class ftp extends ftp_base {
+class ftp_sockets extends ftp_base {
 
        function __construct($verb=FALSE, $le=FALSE) {
                parent::__construct(true, $verb, $le);
        }
 
-       function ftp($verb=FALSE, $le=FALSE) {
-               $this->__construct($verb, $le);
-       }
-
 // <!-- --------------------------------------------------------------------------------------- -->
 // <!--       Private functions                                                                 -->
 // <!-- --------------------------------------------------------------------------------------- -->
index de6a29966af68f20a22ae1ef58529e2fb8c24e43..35f670ff385abb1c17da1444cda8e3ed0503f18a 100644 (file)
@@ -818,7 +818,7 @@ class ftp_base {
        function glob_regexp($pattern,$probe) {
                $sensitive=(PHP_OS!='WIN32');
                return ($sensitive?
-                       preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $probe ) : 
+                       preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $probe ) :
                        preg_match( '/' . preg_quote( $pattern, '/' ) . '/i', $probe )
                );
        }
@@ -904,3 +904,9 @@ if ( ! $mod_sockets && function_exists( 'dl' ) && is_callable( 'dl' ) ) {
 }
 
 require_once dirname( __FILE__ ) . "/class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php";
+
+if ( $mod_sockets ) {
+       class ftp extends ftp_sockets {}
+} else {
+       class ftp extends ftp_pure {}
+}
index 34b202035e02a45b941c0a2ae474f2911d6ce09e..6c5545523958a2bb3bad3e6b7fb4ce89efdcf04c 100644 (file)
@@ -52,12 +52,12 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin {
                $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>';
+                       $install_actions['activate_plugin'] = '<a class="button button-primary" 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>';
+                       $install_actions['activate_plugin'] = '<a class="button button-primary" 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>';
+                       $install_actions['network_activate'] = '<a class="button button-primary" 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'] );
                }
 
@@ -90,7 +90,8 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin {
                 */
                $install_actions = apply_filters( 'install_plugin_complete_actions', $install_actions, $this->api, $plugin_file );
 
-               if ( ! empty($install_actions) )
-                       $this->feedback(implode(' | ', (array)$install_actions));
+               if ( ! empty( $install_actions ) ) {
+                       $this->feedback( implode( ' ', (array) $install_actions ) );
+               }
        }
 }
index ffb46204f209e7051549a3c6e2e3afb180058c6c..1327d28c1127c8da79ca2246212b46c643d1e5a8 100644 (file)
@@ -101,8 +101,10 @@ class Plugin_Upgrader extends WP_Upgrader {
                $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 );
+               if ( $parsed_args['clear_update_cache'] ) {
+                       // 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,
@@ -168,8 +170,10 @@ class Plugin_Upgrader extends WP_Upgrader {
                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 );
+               if ( $parsed_args['clear_update_cache'] ) {
+                       // 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,
@@ -227,7 +231,6 @@ class Plugin_Upgrader extends WP_Upgrader {
                $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();
 
@@ -294,6 +297,9 @@ class Plugin_Upgrader extends WP_Upgrader {
 
                $this->maintenance_mode(false);
 
+               // Force refresh of plugin update information.
+               wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
+
                /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
                do_action( 'upgrader_process_complete', $this, array(
                        'action' => 'update',
@@ -307,12 +313,8 @@ class Plugin_Upgrader extends WP_Upgrader {
                $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;
        }
 
index 76129e34099f631a7e510cc6f438f59f8b439cf9..b2571ee7f48e86d4ab63b577469cb6c009c72fd3 100644 (file)
@@ -201,8 +201,10 @@ class Theme_Upgrader extends WP_Upgrader {
 
                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 );
+               if ( $parsed_args['clear_update_cache'] ) {
+                       // 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,
@@ -269,8 +271,10 @@ class Theme_Upgrader extends WP_Upgrader {
                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 );
+               if ( $parsed_args['clear_update_cache'] ) {
+                       // 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'],
@@ -329,8 +333,6 @@ class Theme_Upgrader extends WP_Upgrader {
                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();
 
@@ -394,6 +396,9 @@ class Theme_Upgrader extends WP_Upgrader {
 
                $this->maintenance_mode(false);
 
+               // Refresh the Theme Update information
+               wp_clean_themes_cache( $parsed_args['clear_update_cache'] );
+
                /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
                do_action( 'upgrader_process_complete', $this, array(
                        'action' => 'update',
@@ -407,14 +412,10 @@ class Theme_Upgrader extends WP_Upgrader {
                $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;
        }
 
index 9a2f3ecb69788a81d4e10fe89ebf4991ef2e3ac0..1f6857667e576c458a88ce3c9ae0afefa0f23410 100644 (file)
@@ -197,16 +197,14 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
                                        </label>
                                </p>
 
-                               <p class="field-move hide-if-no-js description description-wide">
-                                       <label>
-                                               <span><?php _e( 'Move' ); ?></span>
-                                               <a href="#" class="menus-move menus-move-up" data-dir="up"><?php _e( 'Up one' ); ?></a>
-                                               <a href="#" class="menus-move menus-move-down" data-dir="down"><?php _e( 'Down one' ); ?></a>
-                                               <a href="#" class="menus-move menus-move-left" data-dir="left"></a>
-                                               <a href="#" class="menus-move menus-move-right" data-dir="right"></a>
-                                               <a href="#" class="menus-move menus-move-top" data-dir="top"><?php _e( 'To the top' ); ?></a>
-                                       </label>
-                               </p>
+                               <fieldset class="field-move hide-if-no-js description description-wide">
+                                       <span class="field-move-visual-label" aria-hidden="true"><?php _e( 'Move' ); ?></span>
+                                       <button type="button" class="button-link menus-move menus-move-up" data-dir="up"><?php _e( 'Up one' ); ?></button>
+                                       <button type="button" class="button-link menus-move menus-move-down" data-dir="down"><?php _e( 'Down one' ); ?></button>
+                                       <button type="button" class="button-link menus-move menus-move-left" data-dir="left"></button>
+                                       <button type="button" class="button-link menus-move menus-move-right" data-dir="right"></button>
+                                       <button type="button" class="button-link menus-move menus-move-top" data-dir="top"><?php _e( 'To the top' ); ?></button>
+                               </fieldset>
 
                                <div class="menu-item-actions description-wide submitbox">
                                        <?php if ( 'custom' != $item->type && $original_title !== false ) : ?>
index 12199394147a3bf10252bf3d63110537d5bf173f..ea2d70c5ce41f3965f0954fe64f4952b23c99957 100644 (file)
@@ -176,7 +176,7 @@ class WP_Automatic_Updater {
                 * @param bool   $update Whether to update.
                 * @param object $item   The update offer.
                 */
-               $update = apply_filters( 'auto_update_' . $type, $update, $item );
+               $update = apply_filters( "auto_update_{$type}", $update, $item );
 
                if ( ! $update ) {
                        if ( 'core' == $type )
@@ -371,13 +371,8 @@ class WP_Automatic_Updater {
         *
         * @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;
 
@@ -457,7 +452,7 @@ class WP_Automatic_Updater {
 
                // Send debugging email to all development installs.
                if ( ! empty( $this->update_results ) ) {
-                       $development_version = false !== strpos( $wp_version, '-' );
+                       $development_version = false !== strpos( get_bloginfo( 'version' ), '-' );
 
                        /**
                         * Filters whether to send a debugging email for each automatic background update.
@@ -494,12 +489,10 @@ class WP_Automatic_Updater {
         * @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;
+               $wp_version = get_bloginfo( 'version' );
 
                $core_update = $update_result->item;
                $result      = $update_result->result;
@@ -584,8 +577,6 @@ class WP_Automatic_Updater {
         * @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.
@@ -722,7 +713,7 @@ class WP_Automatic_Updater {
 
                if ( 'critical' == $type && is_wp_error( $result ) ) {
                        $body .= "\n***\n\n";
-                       $body .= sprintf( __( 'Your site was running version %s.' ), $GLOBALS['wp_version'] );
+                       $body .= sprintf( __( 'Your site was running version %s.' ), get_bloginfo( '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:' );
 
index 116a55e06f721e459a16967938c7c01db972ee6d..37a2e751a90c2ae8d4040d798829b81f59af1770 100644 (file)
@@ -94,7 +94,7 @@ class WP_Comments_List_Table extends WP_List_Table {
 
                $comments_per_page = $this->get_per_page( $comment_status );
 
-               $doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
+               $doing_ajax = wp_doing_ajax();
 
                if ( isset( $_REQUEST['number'] ) ) {
                        $number = (int) $_REQUEST['number'];
@@ -351,7 +351,7 @@ class WP_Comments_List_Table extends WP_List_Table {
                         * @since 3.5.0
                         */
                        do_action( 'restrict_manage_comments' );
-                       submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
+                       submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
                }
 
                if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) ) {
@@ -600,7 +600,7 @@ class WP_Comments_List_Table extends WP_List_Table {
                        ( ( ( 'approve' === $action || 'unapprove' === $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
 
                        // Reply and quickedit need a hide-if-no-js span when not added with ajax
-                       if ( ( 'reply' === $action || 'quickedit' === $action ) && ! defined('DOING_AJAX') )
+                       if ( ( 'reply' === $action || 'quickedit' === $action ) && ! wp_doing_ajax() )
                                $action .= ' hide-if-no-js';
                        elseif ( ( $action === 'untrash' && $the_comment_status === 'trash' ) || ( $action === 'unspam' && $the_comment_status === 'spam' ) ) {
                                if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) )
index 408fe1bc046f509321c3734cf9ab10547eb09921..794fa5cf0d07c3ed6c198b48bbb9365ed74062be 100644 (file)
@@ -136,13 +136,15 @@ class WP_Importer {
                                fwrite( STDERR, "Error: can not determine blog_id from $blog_id\n" );
                                exit();
                        }
-                       if ( empty( $parsed['path'] ) )
+                       if ( empty( $parsed['path'] ) ) {
                                $parsed['path'] = '/';
-                       $blog = get_blog_details( array( 'domain' => $parsed['host'], 'path' => $parsed['path'] ) );
-                       if ( !$blog ) {
+                       }
+                       $blogs = get_sites( array( 'domain' => $parsed['host'], 'number' => 1, 'path' => $parsed['path'] ) );
+                       if ( ! $blogs ) {
                                fwrite( STDERR, "Error: Could not find blog\n" );
                                exit();
                        }
+                       $blog = array_shift( $blogs );
                        $blog_id = (int) $blog->blog_id;
                }
 
index e4560e480f65873d5e3aacb0aed0a24705301574..222d6dfc2df3def4d55f31b0e43d52e46c460b6d 100644 (file)
@@ -112,7 +112,7 @@ class WP_Links_List_Table extends WP_List_Table {
 
                        echo '<label class="screen-reader-text" for="cat_id">' . __( 'Filter by category' ) . '</label>';
                        wp_dropdown_categories( $dropdown_options );
-                       submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
+                       submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
 ?>
                </div>
 <?php
diff --git a/wp-admin/includes/class-wp-list-table-compat.php b/wp-admin/includes/class-wp-list-table-compat.php
new file mode 100644 (file)
index 0000000..1287647
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Helper functions for displaying a list of items in an ajaxified HTML table.
+ *
+ * @package WordPress
+ * @subpackage List_Table
+ * @since 4.7.0
+ */
+
+/**
+ * Helper class to be used only by back compat functions
+ *
+ * @since 3.1.0
+ */
+class _WP_List_Table_Compat extends WP_List_Table {
+       public $_screen;
+       public $_columns;
+
+       public function __construct( $screen, $columns = array() ) {
+               if ( is_string( $screen ) )
+                       $screen = convert_to_screen( $screen );
+
+               $this->_screen = $screen;
+
+               if ( !empty( $columns ) ) {
+                       $this->_columns = $columns;
+                       add_filter( 'manage_' . $screen->id . '_columns', array( $this, 'get_columns' ), 0 );
+               }
+       }
+
+       /**
+        * @access protected
+        *
+        * @return array
+        */
+       protected function get_column_info() {
+               $columns = get_column_headers( $this->_screen );
+               $hidden = get_hidden_columns( $this->_screen );
+               $sortable = array();
+               $primary = $this->get_default_primary_column_name();
+
+               return array( $columns, $hidden, $sortable, $primary );
+       }
+
+       /**
+        * @access public
+        *
+        * @return array
+        */
+       public function get_columns() {
+               return $this->_columns;
+       }
+}
index ee0f9af59361d517c3d23f75a6eed56d3d7bc48f..bf642acb2572d9ab52e0de6f8695c9d50e3910a4 100644 (file)
@@ -284,7 +284,7 @@ class WP_List_Table {
                        $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
 
                // Redirect if page number is invalid and headers are not already sent.
-               if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
+               if ( ! headers_sent() && ! wp_doing_ajax() && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
                        wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
                        exit;
                }
@@ -361,7 +361,7 @@ class WP_List_Table {
 <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 ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
-       <?php submit_button( $text, 'button', '', false, array( 'id' => 'search-submit' ) ); ?>
+       <?php submit_button( $text, '', '', false, array( 'id' => 'search-submit' ) ); ?>
 </p>
 <?php
        }
@@ -436,7 +436,7 @@ class WP_List_Table {
         */
        protected function bulk_actions( $which = '' ) {
                if ( is_null( $this->_actions ) ) {
-                       $no_new_actions = $this->_actions = $this->get_bulk_actions();
+                       $this->_actions = $this->get_bulk_actions();
                        /**
                         * Filters the list table Bulk Actions drop-down.
                         *
@@ -450,7 +450,6 @@ class WP_List_Table {
                         * @param array $actions An array of the available bulk actions.
                         */
                        $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
-                       $this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );
                        $two = '';
                } else {
                        $two = '2';
index 170ec5a2c594fdb92edf1f84796c17764b745d40..d0c24449f4c9f783c0403d35213767ea82cc0260 100644 (file)
@@ -174,7 +174,7 @@ class WP_Media_List_Table extends WP_List_Table {
                        /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
                        do_action( 'restrict_manage_posts', $this->screen->post_type );
 
-                       submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
+                       submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
                }
 
                if ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) {
@@ -262,7 +262,7 @@ class WP_Media_List_Table extends WP_List_Table {
 
        <div class="search-form">
                <label for="media-search-input" class="screen-reader-text"><?php esc_html_e( 'Search Media' ); ?></label>
-               <input type="search" placeholder="<?php esc_attr_e( 'Search' ) ?>" id="media-search-input" class="search" name="s" value="<?php _admin_search_query(); ?>"></div>
+               <input type="search" placeholder="<?php esc_attr_e( 'Search media items...' ) ?>" id="media-search-input" class="search" name="s" value="<?php _admin_search_query(); ?>"></div>
        </div>
        <?php
        }
index 9ce3ffee9be6ccdf8f7a3eccf759397088ee1b64..6c7bcc3b443e19fbc4b537a6cb55607cbcd6c506 100644 (file)
@@ -518,7 +518,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
 
                $actions['edit']        = '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ) . '">' . __( 'Edit' ) . '</a>';
                $actions['backend']     = "<a href='" . esc_url( get_admin_url( $blog['blog_id'] ) ) . "' class='edit'>" . __( 'Dashboard' ) . '</a>';
-               if ( get_current_site()->blog_id != $blog['blog_id'] ) {
+               if ( get_network()->site_id != $blog['blog_id'] ) {
                        if ( $blog['deleted'] == '1' ) {
                                $actions['activate']   = '<a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=activateblog&amp;id=' . $blog['blog_id'] ), 'activateblog_' . $blog['blog_id'] ) ) . '">' . __( 'Activate' ) . '</a>';
                        } else {
index d35956c14b12361632d6f547f3f0b2510b6e618d..0f3865a98566098b774bd7c2c4fa442e3cc43012 100644 (file)
@@ -150,7 +150,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
                $total_this_page = $totals[ $status ];
 
                wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
-                       'totals' => $totals,
+                       'themes' => $totals,
+                       'totals' => wp_get_update_data(),
                ) );
 
                if ( $orderby ) {
@@ -518,7 +519,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
                 * @param WP_Theme $theme   The current WP_Theme object.
                 * @param string   $context Status of the theme.
                 */
-               $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context );
+               $actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context );
 
                echo $this->row_actions( $actions, true );
        }
@@ -726,6 +727,6 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
                 * @param WP_Theme $theme      Current WP_Theme object.
                 * @param string   $status     Status of the theme.
                 */
-               do_action( "after_theme_row_$stylesheet", $stylesheet, $theme, $status );
+               do_action( "after_theme_row_{$stylesheet}", $stylesheet, $theme, $status );
        }
 }
index da00131bcd488c5662d20ff6ac47caf2e008ad63..d219efc38e525f5110dfc5baf2a6a749ddba191e 100644 (file)
@@ -329,7 +329,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
 
                        $path   = ( $val->path === '/' ) ? '' : $val->path;
                        echo '<span class="site-' . $val->site_id . '" >';
-                       echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . get_current_site()->domain, '', $val->domain . $path ) . '</a>';
+                       echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . get_network()->domain, '', $val->domain . $path ) . '</a>';
                        echo ' <small class="row-actions">';
                        $actions = array();
                        $actions['edit'] = '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a>';
index 6e389b1a2e7ba0adbecba004bb03c4e6c876dd9e..cd718360cbd4c193abcf950985c3ee7065479a09 100644 (file)
@@ -69,7 +69,6 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
         * @global int    $paged
         * @global string $type
         * @global string $term
-        * @global string $wp_version
         */
        public function prepare_items() {
                include( ABSPATH . 'wp-admin/includes/plugin-install.php' );
@@ -88,7 +87,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                if ( 'search' === $tab ) {
                        $tabs['search'] = __( 'Search Results' );
                }
-               if ( $tab === 'beta' || false !== strpos( $GLOBALS['wp_version'], '-' ) ) {
+               if ( $tab === 'beta' || false !== strpos( get_bloginfo( 'version' ), '-' ) ) {
                        $tabs['beta'] = _x( 'Beta Testing', 'Plugin Installer' );
                }
                $tabs['featured']    = _x( 'Featured', 'Plugin Installer' );
@@ -135,7 +134,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                                'active_installs' => true
                        ),
                        // Send the locale and installed plugin slugs to the API so it can provide context-sensitive results.
-                       'locale' => get_locale(),
+                       'locale' => get_user_locale(),
                        'installed_plugins' => $this->get_installed_plugin_slugs(),
                );
 
@@ -200,7 +199,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                 *
                 * @param array|bool $args Plugin Install API arguments.
                 */
-               $args = apply_filters( "install_plugins_table_api_args_$tab", $args );
+               $args = apply_filters( "install_plugins_table_api_args_{$tab}", $args );
 
                if ( !$args )
                        return;
@@ -391,9 +390,6 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                }
        }
 
-       /**
-        * @global string $wp_version
-        */
        public function display_rows() {
                $plugins_allowedtags = array(
                        'a' => array( 'href' => array(),'title' => array(), 'target' => array() ),
@@ -492,7 +488,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                                                        }
 
                                                        $action_links[] = sprintf(
-                                                               '<a href="%1$s" class="button activate-now button-secondary" aria-label="%2$s">%3$s</a>',
+                                                               '<a href="%1$s" class="button activate-now" aria-label="%2$s">%3$s</a>',
                                                                esc_url( $activate_url ),
                                                                esc_attr( sprintf( $button_label, $plugin['name'] ) ),
                                                                $button_text
@@ -566,6 +562,8 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                                        <?php
                                        if ( $plugin['active_installs'] >= 1000000 ) {
                                                $active_installs_text = _x( '1+ Million', 'Active plugin installs' );
+                                       } elseif ( 0 == $plugin['active_installs'] ) {
+                                               $active_installs_text = _x( 'Less Than 10', 'Active plugin installs' );
                                        } else {
                                                $active_installs_text = number_format_i18n( $plugin['active_installs'] ) . '+';
                                        }
@@ -574,9 +572,11 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                                </div>
                                <div class="column-compatibility">
                                        <?php
-                                       if ( ! empty( $plugin['tested'] ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $plugin['tested'] ) ), $plugin['tested'], '>' ) ) {
+                                       $wp_version = get_bloginfo( 'version' );
+
+                                       if ( ! empty( $plugin['tested'] ) && version_compare( substr( $wp_version, 0, strlen( $plugin['tested'] ) ), $plugin['tested'], '>' ) ) {
                                                echo '<span class="compatibility-untested">' . __( 'Untested with your version of WordPress' ) . '</span>';
-                                       } elseif ( ! empty( $plugin['requires'] ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $plugin['requires'] ) ), $plugin['requires'], '<' ) ) {
+                                       } elseif ( ! empty( $plugin['requires'] ) && version_compare( substr( $wp_version, 0, strlen( $plugin['requires'] ) ), $plugin['requires'], '<' ) ) {
                                                echo '<span class="compatibility-incompatible">' . __( '<strong>Incompatible</strong> with your version of WordPress' ) . '</span>';
                                        } else {
                                                echo '<span class="compatibility-compatible">' . __( '<strong>Compatible</strong> with your version of WordPress' ) . '</span>';
index 4204cf93b31043ff337560cd20b18e852d93a5f2..136fbd4c73068481e6db58f97b7cf52818c964b3 100644 (file)
@@ -253,6 +253,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
 
                wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
                        'plugins' => $js_plugins,
+                       'totals'  => wp_get_update_data(),
                ) );
 
                if ( ! $orderby ) {
@@ -367,7 +368,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                <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' ) ); ?>
+                       <?php submit_button( $text, 'hide-if-js', '', false, array( 'id' => 'search-submit' ) ); ?>
                </p>
                <?php
        }
@@ -496,7 +497,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                echo '<div class="alignleft actions">';
 
                if ( 'recently_activated' == $status ) {
-                       submit_button( __( 'Clear List' ), 'button', 'clear-recent-list', false );
+                       submit_button( __( 'Clear List' ), '', 'clear-recent-list', false );
                } elseif ( 'top' === $which && 'mustuse' === $status ) {
                        /* translators: %s: mu-plugins directory name */
                        echo '<p>' . sprintf( __( 'Files in the %s directory are executed automatically.' ),
@@ -652,8 +653,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                         * The default action links for the Network plugins list table include
                         * 'Network Activate', 'Network Deactivate', 'Edit', and 'Delete'.
                         *
-                        * @since 3.1.0 As `{$prefix}_plugin_action_links`
-                        * @since 4.4.0
+                        * @since 3.1.0
                         *
                         * @param array  $actions     An array of plugin action links.
                         * @param string $plugin_file Path to the plugin file relative to the plugins directory.
@@ -670,8 +670,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                         * The dynamic portion of the hook name, $plugin_file, refers to the path
                         * to the plugin file, relative to the plugins directory.
                         *
-                        * @since 3.1.0 As `{$prefix}_plugin_action_links_{$plugin_file}`
-                        * @since 4.4.0
+                        * @since 3.1.0
                         *
                         * @param array  $actions     An array of plugin action links.
                         * @param string $plugin_file Path to the plugin file relative to the plugins directory.
@@ -691,8 +690,8 @@ class WP_Plugins_List_Table extends WP_List_Table {
                         * 'Activate', 'Deactivate', and 'Edit', for a network site, and
                         * 'Activate', 'Deactivate', 'Edit', and 'Delete' for a single site.
                         *
-                        * @since 2.5.0 As `{$prefix}_plugin_action_links`
-                        * @since 4.4.0
+                        * @since 2.5.0
+                        * @since 2.6.0 The `$context` parameter was added.
                         *
                         * @param array  $actions     An array of plugin action links.
                         * @param string $plugin_file Path to the plugin file relative to the plugins directory.
@@ -709,8 +708,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                         * The dynamic portion of the hook name, $plugin_file, refers to the path
                         * to the plugin file, relative to the plugins directory.
                         *
-                        * @since 2.7.0 As `{$prefix}_plugin_action_links_{$plugin_file}`
-                        * @since 4.4.0
+                        * @since 2.7.0
                         *
                         * @param array  $actions     An array of plugin action links.
                         * @param string $plugin_file Path to the plugin file relative to the plugins directory.
@@ -864,7 +862,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                 *                            'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use',
                 *                            'Drop-ins', 'Search'.
                 */
-               do_action( "after_plugin_row_$plugin_file", $plugin_file, $plugin_data, $status );
+               do_action( "after_plugin_row_{$plugin_file}", $plugin_file, $plugin_data, $status );
        }
 
        /**
index 39c2d682680cf5ef7d284d8e242a8685be37bf14..ae0f2441fe277615dd985e590762b71ceb8f9ae2 100644 (file)
@@ -459,6 +459,7 @@ class WP_Posts_List_Table extends WP_List_Table {
                <div class="alignleft actions">
 <?php
                if ( 'top' === $which && !is_singular() ) {
+                       ob_start();
 
                        $this->months_dropdown( $this->screen->post_type );
                        $this->categories_dropdown( $this->screen->post_type );
@@ -479,7 +480,12 @@ class WP_Posts_List_Table extends WP_List_Table {
                         */
                        do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
 
-                       submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
+                       $output = ob_get_clean();
+
+                       if ( ! empty( $output ) ) {
+                               echo $output;
+                               submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
+                       }
                }
 
                if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) ) {
@@ -829,7 +835,16 @@ class WP_Posts_List_Table extends WP_List_Table {
                                printf( __( 'Select %s' ), _draft_or_post_title() );
                        ?></label>
                        <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
-                       <div class="locked-indicator"></div>
+                       <div class="locked-indicator">
+                               <span class="locked-indicator-icon" aria-hidden="true"></span>
+                               <span class="screen-reader-text"><?php
+                               printf(
+                                       /* translators: %s: post title */
+                                       __( '&#8220;%s&#8221; is locked' ),
+                                       _draft_or_post_title()
+                               );
+                               ?></span>
+                       </div>
                <?php endif;
        }
 
@@ -884,6 +899,22 @@ class WP_Posts_List_Table extends WP_List_Table {
                        }
                }
 
+               $can_edit_post = current_user_can( 'edit_post', $post->ID );
+
+               if ( $can_edit_post && $post->post_status != 'trash' ) {
+                       $lock_holder = wp_check_post_lock( $post->ID );
+
+                       if ( $lock_holder ) {
+                               $lock_holder = get_userdata( $lock_holder );
+                               $locked_avatar = get_avatar( $lock_holder->ID, 18 );
+                               $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
+                       } else {
+                               $locked_avatar = $locked_text = '';
+                       }
+
+                       echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";
+               }
+
                $pad = str_repeat( '&#8212; ', $this->current_level );
                echo "<strong>";
 
@@ -901,7 +932,6 @@ class WP_Posts_List_Table extends WP_List_Table {
                        echo $this->get_edit_link( $format_args, $label . ':', $format_class );
                }
 
-               $can_edit_post = current_user_can( 'edit_post', $post->ID );
                $title = _draft_or_post_title();
 
                if ( $can_edit_post && $post->post_status != 'trash' ) {
@@ -924,22 +954,8 @@ class WP_Posts_List_Table extends WP_List_Table {
                }
                echo "</strong>\n";
 
-               if ( $can_edit_post && $post->post_status != 'trash' ) {
-                       $lock_holder = wp_check_post_lock( $post->ID );
-
-                       if ( $lock_holder ) {
-                               $lock_holder = get_userdata( $lock_holder );
-                               $locked_avatar = get_avatar( $lock_holder->ID, 18 );
-                               $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
-                       } else {
-                               $locked_avatar = $locked_text = '';
-                       }
-
-                       echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";
-               }
-
                if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'excerpt' === $mode && current_user_can( 'read_post', $post->ID ) ) {
-                       echo esc_html( get_the_excerpt() );
+                       the_excerpt();
                }
 
                get_inline_data( $post );
@@ -1522,38 +1538,38 @@ class WP_Posts_List_Table extends WP_List_Table {
                                <span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order ?>" /></span>
                        </label>
 
-       <?php   endif; // !$bulk
-
-                       if ( 'page' === $screen->post_type ) :
-       ?>
-
-                       <label>
-                               <span class="title"><?php _e( 'Template' ); ?></span>
-                               <select name="page_template">
-       <?php   if ( $bulk ) : ?>
-                                       <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
-       <?php   endif; // $bulk ?>
-                               <?php
-                                       /** This filter is documented in wp-admin/includes/meta-boxes.php */
-                                       $default_title = apply_filters( 'default_page_template_title',  __( 'Default Template' ), 'quick-edit' );
-                               ?>
-                                       <option value="default"><?php echo esc_html( $default_title ); ?></option>
-                                       <?php page_template_dropdown() ?>
-                               </select>
-                       </label>
-
        <?php
-                       endif; // page post_type
+                       endif; // !$bulk
                endif; // page-attributes
        ?>
 
+       <?php if ( 0 < count( get_page_templates( null, $screen->post_type ) ) ) : ?>
+               <label>
+                       <span class="title"><?php _e( 'Template' ); ?></span>
+                       <select name="page_template">
+<?php  if ( $bulk ) : ?>
+                               <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
+<?php  endif; // $bulk ?>
+                <?php
+                               /** This filter is documented in wp-admin/includes/meta-boxes.php */
+                               $default_title = apply_filters( 'default_page_template_title',  __( 'Default Template' ), 'quick-edit' );
+                ?>
+                               <option value="default"><?php echo esc_html( $default_title ); ?></option>
+                               <?php page_template_dropdown( '', $screen->post_type ) ?>
+                       </select>
+               </label>
+       <?php endif; ?>
+
        <?php if ( count( $flat_taxonomies ) && !$bulk ) : ?>
 
        <?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
-               <?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) : ?>
+               <?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) :
+                       $taxonomy_name = esc_attr( $taxonomy->name );
+
+                       ?>
                        <label class="inline-edit-tags">
                                <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span>
-                               <textarea cols="22" rows="1" name="tax_input[<?php echo esc_attr( $taxonomy->name )?>]" class="tax_input_<?php echo esc_attr( $taxonomy->name )?>"></textarea>
+                               <textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo $taxonomy_name; ?>]" class="tax_input_<?php echo $taxonomy_name; ?>"></textarea>
                        </label>
                <?php endif; ?>
 
@@ -1713,14 +1729,14 @@ class WP_Posts_List_Table extends WP_List_Table {
                }
        ?>
                <p class="submit inline-edit-save">
-                       <button type="button" class="button-secondary cancel alignleft"><?php _e( 'Cancel' ); ?></button>
+                       <button type="button" class="button cancel alignleft"><?php _e( 'Cancel' ); ?></button>
                        <?php if ( ! $bulk ) {
                                wp_nonce_field( 'inlineeditnonce', '_inline_edit', false );
                                ?>
-                               <button type="button" class="button-primary save alignright"><?php _e( 'Update' ); ?></button>
+                               <button type="button" class="button button-primary save alignright"><?php _e( 'Update' ); ?></button>
                                <span class="spinner"></span>
                        <?php } else {
-                               submit_button( __( 'Update' ), 'button-primary alignright', 'bulk_edit', false );
+                               submit_button( __( 'Update' ), 'primary alignright', 'bulk_edit', false );
                        } ?>
                        <input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" />
                        <input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" />
index e4e03c7c5068825b5ce82047782521384bfc1b5a..71ce5153d3a18b9b15d004ea431fe3eed04ee650 100644 (file)
@@ -13,8 +13,8 @@
  * @since 4.2.0
  */
 class WP_Press_This {
-
        // Used to trigger the bookmarklet update notice.
+       const VERSION = 8;
        public $version = 8;
 
        private $images = array();
@@ -119,28 +119,10 @@ class WP_Press_This {
                        'post_type'     => 'post',
                        'post_status'   => 'draft',
                        'post_format'   => ( ! empty( $_POST['post_format'] ) ) ? sanitize_text_field( $_POST['post_format'] ) : '',
+                       'tax_input'     => ( ! empty( $_POST['tax_input'] ) ) ? $_POST['tax_input'] : array(),
+                       'post_category' => ( ! empty( $_POST['post_category'] ) ) ? $_POST['post_category'] : array(),
                );
 
-               // Only accept categories if the user actually can assign
-               $category_tax = get_taxonomy( 'category' );
-               if ( current_user_can( $category_tax->cap->assign_terms ) ) {
-                       $post_data['post_category'] = ( ! empty( $_POST['post_category'] ) ) ? $_POST['post_category'] : array();
-               }
-
-               // Only accept taxonomies if the user can actually assign
-               if ( ! empty( $_POST['tax_input'] ) ) {
-                       $tax_input = $_POST['tax_input'];
-                       foreach ( $tax_input as $tax => $_ti ) {
-                               $tax_object = get_taxonomy( $tax );
-                               if ( ! $tax_object || ! current_user_can( $tax_object->cap->assign_terms ) ) {
-                                       unset( $tax_input[ $tax ] );
-                               }
-                       }
-
-                       $post_data['tax_input'] = $tax_input;
-               }
-
-               // Toggle status to pending if user cannot actually publish
                if ( ! empty( $_POST['post_status'] ) && 'publish' === $_POST['post_status'] ) {
                        if ( current_user_can( 'publish_posts' ) ) {
                                $post_data['post_status'] = 'publish';
@@ -285,8 +267,6 @@ class WP_Press_This {
         * @return string Source's HTML sanitized markup
         */
        public function fetch_source_html( $url ) {
-               global $wp_version;
-
                if ( empty( $url ) ) {
                        return new WP_Error( 'invalid-url', __( 'A valid URL was not provided.' ) );
                }
@@ -294,7 +274,7 @@ class WP_Press_This {
                $remote_url = wp_safe_remote_get( $url, array(
                        'timeout' => 30,
                        // Use an explicit user-agent for Press This
-                       'user-agent' => 'Press This (WordPress/' . $wp_version . '); ' . get_bloginfo( 'url' )
+                       'user-agent' => 'Press This (WordPress/' . get_bloginfo( 'version' ) . '); ' . get_bloginfo( 'url' )
                ) );
 
                if ( is_wp_error( $remote_url ) ) {
@@ -473,7 +453,7 @@ class WP_Press_This {
         * @since 4.2.0
         *
         * @param string $src Embed source URL.
-        * @return string If not from a supported provider, an empty string. Otherwise, a reformatted embed URL.
+        * @return string If not from a supported provider, an empty string. Otherwise, a reformattd embed URL.
         */
        private function _limit_embed( $src ) {
                $src = $this->_limit_url( $src );
@@ -497,7 +477,6 @@ class WP_Press_This {
                        // Embedded Daily Motion videos
                        $src = 'https://www.dailymotion.com/video/' . $src_matches[2];
                } else {
-                       require_once( ABSPATH . WPINC . '/class-oembed.php' );
                        $oembed = _wp_oembed_get_object();
 
                        if ( ! $oembed->get_provider( $src, array( 'discover' => false ) ) ) {
@@ -874,12 +853,6 @@ class WP_Press_This {
        public function categories_html( $post ) {
                $taxonomy = get_taxonomy( 'category' );
 
-               // Bail if user cannot assign terms
-               if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) {
-                       return;
-               }
-
-               // Only show "add" if user can edit terms
                if ( current_user_can( $taxonomy->cap->edit_terms ) ) {
                        ?>
                        <button type="button" class="add-cat-toggle button-link" aria-expanded="false">
@@ -967,7 +940,7 @@ class WP_Press_This {
 
                if ( $user_can_assign_terms ) {
                        ?>
-                       <button type="button" class="button-link tagcloud-link" id="link-post_tag"><?php echo $taxonomy->labels->choose_from_most_used; ?></button>
+                       <button type="button" class="button-link tagcloud-link" id="link-post_tag" aria-expanded="false"><?php echo $taxonomy->labels->choose_from_most_used; ?></button>
                        <?php
                }
        }
@@ -1214,11 +1187,12 @@ class WP_Press_This {
         * @access public
         *
         * @global WP_Locale $wp_locale
-        * @global string    $wp_version
         * @global bool      $is_IE
         */
        public function html() {
-               global $wp_locale, $wp_version;
+               global $wp_locale;
+
+               $wp_version = get_bloginfo( 'version' );
 
                // Get data, new (POST) and old (GET).
                $data = $this->merge_or_fetch_data();
@@ -1298,12 +1272,6 @@ class WP_Press_This {
                wp_enqueue_script( 'json2' );
                wp_enqueue_script( 'editor' );
 
-               $categories_tax   = get_taxonomy( 'category' );
-               $show_categories  = current_user_can( $categories_tax->cap->assign_terms ) || current_user_can( $categories_tax->cap->edit_terms );
-
-               $tag_tax          = get_taxonomy( 'post_tag' );
-               $show_tags        = current_user_can( $tag_tax->cap->assign_terms );
-
                $supports_formats = false;
                $post_format      = 0;
 
@@ -1344,7 +1312,7 @@ class WP_Press_This {
        $admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) );
        $admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) );
        $admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
-       $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
+       $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
 
        /** This filter is documented in wp-admin/admin-header.php */
        $admin_body_classes = apply_filters( 'admin_body_class', '' );
@@ -1455,21 +1423,17 @@ class WP_Press_This {
                                        </button>
                                <?php endif; ?>
 
-                               <?php if ( $show_categories ) : ?>
-                                       <button type="button" class="button-link post-option">
-                                               <span class="dashicons dashicons-category"></span>
-                                               <span class="post-option-title"><?php _e( 'Categories' ); ?></span>
-                                               <span class="dashicons post-option-forward"></span>
-                                       </button>
-                               <?php endif; ?>
-
-                               <?php if ( $show_tags ) : ?>
-                                       <button type="button" class="button-link post-option">
-                                               <span class="dashicons dashicons-tag"></span>
-                                               <span class="post-option-title"><?php _e( 'Tags' ); ?></span>
-                                               <span class="dashicons post-option-forward"></span>
-                                       </button>
-                               <?php endif; ?>
+                               <button type="button" class="button-link post-option">
+                                       <span class="dashicons dashicons-category"></span>
+                                       <span class="post-option-title"><?php _e( 'Categories' ); ?></span>
+                                       <span class="dashicons post-option-forward"></span>
+                               </button>
+
+                               <button type="button" class="button-link post-option">
+                                       <span class="dashicons dashicons-tag"></span>
+                                       <span class="post-option-title"><?php _e( 'Tags' ); ?></span>
+                                       <span class="dashicons post-option-forward"></span>
+                               </button>
                        </div>
 
                        <?php if ( $supports_formats ) : ?>
@@ -1483,27 +1447,23 @@ class WP_Press_This {
                                </div>
                        <?php endif; ?>
 
-                       <?php if ( $show_categories ) : ?>
-                               <div class="setting-modal is-off-screen is-hidden">
-                                       <button type="button" class="button-link modal-close">
-                                               <span class="dashicons post-option-back"></span>
-                                               <span class="setting-title" aria-hidden="true"><?php _e( 'Categories' ); ?></span>
-                                               <span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
-                                       </button>
-                                       <?php $this->categories_html( $post ); ?>
-                               </div>
-                       <?php endif; ?>
+                       <div class="setting-modal is-off-screen is-hidden">
+                               <button type="button" class="button-link modal-close">
+                                       <span class="dashicons post-option-back"></span>
+                                       <span class="setting-title" aria-hidden="true"><?php _e( 'Categories' ); ?></span>
+                                       <span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
+                               </button>
+                               <?php $this->categories_html( $post ); ?>
+                       </div>
 
-                       <?php if ( $show_tags ) : ?>
-                               <div class="setting-modal tags is-off-screen is-hidden">
-                                       <button type="button" class="button-link modal-close">
-                                               <span class="dashicons post-option-back"></span>
-                                               <span class="setting-title" aria-hidden="true"><?php _e( 'Tags' ); ?></span>
-                                               <span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
-                                       </button>
-                                       <?php $this->tags_html( $post ); ?>
-                               </div>
-                       <?php endif; ?>
+                       <div class="setting-modal tags is-off-screen is-hidden">
+                               <button type="button" class="button-link modal-close">
+                                       <span class="dashicons post-option-back"></span>
+                                       <span class="setting-title" aria-hidden="true"><?php _e( 'Tags' ); ?></span>
+                                       <span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
+                               </button>
+                               <?php $this->tags_html( $post ); ?>
+                       </div>
                </div><!-- .options-panel -->
        </div><!-- .wrapper -->
 
@@ -1555,9 +1515,3 @@ class WP_Press_This {
                die();
        }
 }
-
-/**
- *
- * @global WP_Press_This $wp_press_this
- */
-$GLOBALS['wp_press_this'] = new WP_Press_This;
index 967875917c688dad2abb8a915d37cb7cbadf554a..a7d9a1a5c34c13602f5e135605e8d0c96695dcf9 100644 (file)
@@ -915,8 +915,7 @@ final class WP_Screen {
 
                switch ( $this->base ) {
                        case 'widgets':
-                               $nonce = wp_create_nonce( 'widgets-access' );
-                               $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on&_wpnonce=' . urlencode( $nonce ) . '">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off&_wpnonce=' . urlencode( $nonce ) . '">' . __('Disable accessibility mode') . "</a></p>\n";
+                               $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n";
                                break;
                        case 'post' :
                                $expand = '<fieldset class="editor-expand hidden"><legend>' . __( 'Additional settings' ) . '</legend><label for="editor-expand-toggle">';
index 3afc83def7fdca69b62e890e9328739bc1cca3a5..a54c60b704db0b996a416053966a0df121b03ed8 100644 (file)
@@ -240,8 +240,3 @@ class WP_Site_Icon {
                return $value;
        }
 }
-
-/**
- * @global WP_Site_Icon $wp_site_icon
- */
-$GLOBALS['wp_site_icon'] = new WP_Site_Icon;
index e765794a4e0589ea628fe3ce1716ac6f62229a7a..7d59624a20a0a0c4fea3cb751b22e1c0f139cca2 100644 (file)
@@ -151,7 +151,10 @@ class WP_Terms_List_Table extends WP_List_Table {
         */
        protected function get_bulk_actions() {
                $actions = array();
-               $actions['delete'] = __( 'Delete' );
+
+               if ( current_user_can( get_taxonomy( $this->screen->taxonomy )->cap->delete_terms ) ) {
+                       $actions['delete'] = __( 'Delete' );
+               }
 
                return $actions;
        }
@@ -313,7 +316,7 @@ class WP_Terms_List_Table extends WP_List_Table {
 
        /**
         * @global string $taxonomy
-        * @param object $tag
+        * @param WP_Term $tag Term object.
         * @param int $level
         */
        public function single_row( $tag, $level = 0 ) {
@@ -328,21 +331,20 @@ class WP_Terms_List_Table extends WP_List_Table {
        }
 
        /**
-        * @param object $tag
+        * @param WP_Term $tag Term object.
         * @return string
         */
        public function column_cb( $tag ) {
-               $default_term = get_option( 'default_' . $this->screen->taxonomy );
-
-               if ( current_user_can( get_taxonomy( $this->screen->taxonomy )->cap->delete_terms ) && $tag->term_id != $default_term )
+               if ( current_user_can( 'delete_term', $tag->term_id ) ) {
                        return '<label class="screen-reader-text" for="cb-select-' . $tag->term_id . '">' . sprintf( __( 'Select %s' ), $tag->name ) . '</label>'
                                . '<input type="checkbox" name="delete_tags[]" value="' . $tag->term_id . '" id="cb-select-' . $tag->term_id . '" />';
+               }
 
                return '&nbsp;';
        }
 
        /**
-        * @param object $tag
+        * @param WP_Term $tag Term object.
         * @return string
         */
        public function column_name( $tag ) {
@@ -361,13 +363,13 @@ class WP_Terms_List_Table extends WP_List_Table {
                 * @see WP_Terms_List_Table::column_name()
                 *
                 * @param string $pad_tag_name The term name, padded if not top-level.
-                * @param object $tag          Term object.
+                * @param WP_Term $tag         Term object.
                 */
                $name = apply_filters( 'term_name', $pad . ' ' . $tag->name, $tag );
 
                $qe_data = get_term( $tag->term_id, $taxonomy, OBJECT, 'edit' );
 
-               $uri = ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ? wp_get_referer() : $_SERVER['REQUEST_URI'];
+               $uri = wp_doing_ajax() ? wp_get_referer() : $_SERVER['REQUEST_URI'];
 
                $edit_link = add_query_arg(
                        'wp_http_referer',
@@ -411,9 +413,9 @@ class WP_Terms_List_Table extends WP_List_Table {
         * @since 4.3.0
         * @access protected
         *
-        * @param object $tag         Tag being acted upon.
-        * @param string $column_name Current column name.
-        * @param string $primary     Primary column name.
+        * @param WP_Term $tag         Tag being acted upon.
+        * @param string  $column_name Current column name.
+        * @param string  $primary     Primary column name.
         * @return string Row actions output for terms.
         */
        protected function handle_row_actions( $tag, $column_name, $primary ) {
@@ -423,9 +425,7 @@ class WP_Terms_List_Table extends WP_List_Table {
 
                $taxonomy = $this->screen->taxonomy;
                $tax = get_taxonomy( $taxonomy );
-               $default_term = get_option( 'default_' . $taxonomy );
-
-               $uri = ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ? wp_get_referer() : $_SERVER['REQUEST_URI'];
+               $uri = wp_doing_ajax() ? wp_get_referer() : $_SERVER['REQUEST_URI'];
 
                $edit_link = add_query_arg(
                        'wp_http_referer',
@@ -434,7 +434,7 @@ class WP_Terms_List_Table extends WP_List_Table {
                );
 
                $actions = array();
-               if ( current_user_can( $tax->cap->edit_terms ) ) {
+               if ( current_user_can( 'edit_term', $tag->term_id ) ) {
                        $actions['edit'] = sprintf(
                                '<a href="%s" aria-label="%s">%s</a>',
                                esc_url( $edit_link ),
@@ -449,7 +449,7 @@ class WP_Terms_List_Table extends WP_List_Table {
                                __( 'Quick&nbsp;Edit' )
                        );
                }
-               if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term ) {
+               if ( current_user_can( 'delete_term', $tag->term_id ) ) {
                        $actions['delete'] = sprintf(
                                '<a href="%s" class="delete-tag aria-button-if-js" aria-label="%s">%s</a>',
                                wp_nonce_url( "edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ),
@@ -476,7 +476,7 @@ class WP_Terms_List_Table extends WP_List_Table {
                 *
                 * @param array  $actions An array of action links to be displayed. Default
                 *                        'Edit', 'Quick Edit', 'Delete', and 'View'.
-                * @param object $tag     Term object.
+                * @param WP_Term $tag    Term object.
                 */
                $actions = apply_filters( 'tag_row_actions', $actions, $tag );
 
@@ -489,7 +489,7 @@ class WP_Terms_List_Table extends WP_List_Table {
                 *
                 * @param array  $actions An array of action links to be displayed. Default
                 *                        'Edit', 'Quick Edit', 'Delete', and 'View'.
-                * @param object $tag     Term object.
+                * @param WP_Term $tag    Term object.
                 */
                $actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag );
 
@@ -497,7 +497,7 @@ class WP_Terms_List_Table extends WP_List_Table {
        }
 
        /**
-        * @param object $tag
+        * @param WP_Term $tag Term object.
         * @return string
         */
        public function column_description( $tag ) {
@@ -505,7 +505,7 @@ class WP_Terms_List_Table extends WP_List_Table {
        }
 
        /**
-        * @param object $tag
+        * @param WP_Term $tag Term object.
         * @return string
         */
        public function column_slug( $tag ) {
@@ -514,7 +514,7 @@ class WP_Terms_List_Table extends WP_List_Table {
        }
 
        /**
-        * @param object $tag
+        * @param WP_Term $tag Term object.
         * @return string
         */
        public function column_posts( $tag ) {
@@ -542,7 +542,7 @@ class WP_Terms_List_Table extends WP_List_Table {
        }
 
        /**
-        * @param object $tag
+        * @param WP_Term $tag Term object.
         * @return string
         */
        public function column_links( $tag ) {
@@ -553,7 +553,7 @@ class WP_Terms_List_Table extends WP_List_Table {
        }
 
        /**
-        * @param object $tag
+        * @param WP_Term $tag Term object.
         * @param string $column_name
         * @return string
         */
@@ -619,8 +619,8 @@ class WP_Terms_List_Table extends WP_List_Table {
        ?>
 
                <p class="inline-edit-save submit">
-                       <button type="button" class="cancel button-secondary alignleft"><?php _e( 'Cancel' ); ?></button>
-                       <button type="button" class="save button-primary alignright"><?php echo $tax->labels->update_item; ?></button>
+                       <button type="button" class="cancel button alignleft"><?php _e( 'Cancel' ); ?></button>
+                       <button type="button" class="save button button-primary alignright"><?php echo $tax->labels->update_item; ?></button>
                        <span class="spinner"></span>
                        <span class="error" style="display:none;"></span>
                        <?php wp_nonce_field( 'taxinlineeditnonce', '_inline_edit', false ); ?>
index 492497ed35afa28aa4a43a0be0317ba68044e08c..f459d67d1c01e3448dcaa243c1aebba170cdc689 100644 (file)
@@ -134,7 +134,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
                 *
                 * @param array $args An array of themes API arguments.
                 */
-               $args = apply_filters( 'install_themes_table_api_args_' . $tab, $args );
+               $args = apply_filters( "install_themes_table_api_args_{$tab}", $args );
 
                if ( ! $args )
                        return;
@@ -226,23 +226,26 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
        /**
         * Prints a theme from the WordPress.org API.
         *
+        * @since 3.1.0
+        * @access public
+        *
         * @global array $themes_allowedtags
         *
-        * @param object $theme An object that contains theme data returned by the WordPress.org API.
+        * @param object $theme {
+        *     An object that contains theme data returned by the WordPress.org API.
         *
-        * Example theme data:
-        *   object(stdClass)[59]
-        *     public 'name' => string 'Magazine Basic'
-        *     public 'slug' => string 'magazine-basic'
-        *     public 'version' => string '1.1'
-        *     public 'author' => string 'tinkerpriest'
-        *     public 'preview_url' => string 'http://wp-themes.com/?magazine-basic'
-        *     public 'screenshot_url' => string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png'
-        *     public 'rating' => float 80
-        *     public 'num_ratings' => int 1
-        *     public 'homepage' => string 'http://wordpress.org/themes/magazine-basic'
-        *     public 'description' => string 'A basic magazine style layout with a fully customizable layout through a back-end interface. Designed by <a href="http://bavotasan.com">c.bavota</a> of <a href="http://tinkerpriestmedia.com">Tinker Priest Media</a>.'
-        *     public 'download_link' => string 'http://wordpress.org/themes/download/magazine-basic.1.1.zip'
+        *     @type string $name           Theme name, e.g. 'Twenty Seventeen'.
+        *     @type string $slug           Theme slug, e.g. 'twentyseventeen'.
+        *     @type string $version        Theme version, e.g. '1.1'.
+        *     @type string $author         Theme author username, e.g. 'melchoyce'.
+        *     @type string $preview_url    Preview URL, e.g. 'http://2017.wordpress.net/'.
+        *     @type string $screenshot_url Screenshot URL, e.g. 'https://wordpress.org/themes/twentyseventeen/'.
+        *     @type float  $rating         Rating score.
+        *     @type int    $num_ratings    The number of ratings.
+        *     @type string $homepage       Theme homepage, e.g. 'https://wordpress.org/themes/twentyseventeen/'.
+        *     @type string $description    Theme description.
+        *     @type string $download_link  Theme ZIP download URL.
+        * }
         */
        public function single_row( $theme ) {
                global $themes_allowedtags;
@@ -329,14 +332,14 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
                <div id="theme-installer" class="wp-full-overlay expanded">
                        <div class="wp-full-overlay-sidebar">
                                <div class="wp-full-overlay-header">
-                                       <a href="#" class="close-full-overlay button-secondary"><?php _e( 'Close' ); ?></a>
+                                       <a href="#" class="close-full-overlay button"><?php _e( 'Close' ); ?></a>
                                        <span class="theme-install"></span>
                                </div>
                                <div class="wp-full-overlay-sidebar-content">
                                        <div class="install-theme-info"></div>
                                </div>
                                <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' ); ?>">
+                                       <button type="button" class="collapse-sidebar button" 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>
@@ -398,7 +401,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
                <div class="install-theme-info"><?php
                        switch ( $status ) {
                                case 'update_available':
-                                       echo '<a class="theme-install button-primary" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
+                                       echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
                                        break;
                                case 'newer_installed':
                                case 'latest_installed':
@@ -406,7 +409,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
                                        break;
                                case 'install':
                                default:
-                                       echo '<a class="theme-install button-primary" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '">' . __( 'Install' ) . '</a>';
+                                       echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '">' . __( 'Install' ) . '</a>';
                                        break;
                        } ?>
                        <h3 class="theme-name"><?php echo $name; ?></h3>
index a232cd05b2f64b6b0c0500796092371cb012a9ac..9ac4597b375d1a06f5ceb6ce15aa492ec19f914f 100644 (file)
@@ -91,13 +91,14 @@ class WP_Themes_List_Table extends WP_List_Table {
                        return;
                }
 
+               $blog_id = get_current_blog_id();
                if ( is_multisite() ) {
                        if ( current_user_can( 'install_themes' ) && current_user_can( 'manage_network_themes' ) ) {
-                               printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> or <a href="%2$s">install</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $GLOBALS['blog_id'] ), network_admin_url( 'theme-install.php' ) );
+                               printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> or <a href="%2$s">install</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $blog_id ), network_admin_url( 'theme-install.php' ) );
 
                                return;
                        } elseif ( current_user_can( 'manage_network_themes' ) ) {
-                               printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $GLOBALS['blog_id'] ) );
+                               printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $blog_id ) );
 
                                return;
                        }
index 8b2789da0c090c0b43bbec5b37570423e64b039d..183a01193e13e7f2541a775bdc6503feeb9cc453 100644 (file)
@@ -7,6 +7,8 @@
  * @since 2.8.0
  */
 
+_deprecated_file( basename( __FILE__ ), '4.7.0', 'class-wp-upgrader.php' );
+
 /** WP_Upgrader_Skin class */
 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader-skin.php';
 
index 485197c49ac213bc20b17484990614134f08de49..acfae5be06479116cbea44998c54bd911cc03bda 100644 (file)
@@ -833,7 +833,7 @@ class WP_Upgrader {
         * @param string $lock_name       The name of this unique lock.
         * @param int    $release_timeout Optional. The duration in seconds to respect an existing lock.
         *                                Default: 1 hour.
-        * @return bool False if a lock couldn't be created or if the lock is no longer valid. True otherwise.
+        * @return bool False if a lock couldn't be created or if the lock is still valid. True otherwise.
         */
        public static function create_lock( $lock_name, $release_timeout = null ) {
                global $wpdb;
@@ -853,7 +853,7 @@ class WP_Upgrader {
                                return false;
                        }
 
-                       // Check to see if the lock is still valid. If not, bail.
+                       // Check to see if the lock is still valid. If it is, bail.
                        if ( $lock_result > ( time() - $release_timeout ) ) {
                                return false;
                        }
index 80720b6c0f07d13f6ef68697dd45f23b0bf74955..3b7795dfabd763560639bdb2d53d4b100c8e724a 100644 (file)
@@ -267,7 +267,7 @@ class WP_Users_List_Table extends WP_List_Table {
                        <?php wp_dropdown_roles(); ?>
                </select>
        <?php
-                       submit_button( __( 'Change' ), 'button', 'changeit', false );
+                       submit_button( __( 'Change' ), '', 'changeit', false );
                endif;
 
                /**
index 80f1269ec2edd5890ff839123dfa923d53aac1d9..005858c384564e2c3642841f04b789946ce0c8ad 100644 (file)
 /**
  * Retrieve the contributor credits.
  *
- * @global string $wp_version The current WordPress version.
- *
  * @since 3.2.0
  *
  * @return array|false A list of all of the contributors, or false on error.
  */
 function wp_credits() {
-       global $wp_version;
-       $locale = get_locale();
+       $wp_version = get_bloginfo( 'version' );
+       $locale = get_user_locale();
 
        $results = get_site_transient( 'wordpress_credits_' . $locale );
 
@@ -26,7 +24,7 @@ function wp_credits() {
                || false !== strpos( $wp_version, '-' )
                || ( isset( $results['data']['version'] ) && strpos( $wp_version, $results['data']['version'] ) !== 0 )
        ) {
-               $response = wp_remote_get( "http://api.wordpress.org/core/credits/1.1/?version=$wp_version&locale=$locale" );
+               $response = wp_remote_get( "http://api.wordpress.org/core/credits/1.1/?version={$wp_version}&locale={$locale}" );
 
                if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
                        return false;
index e517f956c76161a2f77dbb1ce93ac03acbef902c..0ecf0a23f01106986038844fe1f49810fcfb7f70 100644 (file)
@@ -392,9 +392,12 @@ function wp_network_dashboard_right_now() {
        $c_users = get_user_count();
        $c_blogs = get_blog_count();
 
+       /* translators: 1: Number of users on the network */
        $user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) );
+       /* translators: 1: Number of sites on the network */
        $blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) );
 
+       /* translators: 1: Text indicating the number of sites on the network, 2: Text indicating the number of users on the network */
        $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text );
 
        if ( $actions ) {
@@ -427,7 +430,7 @@ function wp_network_dashboard_right_now() {
                <p>
                        <label class="screen-reader-text" for="search-users"><?php _e( 'Search Users' ); ?></label>
                        <input type="search" name="s" value="" size="30" autocomplete="off" id="search-users"/>
-                       <?php submit_button( __( 'Search Users' ), 'button', false, false, array( 'id' => 'submit_users' ) ); ?>
+                       <?php submit_button( __( 'Search Users' ), '', false, false, array( 'id' => 'submit_users' ) ); ?>
                </p>
        </form>
 
@@ -435,7 +438,7 @@ function wp_network_dashboard_right_now() {
                <p>
                        <label class="screen-reader-text" for="search-sites"><?php _e( 'Search Sites' ); ?></label>
                        <input type="search" name="s" value="" size="30" autocomplete="off" id="search-sites"/>
-                       <?php submit_button( __( 'Search Sites' ), 'button', false, false, array( 'id' => 'submit_sites' ) ); ?>
+                       <?php submit_button( __( 'Search Sites' ), '', false, false, array( 'id' => 'submit_sites' ) ); ?>
                </p>
        </form>
 <?php
@@ -777,7 +780,7 @@ function wp_dashboard_site_activity() {
 
        if ( !$future_posts && !$recent_posts && !$recent_comments ) {
                echo '<div class="no-activity">';
-               echo '<p class="smiley"></p>';
+               echo '<p class="smiley" aria-hidden="true"></p>';
                echo '<p>' . __( 'No activity yet!' ) . '</p>';
                echo '</div>';
        }
@@ -966,7 +969,7 @@ function wp_dashboard_rss_output( $widget_id ) {
  */
 function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) {
        $loading = '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="hide-if-js">' . __( 'This widget requires JavaScript.' ) . '</p>';
-       $doing_ajax = ( defined('DOING_AJAX') && DOING_AJAX );
+       $doing_ajax = wp_doing_ajax();
 
        if ( empty($check_urls) ) {
                $widgets = get_option( 'dashboard_widget_options' );
@@ -1149,7 +1152,7 @@ function wp_dashboard_primary() {
                )
        );
 
-       if ( ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) {
+       if ( ( ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS ) && ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) {
                $feeds['plugins'] = array(
                        'link'         => '',
                        'url'          => array(
@@ -1353,7 +1356,7 @@ function wp_dashboard_browser_nag() {
                $notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
 
                $browsehappy = 'http://browsehappy.com/';
-               $locale = get_locale();
+               $locale = get_user_locale();
                if ( 'en_US' !== $locale )
                        $browsehappy = add_query_arg( 'locale', $locale, $browsehappy );
 
@@ -1393,8 +1396,6 @@ function dashboard_browser_nag_class( $classes ) {
  *
  * @since 3.2.0
  *
- * @global string $wp_version
- *
  * @return array|bool False on failure, array of browser data on success.
  */
 function wp_check_browser_version() {
@@ -1404,11 +1405,9 @@ function wp_check_browser_version() {
        $key = md5( $_SERVER['HTTP_USER_AGENT'] );
 
        if ( false === ($response = get_site_transient('browser_' . $key) ) ) {
-               global $wp_version;
-
                $options = array(
                        'body'                  => array( 'useragent' => $_SERVER['HTTP_USER_AGENT'] ),
-                       'user-agent'    => 'WordPress/' . $wp_version . '; ' . home_url()
+                       'user-agent'    => 'WordPress/' . get_bloginfo( 'version' ) . '; ' . home_url()
                );
 
                $response = wp_remote_post( 'http://api.wordpress.org/core/browse-happy/1.1/', $options );
index 25bf5e7fea328bca3e57d65ea239d12705b37c0d..f321a56eecb38d0a5dbd815851cfc25328feebea 100644 (file)
@@ -18,12 +18,40 @@ define( 'WXR_VERSION', '1.2' );
 /**
  * Generates the WXR export file for download.
  *
+ * Default behavior is to export all content, however, note that post content will only
+ * be exported for post types with the `can_export` argument enabled. Any posts with the
+ * 'auto-draft' status will be skipped.
+ *
  * @since 2.1.0
  *
- * @global wpdb    $wpdb
- * @global WP_Post $post
+ * @global wpdb    $wpdb WordPress database abstraction object.
+ * @global WP_Post $post Global `$post`.
+ *
+ * @param array $args {
+ *     Optional. Arguments for generating the WXR export file for download. Default empty array.
  *
- * @param array $args Filters defining what should be included in the export.
+ *     @type string $content        Type of content to export. If set, only the post content of this post type
+ *                                  will be exported. Accepts 'all', 'post', 'page', 'attachment', or a defined
+ *                                  custom post. If an invalid custom post type is supplied, every post type for
+ *                                  which `can_export` is enabled will be exported instead. If a valid custom post
+ *                                  type is supplied but `can_export` is disabled, then 'posts' will be exported
+ *                                  instead. When 'all' is supplied, only post types with `can_export` enabled will
+ *                                  be exported. Default 'all'.
+ *     @type string $author         Author to export content for. Only used when `$content` is 'post', 'page', or
+ *                                  'attachment'. Accepts false (all) or a specific author ID. Default false (all).
+ *     @type string $category       Category (slug) to export content for. Used only when `$content` is 'post'. If
+ *                                  set, only post content assigned to `$category will be exported. Accepts false
+ *                                  or a specific category slug. Default is false (all categories).
+ *     @type string $start_date     Start date to export content from. Expected date format is 'Y-m-d'. Used only
+ *                                  when `$content` is 'post', 'page' or 'attachment'. Default false (since the
+ *                                  beginning of time).
+ *     @type string $end_date       End date to export content to. Expected date format is 'Y-m-d'. Used only when
+ *                                  `$content` is 'post', 'page' or 'attachment'. Default false (latest publish date).
+ *     @type string $status         Post status to export posts for. Used only when `$content` is 'post' or 'page'.
+ *                                  Accepts false (all statuses except 'auto-draft'), or a specific status, i.e.
+ *                                  'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', or
+ *                                  'trash'. Default false (all statuses except 'auto-draft').
+ * }
  */
 function export_wp( $args = array() ) {
        global $wpdb, $post;
@@ -325,7 +353,7 @@ function export_wp( $args = array() ) {
        }
 
        /**
-        * Ouput all navigation menu terms
+        * Output all navigation menu terms
         *
         * @since 3.1.0
         */
index face9164b48904870b1d5de1d359b67bb9159182..079e1ae892500a20ed9f7f8ece408d7637c5a4be 100644 (file)
@@ -77,9 +77,10 @@ $wp_file_descriptions = array(
 function get_file_description( $file ) {
        global $wp_file_descriptions, $allowed_files;
 
-       $relative_pathinfo = pathinfo( $file );
+       $dirname = pathinfo( $file, PATHINFO_DIRNAME );
+
        $file_path = $allowed_files[ $file ];
-       if ( isset( $wp_file_descriptions[ basename( $file ) ] ) && '.' === $relative_pathinfo['dirname'] ) {
+       if ( isset( $wp_file_descriptions[ basename( $file ) ] ) && '.' === $dirname ) {
                return $wp_file_descriptions[ basename( $file ) ];
        } elseif ( file_exists( $file_path ) && is_file( $file_path ) ) {
                $template_data = implode( '', file( $file_path ) );
@@ -1260,7 +1261,7 @@ foreach ( (array) $extra_fields as $field ) {
 ?>
        <p class="request-filesystem-credentials-action-buttons">
                <button class="button cancel-button" data-js-action="close" type="button"><?php _e( 'Cancel' ); ?></button>
-               <?php submit_button( __( 'Proceed' ), 'button', 'upgrade', false ); ?>
+               <?php submit_button( __( 'Proceed' ), '', 'upgrade', false ); ?>
        </p>
 </div>
 </form>
index 928cd1357f7b39831c6d251b546b018573ea0fa0..db11b56690628cc326c3acd45b14bd34935a8a60 100644 (file)
@@ -387,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.0', __( 'Use WP_Image_Editor::rotate' ) );
+       _deprecated_function( __FUNCTION__, '3.5.0', 'WP_Image_Editor::rotate()' );
        if ( function_exists('imagerotate') ) {
                $rotated = imagerotate($img, $angle, 0);
                if ( is_resource($rotated) ) {
@@ -410,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.0', __( 'Use WP_Image_Editor::flip' ) );
+       _deprecated_function( __FUNCTION__, '3.5.0', 'WP_Image_Editor::flip()' );
        $w = imagesx($img);
        $h = imagesy($img);
        $dst = wp_imagecreatetruecolor($w, $h);
@@ -700,13 +700,11 @@ function wp_restore_image($post_id) {
  * Saves image to post along with enqueued changes
  * in $_REQUEST['history']
  *
- * @global array $_wp_additional_image_sizes
- *
  * @param int $post_id
  * @return \stdClass
  */
 function wp_save_image( $post_id ) {
-       global $_wp_additional_image_sizes;
+       $_wp_additional_image_sizes = wp_get_additional_image_sizes();
 
        $return = new stdClass;
        $success = $delete = $scaled = $nocrop = false;
@@ -761,28 +759,33 @@ function wp_save_image( $post_id ) {
                $backup_sizes = array();
 
        // Generate new filename.
-       $path = get_attached_file($post_id);
-       $path_parts = pathinfo( $path );
-       $filename = $path_parts['filename'];
+       $path = get_attached_file( $post_id );
+
+       $basename = pathinfo( $path, PATHINFO_BASENAME );
+       $dirname = pathinfo( $path, PATHINFO_DIRNAME );
+       $ext = pathinfo( $path, PATHINFO_EXTENSION );
+       $filename = pathinfo( $path, PATHINFO_FILENAME );
        $suffix = time() . rand(100, 999);
 
        if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE &&
-               isset($backup_sizes['full-orig']) && $backup_sizes['full-orig']['file'] != $path_parts['basename'] ) {
+               isset($backup_sizes['full-orig']) && $backup_sizes['full-orig']['file'] != $basename ) {
 
-               if ( 'thumbnail' == $target )
-                       $new_path = "{$path_parts['dirname']}/{$filename}-temp.{$path_parts['extension']}";
-               else
+               if ( 'thumbnail' == $target ) {
+                       $new_path = "{$dirname}/{$filename}-temp.{$ext}";
+               } else {
                        $new_path = $path;
+               }
        } else {
-               while( true ) {
+               while ( true ) {
                        $filename = preg_replace( '/-e([0-9]+)$/', '', $filename );
                        $filename .= "-e{$suffix}";
-                       $new_filename = "{$filename}.{$path_parts['extension']}";
-                       $new_path = "{$path_parts['dirname']}/$new_filename";
-                       if ( file_exists($new_path) )
+                       $new_filename = "{$filename}.{$ext}";
+                       $new_path = "{$dirname}/$new_filename";
+                       if ( file_exists($new_path) ) {
                                $suffix++;
-                       else
+                       } else {
                                break;
+                       }
                }
        }
 
@@ -792,18 +795,19 @@ function wp_save_image( $post_id ) {
                return $return;
        }
 
-       if ( 'nothumb' == $target || 'all' == $target || 'full' == $target || $scaled ) {
+       if ( 'nothumb' === $target || 'all' === $target || 'full' === $target || $scaled ) {
                $tag = false;
-               if ( isset($backup_sizes['full-orig']) ) {
-                       if ( ( !defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE ) && $backup_sizes['full-orig']['file'] != $path_parts['basename'] )
+               if ( isset( $backup_sizes['full-orig'] ) ) {
+                       if ( ( ! defined( 'IMAGE_EDIT_OVERWRITE' ) || ! IMAGE_EDIT_OVERWRITE ) && $backup_sizes['full-orig']['file'] !== $basename ) {
                                $tag = "full-$suffix";
+                       }
                } else {
                        $tag = 'full-orig';
                }
 
-               if ( $tag )
-                       $backup_sizes[$tag] = array('width' => $meta['width'], 'height' => $meta['height'], 'file' => $path_parts['basename']);
-
+               if ( $tag ) {
+                       $backup_sizes[$tag] = array('width' => $meta['width'], 'height' => $meta['height'], 'file' => $basename );
+               }
                $success = ( $path === $new_path ) || update_attached_file( $post_id, $new_path );
 
                $meta['file'] = _wp_relative_upload_path( $new_path );
@@ -834,7 +838,7 @@ function wp_save_image( $post_id ) {
        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'] );
+                               $delete_file = path_join( $dirname, $size['file'] );
                                wp_delete_file( $delete_file );
                        }
                }
index 4d9e07692186706d6fe4b52595fcd4df1fb847d9..5f7b583d5d0481ea260f0b1bf3afbb8c037cd78d 100644 (file)
@@ -67,8 +67,6 @@ function wp_crop_image( $src, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $s
  *
  * @since 2.1.0
  *
- * @global array $_wp_additional_image_sizes
- *
  * @param int $attachment_id Attachment Id to process.
  * @param string $file Filepath of the Attached image.
  * @return mixed Metadata for attachment.
@@ -78,7 +76,9 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
 
        $metadata = array();
        $support = false;
-       if ( preg_match('!^image/!', get_post_mime_type( $attachment )) && file_is_displayable_image($file) ) {
+       $mime_type = get_post_mime_type( $attachment );
+
+       if ( preg_match( '!^image/!', $mime_type ) && file_is_displayable_image( $file ) ) {
                $imagesize = getimagesize( $file );
                $metadata['width'] = $imagesize[0];
                $metadata['height'] = $imagesize[1];
@@ -87,23 +87,34 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
                $metadata['file'] = _wp_relative_upload_path($file);
 
                // Make thumbnails and other intermediate sizes.
-               global $_wp_additional_image_sizes;
+               $_wp_additional_image_sizes = wp_get_additional_image_sizes();
 
                $sizes = array();
                foreach ( get_intermediate_image_sizes() as $s ) {
                        $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => false );
-                       if ( isset( $_wp_additional_image_sizes[$s]['width'] ) )
-                               $sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes
-                       else
-                               $sizes[$s]['width'] = get_option( "{$s}_size_w" ); // For default sizes set in options
-                       if ( isset( $_wp_additional_image_sizes[$s]['height'] ) )
-                               $sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] ); // For theme-added sizes
-                       else
-                               $sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options
-                       if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) )
-                               $sizes[$s]['crop'] = $_wp_additional_image_sizes[$s]['crop']; // For theme-added sizes
-                       else
-                               $sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options
+                       if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) {
+                               // For theme-added sizes
+                               $sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] );
+                       } else {
+                               // For default sizes set in options
+                               $sizes[$s]['width'] = get_option( "{$s}_size_w" );
+                       }
+
+                       if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) {
+                               // For theme-added sizes
+                               $sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] );
+                       } else {
+                               // For default sizes set in options
+                               $sizes[$s]['height'] = get_option( "{$s}_size_h" );
+                       }
+
+                       if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) {
+                               // For theme-added sizes
+                               $sizes[$s]['crop'] = $_wp_additional_image_sizes[$s]['crop'];
+                       } else {
+                               // For default sizes set in options
+                               $sizes[$s]['crop'] = get_option( "{$s}_crop" );
+                       }
                }
 
                /**
@@ -192,6 +203,56 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
                        }
                }
        }
+       // Try to create image thumbnails for PDFs
+       else if ( 'application/pdf' === $mime_type ) {
+               $fallback_sizes = array(
+                       'thumbnail',
+                       'medium',
+                       'large',
+               );
+
+               /**
+                * Filters the image sizes generated for non-image mime types.
+                *
+                * @since 4.7.0
+                *
+                * @param array $fallback_sizes An array of image size names.
+                */
+               $fallback_sizes = apply_filters( 'fallback_intermediate_image_sizes', $fallback_sizes, $metadata );
+
+               $sizes = array();
+
+               foreach ( $fallback_sizes as $s ) {
+                       $sizes[ $s ]['width']  = get_option( "{$s}_size_w" );
+                       $sizes[ $s ]['height'] = get_option( "{$s}_size_h" );
+
+                       // Force thumbnails to be soft crops.
+                       if ( ! 'thumbnail' === $s ) {
+                               $sizes[ $s ]['crop'] = get_option( "{$s}_crop" );
+                       }
+               }
+
+               // Only load PDFs in an image editor if we're processing sizes.
+               if ( ! empty( $sizes ) ) {
+                       $editor = wp_get_image_editor( $file );
+
+                       if ( ! is_wp_error( $editor ) ) { // No support for this type of file
+                               $uploaded = $editor->save( $file, 'image/jpeg' );
+                               unset( $editor );
+
+                               // Resize based on the full size image, rather than the source.
+                               if ( ! is_wp_error( $uploaded ) ) {
+                                       $editor = wp_get_image_editor( $uploaded['path'] );
+                                       unset( $uploaded['path'] );
+
+                                       if ( ! is_wp_error( $editor ) ) {
+                                               $metadata['sizes'] = $editor->multi_resize( $sizes );
+                                               $metadata['sizes']['full'] = $uploaded;
+                                       }
+                               }
+                       }
+               }
+       }
 
        // Remove the blob of binary data from the array.
        if ( $metadata ) {
@@ -554,7 +615,7 @@ function _load_image_to_edit_path( $attachment_id, $size = 'full' ) {
                         */
                        $filepath = apply_filters( 'load_image_to_edit_filesystempath', path_join( dirname( $filepath ), $data['file'] ), $attachment_id, $size );
                }
-       } elseif ( function_exists( 'fopen' ) && function_exists( 'ini_get' ) && true == ini_get( 'allow_url_fopen' ) ) {
+       } elseif ( function_exists( 'fopen' ) && true == ini_get( 'allow_url_fopen' ) ) {
                /**
                 * Filters the image URL if not in the local filesystem.
                 *
index 4f0b78536ff0704503f1d55aba955bb291d373ec..0d534422c212b25df1eef58e3c4bcc056925c6bc 100644 (file)
@@ -125,13 +125,13 @@ function wp_import_handle_upload() {
 function wp_get_popular_importers() {
        include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version
 
-       $locale = get_locale();
+       $locale = get_user_locale();
        $cache_key = 'popular_importers_' . md5( $locale . $wp_version );
        $popular_importers = get_site_transient( $cache_key );
 
        if ( ! $popular_importers ) {
                $url = add_query_arg( array(
-                       'locale'  => get_locale(),
+                       'locale'  => get_user_locale(),
                        'version' => $wp_version,
                ), 'http://api.wordpress.org/core/importers/1.1/' );
                $options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() );
index bcc182c866e637df5501cc82b88f8d82280ce823..e4c66d1fff35030ddb59a6ecd2082cac633980b0 100644 (file)
@@ -66,7 +66,7 @@ function _get_list_table( $class, $args = array() ) {
  * @see get_column_headers(), print_column_headers(), get_hidden_columns()
  */
 function register_column_headers($screen, $columns) {
-       $wp_list_table = new _WP_List_Table_Compat($screen, $columns);
+       new _WP_List_Table_Compat( $screen, $columns );
 }
 
 /**
@@ -82,48 +82,3 @@ function print_column_headers( $screen, $with_id = true ) {
 
        $wp_list_table->print_column_headers( $with_id );
 }
-
-/**
- * Helper class to be used only by back compat functions
- *
- * @since 3.1.0
- */
-class _WP_List_Table_Compat extends WP_List_Table {
-       public $_screen;
-       public $_columns;
-
-       public function __construct( $screen, $columns = array() ) {
-               if ( is_string( $screen ) )
-                       $screen = convert_to_screen( $screen );
-
-               $this->_screen = $screen;
-
-               if ( !empty( $columns ) ) {
-                       $this->_columns = $columns;
-                       add_filter( 'manage_' . $screen->id . '_columns', array( $this, 'get_columns' ), 0 );
-               }
-       }
-
-       /**
-        * @access protected
-        *
-        * @return array
-        */
-       protected function get_column_info() {
-               $columns = get_column_headers( $this->_screen );
-               $hidden = get_hidden_columns( $this->_screen );
-               $sortable = array();
-               $primary = $this->get_default_primary_column_name();
-
-               return array( $columns, $hidden, $sortable, $primary );
-       }
-
-       /**
-        * @access public
-        *
-        * @return array
-        */
-       public function get_columns() {
-               return $this->_columns;
-       }
-}
index 7ff6e4a652865b89c9cb47ea8b2ce2ddcb1ce799..ede25b3df76f740a371d9ac536428e70050c9c6a 100644 (file)
@@ -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>';
 
        /**
-        * Filters the image HTML markup to send to the editor.
+        * Filters the image HTML markup to send to the editor when inserting an image.
         *
         * @since 2.5.0
         *
@@ -278,14 +278,14 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override
                        $time = $post->post_date;
        }
 
-       $name = $_FILES[$file_id]['name'];
        $file = wp_handle_upload($_FILES[$file_id], $overrides, $time);
 
        if ( isset($file['error']) )
                return new WP_Error( 'upload_error', $file['error'] );
 
-       $name_parts = pathinfo($name);
-       $name = trim( substr( $name, 0, -(1 + strlen($name_parts['extension'])) ) );
+       $name = $_FILES[$file_id]['name'];
+       $ext  = pathinfo( $name, PATHINFO_EXTENSION );
+       $name = wp_basename( $name, ".$ext" );
 
        $url = $file['url'];
        $type = $file['type'];
@@ -313,6 +313,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override
                                /* translators: 1: audio track title, 2: artist name */
                                $content .= sprintf( __( '"%1$s" by %2$s.' ), $title, $meta['artist'] );
                        } else {
+                               /* translators: 1: audio track title */
                                $content .= sprintf( __( '"%s".' ), $title );
                        }
 
@@ -331,19 +332,26 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override
 
                }
 
-               if ( ! empty( $meta['year'] ) )
+               if ( ! empty( $meta['year'] ) ) {
+                       /* translators: Audio file track information. 1: Year of audio track release */
                        $content .= ' ' . sprintf( __( 'Released: %d.' ), $meta['year'] );
+               }
 
                if ( ! empty( $meta['track_number'] ) ) {
                        $track_number = explode( '/', $meta['track_number'] );
-                       if ( isset( $track_number[1] ) )
+                       if ( isset( $track_number[1] ) ) {
+                               /* translators: Audio file track information. 1: Audio track number, 2: Total audio tracks */
                                $content .= ' ' . sprintf( __( 'Track %1$s of %2$s.' ), number_format_i18n( $track_number[0] ), number_format_i18n( $track_number[1] ) );
-                       else
+                       } else {
+                               /* translators: Audio file track information. 1: Audio track number */
                                $content .= ' ' . sprintf( __( 'Track %1$s.' ), number_format_i18n( $track_number[0] ) );
+                       }
                }
 
-               if ( ! empty( $meta['genre'] ) )
+               if ( ! empty( $meta['genre'] ) ) {
+                       /* translators: Audio file genre information. 1: Audio genre name */
                        $content .= ' ' . sprintf( __( 'Genre: %s.' ), $meta['genre'] );
+               }
 
        // Use image exif/iptc data for title and caption defaults if possible.
        } elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = @wp_read_image_metadata( $file ) ) {
@@ -619,7 +627,7 @@ function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) {
         *
         * @param string $upload_iframe_src The upload iframe source URL by type.
         */
-       $upload_iframe_src = apply_filters( $type . '_upload_iframe_src', $upload_iframe_src );
+       $upload_iframe_src = apply_filters( "{$type}_upload_iframe_src", $upload_iframe_src );
 
        return add_query_arg('TB_iframe', true, $upload_iframe_src);
 }
@@ -787,7 +795,7 @@ function wp_media_upload_handler() {
                         * @param string $src   Media source URL.
                         * @param string $title Media title.
                         */
-                       $html = apply_filters( $type . '_send_to_editor_url', $html, esc_url_raw( $src ), $title );
+                       $html = apply_filters( "{$type}_send_to_editor_url", $html, esc_url_raw( $src ), $title );
                } else {
                        $align = '';
                        $alt = esc_attr( wp_unslash( $_POST['alt'] ) );
@@ -1482,7 +1490,7 @@ function get_media_item( $attachment_id, $args = null ) {
        );
 
        if ( $r['send'] ) {
-               $r['send'] = get_submit_button( __( 'Insert into Post' ), 'button', "send[$attachment_id]", false );
+               $r['send'] = get_submit_button( __( 'Insert into Post' ), '', "send[$attachment_id]", false );
        }
 
        $delete = empty( $r['delete'] ) ? '' : $r['delete'];
@@ -2033,7 +2041,7 @@ if ( $id ) {
 ?></div>
 
 <p class="savebutton ml-submit">
-<?php submit_button( __( 'Save all changes' ), 'button', 'save', false ); ?>
+<?php submit_button( __( 'Save all changes' ), '', 'save', false ); ?>
 </p>
 </form>
 <?php
@@ -2244,7 +2252,7 @@ jQuery(function($){
 </div>
 
 <p class="ml-submit">
-<?php submit_button( __( 'Save all changes' ), 'button savebutton', 'save', false, array( 'id' => 'save-all', 'style' => 'display: none;' ) ); ?>
+<?php submit_button( __( 'Save all changes' ), 'savebutton', 'save', false, array( 'id' => 'save-all', 'style' => 'display: none;' ) ); ?>
 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
 <input type="hidden" name="type" value="<?php echo esc_attr( $GLOBALS['type'] ); ?>" />
 <input type="hidden" name="tab" value="<?php echo esc_attr( $GLOBALS['tab'] ); ?>" />
@@ -2384,7 +2392,7 @@ function media_upload_library_form($errors) {
 <p id="media-search" class="search-box">
        <label class="screen-reader-text" for="media-search-input"><?php _e('Search Media');?>:</label>
        <input type="search" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
-       <?php submit_button( __( 'Search Media' ), 'button', '', false ); ?>
+       <?php submit_button( __( 'Search Media' ), '', '', false ); ?>
 </p>
 
 <ul class="subsubsub">
@@ -2481,7 +2489,7 @@ foreach ($arc_result as $arc_row) {
 </select>
 <?php } ?>
 
-<?php submit_button( __( 'Filter &#187;' ), 'button', 'post-query-submit', false ); ?>
+<?php submit_button( __( 'Filter &#187;' ), '', 'post-query-submit', false ); ?>
 
 </div>
 
@@ -2511,7 +2519,7 @@ jQuery(function($){
 <?php echo get_media_items(null, $errors); ?>
 </div>
 <p class="ml-submit">
-<?php submit_button( __( 'Save all changes' ), 'button savebutton', 'save', false ); ?>
+<?php submit_button( __( 'Save all changes' ), 'savebutton', 'save', false ); ?>
 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
 </p>
 </form>
@@ -2614,7 +2622,7 @@ function wp_media_insert_url_form( $default_view = 'image' ) {
                <tr class="not-image">
                        <td></td>
                        <td>
-                               ' . get_submit_button( __( 'Insert into Post' ), 'button', 'insertonlybutton', false ) . '
+                               ' . get_submit_button( __( 'Insert into Post' ), '', 'insertonlybutton', false ) . '
                        </td>
                </tr>
        </tbody></table>
@@ -2766,7 +2774,17 @@ function edit_form_image_editor( $post ) {
 
                echo wp_video_shortcode( $attr );
 
-       else :
+       elseif ( isset( $thumb_url[0] ) ):
+
+               ?>
+               <div class="wp_attachment_image wp-clearfix" id="media-head-<?php echo $attachment_id; ?>">
+                       <p id="thumbnail-head-<?php echo $attachment_id; ?>">
+                               <img class="thumbnail" src="<?php echo set_url_scheme( $thumb_url[0] ); ?>" style="max-width:100%" alt="" />
+                       </p>
+               </div>
+               <?php
+
+       else:
 
                /**
                 * Fires when an attachment type can't be rendered in the edit form.
index 89e17671c9dc566f4a7312b5d1dfeb64b006d782..c26ced427acf9ada41517fed24db8d5aac5db90e 100644 (file)
@@ -32,7 +32,7 @@ function post_submit_meta_box( $post, $args = array() ) {
 
 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
 <div style="display:none;">
-<?php submit_button( __( 'Save' ), 'button', 'save' ); ?>
+<?php submit_button( __( 'Save' ), '', 'save' ); ?>
 </div>
 
 <div id="minor-publishing-actions">
@@ -74,9 +74,9 @@ do_action( 'post_submitbox_minor_actions', $post );
 
 <div id="misc-publishing-actions">
 
-<div class="misc-pub-section misc-pub-post-status"><label for="post_status"><?php _e('Status:') ?></label>
-<span id="post-status-display">
-<?php
+<div class="misc-pub-section misc-pub-post-status">
+<?php _e( 'Status:' ) ?> <span id="post-status-display"><?php
+
 switch ( $post->post_status ) {
        case 'private':
                _e('Privately Published');
@@ -98,11 +98,12 @@ switch ( $post->post_status ) {
 ?>
 </span>
 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?>
-<a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a>
+<a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a>
 
 <div id="post-status-select" class="hide-if-js">
 <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ('auto-draft' == $post->post_status ) ? 'draft' : $post->post_status); ?>" />
-<select name='post_status' id='post_status'>
+<label for="post_status" class="screen-reader-text"><?php _e( 'Set status' ) ?></label>
+<select name="post_status" id="post_status">
 <?php if ( 'publish' == $post->post_status ) : ?>
 <option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option>
 <?php elseif ( 'private' == $post->post_status ) : ?>
@@ -144,7 +145,7 @@ if ( 'private' == $post->post_status ) {
 
 echo esc_html( $visibility_trans ); ?></span>
 <?php if ( $can_publish ) { ?>
-<a href="#visibility" class="edit-visibility hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit visibility' ); ?></span></a>
+<a href="#visibility" class="edit-visibility hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit visibility' ); ?></span></a>
 
 <div id="post-visibility-select" class="hide-if-js">
 <input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo esc_attr($post->post_password); ?>" />
@@ -157,7 +158,7 @@ echo esc_html( $visibility_trans ); ?></span>
 <span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span>
 <?php endif; ?>
 <input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e('Password protected'); ?></label><br />
-<span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr($post->post_password); ?>"  maxlength="20" /><br /></span>
+<span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr($post->post_password); ?>"  maxlength="255" /><br /></span>
 <input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br />
 
 <p>
@@ -174,14 +175,18 @@ echo esc_html( $visibility_trans ); ?></span>
 $datef = __( 'M j, Y @ H:i' );
 if ( 0 != $post->ID ) {
        if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
+               /* translators: Post date information. 1: Date on which the post is currently scheduled to be published */
                $stamp = __('Scheduled for: <b>%1$s</b>');
        } elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published
+               /* translators: Post date information. 1: Date on which the post was published */
                $stamp = __('Published on: <b>%1$s</b>');
        } elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified
                $stamp = __('Publish <b>immediately</b>');
        } elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified
+               /* translators: Post date information. 1: Date on which the post is to be published */
                $stamp = __('Schedule for: <b>%1$s</b>');
        } else { // draft, 1 or more saves, date specified
+               /* translators: Post date information. 1: Date on which the post is to be published */
                $stamp = __('Publish on: <b>%1$s</b>');
        }
        $date = date_i18n( $datef, strtotime( $post->post_date ) );
@@ -192,7 +197,10 @@ if ( 0 != $post->ID ) {
 
 if ( ! empty( $args['args']['revisions_count'] ) ) : ?>
 <div class="misc-pub-section misc-pub-revisions">
-       <?php printf( __( 'Revisions: %s' ), '<b>' . number_format_i18n( $args['args']['revisions_count'] ) . '</b>' ); ?>
+       <?php
+               /* translators: Post revisions heading. 1: The number of available revisions */
+               printf( __( 'Revisions: %s' ), '<b>' . number_format_i18n( $args['args']['revisions_count'] ) . '</b>' );
+       ?>
        <a class="hide-if-no-js" href="<?php echo esc_url( get_edit_post_link( $args['args']['revision_id'] ) ); ?>"><span aria-hidden="true"><?php _ex( 'Browse', 'revisions' ); ?></span> <span class="screen-reader-text"><?php _e( 'Browse revisions' ); ?></span></a>
 </div>
 <?php endif;
@@ -201,7 +209,7 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
 <div class="misc-pub-section curtime misc-pub-curtime">
        <span id="timestamp">
        <?php printf($stamp, $date); ?></span>
-       <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
+       <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
        <fieldset id="timestampdiv" class="hide-if-js">
        <legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
        <?php touch_time( ( $action === 'edit' ), 1 ); ?>
@@ -252,14 +260,14 @@ if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0
        if ( $can_publish ) :
                if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
                <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" />
-               <?php submit_button( __( 'Schedule' ), 'primary button-large', 'publish', false ); ?>
+               <?php submit_button( __( 'Schedule' ), 'primary large', 'publish', false ); ?>
 <?php  else : ?>
                <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" />
-               <?php submit_button( __( 'Publish' ), 'primary button-large', 'publish', false ); ?>
+               <?php submit_button( __( 'Publish' ), 'primary large', 'publish', false ); ?>
 <?php  endif;
        else : ?>
                <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" />
-               <?php submit_button( __( 'Submit for Review' ), 'primary button-large', 'publish', false ); ?>
+               <?php submit_button( __( 'Submit for Review' ), 'primary large', 'publish', false ); ?>
 <?php
        endif;
 } else { ?>
@@ -290,7 +298,7 @@ function attachment_submit_meta_box( $post ) {
 
 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
 <div style="display:none;">
-<?php submit_button( __( 'Save' ), 'button', 'save' ); ?>
+<?php submit_button( __( 'Save' ), '', 'save' ); ?>
 </div>
 
 
@@ -298,6 +306,7 @@ function attachment_submit_meta_box( $post ) {
        <?php
        /* translators: Publish box date format, see https://secure.php.net/date */
        $datef = __( 'M j, Y @ H:i' );
+       /* translators: Attachment information. 1: Date the attachment was uploaded */
        $stamp = __('Uploaded on: <b>%1$s</b>');
        $date = date_i18n( $datef, strtotime( $post->post_date ) );
        ?>
@@ -334,7 +343,7 @@ function attachment_submit_meta_box( $post ) {
        <div id="publishing-action">
                <span class="spinner"></span>
                <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" />
-               <input name="save" type="submit" class="button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update' ) ?>" />
+               <input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update' ) ?>" />
        </div>
        <div class="clear"></div>
 </div><!-- #major-publishing-actions -->
@@ -430,16 +439,18 @@ function post_tags_meta_box( $post, $box ) {
        <?php if ( $user_can_assign_terms ) : ?>
        <div class="ajaxtag hide-if-no-js">
                <label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->add_new_item; ?></label>
-               <p><input type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" aria-describedby="new-tag-<?php echo $tax_name; ?>-desc" value="" />
+               <p><input data-wp-taxonomy="<?php echo $tax_name; ?>" type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" aria-describedby="new-tag-<?php echo $tax_name; ?>-desc" value="" />
                <input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" /></p>
        </div>
        <p class="howto" id="new-tag-<?php echo $tax_name; ?>-desc"><?php echo $taxonomy->labels->separate_items_with_commas; ?></p>
+       <?php elseif ( empty( $terms_to_edit ) ): ?>
+               <p><?php echo $taxonomy->labels->no_terms; ?></p>
        <?php endif; ?>
        </div>
        <div class="tagchecklist"></div>
 </div>
 <?php if ( $user_can_assign_terms ) : ?>
-<p class="hide-if-no-js"><a href="#titlediv" class="tagcloud-link" id="link-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->choose_from_most_used; ?></a></p>
+<p class="hide-if-no-js"><button type="button" class="button-link tagcloud-link" id="link-<?php echo $tax_name; ?>" aria-expanded="false"><?php echo $taxonomy->labels->choose_from_most_used; ?></button></p>
 <?php endif; ?>
 <?php
 }
@@ -785,8 +796,7 @@ function post_revisions_meta_box( $post ) {
  * @param object $post
  */
 function page_attributes_meta_box($post) {
-       $post_type_object = get_post_type_object($post->post_type);
-       if ( $post_type_object->hierarchical ) {
+       if ( is_post_type_hierarchical( $post->post_type ) ) :
                $dropdown_args = array(
                        'post_type'        => $post->post_type,
                        'exclude_tree'     => $post->ID,
@@ -809,20 +819,20 @@ function page_attributes_meta_box($post) {
                 */
                $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post );
                $pages = wp_dropdown_pages( $dropdown_args );
-               if ( ! empty($pages) ) {
+               if ( ! empty($pages) ) :
 ?>
-<p><strong><?php _e('Parent') ?></strong></p>
-<label class="screen-reader-text" for="parent_id"><?php _e('Parent') ?></label>
+<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php _e( 'Parent' ); ?></label></p>
 <?php echo $pages; ?>
 <?php
-               } // end empty pages check
-       } // end hierarchical check.
-       if ( 'page' == $post->post_type && 0 != count( get_page_templates( $post ) ) && get_option( 'page_for_posts' ) != $post->ID ) {
-               $template = !empty($post->page_template) ? $post->page_template : false;
+               endif; // end empty pages check
+       endif;  // end hierarchical check.
+
+       if ( count( get_page_templates( $post ) ) > 0 && get_option( 'page_for_posts' ) != $post->ID ) :
+               $template = ! empty( $post->page_template ) ? $post->page_template : false;
                ?>
-<p><strong><?php _e('Template') ?></strong><?php
+<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="page_template"><?php _e( 'Template' ); ?></label><?php
        /**
-        * Fires immediately after the heading inside the 'Template' section
+        * Fires immediately after the label inside the 'Template' section
         * of the 'Page Attributes' meta box.
         *
         * @since 4.4.0
@@ -832,7 +842,7 @@ function page_attributes_meta_box($post) {
         */
        do_action( 'page_attributes_meta_box_template', $template, $post );
 ?></p>
-<label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
+<select name="page_template" id="page_template">
 <?php
 /**
  * Filters the title of the default page template displayed in the drop-down.
@@ -846,16 +856,16 @@ function page_attributes_meta_box($post) {
 $default_title = apply_filters( 'default_page_template_title',  __( 'Default Template' ), 'meta-box' );
 ?>
 <option value="default"><?php echo esc_html( $default_title ); ?></option>
-<?php page_template_dropdown($template); ?>
+<?php page_template_dropdown( $template, $post->post_type ); ?>
 </select>
-<?php
-       } ?>
-<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() ) { ?>
+<?php endif; ?>
+<?php if ( post_type_supports( $post->post_type, 'page-attributes' ) ) : ?>
+<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php _e( 'Order' ); ?></label></p>
+<input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr( $post->menu_order ); ?>" />
+<?php if ( 'page' == $post->post_type && get_current_screen()->get_help_tabs() ) : ?>
 <p><?php _e( 'Need help? Use the Help tab above the screen title.' ); ?></p>
-<?php
-       }
+<?php endif;
+       endif;
 }
 
 // -- Link related Meta Boxes
@@ -875,7 +885,7 @@ function link_submit_meta_box($link) {
 
 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
 <div style="display:none;">
-<?php submit_button( __( 'Save' ), 'button', 'save', false ); ?>
+<?php submit_button( __( 'Save' ), '', 'save', false ); ?>
 </div>
 
 <div id="minor-publishing-actions">
@@ -909,9 +919,9 @@ if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('m
 
 <div id="publishing-action">
 <?php if ( !empty($link->link_id) ) { ?>
-       <input name="save" type="submit" class="button-large button-primary" id="publish" value="<?php esc_attr_e( 'Update Link' ) ?>" />
+       <input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update Link' ) ?>" />
 <?php } else { ?>
-       <input name="save" type="submit" class="button-large button-primary" id="publish" value="<?php esc_attr_e( 'Add Link' ) ?>" />
+       <input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Add Link' ) ?>" />
 <?php } ?>
 </div>
 <div class="clear"></div>
index 0cc57cbc9b8b9c22c9c9273b18c9cdbcad8962db..679b9ac5d6d89dc38a3ecb81f7c817a053a2fc90 100644 (file)
@@ -133,7 +133,7 @@ function insert_with_markers( $filename, $marker, $insertion ) {
                $lines[] = rtrim( fgets( $fp ), "\r\n" );
        }
 
-       // Split out the existing file into the preceeding lines, and those that appear after the marker
+       // Split out the existing file into the preceding lines, and those that appear after the marker
        $pre_lines = $post_lines = $existing_lines = array();
        $found_marker = $found_end_marker = false;
        foreach ( $lines as $line ) {
index c88123a1fa2f5d84900614cdf1143987a1d4038b..0edc308382b61ecbd10ee622df4d4c7a2e622973 100644 (file)
@@ -29,10 +29,12 @@ function check_upload_size( $file ) {
 
        $file_size = filesize( $file['tmp_name'] );
        if ( $space_left < $file_size ) {
+               /* translators: 1: Required disk space in kilobytes */
                $file['error'] = sprintf( __( 'Not enough space to upload. %1$s KB needed.' ), number_format( ( $file_size - $space_left ) / KB_IN_BYTES ) );
        }
 
        if ( $file_size > ( KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 ) ) ) {
+               /* translators: 1: Maximum allowed file size in kilobytes */
                $file['error'] = sprintf( __( 'This file is too big. Files must be less than %1$s KB in size.' ), get_site_option( 'fileupload_maxk', 1500 ) );
        }
 
@@ -40,7 +42,7 @@ function check_upload_size( $file ) {
                $file['error'] = __( 'You have used your space quota. Please delete files before uploading.' );
        }
 
-       if ( $file['error'] != '0' && ! isset( $_POST['html-upload'] ) && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
+       if ( $file['error'] != '0' && ! isset( $_POST['html-upload'] ) && ! wp_doing_ajax() ) {
                wp_die( $file['error'] . ' <a href="javascript:history.go(-1)">' . __( 'Back' ) . '</a>' );
        }
 
@@ -66,7 +68,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
                switch_to_blog( $blog_id );
        }
 
-       $blog = get_blog_details( $blog_id );
+       $blog = get_site( $blog_id );
        /**
         * Fires before a site is deleted.
         *
@@ -88,7 +90,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
 
        update_blog_status( $blog_id, 'deleted', 1 );
 
-       $current_site = get_current_site();
+       $current_network = get_network();
 
        // If a full blog object is not available, do not destroy anything.
        if ( $drop && ! $blog ) {
@@ -96,7 +98,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
        }
 
        // Don't destroy the initial, main, or root blog.
-       if ( $drop && ( 1 == $blog_id || is_main_site( $blog_id ) || ( $blog->path == $current_site->path && $blog->domain == $current_site->domain ) ) ) {
+       if ( $drop && ( 1 == $blog_id || is_main_site( $blog_id ) || ( $blog->path == $current_network->path && $blog->domain == $current_network->domain ) ) ) {
                $drop = false;
        }
 
@@ -272,6 +274,8 @@ function update_option_new_admin_email( $old_value, $value ) {
        );
        update_option( 'adminhash', $new_admin_email );
 
+       $switched_locale = switch_to_locale( get_user_locale() );
+
        /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
        $email_text = __( 'Howdy ###USERNAME###,
 
@@ -315,6 +319,10 @@ All at ###SITENAME###
        $content = str_replace( '###SITEURL###', network_home_url(), $content );
 
        wp_mail( $value, sprintf( __( '[%s] New Admin Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content );
+
+       if ( $switched_locale ) {
+               restore_previous_locale();
+       }
 }
 
 /**
@@ -353,6 +361,8 @@ function send_confirmation_on_profile_email() {
                );
                update_user_meta( $current_user->ID, '_new_email', $new_user_email );
 
+               $switched_locale = switch_to_locale( get_user_locale() );
+
                /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
                $email_text = __( 'Howdy ###USERNAME###,
 
@@ -388,13 +398,17 @@ All at ###SITENAME###
                $content = apply_filters( 'new_user_email_content', $email_text, $new_user_email );
 
                $content = str_replace( '###USERNAME###', $current_user->user_login, $content );
-               $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail='.$hash ) ), $content );
+               $content = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'profile.php?newuseremail=' . $hash ) ), $content );
                $content = str_replace( '###EMAIL###', $_POST['email'], $content);
                $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content );
                $content = str_replace( '###SITEURL###', network_home_url(), $content );
 
                wp_mail( $_POST['email'], sprintf( __( '[%s] New Email Address' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), $content );
                $_POST['email'] = $current_user->user_email;
+
+               if ( $switched_locale ) {
+                       restore_previous_locale();
+               }
        }
 }
 
@@ -462,7 +476,10 @@ function display_space_usage() {
                $space .= __( 'MB' );
        }
        ?>
-       <strong><?php printf( __( 'Used: %1$s%% of %2$s' ), number_format( $percent_used ), $space ); ?></strong>
+       <strong><?php
+               /* translators: Storage space that's been used. 1: Percentage of used space, 2: Total space allowed in megabytes or gigabytes */
+               printf( __( 'Used: %1$s%% of %2$s' ), number_format( $percent_used ), $space );
+       ?></strong>
        <?php
 }
 
index cb1519c83b739255ab347c792a594fabad042b33..a6aac33053225bec3921425befed2f083e09da0b 100644 (file)
@@ -70,14 +70,22 @@ 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] ) ) {
-                       $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,
-                       ) );
+                       $post_type_obj = _wp_nav_menu_meta_box_object( get_post_type_object( $matches[2] ) );
+                       $args = array_merge(
+                               $args,
+                               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 ( isset( $post_type_obj->_default_query ) ) {
+                               $args = array_merge( $args, (array) $post_type_obj->_default_query );
+                       }
+                       $search_results_query = new WP_Query( $args );
                        if ( ! $search_results_query->have_posts() ) {
                                return;
                        }
@@ -279,7 +287,7 @@ function wp_nav_menu_item_link_meta_box() {
 
                <p class="button-controls wp-clearfix">
                        <span class="add-to-menu">
-                               <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-custom-menu-item" id="submit-customlinkdiv" />
+                               <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-custom-menu-item" id="submit-customlinkdiv" />
                                <span class="spinner"></span>
                        </span>
                </p>
@@ -350,9 +358,10 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
                        )
                ),
                'format' => '',
-               'prev_text' => __('&laquo;'),
-               'next_text' => __('&raquo;'),
-               'total' => $num_pages,
+               'prev_text'          => '<span aria-label="' . esc_attr__( 'Previous page' ) . '">' . __( '&laquo;' ) . '</span>',
+               'next_text'          => '<span aria-label="' . esc_attr__( 'Next page' ) . '">' . __( '&raquo;' ) . '</span>',
+               'before_page_number' => '<span class="screen-reader-text">' . __( 'Page' ) . '</span> ',
+               'total'   => $num_pages,
                'current' => $pagenum
        ));
 
@@ -445,7 +454,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
                                <label for="quick-search-posttype-<?php echo $post_type_name; ?>" class="screen-reader-text"><?php _e( 'Search' ); ?></label>
                                <input type="search" class="quick-search" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" id="quick-search-posttype-<?php echo $post_type_name; ?>" />
                                <span class="spinner"></span>
-                               <?php submit_button( __( 'Search' ), 'button-small quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-posttype-' . $post_type_name ) ); ?>
+                               <?php submit_button( __( 'Search' ), 'small quick-search-submit hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-posttype-' . $post_type_name ) ); ?>
                        </p>
 
                        <ul id="<?php echo $post_type_name; ?>-search-checklist" data-wp-lists="list:<?php echo $post_type_name?>" class="categorychecklist form-no-clear">
@@ -502,7 +511,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
                                }
 
                                $post_type = get_post_type_object( $post_type_name );
-                               $archive_link = get_post_type_archive_link( $post_type_name );
+
                                if ( $post_type->has_archive ) {
                                        $_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1;
                                        array_unshift( $posts, (object) array(
@@ -563,11 +572,11 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
                                                ),
                                                remove_query_arg( $removed_args )
                                        ));
-                               ?>#posttype-<?php echo $post_type_name; ?>" class="select-all"><?php _e('Select All'); ?></a>
+                               ?>#posttype-<?php echo $post_type_name; ?>" class="select-all aria-button-if-js"><?php _e( 'Select All' ); ?></a>
                        </span>
 
                        <span class="add-to-menu">
-                               <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-post-type-menu-item" id="<?php echo esc_attr( 'submit-posttype-' . $post_type_name ); ?>" />
+                               <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-post-type-menu-item" id="<?php echo esc_attr( 'submit-posttype-' . $post_type_name ); ?>" />
                                <span class="spinner"></span>
                        </span>
                </p>
@@ -634,9 +643,10 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
                        )
                ),
                'format' => '',
-               'prev_text' => __('&laquo;'),
-               'next_text' => __('&raquo;'),
-               'total' => $num_pages,
+               'prev_text'          => '<span aria-label="' . esc_attr__( 'Previous page' ) . '">' . __( '&laquo;' ) . '</span>',
+               'next_text'          => '<span aria-label="' . esc_attr__( 'Next page' ) . '">' . __( '&raquo;' ) . '</span>',
+               'before_page_number' => '<span class="screen-reader-text">' . __( 'Page' ) . '</span> ',
+               'total'   => $num_pages,
                'current' => $pagenum
        ));
 
@@ -734,7 +744,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
                                <label for="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" class="screen-reader-text"><?php _e( 'Search' ); ?></label>
                                <input type="search" class="quick-search" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" id="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
                                <span class="spinner"></span>
-                               <?php submit_button( __( 'Search' ), 'button-small quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?>
+                               <?php submit_button( __( 'Search' ), 'small quick-search-submit hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?>
                        </p>
 
                        <ul id="<?php echo $taxonomy_name; ?>-search-checklist" data-wp-lists="list:<?php echo $taxonomy_name?>" class="categorychecklist form-no-clear">
@@ -761,11 +771,11 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
                                                ),
                                                remove_query_arg($removed_args)
                                        ));
-                               ?>#taxonomy-<?php echo $taxonomy_name; ?>" class="select-all"><?php _e('Select All'); ?></a>
+                               ?>#taxonomy-<?php echo $taxonomy_name; ?>" class="select-all aria-button-if-js"><?php _e( 'Select All' ); ?></a>
                        </span>
 
                        <span class="add-to-menu">
-                               <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-taxonomy-menu-item" id="<?php echo esc_attr( 'submit-taxonomy-' . $taxonomy_name ); ?>" />
+                               <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-taxonomy-menu-item" id="<?php echo esc_attr( 'submit-taxonomy-' . $taxonomy_name ); ?>" />
                                <span class="spinner"></span>
                        </span>
                </p>
index d04b4f9a28f6e9433f908916f0c7e71519eaa24f..fef6b66850143fd8f61780ebb5d3f48614c769d9 100644 (file)
@@ -144,8 +144,18 @@ function network_step1( $errors = false ) {
                $error_codes = $errors->get_error_codes();
        }
 
-       $site_name = ( ! empty( $_POST['sitename'] ) && ! in_array( 'empty_sitename', $error_codes ) ) ? $_POST['sitename'] : sprintf( _x('%s Sites', 'Default network name' ), get_option( 'blogname' ) );
-       $admin_email = ( ! empty( $_POST['email'] ) && ! in_array( 'invalid_email', $error_codes ) ) ? $_POST['email'] : get_option( 'admin_email' );
+       if ( ! empty( $_POST['sitename'] ) && ! in_array( 'empty_sitename', $error_codes ) ) {
+               $site_name = $_POST['sitename'];
+       } else {
+               /* translators: %s: Default network name */
+               $site_name = sprintf( __( '%s Sites' ), get_option( 'blogname' ) );
+       }
+
+       if ( ! empty( $_POST['email'] ) && ! in_array( 'invalid_email', $error_codes ) ) {
+               $admin_email = $_POST['email'];
+       } else {
+               $admin_email = get_option( 'admin_email' );
+       }
        ?>
        <p><?php _e( 'Welcome to the Network installation process!' ); ?></p>
        <p><?php _e( 'Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.' ); ?></p>
index 4d558cf0eefab779bb379cd5bb1aef71bda4dfbc..0d932c2618cafc494153d1bf2d3ef3ea0ad1879b 100644 (file)
@@ -109,7 +109,7 @@ function plugins_api( $action, $args = array() ) {
        }
 
        if ( ! isset( $args->locale ) ) {
-               $args->locale = get_locale();
+               $args->locale = get_user_locale();
        }
 
        /**
@@ -155,16 +155,38 @@ function plugins_api( $action, $args = array() ) {
                $request = wp_remote_post( $url, $http_args );
 
                if ( $ssl && is_wp_error( $request ) ) {
-                       trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+                       trigger_error(
+                               sprintf(
+                                       /* translators: %s: support forums URL */
+                                       __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                                       __( 'https://wordpress.org/support/' )
+                               ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
+                               headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
+                       );
                        $request = wp_remote_post( $http_url, $http_args );
                }
 
                if ( is_wp_error($request) ) {
-                       $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() );
+                       $res = new WP_Error( 'plugins_api_failed',
+                               sprintf(
+                                       /* translators: %s: support forums URL */
+                                       __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                                       __( 'https://wordpress.org/support/' )
+                               ),
+                               $request->get_error_message()
+                       );
                } else {
                        $res = maybe_unserialize( wp_remote_retrieve_body( $request ) );
-                       if ( ! is_object( $res ) && ! is_array( $res ) )
-                               $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) );
+                       if ( ! is_object( $res ) && ! is_array( $res ) ) {
+                               $res = new WP_Error( 'plugins_api_failed',
+                                       sprintf(
+                                               /* translators: %s: support forums URL */
+                                               __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                                               __( 'https://wordpress.org/support/' )
+                                       ),
+                                       wp_remote_retrieve_body( $request )
+                               );
+                       }
                }
        } elseif ( !is_wp_error($res) ) {
                $res->external = true;
@@ -210,7 +232,7 @@ 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 by clicking the button at the top of this page.' ), 'https://wordpress.org/plugins/' ); ?></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(); ?>
 
@@ -263,9 +285,9 @@ function install_search_form( $deprecated = true ) {
                        <option value="tag"<?php selected( 'tag', $type ); ?>><?php _ex( 'Tag', 'Plugin Installer' ); ?></option>
                </select>
                <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' ); ?>" />
+                       <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 hide-if-js', false, false, array( 'id' => 'search-submit' ) ); ?>
+               <?php submit_button( __( 'Search Plugins' ), 'hide-if-js', false, false, array( 'id' => 'search-submit' ) ); ?>
        </form><?php
 }
 
@@ -281,7 +303,7 @@ function install_plugins_upload() {
                <?php wp_nonce_field( 'plugin-upload' ); ?>
                <label class="screen-reader-text" for="pluginzip"><?php _e( 'Plugin zip file' ); ?></label>
                <input type="file" id="pluginzip" name="pluginzip" />
-               <?php submit_button( __( 'Install Now' ), 'button', 'install-plugin-submit', false ); ?>
+               <?php submit_button( __( 'Install Now' ), '', 'install-plugin-submit', false ); ?>
        </form>
 </div>
 <?php
@@ -348,9 +370,16 @@ function display_plugins_table() {
  *
  * @since 3.0.0
  *
- * @param array|object $api
- * @param bool        $loop
- * @return type
+ * @param  array|object $api  Data about the plugin retrieved from the API.
+ * @param  bool         $loop Optional. Disable further loops. Default false.
+ * @return array {
+ *     Plugin installation status data.
+ *
+ *     @type string $status  Status of a plugin. Could be one of 'install', 'update_available', 'latest_installed' or 'newer_installed'.
+ *     @type string $url     Plugin installation URL.
+ *     @type string $version The most recent version of the plugin.
+ *     @type string $file    Plugin filename relative to the plugins directory.
+ * }
  */
 function install_plugin_install_status($api, $loop = false) {
        // This function is called recursively, $loop prevents further loops.
@@ -423,7 +452,6 @@ function install_plugin_install_status($api, $loop = false) {
  * @since 2.7.0
  *
  * @global string $tab
- * @global string $wp_version
  */
 function install_plugin_information() {
        global $tab;
@@ -557,16 +585,18 @@ function install_plugin_information() {
                                </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 ) ) { ?>
+                       <?php } if ( isset( $api->active_installs ) ) { ?>
                                <li><strong><?php _e( 'Active Installs:' ); ?></strong> <?php
                                        if ( $api->active_installs >= 1000000 ) {
                                                _ex( '1+ Million', 'Active plugin installs' );
+                                       } elseif ( 0 == $api->active_installs ) {
+                                               _ex( 'Less Than 10', '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>
+                               <li><a target="_blank" href="<?php echo __( 'https://wordpress.org/plugins/' ) . $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 ) ) { ?>
@@ -630,9 +660,11 @@ 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, '>' ) ) {
+       $wp_version = get_bloginfo( 'version' );
+
+       if ( ! empty( $api->tested ) && version_compare( substr( $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, '<' ) ) {
+       } elseif ( ! empty( $api->requires ) && version_compare( substr( $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>';
        }
 
index cf6b4babf974596fac35ba192699791a046f5c76..9a4d0cb29bc09b799690fc9e2f36e83980ae772f 100644 (file)
@@ -588,7 +588,7 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen
                         * @param bool $network_wide Whether to enable the plugin for all sites in the network
                         *                           or just the current site. Multisite only. Default is false.
                         */
-                       do_action( 'activate_' . $plugin, $network_wide );
+                       do_action( "activate_{$plugin}", $network_wide );
                }
 
                if ( $network_wide ) {
@@ -701,7 +701,7 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
                         * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network
                         *                                   or just the current site. Multisite only. Default is false.
                         */
-                       do_action( 'deactivate_' . $plugin, $network_deactivating );
+                       do_action( "deactivate_{$plugin}", $network_deactivating );
 
                        /**
                         * Fires after a plugin is deactivated.
@@ -1764,67 +1764,6 @@ function user_can_access_admin_page() {
 
 /* Whitelist functions */
 
-/**
- * Register a setting and its sanitization callback
- *
- * @since 2.7.0
- *
- * @global array $new_whitelist_options
- *
- * @param string $option_group A settings group name. Should correspond to a whitelisted option key name.
- *     Default whitelisted option key names include "general," "discussion," and "reading," among others.
- * @param string $option_name The name of an option to sanitize and save.
- * @param callable $sanitize_callback A callback function that sanitizes the option's value.
- */
-function register_setting( $option_group, $option_name, $sanitize_callback = '' ) {
-       global $new_whitelist_options;
-
-       if ( 'misc' == $option_group ) {
-               _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.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
-               $option_group = 'reading';
-       }
-
-       $new_whitelist_options[ $option_group ][] = $option_name;
-       if ( $sanitize_callback != '' )
-               add_filter( "sanitize_option_{$option_name}", $sanitize_callback );
-}
-
-/**
- * Unregister a setting
- *
- * @since 2.7.0
- *
- * @global array $new_whitelist_options
- *
- * @param string   $option_group
- * @param string   $option_name
- * @param callable $sanitize_callback
- */
-function unregister_setting( $option_group, $option_name, $sanitize_callback = '' ) {
-       global $new_whitelist_options;
-
-       if ( 'misc' == $option_group ) {
-               _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.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
-               $option_group = 'reading';
-       }
-
-       $pos = array_search( $option_name, (array) $new_whitelist_options[ $option_group ] );
-       if ( $pos !== false )
-               unset( $new_whitelist_options[ $option_group ][ $pos ] );
-       if ( $sanitize_callback != '' )
-               remove_filter( "sanitize_option_{$option_name}", $sanitize_callback );
-}
-
 /**
  * Refreshes the value of the options whitelist available via the 'whitelist_options' hook.
  *
index 790b736cdf2c0c09b5021c24410c827c354e88f8..ab50c27d941a269f49bf7c4e817497292609ca50 100644 (file)
@@ -160,7 +160,7 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
                $post_data['post_date'] = sprintf( "%04d-%02d-%02d %02d:%02d:%02d", $aa, $mm, $jj, $hh, $mn, $ss );
                $valid_date = wp_checkdate( $mm, $jj, $aa, $post_data['post_date'] );
                if ( !$valid_date ) {
-                       return new WP_Error( 'invalid_date', __( 'Whoops, the provided date is invalid.' ) );
+                       return new WP_Error( 'invalid_date', __( 'Invalid date.' ) );
                }
                $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] );
        }
@@ -288,6 +288,8 @@ function edit_post( $post_data = null ) {
                                continue;
                        if ( $meta->post_id != $post_ID )
                                continue;
+                       if ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'edit_post_meta', $post_ID, $meta->meta_key ) )
+                               continue;
                        if ( is_protected_meta( $value['key'], 'post' ) || ! current_user_can( 'edit_post_meta', $post_ID, $value['key'] ) )
                                continue;
                        update_meta( $key, $value['key'], $value['value'] );
@@ -1144,9 +1146,43 @@ function wp_edit_attachments_query_vars( $q = false ) {
                $q['post_parent'] = 0;
        }
 
+       // Filter query clauses to include filenames.
+       if ( isset( $q['s'] ) ) {
+               add_filter( 'posts_clauses', '_filter_query_attachment_filenames' );
+       }
+
        return $q;
 }
 
+/**
+ * Filter the SQL clauses of an attachment query to include filenames.
+ *
+ * @since 4.7.0
+ * @access private
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param array $clauses An array including WHERE, GROUP BY, JOIN, ORDER BY,
+ *                       DISTINCT, fields (SELECT), and LIMITS clauses.
+ * @return array The modified clauses.
+ */
+function _filter_query_attachment_filenames( $clauses ) {
+       global $wpdb;
+       remove_filter( 'posts_clauses', __FUNCTION__ );
+
+       // Add a LEFT JOIN of the postmeta table so we don't trample existing JOINs.
+       $clauses['join'] .= " LEFT JOIN {$wpdb->postmeta} AS sq1 ON ( {$wpdb->posts}.ID = sq1.post_id AND sq1.meta_key = '_wp_attached_file' )";
+
+       $clauses['groupby'] = "{$wpdb->posts}.ID";
+
+       $clauses['where'] = preg_replace(
+               "/\({$wpdb->posts}.post_content (NOT LIKE|LIKE) (\'[^']+\')\)/",
+               "$0 OR ( sq1.meta_value $1 $2 )",
+               $clauses['where'] );
+
+       return $clauses;
+}
+
 /**
  * Executes a query for attachments. An array of WP_Query arguments
  * can be passed in, which will override the arguments set by this function.
@@ -1207,9 +1243,9 @@ function postbox_classes( $id, $page ) {
  * @since 2.5.0
  *
  * @param int    $id    Post ID or post object.
- * @param string $title Optional. Title. Default null.
- * @param string $name  Optional. Name. Default null.
- * @return array Array with two entries of type string.
+ * @param string $title Optional. Title to override the post's current title when generating the post name. Default null.
+ * @param string $name  Optional. Name to override the post name. Default null.
+ * @return array Array containing the sample permalink with placeholder for the post name, and the post name.
  */
 function get_sample_permalink($id, $title = null, $name = null) {
        $post = get_post( $id );
@@ -1270,7 +1306,7 @@ function get_sample_permalink($id, $title = null, $name = null) {
         *
         * @since 4.4.0
         *
-        * @param string  $permalink Sample permalink.
+        * @param array   $permalink Array containing the sample permalink with placeholder for the post name, and the post name.
         * @param int     $post_id   Post ID.
         * @param string  $title     Post title.
         * @param string  $name      Post name (slug).
@@ -1300,14 +1336,14 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
        $preview_target = '';
 
        if ( current_user_can( 'read_post', $post->ID ) ) {
-               if ( 'draft' === $post->post_status ) {
+               if ( 'draft' === $post->post_status || empty( $post->post_name ) ) {
                        $view_link = get_preview_post_link( $post );
                        $preview_target = " target='wp-preview-{$post->ID}'";
                } else {
                        if ( 'publish' === $post->post_status || 'attachment' === $post->post_type ) {
                                $view_link = get_permalink( $post );
                        } else {
-                               // Allow non-published (private, future) to be viewed at a pretty permalink.
+                               // Allow non-published (private, future) to be viewed at a pretty permalink, in case $post->post_name is set
                                $view_link = str_replace( array( '%pagename%', '%postname%' ), $post->post_name, $permalink );
                        }
                }
@@ -1367,14 +1403,12 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
  *
  * @since 2.9.0
  *
- * @global array $_wp_additional_image_sizes
- *
  * @param int $thumbnail_id ID of the attachment used for thumbnail
  * @param mixed $post The post ID or object associated with the thumbnail, defaults to global $post.
  * @return string html
  */
 function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
-       global $_wp_additional_image_sizes;
+       $_wp_additional_image_sizes = wp_get_additional_image_sizes();
 
        $post               = get_post( $post );
        $post_type_object   = get_post_type_object( $post->post_type );
index dee879d61a949c75cfceac8eabdbe549e06e8ce7..9edf52d2a08c94a6d43a6c9d706f49a5d9dc1fcf 100644 (file)
@@ -70,10 +70,10 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
                 * @param string  null                  The context of whether the current revision is the old
                 *                                      or the new one. Values are 'to' or 'from'.
                 */
-               $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_$field", $compare_from->$field, $field, $compare_from, 'from' ) : '';
+               $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_{$field}", $compare_from->$field, $field, $compare_from, 'from' ) : '';
 
                /** This filter is documented in wp-admin/includes/revision.php */
-               $content_to = apply_filters( "_wp_post_revision_field_$field", $compare_to->$field, $field, $compare_to, 'to' );
+               $content_to = apply_filters( "_wp_post_revision_field_{$field}", $compare_to->$field, $field, $compare_to, 'to' );
 
                $args = array(
                        'show_split_view' => true
@@ -340,7 +340,7 @@ function wp_print_revision_templates() {
                                }
                                #>
                                />
-                               <?php esc_attr_e( 'Compare any two revisions' ); ?>
+                               <?php esc_html_e( 'Compare any two revisions' ); ?>
                        </label>
                </div>
        </script>
@@ -400,4 +400,4 @@ function wp_print_revision_templates() {
                <# }); #>
                </div>
        </script><?php
-}
\ No newline at end of file
+}
index 83ba531794a4fc3e878d9f6062499ba9890209de..cd66e1924b5adc066f5eaefa53aafda94aa71c48 100644 (file)
@@ -165,7 +165,7 @@ CREATE TABLE $wpdb->posts (
   post_status varchar(20) NOT NULL default 'publish',
   comment_status varchar(20) NOT NULL default 'open',
   ping_status varchar(20) NOT NULL default 'open',
-  post_password varchar(20) NOT NULL default '',
+  post_password varchar(255) NOT NULL default '',
   post_name varchar(200) NOT NULL default '',
   to_ping text NOT NULL,
   pinged text NOT NULL,
@@ -527,7 +527,7 @@ function populate_options() {
        // 3.0 multisite
        if ( is_multisite() ) {
                /* translators: site tagline */
-               $options[ 'blogdescription' ] = sprintf(__('Just another %s site'), get_current_site()->site_name );
+               $options[ 'blogdescription' ] = sprintf(__('Just another %s site'), get_network()->site_name );
                $options[ 'permalink_structure' ] = '/%year%/%monthnum%/%day%/%postname%/';
        }
 
index 57478a11702b0d4faf27d7d0069fa13a58b7b905..edf9a8641c3902bbdbc2e032827e8fde36dc7b6b 100644 (file)
@@ -293,14 +293,15 @@ function get_inline_data($post) {
        <div class="ss">' . mysql2date( 's', $post->post_date, false ) . '</div>
        <div class="post_password">' . esc_html( $post->post_password ) . '</div>';
 
-       if ( $post_type_object->hierarchical )
+       if ( $post_type_object->hierarchical ) {
                echo '<div class="post_parent">' . $post->post_parent . '</div>';
+       }
 
-       if ( $post->post_type == 'page' )
-               echo '<div class="page_template">' . esc_html( get_post_meta( $post->ID, '_wp_page_template', true ) ) . '</div>';
+       echo '<div class="page_template">' . ( $post->page_template ? esc_html( $post->page_template ) : 'default' ) . '</div>';
 
-       if ( post_type_supports( $post->post_type, 'page-attributes' ) )
+       if ( post_type_supports( $post->post_type, 'page-attributes' ) ) {
                echo '<div class="menu_order">' . $post->menu_order . '</div>';
+       }
 
        $taxonomy_names = get_object_taxonomies( $post->post_type );
        foreach ( $taxonomy_names as $taxonomy_name) {
@@ -423,11 +424,11 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
        </div>
 
        <p id="replysubmit" class="submit">
-       <a href="#comments-form" class="save button-primary alignright">
+       <a href="#comments-form" class="save button button-primary alignright">
        <span id="addbtn" style="display:none;"><?php _e('Add Comment'); ?></span>
        <span id="savebtn" style="display:none;"><?php _e('Update Comment'); ?></span>
        <span id="replybtn" style="display:none;"><?php _e('Submit Reply'); ?></span></a>
-       <a href="#comments-form" class="cancel button-secondary alignleft"><?php _e('Cancel'); ?></a>
+       <a href="#comments-form" class="cancel button alignleft"><?php _e('Cancel'); ?></a>
        <span class="waiting spinner"></span>
        <span class="error" style="display:none;"></span>
        </p>
@@ -657,7 +658,7 @@ function meta_form( $post = null ) {
 
 <tr><td colspan="2">
 <div class="submit">
-<?php submit_button( __( 'Add Custom Field' ), 'secondary', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?>
+<?php submit_button( __( 'Add Custom Field' ), '', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?>
 </div>
 <?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
 </td></tr>
@@ -761,11 +762,13 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
  * Print out option HTML elements for the page templates drop-down.
  *
  * @since 1.5.0
+ * @since 4.7.0 Added the `$post_type` parameter.
  *
- * @param string $default Optional. The template file name. Default empty.
+ * @param string $default   Optional. The template file name. Default empty.
+ * @param string $post_type Optional. Post type to get templates for. Default 'post'.
  */
-function page_template_dropdown( $default = '' ) {
-       $templates = get_page_templates( get_post() );
+function page_template_dropdown( $default = '', $post_type = 'page' ) {
+       $templates = get_page_templates( null, $post_type );
        ksort( $templates );
        foreach ( array_keys( $templates ) as $template ) {
                $selected = selected( $default, $templates[ $template ], false );
@@ -1513,7 +1516,7 @@ function find_posts_div($found_action = '') {
                        <div id="find-posts-response"></div>
                </div>
                <div class="find-box-buttons">
-                       <?php submit_button( __( 'Select' ), 'button-primary alignright', 'find-posts-submit', false ); ?>
+                       <?php submit_button( __( 'Select' ), 'primary alignright', 'find-posts-submit', false ); ?>
                        <div class="clear"></div>
                </div>
        </div>
@@ -1622,7 +1625,7 @@ do_action( "admin_head-$hook_suffix" );
 /** This action is documented in wp-admin/admin-header.php */
 do_action( 'admin_head' );
 
-$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
+$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
 
 if ( is_rtl() )
        $admin_body_class .= ' rtl';
@@ -1752,14 +1755,39 @@ function _media_states( $post ) {
 
        if ( current_theme_supports( 'custom-header') ) {
                $meta_header = get_post_meta($post->ID, '_wp_attachment_is_custom_header', true );
-               if ( ! empty( $meta_header ) && $meta_header == $stylesheet )
-                       $media_states[] = __( 'Header Image' );
+
+               if ( is_random_header_image() ) {
+                       $header_images = wp_list_pluck( get_uploaded_header_images(), 'attachment_id' );
+
+                       if ( $meta_header == $stylesheet && in_array( $post->ID, $header_images ) ) {
+                               $media_states[] = __( 'Header Image' );
+                       }
+               } else {
+                       $header_image = get_header_image();
+
+                       // Display "Header Image" if the image was ever used as a header image
+                       if ( ! empty( $meta_header ) && $meta_header == $stylesheet && $header_image !== wp_get_attachment_url( $post->ID ) ) {
+                               $media_states[] = __( 'Header Image' );
+                       }
+
+                       // Display "Current Header Image" if the image is currently the header image
+                       if ( $header_image && $header_image == wp_get_attachment_url( $post->ID ) ) {
+                               $media_states[] = __( 'Current Header Image' );
+                       }
+               }
        }
 
        if ( current_theme_supports( 'custom-background') ) {
                $meta_background = get_post_meta($post->ID, '_wp_attachment_is_custom_background', true );
-               if ( ! empty( $meta_background ) && $meta_background == $stylesheet )
+
+               if ( ! empty( $meta_background ) && $meta_background == $stylesheet ) {
                        $media_states[] = __( 'Background Image' );
+
+                       $background_image = get_background_image();
+                       if ( $background_image && $background_image == wp_get_attachment_url( $post->ID ) ) {
+                               $media_states[] = __( 'Current Background Image' );
+                       }
+               }
        }
 
        if ( $post->ID == get_option( 'site_icon' ) ) {
@@ -1914,10 +1942,8 @@ function get_submit_button( $text = '', $type = 'primary large', $name = 'submit
                        continue;
                $classes[] = in_array( $t, $button_shorthand ) ? 'button-' . $t : $t;
        }
-       $class = implode( ' ', array_unique( $classes ) );
-
-       if ( 'delete' === $type )
-               $class = 'button-secondary delete';
+       // Remove empty items, remove duplicate items, and finally build a string.
+       $class = implode( ' ', array_unique( array_filter( $classes ) ) );
 
        $text = $text ? $text : __( 'Save Changes' );
 
@@ -1995,7 +2021,7 @@ function _wp_admin_html_begin() {
  * @return WP_Screen Screen object.
  */
 function convert_to_screen( $hook_name ) {
-       if ( ! class_exists( 'WP_Screen', false ) ) {
+       if ( ! class_exists( 'WP_Screen' ) ) {
                _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' );
        }
index 9333beac9b776d0acaa67a2aa697a5bb1247330a..31ce5f79718b3681f338a004506368b884bd3f74 100644 (file)
@@ -85,7 +85,7 @@ function install_theme_search_form( $type_selector = true ) {
        <label class="screen-reader-text" for="s"><?php _e('Search by keyword'); ?></label>
        <?php endif; ?>
        <input type="search" name="s" id="s" size="30" value="<?php echo esc_attr($term) ?>" autofocus="autofocus" />
-       <?php submit_button( __( 'Search' ), 'button', 'search', false ); ?>
+       <?php submit_button( __( 'Search' ), '', 'search', false ); ?>
 </form>
 <?php
 }
@@ -130,7 +130,7 @@ function install_themes_dashboard() {
 
 </div>
 <br class="clear" />
-<?php submit_button( __( 'Find Themes' ), 'button', 'search' ); ?>
+<?php submit_button( __( 'Find Themes' ), '', 'search' ); ?>
 </form>
 <?php
 }
@@ -145,7 +145,7 @@ function install_themes_upload() {
        <?php wp_nonce_field( 'theme-upload' ); ?>
        <label class="screen-reader-text" for="themezip"><?php _e( 'Theme zip file' ); ?></label>
        <input type="file" id="themezip" name="themezip" />
-       <?php submit_button( __( 'Install Now' ), 'button', 'install-theme-submit', false ); ?>
+       <?php submit_button( __( 'Install Now' ), '', 'install-theme-submit', false ); ?>
 </form>
        <?php
 }
index 73567e1fd171f5dff2d63202075fa4a81a326c96..822fb5b656b98cb2520568ebc928ecce7ed5ee70 100644 (file)
@@ -102,12 +102,14 @@ function delete_theme($stylesheet, $redirect = '') {
  * Get the Page Templates available in this theme
  *
  * @since 1.5.0
+ * @since 4.7.0 Added the `$post_type` parameter.
  *
- * @param WP_Post|null $post Optional. The post being edited, provided for context.
+ * @param WP_Post|null $post      Optional. The post being edited, provided for context.
+ * @param string       $post_type Optional. Post type to get the templates for. Default 'page'.
  * @return array Key is the template name, value is the filename of the template
  */
-function get_page_templates( $post = null ) {
-       return array_flip( wp_get_theme()->get_page_templates( $post ) );
+function get_page_templates( $post = null, $post_type = 'page' ) {
+       return array_flip( wp_get_theme()->get_page_templates( $post, $post_type ) );
 }
 
 /**
@@ -360,9 +362,9 @@ function get_theme_feature_list( $api = true ) {
  * @param string       $action API action to perform: 'query_themes', 'theme_information',
  *                             'hot_tags' or 'feature_list'.
  * @param array|object $args   {
- *     Optional. Array or object of arguments to serialize for the Plugin Info API.
+ *     Optional. Array or object of arguments to serialize for the Themes API.
  *
- *     @type string  $slug     The plugin slug. Default empty.
+ *     @type string  $slug     The theme slug. Default empty.
  *     @type int     $per_page Number of themes per page. Default 24.
  *     @type int     $page     Number of current page. Default 1.
  *     @type int     $number   Number of tags to be queried.
@@ -412,7 +414,7 @@ function themes_api( $action, $args = array() ) {
        }
 
        if ( ! isset( $args->locale ) ) {
-               $args->locale = get_locale();
+               $args->locale = get_user_locale();
        }
 
        /**
@@ -459,18 +461,40 @@ function themes_api( $action, $args = array() ) {
                $request = wp_remote_post( $url, $http_args );
 
                if ( $ssl && is_wp_error( $request ) ) {
-                       if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
-                               trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+                       if ( ! wp_doing_ajax() ) {
+                               trigger_error(
+                                       sprintf(
+                                               /* translators: %s: support forums URL */
+                                               __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                                               __( 'https://wordpress.org/support/' )
+                                       ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
+                                       headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
+                               );
                        }
                        $request = wp_remote_post( $http_url, $http_args );
                }
 
                if ( is_wp_error($request) ) {
-                       $res = new WP_Error('themes_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() );
+                       $res = new WP_Error( 'themes_api_failed',
+                               sprintf(
+                                       /* translators: %s: support forums URL */
+                                       __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                                       __( 'https://wordpress.org/support/' )
+                               ),
+                               $request->get_error_message()
+                       );
                } else {
                        $res = maybe_unserialize( wp_remote_retrieve_body( $request ) );
-                       if ( ! is_object( $res ) && ! is_array( $res ) )
-                               $res = new WP_Error('themes_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) );
+                       if ( ! is_object( $res ) && ! is_array( $res ) ) {
+                               $res = new WP_Error( 'themes_api_failed',
+                                       sprintf(
+                                               /* translators: %s: support forums URL */
+                                               __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                                               __( 'https://wordpress.org/support/' )
+                                       ),
+                                       wp_remote_retrieve_body( $request )
+                               );
+                       }
                }
        }
 
@@ -572,6 +596,7 @@ function wp_prepare_themes_for_js( $themes = null ) {
                        'parent'       => $parent,
                        'active'       => $slug === $current_theme,
                        'hasUpdate'    => isset( $updates[ $slug ] ),
+                       'hasPackage'   => isset( $updates[ $slug ] ) && ! empty( $updates[ $slug ][ 'package' ] ),
                        'update'       => get_theme_update_available( $theme ),
                        'actions'      => array(
                                'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&amp;stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null,
index ee8254d500991a736d85c63e09788c8a0516f88f..ed86b15cc2174e98a01b2c6f36196af913aea7eb 100644 (file)
@@ -56,17 +56,38 @@ function translations_api( $type, $args = null ) {
                $request = wp_remote_post( $url, $options );
 
                if ( $ssl && is_wp_error( $request ) ) {
-                       trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+                       trigger_error(
+                               sprintf(
+                                       /* translators: %s: support forums URL */
+                                       __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                                       __( 'https://wordpress.org/support/' )
+                               ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
+                               headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
+                       );
 
                        $request = wp_remote_post( $http_url, $options );
                }
 
                if ( is_wp_error( $request ) ) {
-                       $res = new WP_Error( 'translations_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() );
+                       $res = new WP_Error( 'translations_api_failed',
+                               sprintf(
+                                       /* translators: %s: support forums URL */
+                                       __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                                       __( 'https://wordpress.org/support/' )
+                               ),
+                               $request->get_error_message()
+                       );
                } else {
                        $res = json_decode( wp_remote_retrieve_body( $request ), true );
                        if ( ! is_object( $res ) && ! is_array( $res ) ) {
-                               $res = new WP_Error( 'translations_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) );
+                               $res = new WP_Error( 'translations_api_failed',
+                                       sprintf(
+                                               /* translators: %s: support forums URL */
+                                               __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                                               __( 'https://wordpress.org/support/' )
+                                       ),
+                                       wp_remote_retrieve_body( $request )
+                               );
                        }
                }
        }
index a378d3ce95977bdeae0d12cd603f38c3d6d4a7e4..3e6aaa2051bf63547998b9d8b296ce7997269cf9 100644 (file)
@@ -720,8 +720,9 @@ $_old_files = array(
  * Directories should be noted by suffixing it with a trailing slash (/)
  *
  * @since 3.2.0
- * @since 4.4.0 New themes are not automatically installed on upgrade.
- *              This can still be explicitly asked for by defining
+ * @since 4.7.0 New themes were not automatically installed for 4.4-4.6 on
+ *              upgrade. New themes are now installed again. To disable new
+ *              themes from being installed on upgrade, explicitly define
  *              CORE_UPGRADE_SKIP_NEW_BUNDLED as false.
  * @global array $_new_bundled_files
  * @var array
@@ -730,21 +731,17 @@ $_old_files = array(
 global $_new_bundled_files;
 
 $_new_bundled_files = array(
-       'plugins/akismet/'       => '2.0',
-       'themes/twentyten/'      => '3.0',
-       'themes/twentyeleven/'   => '3.2',
-       'themes/twentytwelve/'   => '3.5',
-       'themes/twentythirteen/' => '3.6',
-       'themes/twentyfourteen/' => '3.8',
-       'themes/twentyfifteen/'  => '4.1',
-       'themes/twentysixteen/'  => '4.4',
+       'plugins/akismet/'        => '2.0',
+       'themes/twentyten/'       => '3.0',
+       'themes/twentyeleven/'    => '3.2',
+       'themes/twentytwelve/'    => '3.5',
+       'themes/twentythirteen/'  => '3.6',
+       'themes/twentyfourteen/'  => '3.8',
+       'themes/twentyfifteen/'   => '4.1',
+       'themes/twentysixteen/'   => '4.4',
+       'themes/twentyseventeen/' => '4.7',
 );
 
-// If not explicitly defined as false, don't install new default themes.
-if ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || CORE_UPGRADE_SKIP_NEW_BUNDLED ) {
-       $_new_bundled_files = array( 'plugins/akismet/' => '2.0' );
-}
-
 /**
  * Upgrades the core of WordPress.
  *
@@ -902,6 +899,8 @@ function update_core($from, $to) {
                                        continue;
                                if ( ! file_exists( $working_dir_local . $file ) )
                                        continue;
+                               if ( '.' === dirname( $file ) && in_array( pathinfo( $file, PATHINFO_EXTENSION ), array( 'html', 'txt' ) ) )
+                                       continue;
                                if ( md5_file( ABSPATH . $file ) === $checksum )
                                        $skip[] = $file;
                                else
@@ -963,6 +962,10 @@ function update_core($from, $to) {
                                continue;
                        if ( ! file_exists( $working_dir_local . $file ) )
                                continue;
+                       if ( '.' === dirname( $file ) && in_array( pathinfo( $file, PATHINFO_EXTENSION ), array( 'html', 'txt' ) ) ) {
+                               $skip[] = $file;
+                               continue;
+                       }
                        if ( file_exists( ABSPATH . $file ) && md5_file( ABSPATH . $file ) == $checksum )
                                $skip[] = $file;
                        else
index 74899e37cb4232dfd4f8ba9709365018f491f249..e7a8b5e755c5f54cf09aa03f50c7a3375a22a0ca 100644 (file)
@@ -112,7 +112,14 @@ function get_core_checksums( $version, $locale ) {
 
        $response = wp_remote_get( $url, $options );
        if ( $ssl && is_wp_error( $response ) ) {
-               trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+               trigger_error(
+                       sprintf(
+                               /* translators: %s: support forums URL */
+                               __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                               __( 'https://wordpress.org/support/' )
+                       ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
+                       headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
+               );
                $response = wp_remote_get( $http_url, $options );
        }
 
@@ -200,6 +207,7 @@ function core_update_footer( $msg = '' ) {
 
        switch ( $cur->response ) {
        case 'development' :
+               /* translators: 1: WordPress version number, 2: WordPress updates admin screen URL */
                return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), get_bloginfo( 'version', 'display' ), network_admin_url( 'update-core.php' ) );
 
        case 'upgrade' :
index 807673a7f0b9a0cc9053f29280c15211d72469c1..94a122509cca94aae445c8fe87316321d5fd4522 100644 (file)
@@ -50,6 +50,9 @@ function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated
        update_option('admin_email', $user_email);
        update_option('blog_public', $public);
 
+       // Freshness of site - in the future, this could get more specific about actions taken, perhaps.
+       update_option( 'fresh_site', 1 );
+
        if ( $language ) {
                update_option( 'WPLANG', $language );
        }
@@ -161,12 +164,12 @@ function wp_install_defaults( $user_id ) {
                }
 
                $first_post = sprintf( $first_post,
-                       sprintf( '<a href="%s">%s</a>', esc_url( network_home_url() ), get_current_site()->site_name )
+                       sprintf( '<a href="%s">%s</a>', esc_url( network_home_url() ), get_network()->site_name )
                );
 
                // Back-compat for pre-4.4
                $first_post = str_replace( 'SITE_URL', esc_url( network_home_url() ), $first_post );
-               $first_post = str_replace( 'SITE_NAME', get_current_site()->site_name, $first_post );
+               $first_post = str_replace( 'SITE_NAME', get_network()->site_name, $first_post );
        } else {
                $first_post = __( 'Welcome to WordPress. This is your first post. Edit or delete it, then start writing!' );
        }
@@ -253,8 +256,7 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
        update_option( 'widget_archives', array ( 2 => array ( 'title' => '', 'count' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
        update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
        update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) );
-       update_option( 'sidebars_widgets', array ( 'wp_inactive_widgets' => array (), 'sidebar-1' => array ( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'array_version' => 3 ) );
-
+       update_option( 'sidebars_widgets', array( 'wp_inactive_widgets' => array(), 'sidebar-1' => array( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2' ), 'sidebar-2' => array(), 'sidebar-3' => array(), 'array_version' => 3 ) );
        if ( ! is_multisite() )
                update_user_meta( $user_id, 'show_welcome_panel', 1 );
        elseif ( ! is_super_admin( $user_id ) && ! metadata_exists( 'user', $user_id, 'show_welcome_panel' ) )
@@ -373,6 +375,7 @@ function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) {
        $email = $user->user_email;
        $name = $user->user_login;
        $login_url = wp_login_url();
+       /* translators: New site notification email. 1: New site URL, 2: User login, 3: User password or password reset link, 4: Login URL */
        $message = sprintf( __( "Your new WordPress site has been successfully set up at:
 
 %1\$s
@@ -2283,7 +2286,7 @@ function dbDelta( $queries = '', $execute = true ) {
                                        $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'] . '`';
+                                       $index_name = ( 'PRIMARY KEY' === $index_type ) ? '' : '`' . strtolower( $index_matches['index_name'] ) . '`';
 
                                        // Parse the columns. Multiple columns are separated by a comma.
                                        $index_columns = array_map( 'trim', explode( ',', $index_matches['index_columns'] ) );
@@ -2407,7 +2410,7 @@ function dbDelta( $queries = '', $execute = true ) {
                        foreach ($tableindices as $tableindex) {
 
                                // Add the index to the index data array.
-                               $keyname = $tableindex->Key_name;
+                               $keyname = strtolower( $tableindex->Key_name );
                                $index_ary[$keyname]['columns'][] = array('fieldname' => $tableindex->Column_name, 'subpart' => $tableindex->Sub_part);
                                $index_ary[$keyname]['unique'] = ($tableindex->Non_unique == 0)?true:false;
                                $index_ary[$keyname]['index_type'] = $tableindex->Index_type;
@@ -2418,7 +2421,7 @@ function dbDelta( $queries = '', $execute = true ) {
 
                                // Build a create string to compare to the query.
                                $index_string = '';
-                               if ($index_name == 'PRIMARY') {
+                               if ($index_name == 'primary') {
                                        $index_string .= 'PRIMARY ';
                                } elseif ( $index_data['unique'] ) {
                                        $index_string .= 'UNIQUE ';
@@ -2430,7 +2433,7 @@ function dbDelta( $queries = '', $execute = true ) {
                                        $index_string .= 'SPATIAL ';
                                }
                                $index_string .= 'KEY ';
-                               if ( 'PRIMARY' !== $index_name  ) {
+                               if ( 'primary' !== $index_name  ) {
                                        $index_string .= '`' . $index_name . '`';
                                }
                                $index_columns = '';
@@ -2821,7 +2824,7 @@ function pre_schema_upgrade() {
        // Multisite schema upgrades.
        if ( $wp_current_db_version < 25448 && is_multisite() && wp_should_upgrade_global_tables() ) {
 
-               // Upgrade verions prior to 3.7
+               // Upgrade versions prior to 3.7
                if ( $wp_current_db_version < 25179 ) {
                        // New primary key for signups.
                        $wpdb->query( "ALTER TABLE $wpdb->signups ADD signup_id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST" );
index f6c52dd9549174043060dda89ac536c6fd616903..d962717a0dd8f4d955928cd279501b900e3246e2 100644 (file)
@@ -94,6 +94,20 @@ function edit_user( $user_id = 0 ) {
                $user->rich_editing = isset( $_POST['rich_editing'] ) && 'false' == $_POST['rich_editing'] ? 'false' : 'true';
                $user->admin_color = isset( $_POST['admin_color'] ) ? sanitize_text_field( $_POST['admin_color'] ) : 'fresh';
                $user->show_admin_bar_front = isset( $_POST['admin_bar_front'] ) ? 'true' : 'false';
+               $user->locale = '';
+
+               if ( isset( $_POST['locale'] ) ) {
+                       $locale = sanitize_text_field( $_POST['locale'] );
+                       if ( 'site-default' === $locale ) {
+                               $locale = '';
+                       } elseif ( '' === $locale ) {
+                               $locale = 'en_US';
+                       } elseif ( ! in_array( $locale, get_available_languages(), true ) ) {
+                               $locale = '';
+                       }
+
+                       $user->locale = $locale;
+               }
        }
 
        $user->comment_shortcuts = isset( $_POST['comment_shortcuts'] ) && 'true' == $_POST['comment_shortcuts'] ? 'true' : '';
@@ -171,7 +185,7 @@ function edit_user( $user_id = 0 ) {
         *
         * @param WP_Error &$errors WP_Error object, passed by reference.
         * @param bool     $update  Whether this is a user update.
-        * @param WP_User  &$user   WP_User object, passed by reference.
+        * @param stdClass &$user   User object, passed by reference.
         */
        do_action_ref_array( 'user_profile_update_errors', array( &$errors, $update, &$user ) );
 
index 746a892798bcfd97430b377cb126219c91bd8b56..fe2a957fa72be46dc873fa8c08d4d107209f171d 100644 (file)
@@ -254,7 +254,7 @@ function wp_widget_control( $sidebar_args ) {
                <a class="widget-control-close" href="#close"><?php _e('Close'); ?></a>
                </div>
                <div class="alignright<?php if ( 'noform' === $has_form ) echo ' widget-control-noform'; ?>">
-                       <?php submit_button( __( 'Save' ), 'button-primary widget-control-save right', 'savewidget', false, array( 'id' => 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?>
+                       <?php submit_button( __( 'Save' ), 'primary widget-control-save right', 'savewidget', false, array( 'id' => 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?>
                        <span class="spinner"></span>
                </div>
                <br class="clear" />
@@ -278,4 +278,4 @@ function wp_widget_control( $sidebar_args ) {
  */
 function wp_widgets_access_body_class($classes) {
        return "$classes widgets_access ";
-}
\ No newline at end of file
+}
index 86bed0adfc2efc016c6bda14f267be33e6e14c85..d2d7ec889d602bcd78504b21470414d17c31140b 100644 (file)
@@ -33,7 +33,6 @@ $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 above the screen title.' ) . '</p>';
 
-// Not using chaining here, so as to be parseable by PHP4.
 $screen = get_current_screen();
 
 $screen->add_help_tab( array(
@@ -95,8 +94,8 @@ unset( $help );
 
 $screen->set_help_sidebar(
        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_Screen" target="_blank">Documentation on Dashboard</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
+       '<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_Screen">Documentation on Dashboard</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
index 240398204674c6902605fd803827de0b24253e15..ed9d06d19c6dd631b758d98e448d3a0ec9e8e21b 100644 (file)
@@ -141,7 +141,7 @@ function display_setup_form( $error = null ) {
                                <div class="">
                                        <?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
                                        <input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
-                                       <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
+                                       <button type="button" class="button wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
                                                <span class="dashicons dashicons-hidden"></span>
                                                <span class="text"><?php _e( 'Hide' ); ?></span>
                                        </button>
@@ -232,12 +232,16 @@ $mysql_version  = $wpdb->db_version();
 $php_compat     = version_compare( $php_version, $required_php_version, '>=' );
 $mysql_compat   = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
 
-if ( !$mysql_compat && !$php_compat )
+if ( !$mysql_compat && !$php_compat ) {
+       /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */
        $compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
-elseif ( !$php_compat )
+} elseif ( !$php_compat ) {
+       /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
        $compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version );
-elseif ( !$mysql_compat )
+} elseif ( !$mysql_compat ) {
+       /* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
        $compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version );
+}
 
 if ( !$mysql_compat || !$php_compat ) {
        display_header();
@@ -330,7 +334,6 @@ switch($step) {
 
                $scripts_to_print[] = 'user-profile';
 
-               display_header();
                // Fill in the data we gathered
                $weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
                $user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
@@ -343,21 +346,26 @@ switch($step) {
                $error = false;
                if ( empty( $user_name ) ) {
                        // TODO: poka-yoke
+                       display_header();
                        display_setup_form( __( 'Please provide a valid username.' ) );
                        $error = true;
                } elseif ( $user_name != sanitize_user( $user_name, true ) ) {
+                       display_header();
                        display_setup_form( __( 'The username you provided has invalid characters.' ) );
                        $error = true;
                } elseif ( $admin_password != $admin_password_check ) {
                        // TODO: poka-yoke
+                       display_header();
                        display_setup_form( __( 'Your passwords do not match. Please try again.' ) );
                        $error = true;
                } elseif ( empty( $admin_email ) ) {
                        // TODO: poka-yoke
+                       display_header();
                        display_setup_form( __( 'You must provide an email address.' ) );
                        $error = true;
                } elseif ( ! is_email( $admin_email ) ) {
                        // TODO: poka-yoke
+                       display_header();
                        display_setup_form( __( 'Sorry, that isn&#8217;t a valid email address. Email addresses look like <code>username@example.com</code>.' ) );
                        $error = true;
                }
@@ -365,6 +373,16 @@ switch($step) {
                if ( $error === false ) {
                        $wpdb->show_errors();
                        $result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language );
+
+                       // Log the user in and send them to wp-admin:
+                       if ( ! headers_sent() ) {
+                               wp_set_auth_cookie( $result['user_id'], true, is_ssl() );
+                               wp_redirect( admin_url() );
+                               exit;
+                       }
+
+                       // If headers have already been sent, fall back to a "Success!" message:
+                       display_header();
 ?>
 
 <h1><?php _e( 'Success!' ); ?></h1>
index 089a8495166877b375e3999c0bc1c0fb974b85da..1531806990e0056662e6d40d21e5c54a4278e3e3 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=f<800||f>5e3?600:.7*f,g=g<800||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 96f55daedb58cbb6b9558c25968d3c7c4cee2cbd..807ff2a14c2e4a58dc91ed0222c18fdd0001c067 100644 (file)
                        hide: true,
                        palettes: true,
                        width: 255,
-                       mode: 'hsv'
+                       mode: 'hsv',
+                       type: 'full',
+                       slider: 'horizontal'
+               },
+               _createHueOnly: function() {
+                       var self = this,
+                               el = self.element,
+                               color;
+
+                       // hide input
+                       el.hide();
+                       // max saturated color for hue to be obvious
+                       color = 'hsl(' + el.val() + ', 100, 50)';
+
+                       el.iris( {
+                               mode: 'hsl',
+                               type: 'hue',
+                               hide: false,
+                               color: color,
+                               change: function( event, ui ) {
+                                       if ( $.isFunction( self.options.change ) ) {
+                                               self.options.change.call( this, event, ui );
+                                       }
+                               },
+                               width: self.options.width,
+                               slider: self.options.slider
+                       } );
                },
                _create: function() {
                        // bail early for unsupported Iris.
 
                        $.extend( self.options, el.data() );
 
+                       // hue-only gets created differently
+                       if ( self.options.type === 'hue' ) {
+                               return self._createHueOnly();
+                       }
+
                        // keep close bound so it can be attached to a body listener
                        self.close = $.proxy( self.close, self );
 
                        if ( newColor === undef ) {
                                return this.element.iris( 'option', 'color' );
                        }
-
                        this.element.iris( 'option', 'color', newColor );
                },
                //$("#input").wpColorPicker('defaultColor') returns the current default color
index 7c6e1d1cd6fa553c888c5767a70268a5b7d03f11..7b6591dedc62d18dee3fb231aa2a4e2ad1339e6d 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",type:"full",slider:"horizontal"},_createHueOnly:function(){var b,c=this,d=c.element;d.hide(),b="hsl("+d.val()+", 100, 50)",d.iris({mode:"hsl",type:"hue",hide:!1,color:b,change:function(b,d){a.isFunction(c.options.change)&&c.options.change.call(this,b,d)},width:c.options.width,slider:c.options.slider})},_create:function(){if(a.support.iris){var b=this,c=b.element;if(a.extend(b.options,c.data()),"hue"===b.options.type)return b._createHueOnly();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 200d3e47809d1c7f4a84eb719940fe2f1787139d..867f111999100f66e6a65ba497a803716b405161 100644 (file)
@@ -196,13 +196,15 @@ $document.ready( function() {
                pinnedMenuTop = false,
                pinnedMenuBottom = false,
                menuTop = 0,
+               menuState,
                menuIsPinned = false,
                height = {
                        window: $window.height(),
                        wpwrap: $wpwrap.height(),
                        adminbar: $adminbar.height(),
                        menu: $adminMenuWrap.height()
-               };
+               },
+               $headerEnd = $( '.wp-header-end' );
 
 
        // when the menu is folded, make the fly-out submenu header clickable
@@ -210,59 +212,43 @@ $document.ready( function() {
                $(e.target).parent().siblings('a').get(0).click();
        });
 
-       $('#collapse-menu').on('click.collapse-menu', function() {
-               var respWidth, state;
+       $( '#collapse-button' ).on( 'click.collapse-menu', function() {
+               var viewportWidth = getViewportWidth() || 961;
 
                // reset any compensation for submenus near the bottom of the screen
                $('#adminmenu div.wp-submenu').css('margin-top', '');
 
-               if ( window.innerWidth ) {
-                       // window.innerWidth is affected by zooming on phones
-                       respWidth = Math.max( window.innerWidth, document.documentElement.clientWidth );
-               } else {
-                       // IE < 9 doesn't support @media CSS rules
-                       respWidth = 961;
-               }
-
-               if ( respWidth && respWidth < 960 ) {
+               if ( viewportWidth < 960 ) {
                        if ( $body.hasClass('auto-fold') ) {
                                $body.removeClass('auto-fold').removeClass('folded');
                                setUserSetting('unfold', 1);
                                setUserSetting('mfold', 'o');
-                               state = 'open';
+                               menuState = 'open';
                        } else {
                                $body.addClass('auto-fold');
                                setUserSetting('unfold', 0);
-                               state = 'folded';
+                               menuState = 'folded';
                        }
                } else {
                        if ( $body.hasClass('folded') ) {
                                $body.removeClass('folded');
                                setUserSetting('mfold', 'o');
-                               state = 'open';
+                               menuState = 'open';
                        } else {
                                $body.addClass('folded');
                                setUserSetting('mfold', 'f');
-                               state = 'folded';
+                               menuState = 'folded';
                        }
                }
 
-               currentMenuItemHasPopup();
-               $document.trigger( 'wp-collapse-menu', { state: state } );
+               $document.trigger( 'wp-collapse-menu', { state: menuState } );
        });
 
        // Handle the `aria-haspopup` attribute on the current menu item when it has a sub-menu.
        function currentMenuItemHasPopup() {
-               var respWidth,
-                       $current = $( 'a.wp-has-current-submenu' );
+               var $current = $( 'a.wp-has-current-submenu' );
 
-               if ( window.innerWidth ) {
-                       respWidth = Math.max( window.innerWidth, document.documentElement.clientWidth );
-               } else {
-                       respWidth = 961;
-               }
-
-               if ( $body.hasClass( 'folded' ) || ( $body.hasClass( 'auto-fold' ) && respWidth && respWidth <= 960 && respWidth > 782 ) ) {
+               if ( 'folded' === menuState ) {
                        // When folded or auto-folded and not responsive view, the current menu item does have a fly-out sub-menu.
                        $current.attr( 'aria-haspopup', 'true' );
                } else {
@@ -271,7 +257,7 @@ $document.ready( function() {
                }
        }
 
-       $document.on( 'wp-window-resized wp-responsive-activate wp-responsive-deactivate', currentMenuItemHasPopup );
+       $document.on( 'wp-menu-state-set wp-collapse-menu wp-responsive-activate wp-responsive-deactivate', currentMenuItemHasPopup );
 
        /**
         * Ensure an admin submenu is within the visual viewport.
@@ -396,8 +382,13 @@ $document.ready( function() {
        /*
         * 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.
+        * If '.wp-header-end' is found, append the notices after it otherwise
+        * after the first h1 or h2 heading found within the main content.
         */
-       $( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $( '.wrap h1, .wrap h2' ).first() );
+       if ( ! $headerEnd.length ) {
+               $headerEnd = $( '.wrap h1, .wrap h2' ).first();
+       }
+       $( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $headerEnd );
 
        // Make notices dismissible
        function makeNoticesDismissible() {
@@ -426,10 +417,11 @@ $document.ready( function() {
        // Init screen meta
        screenMeta.init();
 
-       // check all checkboxes
-       $('tbody').children().children('.check-column').find(':checkbox').click( function(e) {
-               if ( 'undefined' == e.shiftKey ) { return true; }
-               if ( e.shiftKey ) {
+       // This event needs to be delegated. Ticket #37973.
+       $body.on( 'click', 'tbody .check-column :checkbox', function( event ) {
+               // Shift click to select a range of checkboxes.
+               if ( 'undefined' == event.shiftKey ) { return true; }
+               if ( event.shiftKey ) {
                        if ( !lastClicked ) { return true; }
                        checks = $( lastClicked ).closest( 'form' ).find( ':checkbox' ).filter( ':visible:enabled' );
                        first = checks.index( lastClicked );
@@ -447,7 +439,7 @@ $document.ready( function() {
                }
                lastClicked = this;
 
-               // toggle "check all" checkboxes
+               // Toggle the "Select all" checkboxes depending if the other ones are all checked or not.
                var unchecked = $(this).closest('tbody').find(':checkbox').filter(':visible:enabled').not(':checked');
                $(this).closest('table').children('thead, tfoot').find(':checkbox').prop('checked', function() {
                        return ( 0 === unchecked.length );
@@ -456,7 +448,8 @@ $document.ready( function() {
                return true;
        });
 
-       $('thead, tfoot').find('.check-column :checkbox').on( 'click.wp-toggle-checkboxes', function( event ) {
+       // This event needs to be delegated. Ticket #37973.
+       $body.on( 'click.wp-toggle-checkboxes', 'thead .check-column :checkbox, tfoot .check-column :checkbox', function( event ) {
                var $this = $(this),
                        $table = $this.closest( 'table' ),
                        controlChecked = $this.prop('checked'),
@@ -828,17 +821,14 @@ $document.ready( function() {
                },
 
                trigger: function() {
-                       var width;
+                       var viewportWidth = getViewportWidth();
 
-                       if ( window.innerWidth ) {
-                               // window.innerWidth is affected by zooming on phones
-                               width = Math.max( window.innerWidth, document.documentElement.clientWidth );
-                       } else {
-                               // Exclude IE < 9, it doesn't support @media CSS rules
+                       // Exclude IE < 9, it doesn't support @media CSS rules.
+                       if ( ! viewportWidth ) {
                                return;
                        }
 
-                       if ( width <= 782 ) {
+                       if ( viewportWidth <= 782 ) {
                                if ( ! wpResponsiveActive ) {
                                        $document.trigger( 'wp-responsive-activate' );
                                        wpResponsiveActive = true;
@@ -850,7 +840,7 @@ $document.ready( function() {
                                }
                        }
 
-                       if ( width <= 480 ) {
+                       if ( viewportWidth <= 480 ) {
                                this.enableOverlay();
                        } else {
                                this.disableOverlay();
@@ -904,8 +894,82 @@ $document.ready( function() {
                aria_button_if_js();
        });
 
+       /**
+        * @summary Get the viewport width.
+        *
+        * @since 4.7.0
+        *
+        * @returns {number|boolean} The current viewport width or false if the
+        *                           browser doesn't support innerWidth (IE < 9).
+        */
+       function getViewportWidth() {
+               var viewportWidth = false;
+
+               if ( window.innerWidth ) {
+                       // On phones, window.innerWidth is affected by zooming.
+                       viewportWidth = Math.max( window.innerWidth, document.documentElement.clientWidth );
+               }
+
+               return viewportWidth;
+       }
+
+       /**
+        * @summary Set the admin menu collapsed/expanded state.
+        *
+        * Sets the global variable `menuState` and triggers a custom event passing
+        * the current menu state.
+        *
+        * @since 4.7.0
+        *
+        * @returns {void}
+        */
+       function setMenuState() {
+               var viewportWidth = getViewportWidth() || 961;
+
+               if ( viewportWidth <= 782  ) {
+                       menuState = 'responsive';
+               } else if ( $body.hasClass( 'folded' ) || ( $body.hasClass( 'auto-fold' ) && viewportWidth <= 960 && viewportWidth > 782 ) ) {
+                       menuState = 'folded';
+               } else {
+                       menuState = 'open';
+               }
+
+               $document.trigger( 'wp-menu-state-set', { state: menuState } );
+       }
+
+       // Set the menu state when the window gets resized.
+       $document.on( 'wp-window-resized.set-menu-state', setMenuState );
+
+       /**
+        * @summary Set ARIA attributes on the collapse/expand menu button.
+        *
+        * When the admin menu is open or folded, updates the `aria-expanded` and
+        * `aria-label` attributes of the button to give feedback to assistive
+        * technologies. In the responsive view, the button is always hidden.
+        *
+        * @since 4.7.0
+        *
+        * @returns {void}
+        */
+       $document.on( 'wp-menu-state-set wp-collapse-menu', function( event, eventData ) {
+               var $collapseButton = $( '#collapse-button' ),
+                       ariaExpanded = 'true',
+                       ariaLabelText = commonL10n.collapseMenu;
+
+               if ( 'folded' === eventData.state ) {
+                       ariaExpanded = 'false';
+                       ariaLabelText = commonL10n.expandMenu;
+               }
+
+               $collapseButton.attr({
+                       'aria-expanded': ariaExpanded,
+                       'aria-label': ariaLabelText
+               });
+       });
+
        window.wpResponsive.init();
        setPinMenu();
+       setMenuState();
        currentMenuItemHasPopup();
        makeNoticesDismissible();
        aria_button_if_js();
index c2070ae4d65c09b67c0afb9bc0dee3527429912b..1ff9e6f19b7be8a64f41ba0b4b6a00c8bb0a6357 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)},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
+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 b=a("a.wp-has-current-submenu");"folded"===x?b.attr("aria-haspopup","true"):b.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=F.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(!(B||D||G.data("wp-responsive"))){if(S.menu+S.adminbar<S.window||S.menu+S.adminbar+20>S.wpwrap)return void k();if(R=!0,S.menu+S.adminbar>S.window){if(b<0)return void(O||(O=!0,P=!1,E.css({position:"fixed",top:"",bottom:""})));if(b+S.window>d.height()-1)return void(P||(P=!0,O=!1,E.css({position:"fixed",top:"",bottom:0})));b>N?O?(O=!1,Q=E.offset().top-S.adminbar-(b-N),Q+S.menu+S.adminbar<b+S.window&&(Q=b+S.window-S.menu-S.adminbar),E.css({position:"absolute",top:Q,bottom:""})):!P&&E.offset().top+S.menu<b+S.window&&(P=!0,E.css({position:"fixed",top:"",bottom:0})):b<N?P?(P=!1,Q=E.offset().top-S.adminbar+(N-b),Q+S.menu>b+S.window&&(Q=b),E.css({position:"absolute",top:Q,bottom:""})):!O&&E.offset().top>=b+S.adminbar&&(O=!0,E.css({position:"fixed",top:"",bottom:""})):c&&(O=P=!1,Q=b+S.window-S.menu-S.adminbar-1,Q>0?E.css({position:"absolute",top:Q,bottom:""}):k())}N=b}}function j(){S={window:e.height(),wpwrap:F.height(),adminbar:M.height(),menu:E.height()}}function k(){!B&&R&&(O=P=R=!1,E.css({position:"",top:"",bottom:""}))}function l(){j(),G.data("wp-responsive")?(f.removeClass("sticky-menu"),k()):S.menu+S.adminbar>S.window?(i(),f.removeClass("sticky-menu")):(f.addClass("sticky-menu"),k())}function m(){a(".aria-button-if-js").attr("role","button")}function n(){var a=!1;return b.innerWidth&&(a=Math.max(b.innerWidth,document.documentElement.clientWidth)),a}function o(){var a=n()||961;x=a<=782?"responsive":f.hasClass("folded")||f.hasClass("auto-fold")&&a<=960&&a>782?"folded":"open",d.trigger("wp-menu-state-set",{state:x})}var p,q,r,s,t,u,v,w,x,y=!1,z=a("input.current-page"),A=z.val(),B=/iPhone|iPad|iPod/.test(navigator.userAgent),C=navigator.userAgent.indexOf("Android")!==-1,D=a(document.documentElement).hasClass("ie8"),E=a("#adminmenuwrap"),F=a("#wpwrap"),G=a("#adminmenu"),H=a("#wp-responsive-overlay"),I=a("#wp-toolbar"),J=I.find('a[aria-haspopup="true"]'),K=a(".meta-box-sortables"),L=!1,M=a("#wpadminbar"),N=0,O=!1,P=!1,Q=0,R=!1,S={window:e.height(),wpwrap:F.height(),adminbar:M.height(),menu:E.height()},T=a(".wp-header-end");G.on("click.wp-submenu-head",".wp-submenu-head",function(b){a(b.target).parent().siblings("a").get(0).click()}),a("#collapse-button").on("click.collapse-menu",function(){var b=n()||961;a("#adminmenu div.wp-submenu").css("margin-top",""),b<960?f.hasClass("auto-fold")?(f.removeClass("auto-fold").removeClass("folded"),setUserSetting("unfold",1),setUserSetting("mfold","o"),x="open"):(f.addClass("auto-fold"),setUserSetting("unfold",0),x="folded"):f.hasClass("folded")?(f.removeClass("folded"),setUserSetting("mfold","o"),x="open"):(f.addClass("folded"),setUserSetting("mfold","f"),x="folded"),d.trigger("wp-collapse-menu",{state:x})}),d.on("wp-menu-state-set wp-collapse-menu wp-responsive-activate wp-responsive-deactivate",c),("ontouchstart"in b||/IEMobile\/[1-9]/.test(navigator.userAgent))&&(u=B?"touchstart":"click",f.on(u+".wp-mobile-hover",function(b){G.data("wp-responsive")||a(b.target).closest("#adminmenu").length||G.find("li.opensub").removeClass("opensub")}),G.find("a.wp-has-submenu").on(u+".wp-mobile-hover",function(b){var c=a(this).parent();G.data("wp-responsive")||c.hasClass("opensub")||c.hasClass("wp-menu-open")&&!(c.width()<40)||(b.preventDefault(),g(c),G.find("li.opensub").removeClass("opensub"),c.addClass("opensub"))})),B||C||(G.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||G.data("wp-responsive")||(g(b),G.find("li.opensub").removeClass("opensub"),b.addClass("opensub"))},out:function(){G.data("wp-responsive")||a(this).removeClass("opensub").find(".wp-submenu").css("margin-top","")},timeout:200,sensitivity:7,interval:90}),G.on("focus.adminmenu",".wp-submenu a",function(b){G.data("wp-responsive")||a(b.target).closest("li.menu-top").addClass("opensub")}).on("blur.adminmenu",".wp-submenu a",function(b){G.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))})),T.length||(T=a(".wrap h1, .wrap h2").first()),a("div.updated, div.error, div.notice").not(".inline, .below-h2").insertAfter(T),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(),f.on("click","tbody .check-column :checkbox",function(b){if("undefined"==b.shiftKey)return!0;if(b.shiftKey){if(!y)return!0;p=a(y).closest("form").find(":checkbox").filter(":visible:enabled"),q=p.index(y),r=p.index(this),s=a(this).prop("checked"),0<q&&0<r&&q!=r&&(t=r>q?p.slice(q,r):p.slice(r,q),t.prop("checked",function(){return!!a(this).closest("tr").is(":visible")&&s}))}y=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}),f.on("click.wp-toggle-checkboxes","thead .check-column :checkbox, tfoot .check-column :checkbox",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(v),w=a(this).find(".row-actions"),a(".row-actions").not(this).removeClass("visible"),w.addClass("visible")},focusout:function(){v=setTimeout(function(){w.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()}}),z.length&&z.closest("form").submit(function(){a('select[name="action"]').val()==-1&&a('select[name="action2"]').val()==-1&&z.val()==A&&z.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))}(),B||(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(),M.find(".hover").removeClass("hover"),F.toggleClass("wp-responsive-open"),F.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")}),G.on("click.wp-responsive","li.wp-has-submenu > a",function(b){G.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"),G.data("wp-responsive",1),this.disableSortables()},deactivate:function(){l(),G.removeData("wp-responsive"),this.enableSortables()},trigger:function(){var a=n();a&&(a<=782?L||(d.trigger("wp-responsive-activate"),L=!0):L&&(d.trigger("wp-responsive-deactivate"),L=!1),a<=480?this.enableOverlay():this.disableOverlay())},enableOverlay:function(){0===H.length&&(H=a('<div id="wp-responsive-overlay"></div>').insertAfter("#wpcontent").hide().on("click.wp-responsive",function(){I.find(".menupop.hover").removeClass("hover"),a(this).hide()})),J.on("click.wp-responsive",function(){H.show()})},disableOverlay:function(){J.off("click.wp-responsive"),H.hide()},disableSortables:function(){if(K.length)try{K.sortable("disable")}catch(a){}},enableSortables:function(){if(K.length)try{K.sortable("enable")}catch(a){}}},a(document).ajaxComplete(function(){m()}),d.on("wp-window-resized.set-menu-state",o),d.on("wp-menu-state-set wp-collapse-menu",function(b,c){var d=a("#collapse-button"),e="true",f=commonL10n.collapseMenu;"folded"===c.state&&(e="false",f=commonL10n.expandMenu),d.attr({"aria-expanded":e,"aria-label":f})}),b.wpResponsive.init(),l(),o(),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 81fd59170c659daf0f9224a4b34ed7505deb04f4..c3f4e294f1a6da867561d2feda9dbab76a029284 100644 (file)
                        }
                });
 
-               $('input[name="background-position-x"]').change(function() {
-                       bgImage.css('background-position', $(this).val() + ' top');
+               $( 'select[name="background-size"]' ).change( function() {
+                       bgImage.css( 'background-size', $( this ).val() );
                });
 
-               $('input[name="background-repeat"]').change(function() {
-                       bgImage.css('background-repeat', $(this).val());
+               $( 'input[name="background-position"]' ).change( function() {
+                       bgImage.css( 'background-position', $( this ).val() );
+               });
+
+               $( 'input[name="background-repeat"]' ).change( function() {
+                       bgImage.css( 'background-repeat', $( this ).is( ':checked' ) ? 'repeat' : 'no-repeat' );
+               });
+
+               $( 'input[name="background-attachment"]' ).change( function() {
+                       bgImage.css( 'background-attachment', $( this ).is( ':checked' ) ? 'scroll' : 'fixed' );
                });
 
                $('#choose-from-library-link').click( function( event ) {
index f53e02cae7ff35506bb7a0d680267e12ea0c7fd6..5e3038821f55865109e1aee4736fbde4489f5a90 100644 (file)
@@ -1 +1 @@
-!function(a){a(document).ready(function(){var b,c=a("#custom-background-image");a("#background-color").wpColorPicker({change:function(a,b){c.css("background-color",b.color.toString())},clear:function(){c.css("background-color","")}}),a('input[name="background-position-x"]').change(function(){c.css("background-position",a(this).val()+" top")}),a('input[name="background-repeat"]').change(function(){c.css("background-repeat",a(this).val())}),a("#choose-from-library-link").click(function(c){var d=a(this);return c.preventDefault(),b?void b.open():(b=wp.media.frames.customBackground=wp.media({title:d.data("choose"),library:{type:"image"},button:{text:d.data("update"),close:!1}}),b.on("select",function(){var c=b.state().get("selection").first();a.post(ajaxurl,{action:"set-background-image",attachment_id:c.id,size:"full"}).done(function(){window.location.reload()})}),void b.open())})})}(jQuery);
\ No newline at end of file
+!function(a){a(document).ready(function(){var b,c=a("#custom-background-image");a("#background-color").wpColorPicker({change:function(a,b){c.css("background-color",b.color.toString())},clear:function(){c.css("background-color","")}}),a('select[name="background-size"]').change(function(){c.css("background-size",a(this).val())}),a('input[name="background-position"]').change(function(){c.css("background-position",a(this).val())}),a('input[name="background-repeat"]').change(function(){c.css("background-repeat",a(this).is(":checked")?"repeat":"no-repeat")}),a('input[name="background-attachment"]').change(function(){c.css("background-attachment",a(this).is(":checked")?"scroll":"fixed")}),a("#choose-from-library-link").click(function(c){var d=a(this);return c.preventDefault(),b?void b.open():(b=wp.media.frames.customBackground=wp.media({title:d.data("choose"),library:{type:"image"},button:{text:d.data("update"),close:!1}}),b.on("select",function(){var c=b.state().get("selection").first();a.post(ajaxurl,{action:"set-background-image",attachment_id:c.id,size:"full"}).done(function(){window.location.reload()})}),void b.open())})})}(jQuery);
\ No newline at end of file
index 8fa7bb09ee2cc8960a70e3e8000e4bcbd9a3893a..65f5584e8a91f0256a3529616783e27041186118 100644 (file)
@@ -1,6 +1,6 @@
 /* global _wpCustomizeHeader, _wpCustomizeBackground, _wpMediaViewsL10n, MediaElementPlayer */
 (function( exports, $ ){
-       var Container, focus, api = wp.customize;
+       var Container, focus, normalizedTransitionendEventName, api = wp.customize;
 
        /**
         * A Customizer Setting.
         */
        api.Setting = api.Value.extend({
                initialize: function( id, value, options ) {
-                       api.Value.prototype.initialize.call( this, value, options );
+                       var setting = this;
+                       api.Value.prototype.initialize.call( setting, value, options );
 
-                       this.id = id;
-                       this.transport = this.transport || 'refresh';
-                       this._dirty = options.dirty || false;
-                       this.notifications = new api.Values({ defaultConstructor: api.Notification });
+                       setting.id = id;
+                       setting.transport = setting.transport || 'refresh';
+                       setting._dirty = options.dirty || false;
+                       setting.notifications = new api.Values({ defaultConstructor: api.Notification });
 
                        // Whenever the setting's value changes, refresh the preview.
-                       this.bind( this.preview );
+                       setting.bind( setting.preview );
                },
 
                /**
                 * Refresh the preview, respective of the setting's refresh policy.
+                *
+                * If the preview hasn't sent a keep-alive message and is likely
+                * disconnected by having navigated to a non-allowed URL, then the
+                * refresh transport will be forced when postMessage is the transport.
+                * Note that postMessage does not throw an error when the recipient window
+                * fails to match the origin window, so using try/catch around the
+                * previewer.send() call to then fallback to refresh will not work.
+                *
+                * @since 3.4.0
+                * @access public
+                *
+                * @returns {void}
                 */
                preview: function() {
-                       switch ( this.transport ) {
-                               case 'refresh':
-                                       return this.previewer.refresh();
-                               case 'postMessage':
-                                       return this.previewer.send( 'setting', [ this.id, this() ] );
+                       var setting = this, transport;
+                       transport = setting.transport;
+
+                       if ( 'postMessage' === transport && ! api.state( 'previewerAlive' ).get() ) {
+                               transport = 'refresh';
+                       }
+
+                       if ( 'postMessage' === transport ) {
+                               setting.previewer.send( 'setting', [ setting.id, setting() ] );
+                       } else if ( 'refresh' === transport ) {
+                               setting.previewer.refresh();
                        }
                },
 
        });
 
        /**
-        * Utility function namespace
+        * Current change count.
+        *
+        * @since 4.7.0
+        * @type {number}
+        * @protected
+        */
+       api._latestRevision = 0;
+
+       /**
+        * Last revision that was saved.
+        *
+        * @since 4.7.0
+        * @type {number}
+        * @protected
+        */
+       api._lastSavedRevision = 0;
+
+       /**
+        * Latest revisions associated with the updated setting.
+        *
+        * @since 4.7.0
+        * @type {object}
+        * @protected
+        */
+       api._latestSettingRevisions = {};
+
+       /*
+        * Keep track of the revision associated with each updated setting so that
+        * requestChangesetUpdate knows which dirty settings to include. Also, once
+        * ready is triggered and all initial settings have been added, increment
+        * revision for each newly-created initially-dirty setting so that it will
+        * also be included in changeset update requests.
+        */
+       api.bind( 'change', function incrementChangedSettingRevision( setting ) {
+               api._latestRevision += 1;
+               api._latestSettingRevisions[ setting.id ] = api._latestRevision;
+       } );
+       api.bind( 'ready', function() {
+               api.bind( 'add', function incrementCreatedSettingRevision( setting ) {
+                       if ( setting._dirty ) {
+                               api._latestRevision += 1;
+                               api._latestSettingRevisions[ setting.id ] = api._latestRevision;
+                       }
+               } );
+       } );
+
+       /**
+        * Get the dirty setting values.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param {object} [options] Options.
+        * @param {boolean} [options.unsaved=false] Whether only values not saved yet into a changeset will be returned (differential changes).
+        * @returns {object} Dirty setting values.
+        */
+       api.dirtyValues = function dirtyValues( options ) {
+               var values = {};
+               api.each( function( setting ) {
+                       var settingRevision;
+
+                       if ( ! setting._dirty ) {
+                               return;
+                       }
+
+                       settingRevision = api._latestSettingRevisions[ setting.id ];
+
+                       // Skip including settings that have already been included in the changeset, if only requesting unsaved.
+                       if ( api.state( 'changesetStatus' ).get() && ( options && options.unsaved ) && ( _.isUndefined( settingRevision ) || settingRevision <= api._lastSavedRevision ) ) {
+                               return;
+                       }
+
+                       values[ setting.id ] = setting.get();
+               } );
+               return values;
+       };
+
+       /**
+        * Request updates to the changeset.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param {object} [changes] Mapping of setting IDs to setting params each normally including a value property, or mapping to null.
+        *                           If not provided, then the changes will still be obtained from unsaved dirty settings.
+        * @returns {jQuery.Promise} Promise resolving with the response data.
         */
-       api.utils = {};
+       api.requestChangesetUpdate = function requestChangesetUpdate( changes ) {
+               var deferred, request, submittedChanges = {}, data;
+               deferred = new $.Deferred();
+
+               if ( changes ) {
+                       _.extend( submittedChanges, changes );
+               }
+
+               // Ensure all revised settings (changes pending save) are also included, but not if marked for deletion in changes.
+               _.each( api.dirtyValues( { unsaved: true } ), function( dirtyValue, settingId ) {
+                       if ( ! changes || null !== changes[ settingId ] ) {
+                               submittedChanges[ settingId ] = _.extend(
+                                       {},
+                                       submittedChanges[ settingId ] || {},
+                                       { value: dirtyValue }
+                               );
+                       }
+               } );
+
+               // Short-circuit when there are no pending changes.
+               if ( _.isEmpty( submittedChanges ) ) {
+                       deferred.resolve( {} );
+                       return deferred.promise();
+               }
+
+               // Make sure that publishing a changeset waits for all changeset update requests to complete.
+               api.state( 'processing' ).set( api.state( 'processing' ).get() + 1 );
+               deferred.always( function() {
+                       api.state( 'processing' ).set( api.state( 'processing' ).get() - 1 );
+               } );
+
+               // Allow plugins to attach additional params to the settings.
+               api.trigger( 'changeset-save', submittedChanges );
+
+               // Ensure that if any plugins add data to save requests by extending query() that they get included here.
+               data = api.previewer.query( { excludeCustomizedSaved: true } );
+               delete data.customized; // Being sent in customize_changeset_data instead.
+               _.extend( data, {
+                       nonce: api.settings.nonce.save,
+                       customize_theme: api.settings.theme.stylesheet,
+                       customize_changeset_data: JSON.stringify( submittedChanges )
+               } );
+
+               request = wp.ajax.post( 'customize_save', data );
+
+               request.done( function requestChangesetUpdateDone( data ) {
+                       var savedChangesetValues = {};
+
+                       // Ensure that all settings updated subsequently will be included in the next changeset update request.
+                       api._lastSavedRevision = Math.max( api._latestRevision, api._lastSavedRevision );
+
+                       api.state( 'changesetStatus' ).set( data.changeset_status );
+                       deferred.resolve( data );
+                       api.trigger( 'changeset-saved', data );
+
+                       if ( data.setting_validities ) {
+                               _.each( data.setting_validities, function( validity, settingId ) {
+                                       if ( true === validity && _.isObject( submittedChanges[ settingId ] ) && ! _.isUndefined( submittedChanges[ settingId ].value ) ) {
+                                               savedChangesetValues[ settingId ] = submittedChanges[ settingId ].value;
+                                       }
+                               } );
+                       }
+
+                       api.previewer.send( 'changeset-saved', _.extend( {}, data, { saved_changeset_values: savedChangesetValues } ) );
+               } );
+               request.fail( function requestChangesetUpdateFail( data ) {
+                       deferred.reject( data );
+                       api.trigger( 'changeset-error', data );
+               } );
+               request.always( function( data ) {
+                       if ( data.setting_validities ) {
+                               api._handleSettingValidities( {
+                                       settingValidities: data.setting_validities
+                               } );
+                       }
+               } );
+
+               return deferred.promise();
+       };
 
        /**
         * Watch all changes to Value properties, and bubble changes to parent Values instance
                params = params || {};
                focus = function () {
                        var focusContainer;
-                       if ( construct.extended( api.Panel ) && construct.expanded && construct.expanded() ) {
-                               focusContainer = construct.container.find( 'ul.control-panel-content' );
-                       } else if ( construct.extended( api.Section ) && construct.expanded && construct.expanded() ) {
-                               focusContainer = construct.container.find( 'ul.accordion-section-content' );
+                       if ( ( construct.extended( api.Panel ) || construct.extended( api.Section ) ) && construct.expanded && construct.expanded() ) {
+                               focusContainer = construct.contentContainer;
                        } else {
                                focusContainer = construct.container;
                        }
                } else {
                        params.completeCallback = focus;
                }
+
+               api.state( 'paneVisible' ).set( true );
                if ( construct.expand ) {
                        construct.expand( params );
                } else {
                return equal;
        };
 
+       /**
+        * Return browser supported `transitionend` event name.
+        *
+        * @since 4.7.0
+        *
+        * @returns {string|null} Normalized `transitionend` event name or null if CSS transitions are not supported.
+        */
+       normalizedTransitionendEventName = (function () {
+               var el, transitions, prop;
+               el = document.createElement( 'div' );
+               transitions = {
+                       'transition'      : 'transitionend',
+                       'OTransition'     : 'oTransitionEnd',
+                       'MozTransition'   : 'transitionend',
+                       'WebkitTransition': 'webkitTransitionEnd'
+               };
+               prop = _.find( _.keys( transitions ), function( prop ) {
+                       return ! _.isUndefined( el.style[ prop ] );
+               } );
+               if ( prop ) {
+                       return transitions[ prop ];
+               } else {
+                       return null;
+               }
+       })();
+
        /**
         * Base class for Panel and Section.
         *
                        if ( 0 === container.container.length ) {
                                container.container = $( container.getContainer() );
                        }
+                       container.headContainer = container.container;
+                       container.contentContainer = container.getContent();
+                       container.container = container.container.add( container.contentContainer );
 
                        container.deferred = {
                                embedded: new $.Deferred()
                 * @param {Object}  args.completeCallback
                 */
                onChangeActive: function( active, args ) {
-                       var duration, construct = this, expandedOtherPanel;
+                       var construct = this,
+                               headContainer = construct.headContainer,
+                               duration, expandedOtherPanel;
+
                        if ( args.unchanged ) {
                                if ( args.completeCallback ) {
                                        args.completeCallback();
                                }
                        }
 
-                       if ( ! $.contains( document, construct.container[0] ) ) {
+                       if ( ! $.contains( document, headContainer ) ) {
                                // jQuery.fn.slideUp is not hiding an element if it is not in the DOM
-                               construct.container.toggle( active );
+                               headContainer.toggle( active );
                                if ( args.completeCallback ) {
                                        args.completeCallback();
                                }
                        } else if ( active ) {
-                               construct.container.stop( true, true ).slideDown( duration, args.completeCallback );
+                               headContainer.stop( true, true ).slideDown( duration, args.completeCallback );
                        } else {
                                if ( construct.expanded() ) {
                                        construct.collapse({
                                                duration: duration,
                                                completeCallback: function() {
-                                                       construct.container.stop( true, true ).slideUp( duration, args.completeCallback );
+                                                       headContainer.stop( true, true ).slideUp( duration, args.completeCallback );
                                                }
                                        });
                                } else {
-                                       construct.container.stop( true, true ).slideUp( duration, args.completeCallback );
+                                       headContainer.stop( true, true ).slideUp( duration, args.completeCallback );
                                }
                        }
-
-                       // Recalculate the margin-top immediately, not waiting for debounced reflow, to prevent momentary (100ms) vertical jiggle.
-                       if ( expandedOtherPanel ) {
-                               expandedOtherPanel._recalculateTopMargin();
-                       }
                },
 
                /**
                                return false;
                        }
 
+                       api.state( 'paneVisible' ).set( true );
                        params.completeCallback = function() {
                                if ( previousCompleteCallback ) {
                                        previousCompleteCallback.apply( instance, arguments );
                        return this._toggleExpanded( false, params );
                },
 
+               /**
+                * Animate container state change if transitions are supported by the browser.
+                *
+                * @since 4.7.0
+                * @private
+                *
+                * @param {function} completeCallback Function to be called after transition is completed.
+                * @returns {void}
+                */
+               _animateChangeExpanded: function( completeCallback ) {
+                       // Return if CSS transitions are not supported.
+                       if ( ! normalizedTransitionendEventName ) {
+                               if ( completeCallback ) {
+                                       completeCallback();
+                               }
+                               return;
+                       }
+
+                       var construct = this,
+                               content = construct.contentContainer,
+                               overlay = content.closest( '.wp-full-overlay' ),
+                               elements, transitionEndCallback;
+
+                       // Determine set of elements that are affected by the animation.
+                       elements = overlay.add( content );
+                       if ( _.isUndefined( construct.panel ) || '' === construct.panel() ) {
+                               elements = elements.add( '#customize-info, .customize-pane-parent' );
+                       }
+
+                       // Handle `transitionEnd` event.
+                       transitionEndCallback = function( e ) {
+                               if ( 2 !== e.eventPhase || ! $( e.target ).is( content ) ) {
+                                       return;
+                               }
+                               content.off( normalizedTransitionendEventName, transitionEndCallback );
+                               elements.removeClass( 'busy' );
+                               if ( completeCallback ) {
+                                       completeCallback();
+                               }
+                       };
+                       content.on( normalizedTransitionendEventName, transitionEndCallback );
+                       elements.addClass( 'busy' );
+
+                       // Prevent screen flicker when pane has been scrolled before expanding.
+                       _.defer( function() {
+                               var container = content.closest( '.wp-full-overlay-sidebar-content' ),
+                                       currentScrollTop = container.scrollTop(),
+                                       previousScrollTop = content.data( 'previous-scrollTop' ) || 0,
+                                       expanded = construct.expanded();
+
+                               if ( expanded && 0 < currentScrollTop ) {
+                                       content.css( 'top', currentScrollTop + 'px' );
+                                       content.data( 'previous-scrollTop', currentScrollTop );
+                               } else if ( ! expanded && 0 < currentScrollTop + previousScrollTop ) {
+                                       content.css( 'top', previousScrollTop - currentScrollTop + 'px' );
+                                       container.scrollTop( previousScrollTop );
+                               }
+                       } );
+               },
+
                /**
                 * Bring the container into view and then expand this and bring it into view
                 * @param {Object} [params]
                        }
 
                        return '<li></li>';
+               },
+
+               /**
+                * Find content element which is displayed when the section is expanded.
+                *
+                * After a construct is initialized, the return value will be available via the `contentContainer` property.
+                * By default the element will be related it to the parent container with `aria-owns` and detached.
+                * Custom panels and sections (such as the `NewMenuSection`) that do not have a sliding pane should
+                * just return the content element without needing to add the `aria-owns` element or detach it from
+                * the container. Such non-sliding pane custom sections also need to override the `onChangeExpanded`
+                * method to handle animating the panel/section into and out of view.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @returns {jQuery} Detached content element.
+                */
+               getContent: function() {
+                       var construct = this,
+                               container = construct.container,
+                               content = container.find( '.accordion-section-content, .control-panel-content' ).first(),
+                               contentId = 'sub-' + container.attr( 'id' ),
+                               ownedElements = contentId,
+                               alreadyOwnedElements = container.attr( 'aria-owns' );
+
+                       if ( alreadyOwnedElements ) {
+                               ownedElements = ownedElements + ' ' + alreadyOwnedElements;
+                       }
+                       container.attr( 'aria-owns', ownedElements );
+
+                       return content.detach().attr( {
+                               'id': contentId,
+                               'class': 'customize-pane-child ' + content.attr( 'class' ) + ' ' + container.attr( 'class' )
+                       } );
                }
        });
 
                        section.id = id;
                        section.panel = new api.Value();
                        section.panel.bind( function ( id ) {
-                               $( section.container ).toggleClass( 'control-subsection', !! id );
+                               $( section.headContainer ).toggleClass( 'control-subsection', !! id );
                        });
                        section.panel.set( section.params.panel || '' );
                        api.utils.bubbleChildValueChanges( section, [ 'panel' ] );
                 * @since 4.1.0
                 */
                embed: function () {
-                       var section = this, inject;
+                       var inject,
+                               section = this,
+                               container = $( '#customize-theme-controls' );
 
                        // Watch for changes to the panel state
                        inject = function ( panelId ) {
                                        api.panel( panelId, function ( panel ) {
                                                // The panel has been registered, wait for it to become ready/initialized
                                                panel.deferred.embedded.done( function () {
-                                                       parentContainer = panel.container.find( 'ul:first' );
-                                                       if ( ! section.container.parent().is( parentContainer ) ) {
-                                                               parentContainer.append( section.container );
+                                                       parentContainer = panel.contentContainer;
+                                                       if ( ! section.headContainer.parent().is( parentContainer ) ) {
+                                                               parentContainer.append( section.headContainer );
+                                                       }
+                                                       if ( ! section.contentContainer.parent().is( section.headContainer ) ) {
+                                                               container.append( section.contentContainer );
                                                        }
                                                        section.deferred.embedded.resolve();
                                                });
                                        } );
                                } else {
                                        // There is no panel, so embed the section in the root of the customizer
-                                       parentContainer = $( '#customize-theme-controls' ).children( 'ul' ); // @todo This should be defined elsewhere, and to be configurable
-                                       if ( ! section.container.parent().is( parentContainer ) ) {
-                                               parentContainer.append( section.container );
+                                       parentContainer = $( '.customize-pane-parent' ); // @todo This should be defined elsewhere, and to be configurable
+                                       if ( ! section.headContainer.parent().is( parentContainer ) ) {
+                                               parentContainer.append( section.headContainer );
+                                       }
+                                       if ( ! section.contentContainer.parent().is( section.headContainer ) ) {
+                                               container.append( section.contentContainer );
                                        }
                                        section.deferred.embedded.resolve();
                                }
                        };
                        section.panel.bind( inject );
                        inject( section.panel.get() ); // Since a section may never get a panel, assume that it won't ever get one
-
-                       section.deferred.embedded.done(function() {
-                               // Fix the top margin after reflow.
-                               api.bind( 'pane-contents-reflowed', _.debounce( function() {
-                                       section._recalculateTopMargin();
-                               }, 100 ) );
-                       });
                },
 
                /**
                 * @since 4.1.0
                 */
                attachEvents: function () {
-                       var section = this;
+                       var meta, content, section = this;
+
+                       if ( section.container.hasClass( 'cannot-expand' ) ) {
+                               return;
+                       }
 
                        // Expand/Collapse accordion sections on click.
                        section.container.find( '.accordion-section-title, .customize-section-back' ).on( 'click keydown', function( event ) {
                                        section.expand();
                                }
                        });
+
+                       // This is very similar to what is found for api.Panel.attachEvents().
+                       section.container.find( '.customize-section-title .customize-help-toggle' ).on( 'click', function() {
+
+                               meta = section.container.find( '.section-meta' );
+                               if ( meta.hasClass( 'cannot-expand' ) ) {
+                                       return;
+                               }
+                               content = meta.find( '.customize-section-description:first' );
+                               content.toggleClass( 'open' );
+                               content.slideToggle();
+                               content.attr( 'aria-expanded', function ( i, attr ) {
+                                       return 'true' === attr ? 'false' : 'true';
+                               });
+                       });
                },
 
                /**
                 */
                onChangeExpanded: function ( expanded, args ) {
                        var section = this,
-                               container = section.container.closest( '.wp-full-overlay-sidebar-content' ),
-                               content = section.container.find( '.accordion-section-content' ),
-                               overlay = section.container.closest( '.wp-full-overlay' ),
-                               backBtn = section.container.find( '.customize-section-back' ),
-                               sectionTitle = section.container.find( '.accordion-section-title' ).first(),
-                               headerActionsHeight = $( '#customize-header-actions' ).height(),
-                               resizeContentHeight, expand, position, scroll;
+                               container = section.headContainer.closest( '.wp-full-overlay-sidebar-content' ),
+                               content = section.contentContainer,
+                               overlay = section.headContainer.closest( '.wp-full-overlay' ),
+                               backBtn = content.find( '.customize-section-back' ),
+                               sectionTitle = section.headContainer.find( '.accordion-section-title' ).first(),
+                               expand;
 
-                       if ( expanded && ! section.container.hasClass( 'open' ) ) {
+                       if ( expanded && ! content.hasClass( 'open' ) ) {
 
                                if ( args.unchanged ) {
                                        expand = args.completeCallback;
                                } else {
-                                       container.scrollTop( 0 );
-                                       resizeContentHeight = function() {
-                                               var matchMedia, offset;
-                                               matchMedia = window.matchMedia || window.msMatchMedia;
-                                               offset = 90; // 45px for customize header actions + 45px for footer actions.
-
-                                               // No footer on small screens.
-                                               if ( matchMedia && matchMedia( '(max-width: 640px)' ).matches ) {
-                                                       offset = 45;
-                                               }
-                                               content.css( 'height', ( window.innerHeight - offset ) );
-                                       };
-                                       expand = function() {
-                                               section.container.addClass( 'open' );
-                                               overlay.addClass( 'section-open' );
-                                               position = content.offset().top;
-                                               scroll = container.scrollTop();
-                                               content.css( 'margin-top', ( headerActionsHeight - position - scroll ) );
-                                               resizeContentHeight();
-                                               sectionTitle.attr( 'tabindex', '-1' );
-                                               backBtn.attr( 'tabindex', '0' );
-                                               backBtn.focus();
-                                               if ( args.completeCallback ) {
-                                                       args.completeCallback();
-                                               }
+                                       expand = $.proxy( function() {
+                                               section._animateChangeExpanded( function() {
+                                                       sectionTitle.attr( 'tabindex', '-1' );
+                                                       backBtn.attr( 'tabindex', '0' );
 
-                                               // Fix the height after browser resize.
-                                               $( window ).on( 'resize.customizer-section', _.debounce( resizeContentHeight, 100 ) );
+                                                       backBtn.focus();
+                                                       content.css( 'top', '' );
+                                                       container.scrollTop( 0 );
 
-                                               setTimeout( _.bind( section._recalculateTopMargin, section ), 0 );
-                                       };
+                                                       if ( args.completeCallback ) {
+                                                               args.completeCallback();
+                                                       }
+                                               } );
+
+                                               content.addClass( 'open' );
+                                               overlay.addClass( 'section-open' );
+                                               api.state( 'expandedSection' ).set( section );
+                                       }, this );
                                }
 
                                if ( ! args.allowMultiple ) {
                                        expand();
                                }
 
-                       } else if ( ! expanded && section.container.hasClass( 'open' ) ) {
-                               section.container.removeClass( 'open' );
+                       } else if ( ! expanded && content.hasClass( 'open' ) ) {
+                               section._animateChangeExpanded( function() {
+                                       backBtn.attr( 'tabindex', '-1' );
+                                       sectionTitle.attr( 'tabindex', '0' );
+
+                                       sectionTitle.focus();
+                                       content.css( 'top', '' );
+
+                                       if ( args.completeCallback ) {
+                                               args.completeCallback();
+                                       }
+                               } );
+
+                               content.removeClass( 'open' );
                                overlay.removeClass( 'section-open' );
-                               content.css( 'margin-top', '' );
-                               container.scrollTop( 0 );
-                               backBtn.attr( 'tabindex', '-1' );
-                               sectionTitle.attr( 'tabindex', '0' );
-                               sectionTitle.focus();
-                               if ( args.completeCallback ) {
-                                       args.completeCallback();
+                               if ( section === api.state( 'expandedSection' ).get() ) {
+                                       api.state( 'expandedSection' ).set( false );
                                }
-                               $( window ).off( 'resize.customizer-section' );
+
                        } else {
                                if ( args.completeCallback ) {
                                        args.completeCallback();
                                }
                        }
-               },
-
-               /**
-                * Recalculate the top margin.
-                *
-                * @since 4.4.0
-                * @private
-                */
-               _recalculateTopMargin: function() {
-                       var section = this, content, offset, headerActionsHeight;
-                       content = section.container.find( '.accordion-section-content' );
-                       if ( 0 === content.length ) {
-                               return;
-                       }
-                       headerActionsHeight = $( '#customize-header-actions' ).height();
-                       offset = ( content.offset().top - headerActionsHeight );
-                       if ( 0 < offset ) {
-                               content.css( 'margin-top', ( parseInt( content.css( 'margin-top' ), 10 ) - offset ) );
-                       }
                }
        });
 
                        section.template = wp.template( 'customize-themes-details-view' );
 
                        // Bind global keyboard events.
-                       $( 'body' ).on( 'keyup', function( event ) {
+                       section.container.on( 'keydown', function( event ) {
                                if ( ! section.overlay.find( '.theme-wrap' ).is( ':visible' ) ) {
                                        return;
                                }
                                // Pressing the escape key fires a theme:collapse event
                                if ( 27 === event.keyCode ) {
                                        section.closeDetails();
+                                       event.stopPropagation(); // Prevent section from being collapsed.
                                }
                        });
 
                        }
 
                        // Note: there is a second argument 'args' passed
-                       var position, scroll,
-                               panel = this,
-                               section = panel.container.closest( '.accordion-section' ),
+                       var panel = this,
+                               section = panel.contentContainer,
                                overlay = section.closest( '.wp-full-overlay' ),
                                container = section.closest( '.wp-full-overlay-sidebar-content' ),
-                               siblings = container.find( '.open' ),
                                customizeBtn = section.find( '.customize-theme' ),
-                               changeBtn = section.find( '.change-theme' ),
-                               content = section.find( '.control-panel-content' );
-
-                       if ( expanded ) {
+                               changeBtn = panel.headContainer.find( '.change-theme' );
 
+                       if ( expanded && ! section.hasClass( 'current-panel' ) ) {
                                // Collapse any sibling sections/panels
                                api.section.each( function ( otherSection ) {
                                        if ( otherSection !== panel ) {
                                        otherPanel.collapse( { duration: 0 } );
                                });
 
-                               content.show( 0, function() {
-                                       position = content.offset().top;
-                                       scroll = container.scrollTop();
-                                       content.css( 'margin-top', ( $( '#customize-header-actions' ).height() - position - scroll ) );
-                                       section.addClass( 'current-panel' );
-                                       overlay.addClass( 'in-themes-panel' );
+                               panel._animateChangeExpanded( function() {
+                                       changeBtn.attr( 'tabindex', '-1' );
+                                       customizeBtn.attr( 'tabindex', '0' );
+
+                                       customizeBtn.focus();
+                                       section.css( 'top', '' );
                                        container.scrollTop( 0 );
-                                       _.delay( panel.renderScreenshots, 10 ); // Wait for the controls
-                                       panel.$customizeSidebar.on( 'scroll.customize-themes-section', _.throttle( panel.renderScreenshots, 300 ) );
+
                                        if ( args.completeCallback ) {
                                                args.completeCallback();
                                        }
                                } );
-                               customizeBtn.focus();
-                       } else {
-                               siblings.removeClass( 'open' );
-                               section.removeClass( 'current-panel' );
-                               overlay.removeClass( 'in-themes-panel' );
-                               panel.$customizeSidebar.off( 'scroll.customize-themes-section' );
-                               content.delay( 180 ).hide( 0, function() {
-                                       content.css( 'margin-top', 'inherit' ); // Reset
+
+                               overlay.addClass( 'in-themes-panel' );
+                               section.addClass( 'current-panel' );
+                               _.delay( panel.renderScreenshots, 10 ); // Wait for the controls
+                               panel.$customizeSidebar.on( 'scroll.customize-themes-section', _.throttle( panel.renderScreenshots, 300 ) );
+
+                       } else if ( ! expanded && section.hasClass( 'current-panel' ) ) {
+                               panel._animateChangeExpanded( function() {
+                                       changeBtn.attr( 'tabindex', '0' );
+                                       customizeBtn.attr( 'tabindex', '-1' );
+
+                                       changeBtn.focus();
+                                       section.css( 'top', '' );
+
                                        if ( args.completeCallback ) {
                                                args.completeCallback();
                                        }
                                } );
-                               customizeBtn.attr( 'tabindex', '0' );
-                               changeBtn.focus();
-                               container.scrollTop( 0 );
-                       }
-               },
 
-               /**
-                * Recalculate the top margin.
-                *
-                * @since 4.4.0
-                * @private
-                */
-               _recalculateTopMargin: function() {
-                       api.Panel.prototype._recalculateTopMargin.call( this );
+                               overlay.removeClass( 'in-themes-panel' );
+                               section.removeClass( 'current-panel' );
+                               panel.$customizeSidebar.off( 'scroll.customize-themes-section' );
+                       }
                },
 
                /**
                        }
                },
 
+               /**
+                * Load theme preview.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @param {string} themeId Theme ID.
+                * @returns {jQuery.promise} Promise.
+                */
+               loadThemePreview: function( themeId ) {
+                       var deferred = $.Deferred(), onceProcessingComplete, overlay, urlParser;
+
+                       urlParser = document.createElement( 'a' );
+                       urlParser.href = location.href;
+                       urlParser.search = $.param( _.extend(
+                               api.utils.parseQueryString( urlParser.search.substr( 1 ) ),
+                               {
+                                       theme: themeId,
+                                       changeset_uuid: api.settings.changeset.uuid
+                               }
+                       ) );
+
+                       overlay = $( '.wp-full-overlay' );
+                       overlay.addClass( 'customize-loading' );
+
+                       onceProcessingComplete = function() {
+                               var request;
+                               if ( api.state( 'processing' ).get() > 0 ) {
+                                       return;
+                               }
+
+                               api.state( 'processing' ).unbind( onceProcessingComplete );
+
+                               request = api.requestChangesetUpdate();
+                               request.done( function() {
+                                       $( window ).off( 'beforeunload.customize-confirm' );
+                                       top.location.href = urlParser.href;
+                                       deferred.resolve();
+                               } );
+                               request.fail( function() {
+                                       overlay.removeClass( 'customize-loading' );
+                                       deferred.reject();
+                               } );
+                       };
+
+                       if ( 0 === api.state( 'processing' ).get() ) {
+                               onceProcessingComplete();
+                       } else {
+                               api.state( 'processing' ).bind( onceProcessingComplete );
+                       }
+
+                       return deferred.promise();
+               },
+
                /**
                 * Render & show the theme details for a given theme model.
                 *
                 * @param {Object}   theme
                 */
                showDetails: function ( theme, callback ) {
-                       var section = this;
+                       var section = this, link;
                        callback = callback || function(){};
                        section.currentTheme = theme.id;
                        section.overlay.html( section.template( theme ) )
                        $( 'body' ).addClass( 'modal-open' );
                        section.containFocus( section.overlay );
                        section.updateLimits();
+
+                       link = section.overlay.find( '.inactive-theme > a' );
+
+                       link.on( 'click', function( event ) {
+                               event.preventDefault();
+
+                               // Short-circuit if request is currently being made.
+                               if ( link.hasClass( 'disabled' ) ) {
+                                       return;
+                               }
+                               link.addClass( 'disabled' );
+
+                               section.loadThemePreview( theme.id ).fail( function() {
+                                       link.removeClass( 'disabled' );
+                               } );
+                       } );
                        callback();
                },
 
                 */
                embed: function () {
                        var panel = this,
-                               parentContainer = $( '#customize-theme-controls > ul' ); // @todo This should be defined elsewhere, and to be configurable
+                               container = $( '#customize-theme-controls' ),
+                               parentContainer = $( '.customize-pane-parent' ); // @todo This should be defined elsewhere, and to be configurable
 
-                       if ( ! panel.container.parent().is( parentContainer ) ) {
-                               parentContainer.append( panel.container );
+                       if ( ! panel.headContainer.parent().is( parentContainer ) ) {
+                               parentContainer.append( panel.headContainer );
+                       }
+                       if ( ! panel.contentContainer.parent().is( panel.headContainer ) ) {
+                               container.append( panel.contentContainer );
                                panel.renderContent();
                        }
 
-                       api.bind( 'pane-contents-reflowed', _.debounce( function() {
-                               panel._recalculateTopMargin();
-                       }, 100 ) );
-
                        panel.deferred.embedded.resolve();
                },
 
                        var meta, panel = this;
 
                        // Expand/Collapse accordion sections on click.
-                       panel.container.find( '.accordion-section-title' ).on( 'click keydown', function( event ) {
+                       panel.headContainer.find( '.accordion-section-title' ).on( 'click keydown', function( event ) {
                                if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
                                        return;
                                }
                                }
                                event.preventDefault(); // Keep this AFTER the key filter above
 
-                               meta = panel.container.find( '.panel-meta' );
                                if ( meta.hasClass( 'cannot-expand' ) ) {
                                        return;
                                }
                        }
 
                        // Note: there is a second argument 'args' passed
-                       var position, scroll,
-                               panel = this,
-                               accordionSection = panel.container.closest( '.accordion-section' ),
+                       var panel = this,
+                               accordionSection = panel.contentContainer,
                                overlay = accordionSection.closest( '.wp-full-overlay' ),
                                container = accordionSection.closest( '.wp-full-overlay-sidebar-content' ),
-                               siblings = container.find( '.open' ),
-                               topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ),
-                               backBtn = accordionSection.find( '.customize-panel-back' ),
-                               panelTitle = accordionSection.find( '.accordion-section-title' ).first(),
-                               content = accordionSection.find( '.control-panel-content' ),
-                               headerActionsHeight = $( '#customize-header-actions' ).height();
-
-                       if ( expanded ) {
+                               topPanel = panel.headContainer.find( '.accordion-section-title' ),
+                               backBtn = accordionSection.find( '.customize-panel-back' );
 
+                       if ( expanded && ! accordionSection.hasClass( 'current-panel' ) ) {
                                // Collapse any sibling sections/panels
                                api.section.each( function ( section ) {
                                        if ( panel.id !== section.panel() ) {
                                        }
                                });
 
-                               content.show( 0, function() {
-                                       content.parent().show();
-                                       position = content.offset().top;
-                                       scroll = container.scrollTop();
-                                       content.css( 'margin-top', ( headerActionsHeight - position - scroll ) );
-                                       accordionSection.addClass( 'current-panel' );
-                                       overlay.addClass( 'in-sub-panel' );
+                               panel._animateChangeExpanded( function() {
+                                       topPanel.attr( 'tabindex', '-1' );
+                                       backBtn.attr( 'tabindex', '0' );
+
+                                       backBtn.focus();
+                                       accordionSection.css( 'top', '' );
                                        container.scrollTop( 0 );
+
                                        if ( args.completeCallback ) {
                                                args.completeCallback();
                                        }
                                } );
-                               topPanel.attr( 'tabindex', '-1' );
-                               backBtn.attr( 'tabindex', '0' );
-                               backBtn.focus();
-                               panel._recalculateTopMargin();
-                       } else {
-                               siblings.removeClass( 'open' );
-                               accordionSection.removeClass( 'current-panel' );
-                               overlay.removeClass( 'in-sub-panel' );
-                               content.delay( 180 ).hide( 0, function() {
-                                       content.css( 'margin-top', 'inherit' ); // Reset
+
+                               overlay.addClass( 'in-sub-panel' );
+                               accordionSection.addClass( 'current-panel' );
+                               api.state( 'expandedPanel' ).set( panel );
+
+                       } else if ( ! expanded && accordionSection.hasClass( 'current-panel' ) ) {
+                               panel._animateChangeExpanded( function() {
+                                       topPanel.attr( 'tabindex', '0' );
+                                       backBtn.attr( 'tabindex', '-1' );
+
+                                       topPanel.focus();
+                                       accordionSection.css( 'top', '' );
+
                                        if ( args.completeCallback ) {
                                                args.completeCallback();
                                        }
                                } );
-                               topPanel.attr( 'tabindex', '0' );
-                               backBtn.attr( 'tabindex', '-1' );
-                               panelTitle.focus();
-                               container.scrollTop( 0 );
-                       }
-               },
 
-               /**
-                * Recalculate the top margin.
-                *
-                * @since 4.4.0
-                * @private
-                */
-               _recalculateTopMargin: function() {
-                       var panel = this, headerActionsHeight, content, accordionSection;
-                       headerActionsHeight = $( '#customize-header-actions' ).height();
-                       accordionSection = panel.container.closest( '.accordion-section' );
-                       content = accordionSection.find( '.control-panel-content' );
-                       content.css( 'margin-top', ( parseInt( content.css( 'margin-top' ), 10 ) - ( content.offset().top - headerActionsHeight ) ) );
+                               overlay.removeClass( 'in-sub-panel' );
+                               accordionSection.removeClass( 'current-panel' );
+                               if ( panel === api.state( 'expandedPanel' ).get() ) {
+                                       api.state( 'expandedPanel' ).set( false );
+                               }
+                       }
                },
 
                /**
                        } else {
                                template = wp.template( 'customize-panel-default-content' );
                        }
-                       if ( template && panel.container ) {
-                               panel.container.find( '.accordion-sub-container' ).html( template( panel.params ) );
+                       if ( template && panel.headContainer ) {
+                               panel.contentContainer.html( template( panel.params ) );
                        }
                }
        });
                                api.section( sectionId, function ( section ) {
                                        // Wait for the section to be ready/initialized
                                        section.deferred.embedded.done( function () {
-                                               parentContainer = section.container.find( 'ul:first' );
+                                               parentContainer = ( section.contentContainer.is( 'ul' ) ) ? section.contentContainer : section.contentContainer.find( 'ul:first' );
                                                if ( ! control.container.parent().is( parentContainer ) ) {
                                                        parentContainer.append( control.container );
                                                        control.renderContent();
                /**
                 * Triggered when the control's markup has been injected into the DOM.
                 *
-                * @abstract
+                * @returns {void}
                 */
-               ready: function() {},
+               ready: function() {
+                       var control = this, newItem;
+                       if ( 'dropdown-pages' === control.params.type && control.params.allow_addition ) {
+                               newItem = control.container.find( '.new-content-item' );
+                               newItem.hide(); // Hide in JS to preserve flex display when showing.
+                               control.container.on( 'click', '.add-new-toggle', function( e ) {
+                                       $( e.currentTarget ).slideUp( 180 );
+                                       newItem.slideDown( 180 );
+                                       newItem.find( '.create-item-input' ).focus();
+                               });
+                               control.container.on( 'click', '.add-content', function() {
+                                       control.addNewPage();
+                               });
+                               control.container.on( 'keyup', '.create-item-input', function( e ) {
+                                       if ( 13 === e.which ) { // Enter
+                                               control.addNewPage();
+                                       }
+                               });
+                       }
+               },
 
                /**
                 * Get the element inside of a control's container that contains the validation error message.
                                        control.container.html( template( control.params ) );
                                }
                        }
-               }
-       });
-
-       /**
-        * A colorpicker control.
-        *
-        * @class
-        * @augments wp.customize.Control
-        * @augments wp.customize.Class
-        */
-       api.ColorControl = api.Control.extend({
-               ready: function() {
-                       var control = this,
-                               picker = this.container.find('.color-picker-hex');
+               },
 
-                       picker.val( control.setting() ).wpColorPicker({
-                               change: function() {
-                                       control.setting.set( picker.wpColorPicker('color') );
-                               },
-                               clear: function() {
-                                       control.setting.set( '' );
-                               }
-                       });
+               /**
+                * Add a new page to a dropdown-pages control reusing menus code for this.
+                *
+                * @since 4.7.0
+                * @access private
+                * @returns {void}
+                */
+               addNewPage: function () {
+                       var control = this, promise, toggle, container, input, title, select;
+
+                       if ( 'dropdown-pages' !== control.params.type || ! control.params.allow_addition || ! api.Menus ) {
+                               return;
+                       }
+
+                       toggle = control.container.find( '.add-new-toggle' );
+                       container = control.container.find( '.new-content-item' );
+                       input = control.container.find( '.create-item-input' );
+                       title = input.val();
+                       select = control.container.find( 'select' );
+
+                       if ( ! title ) {
+                               input.addClass( 'invalid' );
+                               return;
+                       }
+
+                       input.removeClass( 'invalid' );
+                       input.attr( 'disabled', 'disabled' );
+
+                       // The menus functions add the page, publish when appropriate, and also add the new page to the dropdown-pages controls.
+                       promise = api.Menus.insertAutoDraftPost( {
+                               post_title: title,
+                               post_type: 'page'
+                       } );
+                       promise.done( function( data ) {
+                               var availableItem, $content, itemTemplate;
+
+                               // Prepare the new page as an available menu item.
+                               // See api.Menus.submitNew().
+                               availableItem = new api.Menus.AvailableItemModel( {
+                                       'id': 'post-' + data.post_id, // Used for available menu item Backbone models.
+                                       'title': title,
+                                       'type': 'page',
+                                       'type_label': api.Menus.data.l10n.page_label,
+                                       'object': 'post_type',
+                                       'object_id': data.post_id,
+                                       'url': data.url
+                               } );
+
+                               // Add the new item to the list of available menu items.
+                               api.Menus.availableMenuItemsPanel.collection.add( availableItem );
+                               $content = $( '#available-menu-items-post_type-page' ).find( '.available-menu-items-list' );
+                               itemTemplate = wp.template( 'available-menu-item' );
+                               $content.prepend( itemTemplate( availableItem.attributes ) );
+
+                               // Focus the select control.
+                               select.focus();
+                               control.setting.set( String( data.post_id ) ); // Triggers a preview refresh and updates the setting.
+
+                               // Reset the create page form.
+                               container.slideUp( 180 );
+                               toggle.slideDown( 180 );
+                       } );
+                       promise.always( function() {
+                               input.val( '' ).removeAttr( 'disabled' );
+                       } );
+               }
+       });
+
+       /**
+        * A colorpicker control.
+        *
+        * @class
+        * @augments wp.customize.Control
+        * @augments wp.customize.Class
+        */
+       api.ColorControl = api.Control.extend({
+               ready: function() {
+                       var control = this,
+                               isHueSlider = this.params.mode === 'hue',
+                               updating = false,
+                               picker;
+
+                       if ( isHueSlider ) {
+                               picker = this.container.find( '.color-picker-hue' );
+                               picker.val( control.setting() ).wpColorPicker({
+                                       change: function( event, ui ) {
+                                               updating = true;
+                                               control.setting( ui.color.h() );
+                                               updating = false;
+                                       }
+                               });
+                       } else {
+                               picker = this.container.find( '.color-picker-hex' );
+                               picker.val( control.setting() ).wpColorPicker({
+                                       change: function() {
+                                               updating = true;
+                                               control.setting.set( picker.wpColorPicker( 'color' ) );
+                                               updating = false;
+                                       },
+                                       clear: function() {
+                                               updating = true;
+                                               control.setting.set( '' );
+                                               updating = false;
+                                       }
+                               });
+                       }
 
-                       this.setting.bind( function ( value ) {
+                       control.setting.bind( function ( value ) {
+                               // Bail if the update came from the control itself.
+                               if ( updating ) {
+                                       return;
+                               }
                                picker.val( value );
                                picker.wpColorPicker( 'color', value );
-                       });
+                       } );
+
+                       // Collapse color picker when hitting Esc instead of collapsing the current section.
+                       control.container.on( 'keydown', function( event ) {
+                               var pickerContainer;
+                               if ( 27 !== event.which ) { // Esc.
+                                       return;
+                               }
+                               pickerContainer = control.container.find( '.wp-picker-container' );
+                               if ( pickerContainer.hasClass( 'wp-picker-active' ) ) {
+                                       picker.wpColorPicker( 'close' );
+                                       control.container.find( '.wp-color-result' ).focus();
+                                       event.stopPropagation(); // Prevent section from being collapsed.
+                               }
+                       } );
                }
        });
 
                        wp.ajax.post( 'custom-background-add', {
                                nonce: _wpCustomizeBackground.nonces.add,
                                wp_customize: 'on',
-                               theme: api.settings.theme.stylesheet,
+                               customize_theme: api.settings.theme.stylesheet,
                                attachment_id: this.params.attachment.id
                        } );
                }
        });
 
+       /**
+        * A control for positioning a background image.
+        *
+        * @since 4.7.0
+        *
+        * @class
+        * @augments wp.customize.Control
+        * @augments wp.customize.Class
+        */
+       api.BackgroundPositionControl = api.Control.extend( {
+
+               /**
+                * Set up control UI once embedded in DOM and settings are created.
+                *
+                * @since 4.7.0
+                * @access public
+                */
+               ready: function() {
+                       var control = this, updateRadios;
+
+                       control.container.on( 'change', 'input[name="background-position"]', function() {
+                               var position = $( this ).val().split( ' ' );
+                               control.settings.x( position[0] );
+                               control.settings.y( position[1] );
+                       } );
+
+                       updateRadios = _.debounce( function() {
+                               var x, y, radioInput, inputValue;
+                               x = control.settings.x.get();
+                               y = control.settings.y.get();
+                               inputValue = String( x ) + ' ' + String( y );
+                               radioInput = control.container.find( 'input[name="background-position"][value="' + inputValue + '"]' );
+                               radioInput.click();
+                       } );
+                       control.settings.x.bind( updateRadios );
+                       control.settings.y.bind( updateRadios );
+
+                       updateRadios(); // Set initial UI.
+               }
+       } );
+
        /**
         * A control for selecting and cropping an image.
         *
                 * @param {object} attachment
                 */
                setImageFromAttachment: function( attachment ) {
-                       var sizes = [ 'site_icon-32', 'thumbnail', 'full' ],
+                       var sizes = [ 'site_icon-32', 'thumbnail', 'full' ], link,
                                icon;
 
                        _.each( sizes, function( size ) {
                        // Set the Customizer setting; the callback takes care of rendering.
                        this.setting( attachment.id );
 
+                       if ( ! icon ) {
+                               return;
+                       }
+
                        // Update the icon in-browser.
-                       $( 'link[sizes="32x32"]' ).attr( 'href', icon.url );
+                       link = $( 'link[rel="icon"][sizes="32x32"]' );
+                       link.attr( 'href', icon.url );
                },
 
                /**
                        this.params.attachment = {};
                        this.setting( '' );
                        this.renderContent(); // Not bound to setting change when emptying.
-                       $( 'link[rel="icon"]' ).attr( 'href', '' );
+                       $( 'link[rel="icon"][sizes="32x32"]' ).attr( 'href', '/favicon.ico' ); // Set to default.
                }
        });
 
 
                        // Ensure custom-header-crop Ajax requests bootstrap the Customizer to activate the previewed theme.
                        wp.media.controller.Cropper.prototype.defaults.doCropArgs.wp_customize = 'on';
-                       wp.media.controller.Cropper.prototype.defaults.doCropArgs.theme = api.settings.theme.stylesheet;
+                       wp.media.controller.Cropper.prototype.defaults.doCropArgs.customize_theme = api.settings.theme.stylesheet;
                },
 
                /**
                                        return;
                                }
 
-                               var previewUrl = $( this ).data( 'previewUrl' );
-
-                               $( '.wp-full-overlay' ).addClass( 'customize-loading' );
-
-                               window.parent.location = previewUrl;
+                               api.section( control.section() ).loadThemePreview( control.params.theme.id );
                        });
 
                        control.container.on( 'click keydown', '.theme-actions .theme-details', function( event ) {
         * @mixes wp.customize.Events
         */
        api.PreviewFrame = api.Messenger.extend({
-               sensitivity: 2000,
+               sensitivity: null, // Will get set to api.settings.timeouts.previewFrameSensitivity.
 
                /**
                 * Initialize the PreviewFrame.
                 *
                 * @param {object} params.container
-                * @param {object} params.signature
                 * @param {object} params.previewUrl
                 * @param {object} params.query
                 * @param {object} options
                        deferred.promise( this );
 
                        this.container = params.container;
-                       this.signature = params.signature;
 
                        $.extend( params, { channel: api.PreviewFrame.uuid() });
 
                 *                          the request.
                 */
                run: function( deferred ) {
-                       var self   = this,
+                       var previewFrame = this,
                                loaded = false,
-                               ready  = false;
-
-                       if ( this._ready ) {
-                               this.unbind( 'ready', this._ready );
+                               ready = false,
+                               readyData = null,
+                               hasPendingChangesetUpdate = '{}' !== previewFrame.query.customized,
+                               urlParser,
+                               params,
+                               form;
+
+                       if ( previewFrame._ready ) {
+                               previewFrame.unbind( 'ready', previewFrame._ready );
                        }
 
-                       this._ready = function() {
+                       previewFrame._ready = function( data ) {
                                ready = true;
+                               readyData = data;
+                               previewFrame.container.addClass( 'iframe-ready' );
+                               if ( ! data ) {
+                                       return;
+                               }
 
                                if ( loaded ) {
-                                       deferred.resolveWith( self );
+                                       deferred.resolveWith( previewFrame, [ data ] );
                                }
                        };
 
-                       this.bind( 'ready', this._ready );
+                       previewFrame.bind( 'ready', previewFrame._ready );
 
-                       this.bind( 'ready', function ( data ) {
+                       urlParser = document.createElement( 'a' );
+                       urlParser.href = previewFrame.previewUrl();
 
-                               this.container.addClass( 'iframe-ready' );
-
-                               if ( ! data ) {
-                                       return;
+                       params = _.extend(
+                               api.utils.parseQueryString( urlParser.search.substr( 1 ) ),
+                               {
+                                       customize_changeset_uuid: previewFrame.query.customize_changeset_uuid,
+                                       customize_theme: previewFrame.query.customize_theme,
+                                       customize_messenger_channel: previewFrame.query.customize_messenger_channel
                                }
+                       );
 
-                               /*
-                                * Walk over all panels, sections, and controls and set their
-                                * respective active states to true if the preview explicitly
-                                * indicates as such.
-                                */
-                               var constructs = {
-                                       panel: data.activePanels,
-                                       section: data.activeSections,
-                                       control: data.activeControls
-                               };
-                               _( constructs ).each( function ( activeConstructs, type ) {
-                                       api[ type ].each( function ( construct, id ) {
-                                               var active = !! ( activeConstructs && activeConstructs[ id ] );
-                                               if ( active ) {
-                                                       construct.activate();
-                                               } else {
-                                                       construct.deactivate();
-                                               }
-                                       } );
-                               } );
-
-                               if ( data.settingValidities ) {
-                                       api._handleSettingValidities( {
-                                               settingValidities: data.settingValidities,
-                                               focusInvalidControl: false
-                                       } );
-                               }
+                       urlParser.search = $.param( params );
+                       previewFrame.iframe = $( '<iframe />', {
+                               title: api.l10n.previewIframeTitle,
+                               name: 'customize-' + previewFrame.channel()
                        } );
+                       previewFrame.iframe.attr( 'onmousewheel', '' ); // Workaround for Safari bug. See WP Trac #38149.
 
-                       this.request = $.ajax( this.previewUrl(), {
-                               type: 'POST',
-                               data: this.query,
-                               xhrFields: {
-                                       withCredentials: true
-                               }
-                       } );
+                       if ( ! hasPendingChangesetUpdate ) {
+                               previewFrame.iframe.attr( 'src', urlParser.href );
+                       } else {
+                               previewFrame.iframe.attr( 'data-src', urlParser.href ); // For debugging purposes.
+                       }
 
-                       this.request.fail( function() {
-                               deferred.rejectWith( self, [ 'request failure' ] );
-                       });
+                       previewFrame.iframe.appendTo( previewFrame.container );
+                       previewFrame.targetWindow( previewFrame.iframe[0].contentWindow );
 
-                       this.request.done( function( response ) {
-                               var location = self.request.getResponseHeader('Location'),
-                                       signature = self.signature,
-                                       index;
+                       /*
+                        * Submit customized data in POST request to preview frame window since
+                        * there are setting value changes not yet written to changeset.
+                        */
+                       if ( hasPendingChangesetUpdate ) {
+                               form = $( '<form>', {
+                                       action: urlParser.href,
+                                       target: previewFrame.iframe.attr( 'name' ),
+                                       method: 'post',
+                                       hidden: 'hidden'
+                               } );
+                               form.append( $( '<input>', {
+                                       type: 'hidden',
+                                       name: '_method',
+                                       value: 'GET'
+                               } ) );
+                               _.each( previewFrame.query, function( value, key ) {
+                                       form.append( $( '<input>', {
+                                               type: 'hidden',
+                                               name: key,
+                                               value: value
+                                       } ) );
+                               } );
+                               previewFrame.container.append( form );
+                               form.submit();
+                               form.remove(); // No need to keep the form around after submitted.
+                       }
 
-                               // Check if the location response header differs from the current URL.
-                               // If so, the request was redirected; try loading the requested page.
-                               if ( location && location !== self.previewUrl() ) {
-                                       deferred.rejectWith( self, [ 'redirect', location ] );
-                                       return;
-                               }
+                       previewFrame.bind( 'iframe-loading-error', function( error ) {
+                               previewFrame.iframe.remove();
 
                                // Check if the user is not logged in.
-                               if ( '0' === response ) {
-                                       self.login( deferred );
+                               if ( 0 === error ) {
+                                       previewFrame.login( deferred );
                                        return;
                                }
 
                                // Check for cheaters.
-                               if ( '-1' === response ) {
-                                       deferred.rejectWith( self, [ 'cheatin' ] );
+                               if ( -1 === error ) {
+                                       deferred.rejectWith( previewFrame, [ 'cheatin' ] );
                                        return;
                                }
 
-                               // Check for a signature in the request.
-                               index = response.lastIndexOf( signature );
-                               if ( -1 === index || index < response.lastIndexOf('</html>') ) {
-                                       deferred.rejectWith( self, [ 'unsigned' ] );
-                                       return;
-                               }
-
-                               // Strip the signature from the request.
-                               response = response.slice( 0, index ) + response.slice( index + signature.length );
-
-                               // Create the iframe and inject the html content.
-                               self.iframe = $( '<iframe />', { 'title': api.l10n.previewIframeTitle } ).appendTo( self.container );
-
-                               // Bind load event after the iframe has been added to the page;
-                               // otherwise it will fire when injected into the DOM.
-                               self.iframe.one( 'load', function() {
-                                       loaded = true;
-
-                                       if ( ready ) {
-                                               deferred.resolveWith( self );
-                                       } else {
-                                               setTimeout( function() {
-                                                       deferred.rejectWith( self, [ 'ready timeout' ] );
-                                               }, self.sensitivity );
-                                       }
-                               });
+                               deferred.rejectWith( previewFrame, [ 'request failure' ] );
+                       } );
 
-                               self.targetWindow( self.iframe[0].contentWindow );
+                       previewFrame.iframe.one( 'load', function() {
+                               loaded = true;
 
-                               self.targetWindow().document.open();
-                               self.targetWindow().document.write( response );
-                               self.targetWindow().document.close();
+                               if ( ready ) {
+                                       deferred.resolveWith( previewFrame, [ readyData ] );
+                               } else {
+                                       setTimeout( function() {
+                                               deferred.rejectWith( previewFrame, [ 'ready timeout' ] );
+                                       }, previewFrame.sensitivity );
+                               }
                        });
                },
 
 
                destroy: function() {
                        api.Messenger.prototype.destroy.call( this );
-                       this.request.abort();
 
-                       if ( this.iframe )
+                       if ( this.iframe ) {
                                this.iframe.remove();
+                       }
 
-                       delete this.request;
                        delete this.iframe;
                        delete this.targetWindow;
                }
        });
 
        (function(){
-               var uuid = 0;
+               var id = 0;
                /**
-                * Create a universally unique identifier.
+                * Return an incremented ID for a preview messenger channel.
+                *
+                * This function is named "uuid" for historical reasons, but it is a
+                * misnomer as it is not an actual UUID, and it is not universally unique.
+                * This is not to be confused with `api.settings.changeset.uuid`.
                 *
-                * @return {int}
+                * @return {string}
                 */
                api.PreviewFrame.uuid = function() {
-                       return 'preview-' + uuid++;
+                       return 'preview-' + String( id++ );
                };
        }());
 
         * @mixes wp.customize.Events
         */
        api.Previewer = api.Messenger.extend({
-               refreshBuffer: 250,
+               refreshBuffer: null, // Will get set to api.settings.timeouts.windowRefresh.
 
                /**
                 * @param {array}  params.allowedUrls
                 *                                    frame to be placed.
                 * @param {string} params.form
                 * @param {string} params.previewUrl  The URL to preview.
-                * @param {string} params.signature
                 * @param {object} options
                 */
                initialize: function( params, options ) {
-                       var self = this,
-                               rscheme = /^https?/;
+                       var previewer = this,
+                               urlParser = document.createElement( 'a' );
 
-                       $.extend( this, options || {} );
-                       this.deferred = {
+                       $.extend( previewer, options || {} );
+                       previewer.deferred = {
                                active: $.Deferred()
                        };
 
-                       /*
-                        * Wrap this.refresh to prevent it from hammering the servers:
-                        *
-                        * If refresh is called once and no other refresh requests are
-                        * loading, trigger the request immediately.
-                        *
-                        * If refresh is called while another refresh request is loading,
-                        * debounce the refresh requests:
-                        * 1. Stop the loading request (as it is instantly outdated).
-                        * 2. Trigger the new request once refresh hasn't been called for
-                        *    self.refreshBuffer milliseconds.
-                        */
-                       this.refresh = (function( self ) {
-                               var refresh  = self.refresh,
-                                       callback = function() {
-                                               timeout = null;
-                                               refresh.call( self );
-                                       },
-                                       timeout;
-
-                               return function() {
-                                       if ( typeof timeout !== 'number' ) {
-                                               if ( self.loading ) {
-                                                       self.abort();
+                       // Debounce to prevent hammering server and then wait for any pending update requests.
+                       previewer.refresh = _.debounce(
+                               ( function( originalRefresh ) {
+                                       return function() {
+                                               var isProcessingComplete, refreshOnceProcessingComplete;
+                                               isProcessingComplete = function() {
+                                                       return 0 === api.state( 'processing' ).get();
+                                               };
+                                               if ( isProcessingComplete() ) {
+                                                       originalRefresh.call( previewer );
                                                } else {
-                                                       return callback();
+                                                       refreshOnceProcessingComplete = function() {
+                                                               if ( isProcessingComplete() ) {
+                                                                       originalRefresh.call( previewer );
+                                                                       api.state( 'processing' ).unbind( refreshOnceProcessingComplete );
+                                                               }
+                                                       };
+                                                       api.state( 'processing' ).bind( refreshOnceProcessingComplete );
                                                }
-                                       }
-
-                                       clearTimeout( timeout );
-                                       timeout = setTimeout( callback, self.refreshBuffer );
-                               };
-                       })( this );
+                                       };
+                               }( previewer.refresh ) ),
+                               previewer.refreshBuffer
+                       );
 
-                       this.container   = api.ensure( params.container );
-                       this.allowedUrls = params.allowedUrls;
-                       this.signature   = params.signature;
+                       previewer.container   = api.ensure( params.container );
+                       previewer.allowedUrls = params.allowedUrls;
 
                        params.url = window.location.href;
 
-                       api.Messenger.prototype.initialize.call( this, params );
+                       api.Messenger.prototype.initialize.call( previewer, params );
 
-                       this.add( 'scheme', this.origin() ).link( this.origin ).setter( function( to ) {
-                               var match = to.match( rscheme );
-                               return match ? match[0] : '';
-                       });
+                       urlParser.href = previewer.origin();
+                       previewer.add( 'scheme', urlParser.protocol.replace( /:$/, '' ) );
 
                        // Limit the URL to internal, front-end links.
                        //
                        // are on different domains to avoid the case where the front end doesn't have
                        // ssl certs.
 
-                       this.add( 'previewUrl', params.previewUrl ).setter( function( to ) {
-                               var result;
+                       previewer.add( 'previewUrl', params.previewUrl ).setter( function( to ) {
+                               var result = null, urlParser, queryParams, parsedAllowedUrl, parsedCandidateUrls = [];
+                               urlParser = document.createElement( 'a' );
+                               urlParser.href = to;
 
-                               // Check for URLs that include "/wp-admin/" or end in "/wp-admin".
-                               // Strip hashes and query strings before testing.
-                               if ( /\/wp-admin(\/|$)/.test( to.replace( /[#?].*$/, '' ) ) )
+                               // Abort if URL is for admin or (static) files in wp-includes or wp-content.
+                               if ( /\/wp-(admin|includes|content)(\/|$)/.test( urlParser.pathname ) ) {
                                        return null;
+                               }
+
+                               // Remove state query params.
+                               if ( urlParser.search.length > 1 ) {
+                                       queryParams = api.utils.parseQueryString( urlParser.search.substr( 1 ) );
+                                       delete queryParams.customize_changeset_uuid;
+                                       delete queryParams.customize_theme;
+                                       delete queryParams.customize_messenger_channel;
+                                       if ( _.isEmpty( queryParams ) ) {
+                                               urlParser.search = '';
+                                       } else {
+                                               urlParser.search = $.param( queryParams );
+                                       }
+                               }
 
-                               // Attempt to match the URL to the control frame's scheme
-                               // and check if it's allowed. If not, try the original URL.
-                               $.each([ to.replace( rscheme, self.scheme() ), to ], function( i, url ) {
-                                       $.each( self.allowedUrls, function( i, allowed ) {
-                                               var path;
+                               parsedCandidateUrls.push( urlParser );
 
-                                               allowed = allowed.replace( /\/+$/, '' );
-                                               path = url.replace( allowed, '' );
+                               // Prepend list with URL that matches the scheme/protocol of the iframe.
+                               if ( previewer.scheme.get() + ':' !== urlParser.protocol ) {
+                                       urlParser = document.createElement( 'a' );
+                                       urlParser.href = parsedCandidateUrls[0].href;
+                                       urlParser.protocol = previewer.scheme.get() + ':';
+                                       parsedCandidateUrls.unshift( urlParser );
+                               }
 
-                                               if ( 0 === url.indexOf( allowed ) && /^([/#?]|$)/.test( path ) ) {
-                                                       result = url;
-                                                       return false;
+                               // Attempt to match the URL to the control frame's scheme and check if it's allowed. If not, try the original URL.
+                               parsedAllowedUrl = document.createElement( 'a' );
+                               _.find( parsedCandidateUrls, function( parsedCandidateUrl ) {
+                                       return ! _.isUndefined( _.find( previewer.allowedUrls, function( allowedUrl ) {
+                                               parsedAllowedUrl.href = allowedUrl;
+                                               if ( urlParser.protocol === parsedAllowedUrl.protocol && urlParser.host === parsedAllowedUrl.host && 0 === urlParser.pathname.indexOf( parsedAllowedUrl.pathname.replace( /\/$/, '' ) ) ) {
+                                                       result = parsedCandidateUrl.href;
+                                                       return true;
                                                }
-                                       });
-                                       if ( result )
-                                               return false;
-                               });
+                                       } ) );
+                               } );
 
-                               // If we found a matching result, return it. If not, bail.
-                               return result ? result : null;
+                               return result;
                        });
 
+                       previewer.bind( 'ready', previewer.ready );
+
+                       // Start listening for keep-alive messages when iframe first loads.
+                       previewer.deferred.active.done( _.bind( previewer.keepPreviewAlive, previewer ) );
+
+                       previewer.bind( 'synced', function() {
+                               previewer.send( 'active' );
+                       } );
+
                        // Refresh the preview when the URL is changed (but not yet).
-                       this.previewUrl.bind( this.refresh );
+                       previewer.previewUrl.bind( previewer.refresh );
 
-                       this.scroll = 0;
-                       this.bind( 'scroll', function( distance ) {
-                               this.scroll = distance;
+                       previewer.scroll = 0;
+                       previewer.bind( 'scroll', function( distance ) {
+                               previewer.scroll = distance;
                        });
 
-                       // Update the URL when the iframe sends a URL message.
-                       this.bind( 'url', this.previewUrl );
+                       // Update the URL when the iframe sends a URL message, resetting scroll position. If URL is unchanged, then refresh.
+                       previewer.bind( 'url', function( url ) {
+                               var onUrlChange, urlChanged = false;
+                               previewer.scroll = 0;
+                               onUrlChange = function() {
+                                       urlChanged = true;
+                               };
+                               previewer.previewUrl.bind( onUrlChange );
+                               previewer.previewUrl.set( url );
+                               previewer.previewUrl.unbind( onUrlChange );
+                               if ( ! urlChanged ) {
+                                       previewer.refresh();
+                               }
+                       } );
 
                        // Update the document title when the preview changes.
-                       this.bind( 'documentTitle', function ( title ) {
+                       previewer.bind( 'documentTitle', function ( title ) {
                                api.setDocumentTitle( title );
                        } );
                },
 
+               /**
+                * Handle the preview receiving the ready message.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @param {object} data - Data from preview.
+                * @param {string} data.currentUrl - Current URL.
+                * @param {object} data.activePanels - Active panels.
+                * @param {object} data.activeSections Active sections.
+                * @param {object} data.activeControls Active controls.
+                * @returns {void}
+                */
+               ready: function( data ) {
+                       var previewer = this, synced = {}, constructs;
+
+                       synced.settings = api.get();
+                       synced['settings-modified-while-loading'] = previewer.settingsModifiedWhileLoading;
+                       if ( 'resolved' !== previewer.deferred.active.state() || previewer.loading ) {
+                               synced.scroll = previewer.scroll;
+                       }
+                       synced['edit-shortcut-visibility'] = api.state( 'editShortcutVisibility' ).get();
+                       previewer.send( 'sync', synced );
+
+                       // Set the previewUrl without causing the url to set the iframe.
+                       if ( data.currentUrl ) {
+                               previewer.previewUrl.unbind( previewer.refresh );
+                               previewer.previewUrl.set( data.currentUrl );
+                               previewer.previewUrl.bind( previewer.refresh );
+                       }
+
+                       /*
+                        * Walk over all panels, sections, and controls and set their
+                        * respective active states to true if the preview explicitly
+                        * indicates as such.
+                        */
+                       constructs = {
+                               panel: data.activePanels,
+                               section: data.activeSections,
+                               control: data.activeControls
+                       };
+                       _( constructs ).each( function ( activeConstructs, type ) {
+                               api[ type ].each( function ( construct, id ) {
+                                       var isDynamicallyCreated = _.isUndefined( api.settings[ type + 's' ][ id ] );
+
+                                       /*
+                                        * If the construct was created statically in PHP (not dynamically in JS)
+                                        * then consider a missing (undefined) value in the activeConstructs to
+                                        * mean it should be deactivated (since it is gone). But if it is
+                                        * dynamically created then only toggle activation if the value is defined,
+                                        * as this means that the construct was also then correspondingly
+                                        * created statically in PHP and the active callback is available.
+                                        * Otherwise, dynamically-created constructs should normally have
+                                        * their active states toggled in JS rather than from PHP.
+                                        */
+                                       if ( ! isDynamicallyCreated || ! _.isUndefined( activeConstructs[ id ] ) ) {
+                                               if ( activeConstructs[ id ] ) {
+                                                       construct.activate();
+                                               } else {
+                                                       construct.deactivate();
+                                               }
+                                       }
+                               } );
+                       } );
+
+                       if ( data.settingValidities ) {
+                               api._handleSettingValidities( {
+                                       settingValidities: data.settingValidities,
+                                       focusInvalidControl: false
+                               } );
+                       }
+               },
+
+               /**
+                * Keep the preview alive by listening for ready and keep-alive messages.
+                *
+                * If a message is not received in the allotted time then the iframe will be set back to the last known valid URL.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @returns {void}
+                */
+               keepPreviewAlive: function keepPreviewAlive() {
+                       var previewer = this, keepAliveTick, timeoutId, handleMissingKeepAlive, scheduleKeepAliveCheck;
+
+                       /**
+                        * Schedule a preview keep-alive check.
+                        *
+                        * Note that if a page load takes longer than keepAliveCheck milliseconds,
+                        * the keep-alive messages will still be getting sent from the previous
+                        * URL.
+                        */
+                       scheduleKeepAliveCheck = function() {
+                               timeoutId = setTimeout( handleMissingKeepAlive, api.settings.timeouts.keepAliveCheck );
+                       };
+
+                       /**
+                        * Set the previewerAlive state to true when receiving a message from the preview.
+                        */
+                       keepAliveTick = function() {
+                               api.state( 'previewerAlive' ).set( true );
+                               clearTimeout( timeoutId );
+                               scheduleKeepAliveCheck();
+                       };
+
+                       /**
+                        * Set the previewerAlive state to false if keepAliveCheck milliseconds have transpired without a message.
+                        *
+                        * This is most likely to happen in the case of a connectivity error, or if the theme causes the browser
+                        * to navigate to a non-allowed URL. Setting this state to false will force settings with a postMessage
+                        * transport to use refresh instead, causing the preview frame also to be replaced with the current
+                        * allowed preview URL.
+                        */
+                       handleMissingKeepAlive = function() {
+                               api.state( 'previewerAlive' ).set( false );
+                       };
+                       scheduleKeepAliveCheck();
+
+                       previewer.bind( 'ready', keepAliveTick );
+                       previewer.bind( 'keep-alive', keepAliveTick );
+               },
+
                /**
                 * Query string data sent with each preview request.
                 *
                },
 
                /**
-                * Refresh the preview.
+                * Refresh the preview seamlessly.
+                *
+                * @since 3.4.0
+                * @access public
+                * @returns {void}
                 */
                refresh: function() {
-                       var self = this;
+                       var previewer = this, onSettingChange;
 
                        // Display loading indicator
-                       this.send( 'loading-initiated' );
+                       previewer.send( 'loading-initiated' );
 
-                       this.abort();
+                       previewer.abort();
 
-                       this.loading = new api.PreviewFrame({
-                               url:        this.url(),
-                               previewUrl: this.previewUrl(),
-                               query:      this.query() || {},
-                               container:  this.container,
-                               signature:  this.signature
+                       previewer.loading = new api.PreviewFrame({
+                               url:        previewer.url(),
+                               previewUrl: previewer.previewUrl(),
+                               query:      previewer.query( { excludeCustomizedSaved: true } ) || {},
+                               container:  previewer.container
                        });
 
-                       this.loading.done( function() {
-                               // 'this' is the loading frame
-                               this.bind( 'synced', function() {
-                                       if ( self.preview )
-                                               self.preview.destroy();
-                                       self.preview = this;
-                                       delete self.loading;
+                       previewer.settingsModifiedWhileLoading = {};
+                       onSettingChange = function( setting ) {
+                               previewer.settingsModifiedWhileLoading[ setting.id ] = true;
+                       };
+                       api.bind( 'change', onSettingChange );
+                       previewer.loading.always( function() {
+                               api.unbind( 'change', onSettingChange );
+                       } );
 
-                                       self.targetWindow( this.targetWindow() );
-                                       self.channel( this.channel() );
+                       previewer.loading.done( function( readyData ) {
+                               var loadingFrame = this, onceSynced;
 
-                                       self.deferred.active.resolve();
-                                       self.send( 'active' );
-                               });
+                               previewer.preview = loadingFrame;
+                               previewer.targetWindow( loadingFrame.targetWindow() );
+                               previewer.channel( loadingFrame.channel() );
 
-                               this.send( 'sync', {
-                                       scroll:   self.scroll,
-                                       settings: api.get()
-                               });
+                               onceSynced = function() {
+                                       loadingFrame.unbind( 'synced', onceSynced );
+                                       if ( previewer._previousPreview ) {
+                                               previewer._previousPreview.destroy();
+                                       }
+                                       previewer._previousPreview = previewer.preview;
+                                       previewer.deferred.active.resolve();
+                                       delete previewer.loading;
+                               };
+                               loadingFrame.bind( 'synced', onceSynced );
+
+                               // This event will be received directly by the previewer in normal navigation; this is only needed for seamless refresh.
+                               previewer.trigger( 'ready', readyData );
                        });
 
-                       this.loading.fail( function( reason, location ) {
-                               self.send( 'loading-failed' );
-                               if ( 'redirect' === reason && location ) {
-                                       self.previewUrl( location );
-                               }
+                       previewer.loading.fail( function( reason ) {
+                               previewer.send( 'loading-failed' );
 
                                if ( 'logged out' === reason ) {
-                                       if ( self.preview ) {
-                                               self.preview.destroy();
-                                               delete self.preview;
+                                       if ( previewer.preview ) {
+                                               previewer.preview.destroy();
+                                               delete previewer.preview;
                                        }
 
-                                       self.login().done( self.refresh );
+                                       previewer.login().done( previewer.refresh );
                                }
 
                                if ( 'cheatin' === reason ) {
-                                       self.cheatin();
+                                       previewer.cheatin();
                                }
                        });
                },
 
                        request = wp.ajax.post( 'customize_refresh_nonces', {
                                wp_customize: 'on',
-                               theme: api.settings.theme.stylesheet
+                               customize_theme: api.settings.theme.stylesheet
                        });
 
                        request.done( function( response ) {
 
        api.settingConstructor = {};
        api.controlConstructor = {
-               color:         api.ColorControl,
-               media:         api.MediaControl,
-               upload:        api.UploadControl,
-               image:         api.ImageControl,
-               cropped_image: api.CroppedImageControl,
-               site_icon:     api.SiteIconControl,
-               header:        api.HeaderControl,
-               background:    api.BackgroundControl,
-               theme:         api.ThemeControl
+               color:               api.ColorControl,
+               media:               api.MediaControl,
+               upload:              api.UploadControl,
+               image:               api.ImageControl,
+               cropped_image:       api.CroppedImageControl,
+               site_icon:           api.SiteIconControl,
+               header:              api.HeaderControl,
+               background:          api.BackgroundControl,
+               background_position: api.BackgroundPositionControl,
+               theme:               api.ThemeControl
        };
        api.panelConstructor = {};
        api.sectionConstructor = {
                                // Add notifications for invalidities.
                                if ( _.isObject( validity ) ) {
                                        _.each( validity, function( params, code ) {
-                                               var notification = new api.Notification( code, params ), existingNotification, needsReplacement = false;
+                                               var notification, existingNotification, needsReplacement = false;
+                                               notification = new api.Notification( code, _.extend( { fromServer: true }, params ) );
 
                                                // 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 );
+                                                       needsReplacement = notification.type !== existingNotification.type || notification.message !== existingNotification.message || ! _.isEqual( notification.data, existingNotification.data );
                                                }
                                                if ( needsReplacement ) {
                                                        setting.notifications.remove( code );
         */
        api.reflowPaneContents = _.bind( function () {
 
-               var appendContainer, activeElement, rootContainers, rootNodes = [], wasReflowed = false;
+               var appendContainer, activeElement, rootHeadContainers, 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' );
+                               sectionHeadContainers = _.pluck( sections, 'headContainer' );
                        rootNodes.push( panel );
-                       appendContainer = panel.container.find( 'ul:first' );
-                       if ( ! api.utils.areElementListsEqual( sectionContainers, appendContainer.children( '[id]' ) ) ) {
+                       appendContainer = ( panel.contentContainer.is( 'ul' ) ) ? panel.contentContainer : panel.contentContainer.find( 'ul:first' );
+                       if ( ! api.utils.areElementListsEqual( sectionHeadContainers, appendContainer.children( '[id]' ) ) ) {
                                _( sections ).each( function ( section ) {
-                                       appendContainer.append( section.container );
+                                       appendContainer.append( section.headContainer );
                                } );
                                wasReflowed = true;
                        }
                        if ( ! section.panel() ) {
                                rootNodes.push( section );
                        }
-                       appendContainer = section.container.find( 'ul:first' );
+                       appendContainer = ( section.contentContainer.is( 'ul' ) ) ? section.contentContainer : section.contentContainer.find( 'ul:first' );
                        if ( ! api.utils.areElementListsEqual( controlContainers, appendContainer.children( '[id]' ) ) ) {
                                _( controls ).each( function ( control ) {
                                        appendContainer.append( control.container );
 
                // 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() ) ) {
+               rootHeadContainers = _.pluck( rootNodes, 'headContainer' );
+               appendContainer = $( '#customize-theme-controls .customize-pane-parent' ); // @todo This should be defined elsewhere, and to be configurable
+               if ( ! api.utils.areElementListsEqual( rootHeadContainers, appendContainer.children() ) ) {
                        _( rootNodes ).each( function ( rootNode ) {
-                               appendContainer.append( rootNode.container );
+                               appendContainer.append( rootNode.headContainer );
                        } );
                        wasReflowed = true;
                }
                        return;
                }
 
-               var parent, topFocus,
+               if ( null === api.PreviewFrame.prototype.sensitivity ) {
+                       api.PreviewFrame.prototype.sensitivity = api.settings.timeouts.previewFrameSensitivity;
+               }
+               if ( null === api.Previewer.prototype.refreshBuffer ) {
+                       api.Previewer.prototype.refreshBuffer = api.settings.timeouts.windowRefresh;
+               }
+
+               var parent,
                        body = $( document.body ),
                        overlay = body.children( '.wp-full-overlay' ),
                        title = $( '#customize-info .panel-title.site-title' ),
                        container:   '#customize-preview',
                        form:        '#customize-controls',
                        previewUrl:  api.settings.url.preview,
-                       allowedUrls: api.settings.url.allowed,
-                       signature:   'WP_CUSTOMIZER_SIGNATURE'
+                       allowedUrls: api.settings.url.allowed
                }, {
 
                        nonce: api.settings.nonce,
                        /**
                         * Build the query to send along with the Preview request.
                         *
-                        * @return {object}
+                        * @since 3.4.0
+                        * @since 4.7.0 Added options param.
+                        * @access public
+                        *
+                        * @param {object}  [options] Options.
+                        * @param {boolean} [options.excludeCustomizedSaved=false] Exclude saved settings in customized response (values pending writing to changeset).
+                        * @return {object} Query vars.
                         */
-                       query: function() {
-                               var dirtyCustomized = {};
-                               api.each( function ( value, key ) {
-                                       if ( value._dirty ) {
-                                               dirtyCustomized[ key ] = value();
-                                       }
-                               } );
-
-                               return {
+                       query: function( options ) {
+                               var queryVars = {
                                        wp_customize: 'on',
-                                       theme:      api.settings.theme.stylesheet,
-                                       customized: JSON.stringify( dirtyCustomized ),
-                                       nonce:      this.nonce.preview
+                                       customize_theme: api.settings.theme.stylesheet,
+                                       nonce: this.nonce.preview,
+                                       customize_changeset_uuid: api.settings.changeset.uuid
                                };
+
+                               /*
+                                * Exclude customized data if requested especially for calls to requestChangesetUpdate.
+                                * Changeset updates are differential and so it is a performance waste to send all of
+                                * the dirty settings with each update.
+                                */
+                               queryVars.customized = JSON.stringify( api.dirtyValues( {
+                                       unsaved: options && options.excludeCustomizedSaved
+                               } ) );
+
+                               return queryVars;
                        },
 
-                       save: function() {
-                               var self = this,
+                       /**
+                        * Save (and publish) the customizer changeset.
+                        *
+                        * Updates to the changeset are transactional. If any of the settings
+                        * are invalid then none of them will be written into the changeset.
+                        * A revision will be made for the changeset post if revisions support
+                        * has been added to the post type.
+                        *
+                        * @since 3.4.0
+                        * @since 4.7.0 Added args param and return value.
+                        *
+                        * @param {object} [args] Args.
+                        * @param {string} [args.status=publish] Status.
+                        * @param {string} [args.date] Date, in local time in MySQL format.
+                        * @param {string} [args.title] Title
+                        * @returns {jQuery.promise} Promise.
+                        */
+                       save: function( args ) {
+                               var previewer = this,
+                                       deferred = $.Deferred(),
+                                       changesetStatus = 'publish',
                                        processing = api.state( 'processing' ),
                                        submitWhenDoneProcessing,
                                        submit,
                                        invalidSettings = [],
                                        invalidControls;
 
-                               body.addClass( 'saving' );
+                               if ( args && args.status ) {
+                                       changesetStatus = args.status;
+                               }
+
+                               if ( api.state( 'saving' ).get() ) {
+                                       deferred.reject( 'already_saving' );
+                                       deferred.promise();
+                               }
+
+                               api.state( 'saving' ).set( true );
 
                                function captureSettingModifiedDuringSave( setting ) {
                                        modifiedWhileSaving[ setting.id ] = true;
                                api.bind( 'change', captureSettingModifiedDuringSave );
 
                                submit = function () {
-                                       var request, query;
+                                       var request, query, settingInvalidities = {}, latestRevision = api._latestRevision;
 
                                        /*
                                         * Block saving if there are any settings that are marked as
                                         */
                                        api.each( function( setting ) {
                                                setting.notifications.each( function( notification ) {
-                                                       if ( 'error' === notification.type && ( ! notification.data || ! notification.data.from_server ) ) {
+                                                       if ( 'error' === notification.type && ! notification.fromServer ) {
                                                                invalidSettings.push( setting.id );
+                                                               if ( ! settingInvalidities[ setting.id ] ) {
+                                                                       settingInvalidities[ setting.id ] = {};
+                                                               }
+                                                               settingInvalidities[ setting.id ][ notification.code ] = notification;
                                                        }
                                                } );
                                        } );
                                        invalidControls = api.findControlsForSettings( invalidSettings );
                                        if ( ! _.isEmpty( invalidControls ) ) {
                                                _.values( invalidControls )[0][0].focus();
-                                               body.removeClass( 'saving' );
                                                api.unbind( 'change', captureSettingModifiedDuringSave );
-                                               return;
+                                               deferred.rejectWith( previewer, [
+                                                       { setting_invalidities: settingInvalidities }
+                                               ] );
+                                               api.state( 'saving' ).set( false );
+                                               return deferred.promise();
                                        }
 
-                                       query = $.extend( self.query(), {
-                                               nonce:  self.nonce.save
+                                       /*
+                                        * Note that excludeCustomizedSaved is intentionally false so that the entire
+                                        * set of customized data will be included if bypassed changeset update.
+                                        */
+                                       query = $.extend( previewer.query( { excludeCustomizedSaved: false } ), {
+                                               nonce: previewer.nonce.save,
+                                               customize_changeset_status: changesetStatus
                                        } );
+                                       if ( args && args.date ) {
+                                               query.customize_changeset_date = args.date;
+                                       }
+                                       if ( args && args.title ) {
+                                               query.customize_changeset_title = args.title;
+                                       }
+
+                                       /*
+                                        * Note that the dirty customized values will have already been set in the
+                                        * changeset and so technically query.customized could be deleted. However,
+                                        * it is remaining here to make sure that any settings that got updated
+                                        * quietly which may have not triggered an update request will also get
+                                        * included in the values that get saved to the changeset. This will ensure
+                                        * that values that get injected via the saved event will be included in
+                                        * the changeset. This also ensures that setting values that were invalid
+                                        * will get re-validated, perhaps in the case of settings that are invalid
+                                        * due to dependencies on other settings.
+                                        */
                                        request = wp.ajax.post( 'customize_save', query );
 
                                        // Disable save button during the save request.
                                        api.trigger( 'save', request );
 
                                        request.always( function () {
-                                               body.removeClass( 'saving' );
+                                               api.state( 'saving' ).set( false );
                                                saveBtn.prop( 'disabled', false );
                                                api.unbind( 'change', captureSettingModifiedDuringSave );
                                        } );
 
                                        request.fail( function ( response ) {
+
                                                if ( '0' === response ) {
                                                        response = 'not_logged_in';
                                                } else if ( '-1' === response ) {
                                                }
 
                                                if ( 'invalid_nonce' === response ) {
-                                                       self.cheatin();
+                                                       previewer.cheatin();
                                                } else if ( 'not_logged_in' === response ) {
-                                                       self.preview.iframe.hide();
-                                                       self.login().done( function() {
-                                                               self.save();
-                                                               self.preview.iframe.show();
+                                                       previewer.preview.iframe.hide();
+                                                       previewer.login().done( function() {
+                                                               previewer.save();
+                                                               previewer.preview.iframe.show();
                                                        } );
                                                }
 
                                                        } );
                                                }
 
+                                               deferred.rejectWith( previewer, [ response ] );
                                                api.trigger( 'error', response );
                                        } );
 
                                        request.done( function( response ) {
 
-                                               // Clear setting dirty states, if setting wasn't modified while saving.
-                                               api.each( function( setting ) {
-                                                       if ( ! modifiedWhileSaving[ setting.id ] ) {
-                                                               setting._dirty = false;
-                                                       }
-                                               } );
+                                               previewer.send( 'saved', response );
+
+                                               api.state( 'changesetStatus' ).set( response.changeset_status );
+                                               if ( 'publish' === response.changeset_status ) {
+
+                                                       // Mark all published as clean if they haven't been modified during the request.
+                                                       api.each( function( setting ) {
+                                                               /*
+                                                                * Note that the setting revision will be undefined in the case of setting
+                                                                * values that are marked as dirty when the customizer is loaded, such as
+                                                                * when applying starter content. All other dirty settings will have an
+                                                                * associated revision due to their modification triggering a change event.
+                                                                */
+                                                               if ( setting._dirty && ( _.isUndefined( api._latestSettingRevisions[ setting.id ] ) || api._latestSettingRevisions[ setting.id ] <= latestRevision ) ) {
+                                                                       setting._dirty = false;
+                                                               }
+                                                       } );
 
-                                               api.previewer.send( 'saved', response );
+                                                       api.state( 'changesetStatus' ).set( '' );
+                                                       api.settings.changeset.uuid = response.next_changeset_uuid;
+                                                       parent.send( 'changeset-uuid', api.settings.changeset.uuid );
+                                               }
 
                                                if ( response.setting_validities ) {
                                                        api._handleSettingValidities( {
                                                        } );
                                                }
 
+                                               deferred.resolveWith( previewer, [ response ] );
                                                api.trigger( 'saved', response );
 
                                                // Restore the global dirty state if any settings were modified during save.
                                        api.state.bind( 'change', submitWhenDoneProcessing );
                                }
 
+                               return deferred.promise();
                        }
                });
 
 
                api.bind( 'ready', api.reflowPaneContents );
                $( [ api.panel, api.section, api.control ] ).each( function ( i, values ) {
-                       var debouncedReflowPaneContents = _.debounce( api.reflowPaneContents, 100 );
+                       var debouncedReflowPaneContents = _.debounce( api.reflowPaneContents, api.settings.timeouts.reflowPaneContents );
                        values.bind( 'add', debouncedReflowPaneContents );
                        values.bind( 'change', debouncedReflowPaneContents );
                        values.bind( 'remove', debouncedReflowPaneContents );
                } );
 
-               // Check if preview url is valid and load the preview frame.
-               if ( api.previewer.previewUrl() ) {
-                       api.previewer.refresh();
-               } else {
-                       api.previewer.previewUrl( api.settings.url.home );
-               }
-
                // Save and activated states
                (function() {
                        var state = new api.Values(),
                                saved = state.create( 'saved' ),
+                               saving = state.create( 'saving' ),
                                activated = state.create( 'activated' ),
-                               processing = state.create( 'processing' );
+                               processing = state.create( 'processing' ),
+                               paneVisible = state.create( 'paneVisible' ),
+                               expandedPanel = state.create( 'expandedPanel' ),
+                               expandedSection = state.create( 'expandedSection' ),
+                               changesetStatus = state.create( 'changesetStatus' ),
+                               previewerAlive = state.create( 'previewerAlive' ),
+                               editShortcutVisibility  = state.create( 'editShortcutVisibility' ),
+                               populateChangesetUuidParam;
 
                        state.bind( 'change', function() {
+                               var canSave;
+
                                if ( ! activated() ) {
-                                       saveBtn.val( api.l10n.activate ).prop( 'disabled', false );
+                                       saveBtn.val( api.l10n.activate );
                                        closeBtn.find( '.screen-reader-text' ).text( api.l10n.cancel );
 
-                               } else if ( saved() ) {
-                                       saveBtn.val( api.l10n.saved ).prop( 'disabled', true );
+                               } else if ( '' === changesetStatus.get() && saved() ) {
+                                       saveBtn.val( api.l10n.saved );
                                        closeBtn.find( '.screen-reader-text' ).text( api.l10n.close );
 
                                } else {
-                                       saveBtn.val( api.l10n.save ).prop( 'disabled', false );
+                                       saveBtn.val( api.l10n.save );
                                        closeBtn.find( '.screen-reader-text' ).text( api.l10n.cancel );
                                }
+
+                               /*
+                                * Save (publish) button should be enabled if saving is not currently happening,
+                                * and if the theme is not active or the changeset exists but is not published.
+                                */
+                               canSave = ! saving() && ( ! activated() || ! saved() || ( '' !== changesetStatus() && 'publish' !== changesetStatus() ) );
+
+                               saveBtn.prop( 'disabled', ! canSave );
                        });
 
                        // Set default states.
+                       changesetStatus( api.settings.changeset.status );
                        saved( true );
+                       if ( '' === changesetStatus() ) { // Handle case for loading starter content.
+                               api.each( function( setting ) {
+                                       if ( setting._dirty ) {
+                                               saved( false );
+                                       }
+                               } );
+                       }
+                       saving( false );
                        activated( api.settings.theme.active );
                        processing( 0 );
+                       paneVisible( true );
+                       expandedPanel( false );
+                       expandedSection( false );
+                       previewerAlive( true );
+                       editShortcutVisibility( 'visible' );
 
                        api.bind( 'change', function() {
                                state('saved').set( false );
                        });
 
-                       api.bind( 'saved', function() {
+                       saving.bind( function( isSaving ) {
+                               body.toggleClass( 'saving', isSaving );
+                       } );
+
+                       api.bind( 'saved', function( response ) {
                                state('saved').set( true );
-                               state('activated').set( true );
+                               if ( 'publish' === response.changeset_status ) {
+                                       state( 'activated' ).set( true );
+                               }
                        });
 
                        activated.bind( function( to ) {
                                }
                        });
 
+                       /**
+                        * Populate URL with UUID via `history.replaceState()`.
+                        *
+                        * @since 4.7.0
+                        * @access private
+                        *
+                        * @param {boolean} isIncluded Is UUID included.
+                        * @returns {void}
+                        */
+                       populateChangesetUuidParam = function( isIncluded ) {
+                               var urlParser, queryParams;
+                               urlParser = document.createElement( 'a' );
+                               urlParser.href = location.href;
+                               queryParams = api.utils.parseQueryString( urlParser.search.substr( 1 ) );
+                               if ( isIncluded ) {
+                                       if ( queryParams.changeset_uuid === api.settings.changeset.uuid ) {
+                                               return;
+                                       }
+                                       queryParams.changeset_uuid = api.settings.changeset.uuid;
+                               } else {
+                                       if ( ! queryParams.changeset_uuid ) {
+                                               return;
+                                       }
+                                       delete queryParams.changeset_uuid;
+                               }
+                               urlParser.search = $.param( queryParams );
+                               history.replaceState( {}, document.title, urlParser.href );
+                       };
+
+                       if ( history.replaceState ) {
+                               changesetStatus.bind( function( newStatus ) {
+                                       populateChangesetUuidParam( '' !== newStatus && 'publish' !== newStatus );
+                               } );
+                       }
+
                        // Expose states to the API.
                        api.state = state;
                }());
 
+               // Check if preview url is valid and load the preview frame.
+               if ( api.previewer.previewUrl() ) {
+                       api.previewer.refresh();
+               } else {
+                       api.previewer.previewUrl( api.settings.url.home );
+               }
+
                // Button bindings.
                saveBtn.click( function( event ) {
                        api.previewer.save();
                });
 
                $( '.collapse-sidebar' ).on( 'click', function() {
-                       if ( 'true' === $( this ).attr( 'aria-expanded' ) ) {
-                               $( this ).attr({ 'aria-expanded': 'false', 'aria-label': api.l10n.expandSidebar });
+                       api.state( 'paneVisible' ).set( ! api.state( 'paneVisible' ).get() );
+               });
+
+               api.state( 'paneVisible' ).bind( function( paneVisible ) {
+                       overlay.toggleClass( 'preview-only', ! paneVisible );
+                       overlay.toggleClass( 'expanded', paneVisible );
+                       overlay.toggleClass( 'collapsed', ! paneVisible );
+
+                       if ( ! paneVisible ) {
+                               $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'false', 'aria-label': api.l10n.expandSidebar });
                        } else {
-                               $( this ).attr({ 'aria-expanded': 'true', 'aria-label': api.l10n.collapseSidebar });
+                               $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'true', 'aria-label': api.l10n.collapseSidebar });
                        }
-
-                       overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
                });
 
                // Keyboard shortcuts - esc to exit section/panel.
                                return;
                        }
 
+                       /*
+                        * Abort if the event target is not the body (the default) and not inside of #customize-controls.
+                        * This ensures that ESC meant to collapse a modal dialog or a TinyMCE toolbar won't collapse something else.
+                        */
+                       if ( ! $( event.target ).is( 'body' ) && ! $.contains( $( '#customize-controls' )[0], event.target ) ) {
+                               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 ) ) {
                });
 
                $( '.customize-controls-preview-toggle' ).on( 'click', function() {
-                       overlay.toggleClass( 'preview-only' );
+                       api.state( 'paneVisible' ).set( ! api.state( 'paneVisible' ).get() );
                });
 
+               /*
+                * Sticky header feature.
+                */
+               (function initStickyHeaders() {
+                       var parentContainer = $( '.wp-full-overlay-sidebar-content' ),
+                               changeContainer, getHeaderHeight, releaseStickyHeader, resetStickyHeader, positionStickyHeader,
+                               activeHeader, lastScrollTop;
+
+                       /**
+                        * Determine which panel or section is currently expanded.
+                        *
+                        * @since 4.7.0
+                        * @access private
+                        *
+                        * @param {wp.customize.Panel|wp.customize.Section} container Construct.
+                        * @returns {void}
+                        */
+                       changeContainer = function( container ) {
+                               var newInstance = container,
+                                       expandedSection = api.state( 'expandedSection' ).get(),
+                                       expandedPanel = api.state( 'expandedPanel' ).get(),
+                                       headerElement;
+
+                               // Release previously active header element.
+                               if ( activeHeader && activeHeader.element ) {
+                                       releaseStickyHeader( activeHeader.element );
+                               }
+
+                               if ( ! newInstance ) {
+                                       if ( ! expandedSection && expandedPanel && expandedPanel.contentContainer ) {
+                                               newInstance = expandedPanel;
+                                       } else if ( ! expandedPanel && expandedSection && expandedSection.contentContainer ) {
+                                               newInstance = expandedSection;
+                                       } else {
+                                               activeHeader = false;
+                                               return;
+                                       }
+                               }
+
+                               headerElement = newInstance.contentContainer.find( '.customize-section-title, .panel-meta' ).first();
+                               if ( headerElement.length ) {
+                                       activeHeader = {
+                                               instance: newInstance,
+                                               element:  headerElement,
+                                               parent:   headerElement.closest( '.customize-pane-child' ),
+                                               height:   getHeaderHeight( headerElement )
+                                       };
+                                       if ( expandedSection ) {
+                                               resetStickyHeader( activeHeader.element, activeHeader.parent );
+                                       }
+                               } else {
+                                       activeHeader = false;
+                               }
+                       };
+                       api.state( 'expandedSection' ).bind( changeContainer );
+                       api.state( 'expandedPanel' ).bind( changeContainer );
+
+                       // Throttled scroll event handler.
+                       parentContainer.on( 'scroll', _.throttle( function() {
+                               if ( ! activeHeader ) {
+                                       return;
+                               }
+
+                               var scrollTop = parentContainer.scrollTop(),
+                                       isScrollingUp = ( lastScrollTop ) ? scrollTop <= lastScrollTop : true;
+
+                               lastScrollTop = scrollTop;
+                               positionStickyHeader( activeHeader, scrollTop, isScrollingUp );
+                       }, 8 ) );
+
+                       // Release header element if it is sticky.
+                       releaseStickyHeader = function( headerElement ) {
+                               if ( ! headerElement.hasClass( 'is-sticky' ) ) {
+                                       return;
+                               }
+                               headerElement
+                                       .removeClass( 'is-sticky' )
+                                       .addClass( 'maybe-sticky is-in-view' )
+                                       .css( 'top', parentContainer.scrollTop() + 'px' );
+                       };
+
+                       // Reset position of the sticky header.
+                       resetStickyHeader = function( headerElement, headerParent ) {
+                               headerElement
+                                       .removeClass( 'maybe-sticky is-in-view' )
+                                       .css( {
+                                               width: '',
+                                               top: ''
+                                       } );
+                               headerParent.css( 'padding-top', '' );
+                       };
+
+                       /**
+                        * Get header height.
+                        *
+                        * @since 4.7.0
+                        * @access private
+                        *
+                        * @param {jQuery} headerElement Header element.
+                        * @returns {number} Height.
+                        */
+                       getHeaderHeight = function( headerElement ) {
+                               var height = headerElement.data( 'height' );
+                               if ( ! height ) {
+                                       height = headerElement.outerHeight();
+                                       headerElement.data( 'height', height );
+                               }
+                               return height;
+                       };
+
+                       /**
+                        * Reposition header on throttled `scroll` event.
+                        *
+                        * @since 4.7.0
+                        * @access private
+                        *
+                        * @param {object}  header        Header.
+                        * @param {number}  scrollTop     Scroll top.
+                        * @param {boolean} isScrollingUp Is scrolling up?
+                        * @returns {void}
+                        */
+                       positionStickyHeader = function( header, scrollTop, isScrollingUp ) {
+                               var headerElement = header.element,
+                                       headerParent = header.parent,
+                                       headerHeight = header.height,
+                                       headerTop = parseInt( headerElement.css( 'top' ), 10 ),
+                                       maybeSticky = headerElement.hasClass( 'maybe-sticky' ),
+                                       isSticky = headerElement.hasClass( 'is-sticky' ),
+                                       isInView = headerElement.hasClass( 'is-in-view' );
+
+                               // When scrolling down, gradually hide sticky header.
+                               if ( ! isScrollingUp ) {
+                                       if ( isSticky ) {
+                                               headerTop = scrollTop;
+                                               headerElement
+                                                       .removeClass( 'is-sticky' )
+                                                       .css( {
+                                                               top:   headerTop + 'px',
+                                                               width: ''
+                                                       } );
+                                       }
+                                       if ( isInView && scrollTop > headerTop + headerHeight ) {
+                                               headerElement.removeClass( 'is-in-view' );
+                                               headerParent.css( 'padding-top', '' );
+                                       }
+                                       return;
+                               }
+
+                               // Scrolling up.
+                               if ( ! maybeSticky && scrollTop >= headerHeight ) {
+                                       maybeSticky = true;
+                                       headerElement.addClass( 'maybe-sticky' );
+                               } else if ( 0 === scrollTop ) {
+                                       // Reset header in base position.
+                                       headerElement
+                                               .removeClass( 'maybe-sticky is-in-view is-sticky' )
+                                               .css( {
+                                                       top:   '',
+                                                       width: ''
+                                               } );
+                                       headerParent.css( 'padding-top', '' );
+                                       return;
+                               }
+
+                               if ( isInView && ! isSticky ) {
+                                       // Header is in the view but is not yet sticky.
+                                       if ( headerTop >= scrollTop ) {
+                                               // Header is fully visible.
+                                               headerElement
+                                                       .addClass( 'is-sticky' )
+                                                       .css( {
+                                                               top:   '',
+                                                               width: headerParent.outerWidth() + 'px'
+                                                       } );
+                                       }
+                               } else if ( maybeSticky && ! isInView ) {
+                                       // Header is out of the view.
+                                       headerElement
+                                               .addClass( 'is-in-view' )
+                                               .css( 'top', ( scrollTop - headerHeight ) + 'px' );
+                                       headerParent.css( 'padding-top', headerHeight + 'px' );
+                               }
+                       };
+               }());
+
                // Previewed device bindings.
                api.previewedDevice = new api.Value();
 
                });
 
                // Prompt user with AYS dialog if leaving the Customizer with unsaved changes
-               $( window ).on( 'beforeunload', function () {
+               $( window ).on( 'beforeunload.customize-confirm', function () {
                        if ( ! api.state( 'saved' )() ) {
                                setTimeout( function() {
                                        overlay.removeClass( 'customize-loading' );
                        parent.send( 'title', newTitle );
                });
 
+               parent.send( 'changeset-uuid', api.settings.changeset.uuid );
+
                // Initialize the connection with the parent frame.
                parent.send( 'ready' );
 
                // Control visibility for default controls
                $.each({
                        'background_image': {
-                               controls: [ 'background_repeat', 'background_position_x', 'background_attachment' ],
+                               controls: [ 'background_preset', 'background_position', 'background_size', 'background_repeat', 'background_attachment' ],
                                callback: function( to ) { return !! to; }
                        },
                        'show_on_front': {
                        });
                });
 
+               api.control( 'background_preset', function( control ) {
+                       var visibility, defaultValues, values, toggleVisibility, updateSettings, preset;
+
+                       visibility = { // position, size, repeat, attachment
+                               'default': [ false, false, false, false ],
+                               'fill': [ true, false, false, false ],
+                               'fit': [ true, false, true, false ],
+                               'repeat': [ true, false, false, true ],
+                               'custom': [ true, true, true, true ]
+                       };
+
+                       defaultValues = [
+                               _wpCustomizeBackground.defaults['default-position-x'],
+                               _wpCustomizeBackground.defaults['default-position-y'],
+                               _wpCustomizeBackground.defaults['default-size'],
+                               _wpCustomizeBackground.defaults['default-repeat'],
+                               _wpCustomizeBackground.defaults['default-attachment']
+                       ];
+
+                       values = { // position_x, position_y, size, repeat, attachment
+                               'default': defaultValues,
+                               'fill': [ 'left', 'top', 'cover', 'no-repeat', 'fixed' ],
+                               'fit': [ 'left', 'top', 'contain', 'no-repeat', 'fixed' ],
+                               'repeat': [ 'left', 'top', 'auto', 'repeat', 'scroll' ]
+                       };
+
+                       // @todo These should actually toggle the active state, but without the preview overriding the state in data.activeControls.
+                       toggleVisibility = function( preset ) {
+                               _.each( [ 'background_position', 'background_size', 'background_repeat', 'background_attachment' ], function( controlId, i ) {
+                                       var control = api.control( controlId );
+                                       if ( control ) {
+                                               control.container.toggle( visibility[ preset ][ i ] );
+                                       }
+                               } );
+                       };
+
+                       updateSettings = function( preset ) {
+                               _.each( [ 'background_position_x', 'background_position_y', 'background_size', 'background_repeat', 'background_attachment' ], function( settingId, i ) {
+                                       var setting = api( settingId );
+                                       if ( setting ) {
+                                               setting.set( values[ preset ][ i ] );
+                                       }
+                               } );
+                       };
+
+                       preset = control.setting.get();
+                       toggleVisibility( preset );
+
+                       control.setting.bind( 'change', function( preset ) {
+                               toggleVisibility( preset );
+                               if ( 'custom' !== preset ) {
+                                       updateSettings( preset );
+                               }
+                       } );
+               } );
+
+               api.control( 'background_repeat', function( control ) {
+                       control.elements[0].unsync( api( 'background_repeat' ) );
+
+                       control.element = new api.Element( control.container.find( 'input' ) );
+                       control.element.set( 'no-repeat' !== control.setting() );
+
+                       control.element.bind( function( to ) {
+                               control.setting.set( to ? 'repeat' : 'no-repeat' );
+                       } );
+
+                       control.setting.bind( function( to ) {
+                               control.element.set( 'no-repeat' !== to );
+                       } );
+               } );
+
+               api.control( 'background_attachment', function( control ) {
+                       control.elements[0].unsync( api( 'background_attachment' ) );
+
+                       control.element = new api.Element( control.container.find( 'input' ) );
+                       control.element.set( 'fixed' !== control.setting() );
+
+                       control.element.bind( function( to ) {
+                               control.setting.set( to ? 'scroll' : 'fixed' );
+                       } );
+
+                       control.setting.bind( function( to ) {
+                               control.element.set( 'fixed' !== to );
+                       } );
+               } );
+
                // Juggle the two controls that use header_textcolor
                api.control( 'display_header_text', function( control ) {
                        var last = '';
                        });
                });
 
+               // Allow tabs to be entered in Custom CSS textarea.
+               api.control( 'custom_css', function setupCustomCssControl( control ) {
+                       control.deferred.embedded.done( function allowTabs() {
+                               var $textarea = control.container.find( 'textarea' ), textarea = $textarea[0];
+
+                               $textarea.on( 'blur', function onBlur() {
+                                       $textarea.data( 'next-tab-blurs', false );
+                               } );
+
+                               $textarea.on( 'keydown', function onKeydown( event ) {
+                                       var selectionStart, selectionEnd, value, scroll, tabKeyCode = 9, escKeyCode = 27;
+
+                                       if ( escKeyCode === event.keyCode ) {
+                                               if ( ! $textarea.data( 'next-tab-blurs' ) ) {
+                                                       $textarea.data( 'next-tab-blurs', true );
+                                                       event.stopPropagation(); // Prevent collapsing the section.
+                                               }
+                                               return;
+                                       }
+
+                                       // Short-circuit if tab key is not being pressed or if a modifier key *is* being pressed.
+                                       if ( tabKeyCode !== event.keyCode || event.ctrlKey || event.altKey || event.shiftKey ) {
+                                               return;
+                                       }
+
+                                       // Prevent capturing Tab characters if Esc was pressed.
+                                       if ( $textarea.data( 'next-tab-blurs' ) ) {
+                                               return;
+                                       }
+
+                                       selectionStart = textarea.selectionStart;
+                                       selectionEnd = textarea.selectionEnd;
+                                       value = textarea.value;
+
+                                       if ( selectionStart >= 0 ) {
+                                               scroll = $textarea.scrollTop;
+                                               textarea.value = value.substring( 0, selectionStart ).concat( '\t', value.substring( selectionEnd ) );
+                                               $textarea.selectionStart = textarea.selectionEnd = selectionStart + 1;
+                                               textarea.scrollTop = scroll;
+                                       }
+
+                                       event.stopPropagation();
+                                       event.preventDefault();
+                               } );
+                       } );
+               } );
+
+               // Toggle visibility of Header Video notice when active state change.
+               api.control( 'header_video', function( headerVideoControl ) {
+                       headerVideoControl.deferred.embedded.done( function() {
+                               var toggleNotice = function() {
+                                       var section = api.section( headerVideoControl.section() ), notice;
+                                       if ( ! section ) {
+                                               return;
+                                       }
+                                       notice = section.container.find( '.header-video-not-currently-previewable:first' );
+                                       if ( headerVideoControl.active.get() ) {
+                                               notice.stop().slideUp( 'fast' );
+                                       } else {
+                                               notice.stop().slideDown( 'fast' );
+                                       }
+                               };
+                               toggleNotice();
+                               headerVideoControl.active.bind( toggleNotice );
+                       } );
+               } );
+
                // Update the setting validities.
                api.previewer.bind( 'selective-refresh-setting-validities', function handleSelectiveRefreshedSettingValidities( settingValidities ) {
                        api._handleSettingValidities( {
                        api.previewer.refresh();
                });
 
-               api.trigger( 'ready' );
+               // Update the edit shortcut visibility state.
+               api.state( 'paneVisible' ).bind( function( isPaneVisible ) {
+                       var isMobileScreen;
+                       if ( window.matchMedia ) {
+                               isMobileScreen = window.matchMedia( 'screen and ( max-width: 640px )' ).matches;
+                       } else {
+                               isMobileScreen = $( window ).width() <= 640;
+                       }
+                       api.state( 'editShortcutVisibility' ).set( isPaneVisible || isMobileScreen ? 'visible' : 'hidden' );
+               } );
+               if ( window.matchMedia ) {
+                       window.matchMedia( 'screen and ( max-width: 640px )' ).addListener( function() {
+                               var state = api.state( 'paneVisible' );
+                               state.callbacks.fireWith( state, [ state.get(), state.get() ] );
+                       } );
+               }
+               api.previewer.bind( 'edit-shortcut-visibility', function( visibility ) {
+                       api.state( 'editShortcutVisibility' ).set( visibility );
+               } );
+               api.state( 'editShortcutVisibility' ).bind( function( visibility ) {
+                       api.previewer.send( 'edit-shortcut-visibility', visibility );
+               } );
 
-               // Make sure left column gets focus
-               topFocus = closeBtn;
-               topFocus.focus();
-               setTimeout(function () {
-                       topFocus.focus();
-               }, 200);
+               // Autosave changeset.
+               ( function() {
+                       var timeoutId, updateChangesetWithReschedule, scheduleChangesetUpdate, updatePending = false;
 
+                       /**
+                        * Request changeset update and then re-schedule the next changeset update time.
+                        *
+                        * @since 4.7.0
+                        * @private
+                        */
+                       updateChangesetWithReschedule = function() {
+                               if ( ! updatePending ) {
+                                       updatePending = true;
+                                       api.requestChangesetUpdate().always( function() {
+                                               updatePending = false;
+                                       } );
+                               }
+                               scheduleChangesetUpdate();
+                       };
+
+                       /**
+                        * Schedule changeset update.
+                        *
+                        * @since 4.7.0
+                        * @private
+                        */
+                       scheduleChangesetUpdate = function() {
+                               clearTimeout( timeoutId );
+                               timeoutId = setTimeout( function() {
+                                       updateChangesetWithReschedule();
+                               }, api.settings.timeouts.changesetAutoSave );
+                       };
+
+                       // Start auto-save interval for updating changeset.
+                       scheduleChangesetUpdate();
+
+                       // Save changeset when focus removed from window.
+                       $( window ).on( 'blur.wp-customize-changeset-update', function() {
+                               updateChangesetWithReschedule();
+                       } );
+
+                       // Save changeset before unloading window.
+                       $( window ).on( 'beforeunload.wp-customize-changeset-update', function() {
+                               updateChangesetWithReschedule();
+                       } );
+               } ());
+
+               api.trigger( 'ready' );
        });
 
 })( wp, jQuery );
index a9a63de823731b4202a0863c1365810158488b1a..84b2edbcd402e6b930a8df37c396b6538b2e5fa2 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.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
+!function(a,b){var c,d,e,f=wp.customize;f.Setting=f.Value.extend({initialize:function(a,b,c){var d=this;f.Value.prototype.initialize.call(d,b,c),d.id=a,d.transport=d.transport||"refresh",d._dirty=c.dirty||!1,d.notifications=new f.Values({defaultConstructor:f.Notification}),d.bind(d.preview)},preview:function(){var a,b=this;a=b.transport,"postMessage"!==a||f.state("previewerAlive").get()||(a="refresh"),"postMessage"===a?b.previewer.send("setting",[b.id,b()]):"refresh"===a&&b.previewer.refresh()},findControls:function(){var a=this,b=[];return f.control.each(function(c){_.each(c.settings,function(d){d.id===a.id&&b.push(c)})}),b}}),f._latestRevision=0,f._lastSavedRevision=0,f._latestSettingRevisions={},f.bind("change",function(a){f._latestRevision+=1,f._latestSettingRevisions[a.id]=f._latestRevision}),f.bind("ready",function(){f.bind("add",function(a){a._dirty&&(f._latestRevision+=1,f._latestSettingRevisions[a.id]=f._latestRevision)})}),f.dirtyValues=function(a){var b={};return f.each(function(c){var d;c._dirty&&(d=f._latestSettingRevisions[c.id],f.state("changesetStatus").get()&&a&&a.unsaved&&(_.isUndefined(d)||d<=f._lastSavedRevision)||(b[c.id]=c.get()))}),b},f.requestChangesetUpdate=function(a){var c,d,e,g={};return c=new b.Deferred,a&&_.extend(g,a),_.each(f.dirtyValues({unsaved:!0}),function(b,c){a&&null===a[c]||(g[c]=_.extend({},g[c]||{},{value:b}))}),_.isEmpty(g)?(c.resolve({}),c.promise()):(f.state("processing").set(f.state("processing").get()+1),c.always(function(){f.state("processing").set(f.state("processing").get()-1)}),f.trigger("changeset-save",g),e=f.previewer.query({excludeCustomizedSaved:!0}),delete e.customized,_.extend(e,{nonce:f.settings.nonce.save,customize_theme:f.settings.theme.stylesheet,customize_changeset_data:JSON.stringify(g)}),d=wp.ajax.post("customize_save",e),d.done(function(a){var b={};f._lastSavedRevision=Math.max(f._latestRevision,f._lastSavedRevision),f.state("changesetStatus").set(a.changeset_status),c.resolve(a),f.trigger("changeset-saved",a),a.setting_validities&&_.each(a.setting_validities,function(a,c){!0===a&&_.isObject(g[c])&&!_.isUndefined(g[c].value)&&(b[c]=g[c].value)}),f.previewer.send("changeset-saved",_.extend({},a,{saved_changeset_values:b}))}),d.fail(function(a){c.reject(a),f.trigger("changeset-error",a)}),d.always(function(a){a.setting_validities&&f._handleSettingValidities({settingValidities:a.setting_validities})}),c.promise())},f.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,e;b=this,a=a||{},d=function(){var a;a=(b.extended(f.Panel)||b.extended(f.Section))&&b.expanded&&b.expanded()?b.contentContainer:b.container,e=a.find(".control-focus:first"),0===e.length&&(e=a.find("input, select, textarea, button, object, a[href], [tabindex]").filter(":visible").first()),e.focus()},a.completeCallback?(c=a.completeCallback,a.completeCallback=function(){d(),c()}):a.completeCallback=d,f.state("paneVisible").set(!0),b.expand?b.expand(a):a.completeCallback()},f.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()},f.utils.isKeydownButNotEnterEvent=function(a){return"keydown"===a.type&&13!==a.which},f.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},e=function(){var a,b,c;return a=document.createElement("div"),b={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},c=_.find(_.keys(b),function(b){return!_.isUndefined(a.style[b])}),c?b[c]:null}(),c=f.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.headContainer=d.container,d.contentContainer=d.getContent(),d.container=d.container.add(d.contentContainer),d.deferred={embedded:new b.Deferred},d.priority=new f.Value,d.active=new f.Value,d.activeArgumentsQueue=[],d.expanded=new f.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()}),f.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 f[b].each(function(b){b[a].get()===c.id&&d.push(b)}),d.sort(f.utils.prioritySort),d},isContextuallyActive:function(){throw new Error("Container.isContextuallyActive() must be overridden in a subclass.")},onChangeActive:function(a,c){var d,e,g=this,h=g.headContainer;return c.unchanged?void(c.completeCallback&&c.completeCallback()):(d="resolved"===f.previewer.deferred.active.state()?c.duration:0,g.extended(f.Panel)&&(f.panel.each(function(a){a!==g&&a.expanded()&&(e=a,d=0)}),a||_.each(g.sections(),function(a){a.collapse({duration:0})})),void(b.contains(document,h)?a?h.stop(!0,!0).slideDown(d,c.completeCallback):g.expanded()?g.collapse({duration:d,completeCallback:function(){h.stop(!0,!0).slideUp(d,c.completeCallback)}}):h.stop(!0,!0).slideUp(d,c.completeCallback):(h.toggle(a),c.completeCallback&&c.completeCallback())))},_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())&&(f.state("paneVisible").set(!0),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)},_animateChangeExpanded:function(a){if(!e)return void(a&&a());var c,d,f=this,g=f.contentContainer,h=g.closest(".wp-full-overlay");c=h.add(g),(_.isUndefined(f.panel)||""===f.panel())&&(c=c.add("#customize-info, .customize-pane-parent")),d=function(f){2===f.eventPhase&&b(f.target).is(g)&&(g.off(e,d),c.removeClass("busy"),a&&a())},g.on(e,d),c.addClass("busy"),_.defer(function(){var a=g.closest(".wp-full-overlay-sidebar-content"),b=a.scrollTop(),c=g.data("previous-scrollTop")||0,d=f.expanded();d&&0<b?(g.css("top",b+"px"),g.data("previous-scrollTop",b)):!d&&0<b+c&&(g.css("top",c-b+"px"),a.scrollTop(c))})},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>"},getContent:function(){var a=this,b=a.container,c=b.find(".accordion-section-content, .control-panel-content").first(),d="sub-"+b.attr("id"),e=d,f=b.attr("aria-owns");return f&&(e=e+" "+f),b.attr("aria-owns",e),c.detach().attr({id:d,"class":"customize-pane-child "+c.attr("class")+" "+b.attr("class")})}}),f.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 e=this;c.prototype.initialize.call(e,a,d),e.id=a,e.panel=new f.Value,e.panel.bind(function(a){b(e.headContainer).toggleClass("control-subsection",!!a)}),e.panel.set(e.params.panel||""),f.utils.bubbleChildValueChanges(e,["panel"]),e.embed(),e.deferred.embedded.done(function(){e.ready()})},embed:function(){var a,c=this,d=b("#customize-theme-controls");a=function(a){var e;a?f.panel(a,function(a){a.deferred.embedded.done(function(){e=a.contentContainer,c.headContainer.parent().is(e)||e.append(c.headContainer),c.contentContainer.parent().is(c.headContainer)||d.append(c.contentContainer),c.deferred.embedded.resolve()})}):(e=b(".customize-pane-parent"),c.headContainer.parent().is(e)||e.append(c.headContainer),c.contentContainer.parent().is(c.headContainer)||d.append(c.contentContainer),c.deferred.embedded.resolve())},c.panel.bind(a),a(c.panel.get())},attachEvents:function(){var a,b,c=this;c.container.hasClass("cannot-expand")||(c.container.find(".accordion-section-title, .customize-section-back").on("click keydown",function(a){f.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),c.expanded()?c.collapse():c.expand())}),c.container.find(".customize-section-title .customize-help-toggle").on("click",function(){a=c.container.find(".section-meta"),a.hasClass("cannot-expand")||(b=a.find(".customize-section-description:first"),b.toggleClass("open"),b.slideToggle(),b.attr("aria-expanded",function(a,b){return"true"===b?"false":"true"}))}))},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,e=this,g=e.headContainer.closest(".wp-full-overlay-sidebar-content"),h=e.contentContainer,i=e.headContainer.closest(".wp-full-overlay"),j=h.find(".customize-section-back"),k=e.headContainer.find(".accordion-section-title").first();a&&!h.hasClass("open")?(d=c.unchanged?c.completeCallback:b.proxy(function(){e._animateChangeExpanded(function(){k.attr("tabindex","-1"),j.attr("tabindex","0"),j.focus(),h.css("top",""),g.scrollTop(0),c.completeCallback&&c.completeCallback()}),h.addClass("open"),i.addClass("section-open"),f.state("expandedSection").set(e)},this),c.allowMultiple||f.section.each(function(a){a!==e&&a.collapse({duration:c.duration})}),e.panel()?f.panel(e.panel()).expand({duration:c.duration,completeCallback:d}):(f.panel.each(function(a){a.collapse()}),d())):!a&&h.hasClass("open")?(e._animateChangeExpanded(function(){j.attr("tabindex","-1"),k.attr("tabindex","0"),k.focus(),h.css("top",""),c.completeCallback&&c.completeCallback()}),h.removeClass("open"),i.removeClass("section-open"),e===f.state("expandedSection").get()&&f.state("expandedSection").set(!1)):c.completeCallback&&c.completeCallback()}}),f.ThemesSection=f.Section.extend({currentTheme:"",overlay:"",template:"",screenshotQueue:null,$window:b(window),initialize:function(){return this.$customizeSidebar=b(".wp-full-overlay-sidebar-content:first"),f.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"),a.container.on("keydown",function(b){a.overlay.find(".theme-wrap").is(":visible")&&(39===b.keyCode&&a.nextTheme(),37===b.keyCode&&a.previousTheme(),27===b.keyCode&&(a.closeDetails(),b.stopPropagation()))}),_.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){f.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.expanded()?a.collapse():a.expand())}),a.container.on("click keydown",".left",function(b){f.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.previousTheme())}),a.container.on("click keydown",".right",function(b){f.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.nextTheme())}),a.container.on("click keydown",".theme-backdrop, .close",function(b){f.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)}),f.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,b){if(b.unchanged)return void(b.completeCallback&&b.completeCallback());var c=this,d=c.contentContainer,e=d.closest(".wp-full-overlay"),g=d.closest(".wp-full-overlay-sidebar-content"),h=d.find(".customize-theme"),i=c.headContainer.find(".change-theme");a&&!d.hasClass("current-panel")?(f.section.each(function(a){a!==c&&a.collapse({duration:b.duration})}),f.panel.each(function(a){a.collapse({duration:0})}),c._animateChangeExpanded(function(){i.attr("tabindex","-1"),h.attr("tabindex","0"),h.focus(),d.css("top",""),g.scrollTop(0),b.completeCallback&&b.completeCallback()}),e.addClass("in-themes-panel"),d.addClass("current-panel"),_.delay(c.renderScreenshots,10),c.$customizeSidebar.on("scroll.customize-themes-section",_.throttle(c.renderScreenshots,300))):!a&&d.hasClass("current-panel")&&(c._animateChangeExpanded(function(){i.attr("tabindex","0"),h.attr("tabindex","-1"),i.focus(),d.css("top",""),b.completeCallback&&b.completeCallback()}),e.removeClass("in-themes-panel"),d.removeClass("current-panel"),c.$customizeSidebar.off("scroll.customize-themes-section"))},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=f.control("theme_"+this.currentTheme),b=a.container.next("li.customize-control-theme"),!!b.length&&(b=b[0].id.replace("customize-control-",""),a=f.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=f.control("theme_"+this.currentTheme),b=a.container.prev("li.customize-control-theme"),!!b.length&&(b=b[0].id.replace("customize-control-",""),a=f.control(b),a.params.theme)},updateLimits:function(){this.getNextTheme()||this.overlay.find(".right").addClass("disabled"),this.getPreviousTheme()||this.overlay.find(".left").addClass("disabled")},loadThemePreview:function(a){var c,d,e,g=b.Deferred();return e=document.createElement("a"),e.href=location.href,e.search=b.param(_.extend(f.utils.parseQueryString(e.search.substr(1)),{theme:a,changeset_uuid:f.settings.changeset.uuid})),d=b(".wp-full-overlay"),d.addClass("customize-loading"),c=function(){var a;f.state("processing").get()>0||(f.state("processing").unbind(c),a=f.requestChangesetUpdate(),a.done(function(){b(window).off("beforeunload.customize-confirm"),top.location.href=e.href,g.resolve()}),a.fail(function(){d.removeClass("customize-loading"),g.reject()}))},0===f.state("processing").get()?c():f.state("processing").bind(c),g.promise()},showDetails:function(a,c){var d,e=this;c=c||function(){},e.currentTheme=a.id,e.overlay.html(e.template(a)).fadeIn("fast").focus(),b("body").addClass("modal-open"),e.containFocus(e.overlay),e.updateLimits(),d=e.overlay.find(".inactive-theme > a"),d.on("click",function(b){b.preventDefault(),d.hasClass("disabled")||(d.addClass("disabled"),e.loadThemePreview(a.id).fail(function(){d.removeClass("disabled")}))}),c()},closeDetails:function(){b("body").removeClass("modal-open"),this.overlay.fadeOut("fast"),f.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)})}}),f.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"),d=b(".customize-pane-parent");a.headContainer.parent().is(d)||d.append(a.headContainer),a.contentContainer.parent().is(a.headContainer)||(c.append(a.contentContainer),a.renderContent()),a.deferred.embedded.resolve()},attachEvents:function(){var a,c=this;c.headContainer.find(".accordion-section-title").on("click keydown",function(a){f.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),c.expanded()||c.expand())}),c.container.find(".customize-panel-back").on("click keydown",function(a){f.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(!f.utils.isKeydownButNotEnterEvent(d)&&(d.preventDefault(),!a.hasClass("cannot-expand"))){var e=a.find(".customize-panel-description:first");a.hasClass("open")?(a.toggleClass("open"),e.slideUp(c.defaultExpandedArguments.duration),b(this).attr("aria-expanded",!1)):(e.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,b){if(b.unchanged)return void(b.completeCallback&&b.completeCallback());var c=this,d=c.contentContainer,e=d.closest(".wp-full-overlay"),g=d.closest(".wp-full-overlay-sidebar-content"),h=c.headContainer.find(".accordion-section-title"),i=d.find(".customize-panel-back");a&&!d.hasClass("current-panel")?(f.section.each(function(a){c.id!==a.panel()&&a.collapse({duration:0})}),f.panel.each(function(a){c!==a&&a.collapse({duration:0})}),c._animateChangeExpanded(function(){h.attr("tabindex","-1"),i.attr("tabindex","0"),i.focus(),d.css("top",""),g.scrollTop(0),b.completeCallback&&b.completeCallback()}),e.addClass("in-sub-panel"),d.addClass("current-panel"),f.state("expandedPanel").set(c)):!a&&d.hasClass("current-panel")&&(c._animateChangeExpanded(function(){h.attr("tabindex","0"),i.attr("tabindex","-1"),h.focus(),d.css("top",""),b.completeCallback&&b.completeCallback()}),e.removeClass("in-sub-panel"),d.removeClass("current-panel"),c===f.state("expandedPanel").get()&&f.state("expandedPanel").set(!1))},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.headContainer&&c.contentContainer.html(a(c.params))}}),f.Control=f.Class.extend({defaultActiveArguments:{duration:"fast",completeCallback:b.noop},initialize:function(a,c){var d,e,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 f.Value,h.priority=new f.Value,h.active=new f.Value,h.activeArgumentsQueue=[],h.notifications=new f.Values({defaultConstructor:f.Notification}),h.elements=[],d=h.container.find("[data-customize-setting-link]"),e={},d.each(function(){var a,c=b(this);if(c.is(":radio")){if(a=c.prop("name"),e[a])return;e[a]=!0,c=d.filter('[name="'+a+'"]')}f(c.data("customizeSettingLink"),function(a){var b=new f.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),f.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()):f.apply(f,g.concat(function(){var a;h.settings={};for(a in h.params.settings)h.settings[a]=f(h.params.settings[a]);h.setting=h.settings["default"]||null,_.each(h.settings,function(a){a.notifications.bind("add",function(b){var c,d,e;d=a.id+":"+b.code,e=_.extend({},b,{setting:a.id}),c=new f.Notification(d,e),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&&f.section(a,function(a){a.deferred.embedded.done(function(){c=a.contentContainer.is("ul")?a.contentContainer:a.contentContainer.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(){var a,c=this;"dropdown-pages"===c.params.type&&c.params.allow_addition&&(a=c.container.find(".new-content-item"),a.hide(),c.container.on("click",".add-new-toggle",function(c){b(c.currentTarget).slideUp(180),a.slideDown(180),a.find(".create-item-input").focus()}),c.container.on("click",".add-content",function(){c.addNewPage()}),c.container.on("keyup",".create-item-input",function(a){13===a.which&&c.addNewPage()}))},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){f.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,e=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){f.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(e),e(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)))},addNewPage:function(){var a,c,d,e,g,h,i=this;if("dropdown-pages"===i.params.type&&i.params.allow_addition&&f.Menus){if(c=i.container.find(".add-new-toggle"),d=i.container.find(".new-content-item"),e=i.container.find(".create-item-input"),g=e.val(),h=i.container.find("select"),!g)return void e.addClass("invalid");e.removeClass("invalid"),e.attr("disabled","disabled"),a=f.Menus.insertAutoDraftPost({post_title:g,post_type:"page"}),a.done(function(a){var e,j,k;e=new f.Menus.AvailableItemModel({id:"post-"+a.post_id,title:g,type:"page",type_label:f.Menus.data.l10n.page_label,object:"post_type",object_id:a.post_id,url:a.url}),f.Menus.availableMenuItemsPanel.collection.add(e),j=b("#available-menu-items-post_type-page").find(".available-menu-items-list"),k=wp.template("available-menu-item"),j.prepend(k(e.attributes)),h.focus(),i.setting.set(String(a.post_id)),d.slideUp(180),c.slideDown(180)}),a.always(function(){e.val("").removeAttr("disabled")})}}}),f.ColorControl=f.Control.extend({ready:function(){var a,b=this,c="hue"===this.params.mode,d=!1;c?(a=this.container.find(".color-picker-hue"),a.val(b.setting()).wpColorPicker({change:function(a,c){d=!0,b.setting(c.color.h()),d=!1}})):(a=this.container.find(".color-picker-hex"),a.val(b.setting()).wpColorPicker({change:function(){d=!0,b.setting.set(a.wpColorPicker("color")),d=!1},clear:function(){d=!0,b.setting.set(""),d=!1}})),b.setting.bind(function(b){d||(a.val(b),a.wpColorPicker("color",b))}),b.container.on("keydown",function(c){var d;27===c.which&&(d=b.container.find(".wp-picker-container"),d.hasClass("wp-picker-active")&&(a.wpColorPicker("close"),b.container.find(".wp-color-result").focus(),c.stopPropagation()))})}}),f.MediaControl=f.Control.extend({ready:function(){function a(a){var d=b.Deferred();c.extended(f.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),f.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){f.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){f.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),this.params.attachment=this.params.defaultAttachment,this.setting(this.params.defaultAttachment.url))},removeFile:function(a){f.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),this.params.attachment={},this.setting(""),this.renderContent())}}),f.UploadControl=f.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(){}}),f.ImageControl=f.UploadControl.extend({thumbnailSrc:function(){}}),f.BackgroundControl=f.UploadControl.extend({ready:function(){f.UploadControl.prototype.ready.apply(this,arguments)},select:function(){f.UploadControl.prototype.select.apply(this,arguments),wp.ajax.post("custom-background-add",{nonce:_wpCustomizeBackground.nonces.add,wp_customize:"on",customize_theme:f.settings.theme.stylesheet,attachment_id:this.params.attachment.id})}}),f.BackgroundPositionControl=f.Control.extend({ready:function(){var a,c=this;c.container.on("change",'input[name="background-position"]',function(){var a=b(this).val().split(" ");c.settings.x(a[0]),c.settings.y(a[1])}),a=_.debounce(function(){var a,b,d,e;a=c.settings.x.get(),b=c.settings.y.get(),e=String(a)+" "+String(b),d=c.container.find('input[name="background-position"][value="'+e+'"]'),d.click()}),c.settings.x.bind(a),c.settings.y.bind(a),a()}}),f.CroppedImageControl=f.MediaControl.extend({openFrame:function(a){f.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)}}),f.SiteIconControl=f.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,e=["site_icon-32","thumbnail","full"];_.each(e,function(b){d||_.isUndefined(a.sizes[b])||(d=a.sizes[b])}),this.params.attachment=a,this.setting(a.id),d&&(c=b('link[rel="icon"][sizes="32x32"]'),c.attr("href",d.url))},removeFile:function(a){f.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),this.params.attachment={},this.setting(""),this.renderContent(),b('link[rel="icon"][sizes="32x32"]').attr("href","/favicon.ico"))}}),f.HeaderControl=f.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),f.HeaderTool.currentHeader=this.getInitialHeaderImage(),new f.HeaderTool.CurrentView({model:f.HeaderTool.currentHeader,el:"#customize-control-header_image .current .container"}),new f.HeaderTool.ChoiceListView({collection:f.HeaderTool.UploadsList=new f.HeaderTool.ChoiceList,el:"#customize-control-header_image .choices .uploaded .list"}),new f.HeaderTool.ChoiceListView({collection:f.HeaderTool.DefaultsList=new f.HeaderTool.DefaultsList,el:"#customize-control-header_image .choices .default .list"}),f.HeaderTool.combinedList=f.HeaderTool.CombinedList=new f.HeaderTool.CombinedList([f.HeaderTool.UploadsList,f.HeaderTool.DefaultsList]),wp.media.controller.Cropper.prototype.defaults.doCropArgs.wp_customize="on",wp.media.controller.Cropper.prototype.defaults.doCropArgs.customize_theme=f.settings.theme.stylesheet},getInitialHeaderImage:function(){if(!f.get().header_image||!f.get().header_image_data||_.contains(["remove-header","random-default-image","random-uploaded-image"],f.get().header_image))return new f.HeaderTool.ImageModel;var a=_.find(_wpCustomizeHeader.uploads,function(a){return a.attachment_id===f.get().header_image_data.attachment_id});return a||(a={url:f.get().header_image,thumbnail_url:f.get().header_image,attachment_id:f.get().header_image_data.attachment_id}),new f.HeaderTool.ImageModel({header:a,choice:a.url.split("/").pop()})},calculateImageSelectOptions:function(a,b){var c,d,e,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 f.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,e=g,d/e>c?(k=e,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 e,g={};g.url=a,g.thumbnail_url=a,g.timestamp=_.now(),b&&(g.attachment_id=b),c&&(g.width=c),d&&(g.height=d),e=new f.HeaderTool.ImageModel({header:g,choice:a.split("/").pop()}),f.HeaderTool.UploadsList.add(e),f.HeaderTool.currentHeader.set(e.toJSON()),e.save(),e.importImage()},removeImage:function(){f.HeaderTool.currentHeader.trigger("hide"),f.HeaderTool.CombinedList.trigger("control:removeImage")}}),f.ThemeControl=f.Control.extend({touchDrag:!1,isRendered:!1,renderContent:function(){var a=this,b=arguments;f.section(a.section(),function(c){c.expanded()?(f.Control.prototype.renderContent.apply(a,b),a.isRendered=!0):c.expanded.bind(function(c){c&&!a.isRendered&&(f.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(!f.utils.isKeydownButNotEnterEvent(c))return a.touchDrag===!0?a.touchDrag=!1:void(b(c.target).is(".theme-actions .button")||f.section(a.section()).loadThemePreview(a.params.theme.id))}),a.container.on("click keydown",".theme-actions .theme-details",function(b){f.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),f.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()}}),f.defaultConstructor=f.Setting,f.control=new f.Values({defaultConstructor:f.Control}),f.section=new f.Values({defaultConstructor:f.Section}),f.panel=new f.Values({defaultConstructor:f.Panel}),f.PreviewFrame=f.Messenger.extend({sensitivity:null,initialize:function(a,c){var d=b.Deferred();d.promise(this),this.container=a.container,b.extend(a,{channel:f.PreviewFrame.uuid()}),f.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,d,e,g=this,h=!1,i=!1,j=null,k="{}"!==g.query.customized;g._ready&&g.unbind("ready",g._ready),g._ready=function(b){i=!0,j=b,g.container.addClass("iframe-ready"),b&&h&&a.resolveWith(g,[b])},g.bind("ready",g._ready),c=document.createElement("a"),c.href=g.previewUrl(),d=_.extend(f.utils.parseQueryString(c.search.substr(1)),{customize_changeset_uuid:g.query.customize_changeset_uuid,customize_theme:g.query.customize_theme,customize_messenger_channel:g.query.customize_messenger_channel}),c.search=b.param(d),g.iframe=b("<iframe />",{title:f.l10n.previewIframeTitle,name:"customize-"+g.channel()}),g.iframe.attr("onmousewheel",""),k?g.iframe.attr("data-src",c.href):g.iframe.attr("src",c.href),g.iframe.appendTo(g.container),g.targetWindow(g.iframe[0].contentWindow),k&&(e=b("<form>",{action:c.href,target:g.iframe.attr("name"),method:"post",hidden:"hidden"}),e.append(b("<input>",{type:"hidden",name:"_method",value:"GET"})),_.each(g.query,function(a,c){e.append(b("<input>",{type:"hidden",name:c,value:a}))}),g.container.append(e),e.submit(),e.remove()),g.bind("iframe-loading-error",function(b){return g.iframe.remove(),0===b?void g.login(a):-1===b?void a.rejectWith(g,["cheatin"]):void a.rejectWith(g,["request failure"])}),g.iframe.one("load",function(){h=!0,i?a.resolveWith(g,[j]):setTimeout(function(){a.rejectWith(g,["ready timeout"])},g.sensitivity)})},login:function(a){var c,d=this;return c=function(){a.rejectWith(d,["logged out"])},this.triedLogin?c():void b.get(f.settings.url.ajax,{action:"logged-in"}).fail(c).done(function(e){var g;"1"!==e&&c(),g=b("<iframe />",{src:d.previewUrl(),title:f.l10n.previewIframeTitle}).hide(),g.appendTo(d.container),g.on("load",function(){d.triedLogin=!0,g.remove(),d.run(a)})})},destroy:function(){f.Messenger.prototype.destroy.call(this),this.iframe&&this.iframe.remove(),delete this.iframe,delete this.targetWindow}}),function(){var a=0;f.PreviewFrame.uuid=function(){return"preview-"+String(a++)}}(),f.setDocumentTitle=function(a){var b,c;b=f.settings.documentTitleTmpl,c=b.replace("%s",a),document.title=c,f.trigger("title",c)},f.Previewer=f.Messenger.extend({refreshBuffer:null,initialize:function(a,c){var d=this,e=document.createElement("a");b.extend(d,c||{}),d.deferred={active:b.Deferred()},d.refresh=_.debounce(function(a){return function(){var b,c;b=function(){return 0===f.state("processing").get()},b()?a.call(d):(c=function(){b()&&(a.call(d),f.state("processing").unbind(c))},f.state("processing").bind(c))}}(d.refresh),d.refreshBuffer),d.container=f.ensure(a.container),d.allowedUrls=a.allowedUrls,a.url=window.location.href,f.Messenger.prototype.initialize.call(d,a),e.href=d.origin(),d.add("scheme",e.protocol.replace(/:$/,"")),d.add("previewUrl",a.previewUrl).setter(function(a){var c,e,g,h=null,i=[];return c=document.createElement("a"),c.href=a,/\/wp-(admin|includes|content)(\/|$)/.test(c.pathname)?null:(c.search.length>1&&(e=f.utils.parseQueryString(c.search.substr(1)),delete e.customize_changeset_uuid,delete e.customize_theme,delete e.customize_messenger_channel,_.isEmpty(e)?c.search="":c.search=b.param(e)),i.push(c),d.scheme.get()+":"!==c.protocol&&(c=document.createElement("a"),c.href=i[0].href,c.protocol=d.scheme.get()+":",i.unshift(c)),g=document.createElement("a"),_.find(i,function(a){return!_.isUndefined(_.find(d.allowedUrls,function(b){if(g.href=b,c.protocol===g.protocol&&c.host===g.host&&0===c.pathname.indexOf(g.pathname.replace(/\/$/,"")))return h=a.href,!0}))}),h)}),d.bind("ready",d.ready),d.deferred.active.done(_.bind(d.keepPreviewAlive,d)),d.bind("synced",function(){d.send("active")}),d.previewUrl.bind(d.refresh),d.scroll=0,d.bind("scroll",function(a){d.scroll=a}),d.bind("url",function(a){var b,c=!1;d.scroll=0,b=function(){c=!0},d.previewUrl.bind(b),d.previewUrl.set(a),d.previewUrl.unbind(b),c||d.refresh()}),d.bind("documentTitle",function(a){f.setDocumentTitle(a)})},ready:function(a){var b,c=this,d={};d.settings=f.get(),d["settings-modified-while-loading"]=c.settingsModifiedWhileLoading,("resolved"!==c.deferred.active.state()||c.loading)&&(d.scroll=c.scroll),d["edit-shortcut-visibility"]=f.state("editShortcutVisibility").get(),c.send("sync",d),a.currentUrl&&(c.previewUrl.unbind(c.refresh),c.previewUrl.set(a.currentUrl),c.previewUrl.bind(c.refresh)),b={panel:a.activePanels,section:a.activeSections,control:a.activeControls},_(b).each(function(a,b){f[b].each(function(c,d){var e=_.isUndefined(f.settings[b+"s"][d]);e&&_.isUndefined(a[d])||(a[d]?c.activate():c.deactivate())})}),a.settingValidities&&f._handleSettingValidities({settingValidities:a.settingValidities,focusInvalidControl:!1})},keepPreviewAlive:function(){var a,b,c,d,e=this;d=function(){b=setTimeout(c,f.settings.timeouts.keepAliveCheck)},a=function(){f.state("previewerAlive").set(!0),clearTimeout(b),d()},c=function(){f.state("previewerAlive").set(!1)},d(),e.bind("ready",a),e.bind("keep-alive",a)},query:function(){},abort:function(){this.loading&&(this.loading.destroy(),delete this.loading)},refresh:function(){var a,b=this;b.send("loading-initiated"),b.abort(),b.loading=new f.PreviewFrame({url:b.url(),previewUrl:b.previewUrl(),query:b.query({excludeCustomizedSaved:!0})||{},container:b.container}),b.settingsModifiedWhileLoading={},a=function(a){b.settingsModifiedWhileLoading[a.id]=!0},f.bind("change",a),b.loading.always(function(){f.unbind("change",a)}),b.loading.done(function(a){var c,d=this;b.preview=d,b.targetWindow(d.targetWindow()),b.channel(d.channel()),c=function(){d.unbind("synced",c),b._previousPreview&&b._previousPreview.destroy(),b._previousPreview=b.preview,b.deferred.active.resolve(),delete b.loading},d.bind("synced",c),b.trigger("ready",a)}),b.loading.fail(function(a){b.send("loading-failed"),"logged out"===a&&(b.preview&&(b.preview.destroy(),delete b.preview),b.login().done(b.refresh)),"cheatin"===a&&b.cheatin()})},login:function(){var a,c,d,e=this;return this._login?this._login:(a=b.Deferred(),this._login=a.promise(),c=new f.Messenger({channel:"login",url:f.settings.url.login}),d=b("<iframe />",{src:f.settings.url.login,title:f.l10n.loginIframeTitle}).appendTo(this.container),c.targetWindow(d[0].contentWindow),c.bind("login",function(){var b=e.refreshNonces();b.always(function(){d.remove(),c.destroy(),delete e._login}),b.done(function(){a.resolve()}),b.fail(function(){e.cheatin(),a.reject()})}),this._login)},cheatin:function(){b(document.body).empty().addClass("cheatin").append("<h1>"+f.l10n.cheatin+"</h1><p>"+f.l10n.notAllowed+"</p>")},refreshNonces:function(){var a,c=b.Deferred();return c.promise(),a=wp.ajax.post("customize_refresh_nonces",{wp_customize:"on",customize_theme:f.settings.theme.stylesheet}),a.done(function(a){f.trigger("nonce-refresh",a),c.resolve()}),a.fail(function(){c.reject()}),c}}),f.settingConstructor={},f.controlConstructor={color:f.ColorControl,media:f.MediaControl,upload:f.UploadControl,image:f.ImageControl,cropped_image:f.CroppedImageControl,site_icon:f.SiteIconControl,header:f.HeaderControl,background:f.BackgroundControl,background_position:f.BackgroundPositionControl,theme:f.ThemeControl},f.panelConstructor={},f.sectionConstructor={themes:f.ThemesSection},f._handleSettingValidities=function(a){var b,c=[],d=!1;_.each(a.settingValidities,function(a,b){var d=f(b);d&&(_.isObject(a)&&_.each(a,function(a,b){var e,g,h=!1;e=new f.Notification(b,_.extend({fromServer:!0},a)),g=d.notifications(e.code),g&&(h=e.type!==g.type||e.message!==g.message||!_.isEqual(e.data,g.data)),h&&d.notifications.remove(b),d.notifications.has(e.code)||d.notifications.add(b,e),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=f.findControlsForSettings(c),_(_.values(b)).find(function(a){return _(a).find(function(a){var b=a.section()&&f.section.has(a.section())&&f.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())},f.findControlsForSettings=function(a){var b,c={};return _.each(_.unique(a),function(a){var d=f(a);d&&(b=d.findControls(),b&&b.length>0&&(c[a]=b))}),c},f.reflowPaneContents=_.bind(function(){var a,c,d,e=[],g=!1;document.activeElement&&(c=b(document.activeElement)),f.panel.each(function(b){var c=b.sections(),d=_.pluck(c,"headContainer");e.push(b),a=b.contentContainer.is("ul")?b.contentContainer:b.contentContainer.find("ul:first"),f.utils.areElementListsEqual(d,a.children("[id]"))||(_(c).each(function(b){a.append(b.headContainer)}),g=!0)}),f.section.each(function(b){var c=b.controls(),d=_.pluck(c,"container");b.panel()||e.push(b),a=b.contentContainer.is("ul")?b.contentContainer:b.contentContainer.find("ul:first"),f.utils.areElementListsEqual(d,a.children("[id]"))||(_(c).each(function(b){a.append(b.container)}),g=!0)}),e.sort(f.utils.prioritySort),d=_.pluck(e,"headContainer"),a=b("#customize-theme-controls .customize-pane-parent"),f.utils.areElementListsEqual(d,a.children())||(_(e).each(function(b){a.append(b.headContainer)}),g=!0),f.panel.each(function(a){var b=a.active();a.active.callbacks.fireWith(a.active,[b,b])}),f.section.each(function(a){var b=a.active();a.active.callbacks.fireWith(a.active,[b,b])}),g&&c&&c.focus(),f.trigger("pane-contents-reflowed")},f),b(function(){if(f.settings=window._wpCustomizeSettings,f.l10n=window._wpCustomizeControlsL10n,f.settings&&b.support.postMessage&&(b.support.cors||!f.settings.isCrossDomain)){null===f.PreviewFrame.prototype.sensitivity&&(f.PreviewFrame.prototype.sensitivity=f.settings.timeouts.previewFrameSensitivity),null===f.Previewer.prototype.refreshBuffer&&(f.Previewer.prototype.refreshBuffer=f.settings.timeouts.windowRefresh);var a,c=b(document.body),d=c.children(".wp-full-overlay"),e=b("#customize-info .panel-title.site-title"),g=b(".customize-controls-close"),h=b("#save"),i=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(f.Panel.prototype.defaultExpandedArguments.duration),b(this).attr("aria-expanded",!1)):(c.slideDown(f.Panel.prototype.defaultExpandedArguments.duration),a.toggleClass("open"),b(this).attr("aria-expanded",!0)))}),f.previewer=new f.Previewer({container:"#customize-preview",form:"#customize-controls",previewUrl:f.settings.url.preview,allowedUrls:f.settings.url.allowed},{nonce:f.settings.nonce,query:function(a){var b={wp_customize:"on",customize_theme:f.settings.theme.stylesheet,nonce:this.nonce.preview,customize_changeset_uuid:f.settings.changeset.uuid};return b.customized=JSON.stringify(f.dirtyValues({unsaved:a&&a.excludeCustomizedSaved})),b},save:function(c){function d(a){n[a.id]=!0}var e,g,i,j=this,k=b.Deferred(),l="publish",m=f.state("processing"),n={},o=[];return c&&c.status&&(l=c.status),f.state("saving").get()&&(k.reject("already_saving"),k.promise()),f.state("saving").set(!0),f.bind("change",d),g=function(){var e,g,m={},p=f._latestRevision;return f.each(function(a){a.notifications.each(function(b){"error"!==b.type||b.fromServer||(o.push(a.id),m[a.id]||(m[a.id]={}),m[a.id][b.code]=b)})}),i=f.findControlsForSettings(o),_.isEmpty(i)?(g=b.extend(j.query({excludeCustomizedSaved:!1}),{nonce:j.nonce.save,customize_changeset_status:l}),c&&c.date&&(g.customize_changeset_date=c.date),c&&c.title&&(g.customize_changeset_title=c.title),e=wp.ajax.post("customize_save",g),h.prop("disabled",!0),f.trigger("save",e),e.always(function(){f.state("saving").set(!1),h.prop("disabled",!1),f.unbind("change",d)}),e.fail(function(a){"0"===a?a="not_logged_in":"-1"===a&&(a="invalid_nonce"),"invalid_nonce"===a?j.cheatin():"not_logged_in"===a&&(j.preview.iframe.hide(),j.login().done(function(){j.save(),j.preview.iframe.show()})),a.setting_validities&&f._handleSettingValidities({settingValidities:a.setting_validities,focusInvalidControl:!0}),k.rejectWith(j,[a]),f.trigger("error",a)}),void e.done(function(b){j.send("saved",b),f.state("changesetStatus").set(b.changeset_status),"publish"===b.changeset_status&&(f.each(function(a){a._dirty&&(_.isUndefined(f._latestSettingRevisions[a.id])||f._latestSettingRevisions[a.id]<=p)&&(a._dirty=!1)}),f.state("changesetStatus").set(""),f.settings.changeset.uuid=b.next_changeset_uuid,a.send("changeset-uuid",f.settings.changeset.uuid)),b.setting_validities&&f._handleSettingValidities({settingValidities:b.setting_validities,focusInvalidControl:!0}),k.resolveWith(j,[b]),f.trigger("saved",b),_.isEmpty(n)||f.state("saved").set(!1)})):(_.values(i)[0][0].focus(),f.unbind("change",d),k.rejectWith(j,[{setting_invalidities:m}]),f.state("saving").set(!1),k.promise())},0===m()?g():(e=function(){0===m()&&(f.state.unbind("change",e),g())},f.state.bind("change",e)),k.promise()}}),f.previewer.bind("nonce",function(a){b.extend(this.nonce,a)}),f.bind("nonce-refresh",function(a){b.extend(f.settings.nonce,a),b.extend(f.previewer.nonce,a),f.previewer.send("nonce-refresh",a)}),b.each(f.settings.settings,function(a,b){var c,d=f.settingConstructor[b.type]||f.Setting;c=new d(a,b.value,{transport:b.transport,previewer:f.previewer,dirty:!!b.dirty}),f.add(a,c)}),b.each(f.settings.panels,function(a,b){var c,d=f.panelConstructor[b.type]||f.Panel;c=new d(a,{params:b}),f.panel.add(a,c)}),b.each(f.settings.sections,function(a,b){var c,d=f.sectionConstructor[b.type]||f.Section;c=new d(a,{params:b}),f.section.add(a,c)}),b.each(f.settings.controls,function(a,b){var c,d=f.controlConstructor[b.type]||f.Control;c=new d(a,{params:b,previewer:f.previewer}),f.control.add(a,c)}),_.each(["panel","section","control"],function(a){var b=f.settings.autofocus[a];b&&f[a](b,function(a){a.deferred.embedded.done(function(){f.previewer.deferred.active.done(function(){a.focus()})})})}),f.bind("ready",f.reflowPaneContents),b([f.panel,f.section,f.control]).each(function(a,b){var c=_.debounce(f.reflowPaneContents,f.settings.timeouts.reflowPaneContents);b.bind("add",c),b.bind("change",c),b.bind("remove",c)}),function(){var a,d=new f.Values,e=d.create("saved"),i=d.create("saving"),j=d.create("activated"),k=d.create("processing"),l=d.create("paneVisible"),m=d.create("expandedPanel"),n=d.create("expandedSection"),o=d.create("changesetStatus"),p=d.create("previewerAlive"),q=d.create("editShortcutVisibility");d.bind("change",function(){var a;j()?""===o.get()&&e()?(h.val(f.l10n.saved),g.find(".screen-reader-text").text(f.l10n.close)):(h.val(f.l10n.save),g.find(".screen-reader-text").text(f.l10n.cancel)):(h.val(f.l10n.activate),g.find(".screen-reader-text").text(f.l10n.cancel)),a=!i()&&(!j()||!e()||""!==o()&&"publish"!==o()),h.prop("disabled",!a)}),o(f.settings.changeset.status),e(!0),""===o()&&f.each(function(a){a._dirty&&e(!1)}),i(!1),j(f.settings.theme.active),k(0),l(!0),m(!1),n(!1),p(!0),q("visible"),f.bind("change",function(){d("saved").set(!1)}),i.bind(function(a){c.toggleClass("saving",a)}),f.bind("saved",function(a){d("saved").set(!0),"publish"===a.changeset_status&&d("activated").set(!0)}),j.bind(function(a){a&&f.trigger("activated")}),a=function(a){var c,d;if(c=document.createElement("a"),c.href=location.href,d=f.utils.parseQueryString(c.search.substr(1)),a){if(d.changeset_uuid===f.settings.changeset.uuid)return;d.changeset_uuid=f.settings.changeset.uuid}else{if(!d.changeset_uuid)return;delete d.changeset_uuid}c.search=b.param(d),history.replaceState({},document.title,c.href)},history.replaceState&&o.bind(function(b){a(""!==b&&"publish"!==b)}),f.state=d}(),f.previewer.previewUrl()?f.previewer.refresh():f.previewer.previewUrl(f.settings.url.home),h.click(function(a){f.previewer.save(),a.preventDefault()}).keydown(function(a){9!==a.which&&(13===a.which&&f.previewer.save(),a.preventDefault())}),g.keydown(function(a){9!==a.which&&(13===a.which&&this.click(),a.preventDefault())}),b(".collapse-sidebar").on("click",function(){f.state("paneVisible").set(!f.state("paneVisible").get())}),f.state("paneVisible").bind(function(a){d.toggleClass("preview-only",!a),d.toggleClass("expanded",a),d.toggleClass("collapsed",!a),a?b(".collapse-sidebar").attr({"aria-expanded":"true","aria-label":f.l10n.collapseSidebar}):b(".collapse-sidebar").attr({"aria-expanded":"false","aria-label":f.l10n.expandSidebar})}),b("body").on("keydown",function(a){var c,d=[],e=[],g=[];27===a.which&&(b(a.target).is("body")||b.contains(b("#customize-controls")[0],a.target))&&(f.control.each(function(a){a.expanded&&a.expanded()&&_.isFunction(a.collapse)&&d.push(a)}),f.section.each(function(a){a.expanded()&&e.push(a)}),f.panel.each(function(a){a.expanded()&&g.push(a)}),d.length>0&&0===e.length&&(d.length=0),c=d[0]||e[0]||g[0],c&&(c.collapse(),a.preventDefault()))}),b(".customize-controls-preview-toggle").on("click",function(){f.state("paneVisible").set(!f.state("paneVisible").get())}),function(){var a,c,d,e,g,h,i,j=b(".wp-full-overlay-sidebar-content");a=function(a){var b,g=a,i=f.state("expandedSection").get(),j=f.state("expandedPanel").get();if(h&&h.element&&d(h.element),!g)if(!i&&j&&j.contentContainer)g=j;else{if(j||!i||!i.contentContainer)return void(h=!1);g=i}b=g.contentContainer.find(".customize-section-title, .panel-meta").first(),b.length?(h={instance:g,element:b,parent:b.closest(".customize-pane-child"),height:c(b)},i&&e(h.element,h.parent)):h=!1},f.state("expandedSection").bind(a),f.state("expandedPanel").bind(a),j.on("scroll",_.throttle(function(){if(h){var a=j.scrollTop(),b=!i||a<=i;i=a,g(h,a,b)}},8)),d=function(a){a.hasClass("is-sticky")&&a.removeClass("is-sticky").addClass("maybe-sticky is-in-view").css("top",j.scrollTop()+"px")},e=function(a,b){a.removeClass("maybe-sticky is-in-view").css({width:"",top:""}),b.css("padding-top","")},c=function(a){var b=a.data("height");return b||(b=a.outerHeight(),a.data("height",b)),b},g=function(a,b,c){var d=a.element,e=a.parent,f=a.height,g=parseInt(d.css("top"),10),h=d.hasClass("maybe-sticky"),i=d.hasClass("is-sticky"),j=d.hasClass("is-in-view");if(!c)return i&&(g=b,d.removeClass("is-sticky").css({top:g+"px",width:""})),void(j&&b>g+f&&(d.removeClass("is-in-view"),e.css("padding-top","")));if(!h&&b>=f)h=!0,d.addClass("maybe-sticky");else if(0===b)return d.removeClass("maybe-sticky is-in-view is-sticky").css({top:"",width:""}),void e.css("padding-top","");j&&!i?g>=b&&d.addClass("is-sticky").css({top:"",width:e.outerWidth()+"px"}):h&&!j&&(d.addClass("is-in-view").css("top",b-f+"px"),e.css("padding-top",f+"px"))}}(),f.previewedDevice=new f.Value,f.bind("ready",function(){_.find(f.settings.previewableDevices,function(a,b){if(!0===a["default"])return f.previewedDevice.set(b),!0})}),i.find(".devices button").on("click",function(a){f.previewedDevice.set(b(a.currentTarget).data("device"))}),f.previewedDevice.bind(function(a){var c=b(".wp-full-overlay"),d="";i.find(".devices button").removeClass("active").attr("aria-pressed",!1),i.find(".devices .preview-"+a).addClass("active").attr("aria-pressed",!0),b.each(f.settings.previewableDevices,function(a){d+=" preview-"+a}),c.removeClass(d).addClass("preview-"+a)}),e.length&&f("blogname",function(a){var c=function(){e.text(b.trim(a())||f.l10n.untitledBlogName)};a.bind(c),c()}),a=new f.Messenger({url:f.settings.url.parent,channel:"loader"}),a.bind("back",function(){g.on("click.customize-controls-close",function(b){b.preventDefault(),a.send("close")})}),b(window).on("beforeunload.customize-confirm",function(){if(!f.state("saved")())return setTimeout(function(){d.removeClass("customize-loading")},1),f.l10n.saveAlert}),b.each(["saved","change"],function(b,c){f.bind(c,function(){a.send(c)})}),f.bind("title",function(b){a.send("title",b)}),a.send("changeset-uuid",f.settings.changeset.uuid),a.send("ready"),b.each({background_image:{controls:["background_preset","background_position","background_size","background_repeat","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){f(a,function(a){b.each(c.controls,function(b,d){f.control(d,function(b){var d=function(a){b.container.toggle(c.callback(a))};d(a.get()),a.bind(d)})})})}),f.control("background_preset",function(a){var b,c,d,e,g,h;b={"default":[!1,!1,!1,!1],fill:[!0,!1,!1,!1],fit:[!0,!1,!0,!1],repeat:[!0,!1,!1,!0],custom:[!0,!0,!0,!0]},c=[_wpCustomizeBackground.defaults["default-position-x"],_wpCustomizeBackground.defaults["default-position-y"],_wpCustomizeBackground.defaults["default-size"],_wpCustomizeBackground.defaults["default-repeat"],_wpCustomizeBackground.defaults["default-attachment"]],d={"default":c,fill:["left","top","cover","no-repeat","fixed"],fit:["left","top","contain","no-repeat","fixed"],repeat:["left","top","auto","repeat","scroll"]},e=function(a){_.each(["background_position","background_size","background_repeat","background_attachment"],function(c,d){var e=f.control(c);e&&e.container.toggle(b[a][d])})},g=function(a){_.each(["background_position_x","background_position_y","background_size","background_repeat","background_attachment"],function(b,c){var e=f(b);e&&e.set(d[a][c])})},h=a.setting.get(),e(h),a.setting.bind("change",function(a){e(a),"custom"!==a&&g(a)})}),f.control("background_repeat",function(a){a.elements[0].unsync(f("background_repeat")),a.element=new f.Element(a.container.find("input")),a.element.set("no-repeat"!==a.setting()),a.element.bind(function(b){a.setting.set(b?"repeat":"no-repeat")}),a.setting.bind(function(b){a.element.set("no-repeat"!==b)})}),f.control("background_attachment",function(a){a.elements[0].unsync(f("background_attachment")),a.element=new f.Element(a.container.find("input")),a.element.set("fixed"!==a.setting()),a.element.bind(function(b){a.setting.set(b?"scroll":"fixed")}),a.setting.bind(function(b){a.element.set("fixed"!==b)})}),f.control("display_header_text",function(a){var b="";a.elements[0].unsync(f("header_textcolor")),a.element=new f.Element(a.container.find("input")),a.element.set("blank"!==a.setting()),a.element.bind(function(c){c||(b=f("header_textcolor").get()),a.setting.set(c?b:"blank")}),a.setting.bind(function(b){a.element.set("blank"!==b)})}),f("show_on_front","page_on_front",function(a,b){var c=function(){"page"===a()&&parseInt(b(),10)>0&&f.previewer.previewUrl.set(f.settings.url.home)};a.bind(c),b.bind(c)}),f("page_for_posts",function(a){a.bind(function(a){a=parseInt(a,10),a>0&&f.previewer.previewUrl.set(f.settings.url.home+"?page_id="+a)})}),f.control("custom_css",function(a){a.deferred.embedded.done(function(){var b=a.container.find("textarea"),c=b[0];b.on("blur",function(){b.data("next-tab-blurs",!1)}),b.on("keydown",function(a){var d,e,f,g,h=9,i=27;return i===a.keyCode?void(b.data("next-tab-blurs")||(b.data("next-tab-blurs",!0),a.stopPropagation())):void(h!==a.keyCode||a.ctrlKey||a.altKey||a.shiftKey||b.data("next-tab-blurs")||(d=c.selectionStart,e=c.selectionEnd,f=c.value,d>=0&&(g=b.scrollTop,c.value=f.substring(0,d).concat("\t",f.substring(e)),b.selectionStart=c.selectionEnd=d+1,c.scrollTop=g),a.stopPropagation(),a.preventDefault()))})})}),f.control("header_video",function(a){a.deferred.embedded.done(function(){var b=function(){var b,c=f.section(a.section());c&&(b=c.container.find(".header-video-not-currently-previewable:first"),a.active.get()?b.stop().slideUp("fast"):b.stop().slideDown("fast"))};b(),a.active.bind(b)})}),f.previewer.bind("selective-refresh-setting-validities",function(a){f._handleSettingValidities({settingValidities:a,focusInvalidControl:!1})}),f.previewer.bind("focus-control-for-setting",function(a){var b;f.control.each(function(c){var d=_.pluck(c.settings,"id");-1!==_.indexOf(d,a)&&(b=c)}),b&&b.focus()}),f.previewer.bind("refresh",function(){f.previewer.refresh()}),f.state("paneVisible").bind(function(a){var c;c=window.matchMedia?window.matchMedia("screen and ( max-width: 640px )").matches:b(window).width()<=640,f.state("editShortcutVisibility").set(a||c?"visible":"hidden")}),window.matchMedia&&window.matchMedia("screen and ( max-width: 640px )").addListener(function(){var a=f.state("paneVisible");a.callbacks.fireWith(a,[a.get(),a.get()])}),f.previewer.bind("edit-shortcut-visibility",function(a){f.state("editShortcutVisibility").set(a)}),f.state("editShortcutVisibility").bind(function(a){f.previewer.send("edit-shortcut-visibility",a)}),function(){var a,c,d,e=!1;c=function(){e||(e=!0,f.requestChangesetUpdate().always(function(){e=!1})),d()},d=function(){clearTimeout(a),a=setTimeout(function(){c()},f.settings.timeouts.changesetAutoSave)},d(),b(window).on("blur.wp-customize-changeset-update",function(){c()}),b(window).on("beforeunload.wp-customize-changeset-update",function(){c()})}(),f.trigger("ready")}})}(wp,jQuery);
\ No newline at end of file
index 25090359512f60be57689e66f9555463d316b67c..b7556f6702ccaae7dd34f5ac0e962054943fc293 100644 (file)
        });
        api.Menus.availableMenuItems = new api.Menus.AvailableItemCollection( api.Menus.data.availableMenuItems );
 
+       /**
+        * Insert a new `auto-draft` post.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param {object} params - Parameters for the draft post to create.
+        * @param {string} params.post_type - Post type to add.
+        * @param {string} params.post_title - Post title to use.
+        * @return {jQuery.promise} Promise resolved with the added post.
+        */
+       api.Menus.insertAutoDraftPost = function insertAutoDraftPost( params ) {
+               var request, deferred = $.Deferred();
+
+               request = wp.ajax.post( 'customize-nav-menus-insert-auto-draft', {
+                       'customize-menus-nonce': api.settings.nonce['customize-menus'],
+                       'wp_customize': 'on',
+                       'params': params
+               } );
+
+               request.done( function( response ) {
+                       if ( response.post_id ) {
+                               api( 'nav_menus_created_posts' ).set(
+                                       api( 'nav_menus_created_posts' ).get().concat( [ response.post_id ] )
+                               );
+
+                               if ( 'page' === params.post_type ) {
+
+                                       // Activate static front page controls as this could be the first page created.
+                                       if ( api.section.has( 'static_front_page' ) ) {
+                                               api.section( 'static_front_page' ).activate();
+                                       }
+
+                                       // Add new page to dropdown-pages controls.
+                                       api.control.each( function( control ) {
+                                               var select;
+                                               if ( 'dropdown-pages' === control.params.type ) {
+                                                       select = control.container.find( 'select[name^="_customize-dropdown-pages-"]' );
+                                                       select.append( new Option( params.post_title, response.post_id ) );
+                                               }
+                                       } );
+                               }
+                               deferred.resolve( response );
+                       }
+               } );
+
+               request.fail( function( response ) {
+                       var error = response || '';
+
+                       if ( 'undefined' !== typeof response.message ) {
+                               error = response.message;
+                       }
+
+                       console.error( error );
+                       deferred.rejectWith( error );
+               } );
+
+               return deferred.promise();
+       };
+
        /**
         * wp.customize.Menus.AvailableMenuItemsPanelView
         *
                        'click .menu-item-tpl': '_submit',
                        'click #custom-menu-item-submit': '_submitLink',
                        'keypress #custom-menu-item-name': '_submitLink',
+                       'click .new-content-item .add-content': '_submitNew',
+                       'keypress .create-item-input': '_submitNew',
                        'keydown': 'keyboardAccessible'
                },
 
                currentMenuControl: null,
                debounceSearch: null,
                $search: null,
+               $clearResults: null,
                searchTerm: '',
                rendered: false,
                pages: {},
                sectionContent: '',
                loading: false,
+               addingNew: false,
 
                initialize: function() {
                        var self = this;
                        }
 
                        this.$search = $( '#menu-items-search' );
-                       this.sectionContent = this.$el.find( '.accordion-section-content' );
+                       this.$clearResults = this.$el.find( '.clear-results' );
+                       this.sectionContent = this.$el.find( '.available-menu-items-list' );
 
                        this.debounceSearch = _.debounce( self.search, 500 );
 
                                }
                        } );
 
-                       // Clear the search results.
-                       $( '.clear-results' ).on( 'click', function() {
+                       // Clear the search results and trigger a `keyup` event to fire a new search.
+                       this.$clearResults.on( 'click', function() {
                                self.$search.val( '' ).focus().trigger( 'keyup' );
                        } );
 
 
                        // Load more items.
                        this.sectionContent.scroll( function() {
-                               var totalHeight = self.$el.find( '.accordion-section.open .accordion-section-content' ).prop( 'scrollHeight' ),
+                               var totalHeight = self.$el.find( '.accordion-section.open .available-menu-items-list' ).prop( 'scrollHeight' ),
                                        visibleHeight = self.$el.find( '.accordion-section.open' ).height();
 
                                if ( ! self.loading && $( this ).scrollTop() > 3 / 4 * totalHeight - visibleHeight ) {
                                                        self.doSearch( self.pages.search );
                                                }
                                        } else {
-                                               self.loadItems( type, object );
+                                               self.loadItems( [
+                                                       { type: type, object: object }
+                                               ] );
                                        }
                                }
                        });
                                $otherSections.fadeOut( 100 );
                                $searchSection.find( '.accordion-section-content' ).slideDown( 'fast' );
                                $searchSection.addClass( 'open' );
-                               $searchSection.find( '.clear-results' ).addClass( 'is-visible' );
+                               this.$clearResults.addClass( 'is-visible' );
                        } else if ( '' === event.target.value ) {
                                $searchSection.removeClass( 'open' );
                                $otherSections.show();
-                               $searchSection.find( '.clear-results' ).removeClass( 'is-visible' );
+                               this.$clearResults.removeClass( 'is-visible' );
                        }
 
                        this.searchTerm = event.target.value;
 
                        $section.addClass( 'loading' );
                        self.loading = true;
-                       params = {
+
+                       params = api.previewer.query( { excludeCustomizedSaved: true } );
+                       _.extend( params, {
                                'customize-menus-nonce': api.settings.nonce['customize-menus'],
                                'wp_customize': 'on',
                                'search': self.searchTerm,
                                'page': page
-                       };
+                       } );
 
                        self.currentRequest = wp.ajax.post( 'search-available-menu-items-customizer', params );
 
                        self.currentRequest.fail(function( data ) {
                                // data.message may be undefined, for example when typing slow and the request is aborted.
                                if ( data.message ) {
-                                       $content.empty().append( $( '<p class="nothing-found"></p>' ).text( data.message ) );
+                                       $content.empty().append( $( '<li class="nothing-found"></li>' ).text( data.message ) );
                                        wp.a11y.speak( data.message );
                                }
                                self.pages.search = -1;
                        // Render the template for each item by type.
                        _.each( api.Menus.data.itemTypes, function( itemType ) {
                                self.pages[ itemType.type + ':' + itemType.object ] = 0;
-                               self.loadItems( itemType.type, itemType.object ); // @todo we need to combine these Ajax requests.
                        } );
+                       self.loadItems( api.Menus.data.itemTypes );
                },
 
-               // Load available menu items.
-               loadItems: function( type, object ) {
-                       var self = this, params, request, itemTemplate, availableMenuItemContainer;
+               /**
+                * Load available nav menu items.
+                *
+                * @since 4.3.0
+                * @since 4.7.0 Changed function signature to take list of item types instead of single type/object.
+                * @access private
+                *
+                * @param {Array.<object>} itemTypes List of objects containing type and key.
+                * @param {string} deprecated Formerly the object parameter.
+                * @returns {void}
+                */
+               loadItems: function( itemTypes, deprecated ) {
+                       var self = this, _itemTypes, requestItemTypes = [], params, request, itemTemplate, availableMenuItemContainers = {};
                        itemTemplate = wp.template( 'available-menu-item' );
 
-                       if ( -1 === self.pages[ type + ':' + object ] ) {
+                       if ( _.isString( itemTypes ) && _.isString( deprecated ) ) {
+                               _itemTypes = [ { type: itemTypes, object: deprecated } ];
+                       } else {
+                               _itemTypes = itemTypes;
+                       }
+
+                       _.each( _itemTypes, function( itemType ) {
+                               var container, name = itemType.type + ':' + itemType.object;
+                               if ( -1 === self.pages[ name ] ) {
+                                       return; // Skip types for which there are no more results.
+                               }
+                               container = $( '#available-menu-items-' + itemType.type + '-' + itemType.object );
+                               container.find( '.accordion-section-title' ).addClass( 'loading' );
+                               availableMenuItemContainers[ name ] = container;
+
+                               requestItemTypes.push( {
+                                       object: itemType.object,
+                                       type: itemType.type,
+                                       page: self.pages[ name ]
+                               } );
+                       } );
+
+                       if ( 0 === requestItemTypes.length ) {
                                return;
                        }
-                       availableMenuItemContainer = $( '#available-menu-items-' + type + '-' + object );
-                       availableMenuItemContainer.find( '.accordion-section-title' ).addClass( 'loading' );
+
                        self.loading = true;
-                       params = {
+
+                       params = api.previewer.query( { excludeCustomizedSaved: true } );
+                       _.extend( params, {
                                'customize-menus-nonce': api.settings.nonce['customize-menus'],
                                'wp_customize': 'on',
-                               'type': type,
-                               'object': object,
-                               'page': self.pages[ type + ':' + object ]
-                       };
+                               'item_types': requestItemTypes
+                       } );
+
                        request = wp.ajax.post( 'load-available-menu-items-customizer', params );
 
                        request.done(function( data ) {
-                               var items, typeInner;
-                               items = data.items;
-                               if ( 0 === items.length ) {
-                                       if ( 0 === self.pages[ type + ':' + object ] ) {
-                                               availableMenuItemContainer
-                                                       .addClass( 'cannot-expand' )
-                                                       .removeClass( 'loading' )
-                                                       .find( '.accordion-section-title > button' )
-                                                       .prop( 'tabIndex', -1 );
+                               var typeInner;
+                               _.each( data.items, function( typeItems, name ) {
+                                       if ( 0 === typeItems.length ) {
+                                               if ( 0 === self.pages[ name ] ) {
+                                                       availableMenuItemContainers[ name ].find( '.accordion-section-title' )
+                                                               .addClass( 'cannot-expand' )
+                                                               .removeClass( 'loading' )
+                                                               .find( '.accordion-section-title > button' )
+                                                               .prop( 'tabIndex', -1 );
+                                               }
+                                               self.pages[ name ] = -1;
+                                               return;
+                                       } else if ( ( 'post_type:page' === name ) && ( ! availableMenuItemContainers[ name ].hasClass( 'open' ) ) ) {
+                                               availableMenuItemContainers[ name ].find( '.accordion-section-title > button' ).click();
                                        }
-                                       self.pages[ type + ':' + object ] = -1;
-                                       return;
-                               }
-                               items = new api.Menus.AvailableItemCollection( items ); // @todo Why is this collection created and then thrown away?
-                               self.collection.add( items.models );
-                               typeInner = availableMenuItemContainer.find( '.accordion-section-content' );
-                               items.each(function( menuItem ) {
-                                       typeInner.append( itemTemplate( menuItem.attributes ) );
+                                       typeItems = new api.Menus.AvailableItemCollection( typeItems ); // @todo Why is this collection created and then thrown away?
+                                       self.collection.add( typeItems.models );
+                                       typeInner = availableMenuItemContainers[ name ].find( '.available-menu-items-list' );
+                                       typeItems.each( function( menuItem ) {
+                                               typeInner.append( itemTemplate( menuItem.attributes ) );
+                                       } );
+                                       self.pages[ name ] += 1;
                                });
-                               self.pages[ type + ':' + object ] += 1;
                        });
                        request.fail(function( data ) {
                                if ( typeof console !== 'undefined' && console.error ) {
                                }
                        });
                        request.always(function() {
-                               availableMenuItemContainer.find( '.accordion-section-title' ).removeClass( 'loading' );
+                               _.each( availableMenuItemContainers, function( container ) {
+                                       container.find( '.accordion-section-title' ).removeClass( 'loading' );
+                               } );
                                self.loading = false;
                        });
                },
 
                // Adjust the height of each section of items to fit the screen.
                itemSectionHeight: function() {
-                       var sections, totalHeight, accordionHeight, diff;
+                       var sections, lists, totalHeight, accordionHeight, diff;
                        totalHeight = window.innerHeight;
                        sections = this.$el.find( '.accordion-section:not( #available-menu-items-search ) .accordion-section-content' );
-                       accordionHeight =  46 * ( 2 + sections.length ) - 13; // Magic numbers.
+                       lists = this.$el.find( '.accordion-section:not( #available-menu-items-search ) .available-menu-items-list:not(":only-child")' );
+                       accordionHeight =  46 * ( 1 + sections.length ) + 14; // Magic numbers.
                        diff = totalHeight - accordionHeight;
                        if ( 120 < diff && 290 > diff ) {
                                sections.css( 'max-height', diff );
+                               lists.css( 'max-height', ( diff - 60 ) );
                        }
                },
 
                                'url': itemUrl.val(),
                                'type': 'custom',
                                'type_label': api.Menus.data.l10n.custom_label,
-                               'object': ''
+                               'object': 'custom'
                        };
 
                        this.currentMenuControl.addItemToMenu( menuItem );
                        itemName.val( '' );
                },
 
+               /**
+                * Submit handler for keypress (enter) on field and click on button.
+                *
+                * @since 4.7.0
+                * @private
+                *
+                * @param {jQuery.Event} event Event.
+                * @returns {void}
+                */
+               _submitNew: function( event ) {
+                       var container;
+
+                       // Only proceed with keypress if it is Enter.
+                       if ( 'keypress' === event.type && 13 !== event.which ) {
+                               return;
+                       }
+
+                       if ( this.addingNew ) {
+                               return;
+                       }
+
+                       container = $( event.target ).closest( '.accordion-section' );
+
+                       this.submitNew( container );
+               },
+
+               /**
+                * Creates a new object and adds an associated menu item to the menu.
+                *
+                * @since 4.7.0
+                * @private
+                *
+                * @param {jQuery} container
+                * @returns {void}
+                */
+               submitNew: function( container ) {
+                       var panel = this,
+                               itemName = container.find( '.create-item-input' ),
+                               title = itemName.val(),
+                               dataContainer = container.find( '.available-menu-items-list' ),
+                               itemType = dataContainer.data( 'type' ),
+                               itemObject = dataContainer.data( 'object' ),
+                               itemTypeLabel = dataContainer.data( 'type_label' ),
+                               promise;
+
+                       if ( ! this.currentMenuControl ) {
+                               return;
+                       }
+
+                       // Only posts are supported currently.
+                       if ( 'post_type' !== itemType ) {
+                               return;
+                       }
+
+                       if ( '' === $.trim( itemName.val() ) ) {
+                               itemName.addClass( 'invalid' );
+                               itemName.focus();
+                               return;
+                       } else {
+                               itemName.removeClass( 'invalid' );
+                               container.find( '.accordion-section-title' ).addClass( 'loading' );
+                       }
+
+                       panel.addingNew = true;
+                       itemName.attr( 'disabled', 'disabled' );
+                       promise = api.Menus.insertAutoDraftPost( {
+                               post_title: title,
+                               post_type: itemObject
+                       } );
+                       promise.done( function( data ) {
+                               var availableItem, $content, itemElement;
+                               availableItem = new api.Menus.AvailableItemModel( {
+                                       'id': 'post-' + data.post_id, // Used for available menu item Backbone models.
+                                       'title': itemName.val(),
+                                       'type': itemType,
+                                       'type_label': itemTypeLabel,
+                                       'object': itemObject,
+                                       'object_id': data.post_id,
+                                       'url': data.url
+                               } );
+
+                               // Add new item to menu.
+                               panel.currentMenuControl.addItemToMenu( availableItem.attributes );
+
+                               // Add the new item to the list of available items.
+                               api.Menus.availableMenuItemsPanel.collection.add( availableItem );
+                               $content = container.find( '.available-menu-items-list' );
+                               itemElement = $( wp.template( 'available-menu-item' )( availableItem.attributes ) );
+                               itemElement.find( '.menu-item-handle:first' ).addClass( 'item-added' );
+                               $content.prepend( itemElement );
+                               $content.scrollTop();
+
+                               // Reset the create content form.
+                               itemName.val( '' ).removeAttr( 'disabled' );
+                               panel.addingNew = false;
+                               container.find( '.accordion-section-title' ).removeClass( 'loading' );
+                       } );
+               },
+
                // Opens the panel.
                open: function( menuControl ) {
                        this.currentMenuControl = menuControl;
                },
 
                /**
-                * Show/hide/save screen options (columns). From common.js.
+                * Update field visibility when clicking on the field toggles.
                 */
                ready: function() {
                        var panel = this;
-                       this.container.find( '.hide-column-tog' ).click( function() {
-                               var $t = $( this ), column = $t.val();
-                               if ( $t.prop( 'checked' ) ) {
-                                       panel.checked( column );
-                               } else {
-                                       panel.unchecked( column );
-                               }
-
+                       panel.container.find( '.hide-column-tog' ).click( function() {
                                panel.saveManageColumnsState();
                        });
-                       this.container.find( '.hide-column-tog' ).each( function() {
-                       var $t = $( this ), column = $t.val();
-                               if ( $t.prop( 'checked' ) ) {
-                                       panel.checked( column );
-                               } else {
-                                       panel.unchecked( column );
-                               }
-                       });
                },
 
+               /**
+                * Save hidden column states.
+                *
+                * @since 4.3.0
+                * @private
+                *
+                * @returns {void}
+                */
                saveManageColumnsState: _.debounce( function() {
                        var panel = this;
                        if ( panel._updateHiddenColumnsRequest ) {
                        } );
                }, 2000 ),
 
-               checked: function( column ) {
-                       this.container.addClass( 'field-' + column + '-active' );
-               },
+               /**
+                * @deprecated Since 4.7.0 now that the nav_menu sections are responsible for toggling the classes on their own containers.
+                */
+               checked: function() {},
 
-               unchecked: function( column ) {
-                       this.container.removeClass( 'field-' + column + '-active' );
-               },
+               /**
+                * @deprecated Since 4.7.0 now that the nav_menu sections are responsible for toggling the classes on their own containers.
+                */
+               unchecked: function() {},
 
+               /**
+                * Get hidden fields.
+                *
+                * @since 4.3.0
+                * @private
+                *
+                * @returns {Array} Fields (columns) that are hidden.
+                */
                hidden: function() {
                        return $( '.hide-column-tog' ).not( ':checked' ).map( function() {
                                var id = this.id;
        api.Menus.MenuSection = api.Section.extend({
 
                /**
-                * @since Menu Customizer 0.3
+                * Initialize.
+                *
+                * @since 4.3.0
                 *
                 * @param {String} id
                 * @param {Object} options
                },
 
                /**
-                *
+                * Ready.
                 */
                ready: function() {
-                       var section = this;
+                       var section = this, fieldActiveToggles, handleFieldActiveToggle;
 
                        if ( 'undefined' === typeof section.params.menu_id ) {
                                throw new Error( 'params.menu_id was not defined' );
 
                        api.bind( 'pane-contents-reflowed', function() {
                                // Skip menus that have been removed.
-                               if ( ! section.container.parent().length ) {
+                               if ( ! section.contentContainer.parent().length ) {
                                        return;
                                }
                                section.container.find( '.menu-item .menu-item-reorder-nav button' ).attr({ 'tabindex': '0', 'aria-hidden': 'false' });
                                section.container.find( '.menu-item.move-left-disabled .menus-move-left' ).attr({ 'tabindex': '-1', 'aria-hidden': 'true' });
                                section.container.find( '.menu-item.move-right-disabled .menus-move-right' ).attr({ 'tabindex': '-1', 'aria-hidden': 'true' });
                        } );
+
+                       /**
+                        * Update the active field class for the content container for a given checkbox toggle.
+                        *
+                        * @this {jQuery}
+                        * @returns {void}
+                        */
+                       handleFieldActiveToggle = function() {
+                               var className = 'field-' + $( this ).val() + '-active';
+                               section.contentContainer.toggleClass( className, $( this ).prop( 'checked' ) );
+                       };
+                       fieldActiveToggles = api.panel( 'nav_menus' ).contentContainer.find( '.metabox-prefs:first' ).find( '.hide-column-tog' );
+                       fieldActiveToggles.each( handleFieldActiveToggle );
+                       fieldActiveToggles.on( 'click', handleFieldActiveToggle );
                },
 
                populateControls: function() {
                },
 
                /**
-                * @param {array} themeLocations
+                * @param {Array} themeLocationSlugs Theme location slugs.
                 */
                updateAssignedLocationsInSectionTitle: function( themeLocationSlugs ) {
                        var section = this,
                },
 
                onChangeExpanded: function( expanded, args ) {
-                       var section = this;
+                       var section = this, completeCallback;
 
                        if ( expanded ) {
-                               wpNavMenu.menuList = section.container.find( '.accordion-section-content:first' );
+                               wpNavMenu.menuList = section.contentContainer;
                                wpNavMenu.targetList = wpNavMenu.menuList;
 
                                // Add attributes needed by wpNavMenu
                                        }
                                } );
 
-                               if ( 'resolved' !== section.deferred.initSortables.state() ) {
-                                       wpNavMenu.initSortables(); // Depends on menu-to-edit ID being set above.
-                                       section.deferred.initSortables.resolve( wpNavMenu.menuList ); // Now MenuControl can extend the sortable.
-
-                                       // @todo Note that wp.customize.reflowPaneContents() is debounced, so this immediate change will show a slight flicker while priorities get updated.
-                                       api.control( 'nav_menu[' + String( section.params.menu_id ) + ']' ).reflowMenuItems();
+                               // Make sure Sortables is initialized after the section has been expanded to prevent `offset` issues.
+                               if ( args.completeCallback ) {
+                                       completeCallback = args.completeCallback;
                                }
+                               args.completeCallback = function() {
+                                       if ( 'resolved' !== section.deferred.initSortables.state() ) {
+                                               wpNavMenu.initSortables(); // Depends on menu-to-edit ID being set above.
+                                               section.deferred.initSortables.resolve( wpNavMenu.menuList ); // Now MenuControl can extend the sortable.
+
+                                               // @todo Note that wp.customize.reflowPaneContents() is debounced, so this immediate change will show a slight flicker while priorities get updated.
+                                               api.control( 'nav_menu[' + String( section.params.menu_id ) + ']' ).reflowMenuItems();
+                                       }
+                                       if ( _.isFunction( completeCallback ) ) {
+                                               completeCallback();
+                                       }
+                               };
                        }
                        api.Section.prototype.onChangeExpanded.call( section, expanded, args );
                }
                /**
                 * Add behaviors for the accordion section.
                 *
-                * @since Menu Customizer 0.3
+                * @since 4.3.0
                 */
                attachEvents: function() {
                        var section = this;
                onChangeExpanded: function( expanded ) {
                        var section = this,
                                button = section.container.find( '.add-menu-toggle' ),
-                               content = section.container.find( '.new-menu-section-content' ),
-                               customizer = section.container.closest( '.wp-full-overlay-sidebar-content' );
+                               content = section.contentContainer,
+                               customizer = section.headContainer.closest( '.wp-full-overlay-sidebar-content' );
                        if ( expanded ) {
                                button.addClass( 'open' );
                                button.attr( 'aria-expanded', 'true' );
                                content.slideUp( 'fast' );
                                content.find( '.menu-name-field' ).removeClass( 'invalid' );
                        }
+               },
+
+               /**
+                * Find the content element.
+                *
+                * @since 4.7.0
+                *
+                * @returns {jQuery} Content UL element.
+                */
+               getContent: function() {
+                       return this.container.find( 'ul:first' );
                }
        });
 
                },
 
                /**
-                * @since Menu Customizer 0.3
-                *
                 * Override the embed() method to do nothing,
                 * so that the control isn't embedded on load,
                 * unless the containing section is already expanded.
+                *
+                * @since 4.3.0
                 */
                embed: function() {
                        var control = this,
                 * This function is called in Section.onChangeExpanded() so the control
                 * will only get embedded when the Section is first expanded.
                 *
-                * @since Menu Customizer 0.3
+                * @since 4.3.0
                 */
                actuallyEmbed: function() {
                        var control = this;
                                }
 
                                var titleEl = control.container.find( '.menu-item-title' ),
-                                   titleText = item.title || api.Menus.data.l10n.untitled;
+                                   titleText = item.title || item.original_title || api.Menus.data.l10n.untitled;
 
                                if ( item._invalid ) {
                                        titleText = api.Menus.data.l10n.invalidTitleTpl.replace( '%s', titleText );
                                }
 
                                // Don't update to an empty title.
-                               if ( item.title ) {
+                               if ( item.title || item.original_title ) {
                                        titleEl
                                                .text( titleText )
                                                .removeClass( 'no-title' );
                 */
                expandControlSection: function() {
                        var $section = this.container.closest( '.accordion-section' );
-
                        if ( ! $section.hasClass( 'open' ) ) {
                                $section.find( '.accordion-section-title:first' ).trigger( 'click' );
                        }
                 */
                focus: function( params ) {
                        params = params || {};
-                       var control = this, originalCompleteCallback = params.completeCallback;
+                       var control = this, originalCompleteCallback = params.completeCallback, focusControl;
 
-                       control.expandControlSection();
+                       focusControl = function() {
+                               control.expandControlSection();
 
-                       params.completeCallback = function() {
-                               var focusable;
+                               params.completeCallback = function() {
+                                       var focusable;
 
-                               // Note that we can't use :focusable due to a jQuery UI issue. See: https://github.com/jquery/jquery-ui/pull/1583
-                               focusable = control.container.find( '.menu-item-settings' ).find( 'input, select, textarea, button, object, a[href], [tabindex]' ).filter( ':visible' );
-                               focusable.first().focus();
+                                       // Note that we can't use :focusable due to a jQuery UI issue. See: https://github.com/jquery/jquery-ui/pull/1583
+                                       focusable = control.container.find( '.menu-item-settings' ).find( 'input, select, textarea, button, object, a[href], [tabindex]' ).filter( ':visible' );
+                                       focusable.first().focus();
 
-                               if ( originalCompleteCallback ) {
-                                       originalCompleteCallback();
-                               }
+                                       if ( originalCompleteCallback ) {
+                                               originalCompleteCallback();
+                                       }
+                               };
+
+                               control.expandForm( params );
                        };
 
-                       control.expandForm( params );
+                       if ( api.section.has( control.section() ) ) {
+                               api.section( control.section() ).expand( {
+                                       completeCallback: focusControl
+                               } );
+                       } else {
+                               focusControl();
+                       }
                },
 
                /**
                 */
                ready: function() {
                        var control = this,
+                               section = api.section( control.section() ),
                                menuId = control.params.menu_id,
                                menu = control.setting(),
                                name,
                         * being deactivated.
                         */
                        control.active.validate = function() {
-                               var value, section = api.section( control.section() );
+                               var value;
                                if ( section ) {
                                        value = section.active();
                                } else {
                                return value;
                        };
 
-                       control.$controlSection = control.container.closest( '.control-section' );
+                       control.$controlSection = section.headContainer;
                        control.$sectionContent = control.container.closest( '.accordion-section-content' );
 
                        this._setupModel();
                                        return;
                                }
 
-                               var section = control.container.closest( '.accordion-section' ),
+                               var section = api.section( control.section() ),
                                        menuId = control.params.menu_id,
-                                       controlTitle = section.find( '.accordion-section-title' ),
-                                       sectionTitle = section.find( '.customize-section-title h3' ),
-                                       location = section.find( '.menu-in-location' ),
+                                       controlTitle = section.headContainer.find( '.accordion-section-title' ),
+                                       sectionTitle = section.contentContainer.find( '.customize-section-title h3' ),
+                                       location = section.headContainer.find( '.menu-in-location' ),
                                        action = sectionTitle.find( '.customize-action' ),
                                        name = displayNavMenuName( menu.name );
 
                                } );
 
                                // Update the nav menu name in all location checkboxes.
-                               section.find( '.customize-control-checkbox input' ).each( function() {
+                               section.contentContainer.find( '.customize-control-checkbox input' ).each( function() {
                                        if ( $( this ).prop( 'checked' ) ) {
                                                $( '.current-menu-location-name-' + $( this ).data( 'location-id' ) ).text( name );
                                        }
 
                        // Focus on the new menu section.
                        api.section( customizeId ).focus(); // @todo should we focus on the new menu's control and open the add-items panel? Thinking user flow...
-
-                       // Fix an issue with extra space at top immediately after creating new menu.
-                       $( '#menu-to-edit' ).css( 'margin-top', 0 );
                }
        });
 
                        }
                } );
 
+               /*
+                * Reset the list of posts created in the customizer once published.
+                * The setting is updated quietly (bypassing events being triggered)
+                * so that the customized state doesn't become immediately dirty.
+                */
+               api.state( 'changesetStatus' ).bind( function( status ) {
+                       if ( 'publish' === status ) {
+                               api( 'nav_menus_created_posts' )._value = [];
+                       }
+               } );
+
                // Open and focus menu control.
                api.previewer.bind( 'focus-nav-menu-item-control', api.Menus.focusMenuItemControl );
        } );
         */
        api.Menus.focusMenuItemControl = function( menuItemId ) {
                var control = api.Menus.getMenuItemControl( menuItemId );
-
                if ( control ) {
                        control.focus();
                }
index 37cd600af827c358d8baf48d0e47586e729f40c6..db9d31abfc0efe37338f83f986556fceb7311dd8 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",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
+!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.insertAutoDraftPost=function(d){var e,f=c.Deferred();return e=b.ajax.post("customize-nav-menus-insert-auto-draft",{"customize-menus-nonce":a.settings.nonce["customize-menus"],wp_customize:"on",params:d}),e.done(function(b){b.post_id&&(a("nav_menus_created_posts").set(a("nav_menus_created_posts").get().concat([b.post_id])),"page"===d.post_type&&(a.section.has("static_front_page")&&a.section("static_front_page").activate(),a.control.each(function(a){var c;"dropdown-pages"===a.params.type&&(c=a.container.find('select[name^="_customize-dropdown-pages-"]'),c.append(new Option(d.post_title,b.post_id)))})),f.resolve(b))}),e.fail(function(a){var b=a||"";"undefined"!=typeof a.message&&(b=a.message),console.error(b),f.rejectWith(b)}),f.promise()},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","click .new-content-item .add-content":"_submitNew","keypress .create-item-input":"_submitNew",keydown:"keyboardAccessible"},selected:null,currentMenuControl:null,debounceSearch:null,$search:null,$clearResults:null,searchTerm:"",rendered:!1,pages:{},sectionContent:"",loading:!1,addingNew:!1,initialize:function(){var b=this;a.panel.has("nav_menus")&&(this.$search=c("#menu-items-search"),this.$clearResults=this.$el.find(".clear-results"),this.sectionContent=this.$el.find(".available-menu-items-list"),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()}),this.$clearResults.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 .available-menu-items-list").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([{type:e,object: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(),this.$clearResults.removeClass("is-visible")):(d.fadeOut(100),b.find(".accordion-section-content").slideDown("fast"),b.addClass("open"),this.$clearResults.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=a.previewer.query({excludeCustomizedSaved:!0}),_.extend(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('<li class="nothing-found"></li>').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.Menus.data.itemTypes)},loadItems:function(d,e){var f,g,h,i,j=this,k=[],l={};i=b.template("available-menu-item"),f=_.isString(d)&&_.isString(e)?[{type:d,object:e}]:d,_.each(f,function(a){var b,d=a.type+":"+a.object;-1!==j.pages[d]&&(b=c("#available-menu-items-"+a.type+"-"+a.object),b.find(".accordion-section-title").addClass("loading"),l[d]=b,k.push({object:a.object,type:a.type,page:j.pages[d]}))}),0!==k.length&&(j.loading=!0,g=a.previewer.query({excludeCustomizedSaved:!0}),_.extend(g,{"customize-menus-nonce":a.settings.nonce["customize-menus"],wp_customize:"on",item_types:k}),h=b.ajax.post("load-available-menu-items-customizer",g),h.done(function(b){var c;_.each(b.items,function(b,d){return 0===b.length?(0===j.pages[d]&&l[d].find(".accordion-section-title").addClass("cannot-expand").removeClass("loading").find(".accordion-section-title > button").prop("tabIndex",-1),void(j.pages[d]=-1)):("post_type:page"!==d||l[d].hasClass("open")||l[d].find(".accordion-section-title > button").click(),b=new a.Menus.AvailableItemCollection(b),j.collection.add(b.models),c=l[d].find(".available-menu-items-list"),b.each(function(a){c.append(i(a.attributes))}),void(j.pages[d]+=1))})}),h.fail(function(a){"undefined"!=typeof console&&console.error&&console.error(a)}),h.always(function(){_.each(l,function(a){a.find(".accordion-section-title").removeClass("loading")}),j.loading=!1}))},itemSectionHeight:function(){var a,b,c,d,e;c=window.innerHeight,a=this.$el.find(".accordion-section:not( #available-menu-items-search ) .accordion-section-content"),b=this.$el.find('.accordion-section:not( #available-menu-items-search ) .available-menu-items-list:not(":only-child")'),d=46*(1+a.length)+14,e=c-d,120<e&&290>e&&(a.css("max-height",e),b.css("max-height",e-60))},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:"custom"},this.currentMenuControl.addItemToMenu(b),e.val("http://"),d.val("")}},_submitNew:function(a){var b;"keypress"===a.type&&13!==a.which||this.addingNew||(b=c(a.target).closest(".accordion-section"),this.submitNew(b))},submitNew:function(d){var e,f=this,g=d.find(".create-item-input"),h=g.val(),i=d.find(".available-menu-items-list"),j=i.data("type"),k=i.data("object"),l=i.data("type_label");if(this.currentMenuControl&&"post_type"===j){if(""===c.trim(g.val()))return g.addClass("invalid"),void g.focus();g.removeClass("invalid"),d.find(".accordion-section-title").addClass("loading"),f.addingNew=!0,g.attr("disabled","disabled"),e=a.Menus.insertAutoDraftPost({post_title:h,post_type:k}),e.done(function(e){var h,i,m;h=new a.Menus.AvailableItemModel({id:"post-"+e.post_id,title:g.val(),type:j,type_label:l,object:k,object_id:e.post_id,url:e.url}),f.currentMenuControl.addItemToMenu(h.attributes),a.Menus.availableMenuItemsPanel.collection.add(h),i=d.find(".available-menu-items-list"),m=c(b.template("available-menu-item")(h.attributes)),m.find(".menu-item-handle:first").addClass("item-added"),i.prepend(m),i.scrollTop(),g.val("").removeAttr("disabled"),f.addingNew=!1,d.find(".accordion-section-title").removeClass("loading")})}},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;a.container.find(".hide-column-tog").click(function(){a.saveManageColumnsState()})},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(){},unchecked:function(){},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,d,e=this;if("undefined"==typeof e.params.menu_id)throw new Error("params.menu_id was not defined");e.active.validate=function(){return!!a.has(e.id)&&!!a(e.id).get()},e.populateControls(),e.navMenuLocationSettings={},e.assignedLocations=new a.Value([]),a.each(function(a,b){var c=b.match(/^nav_menu_locations\[(.+?)]/);c&&(e.navMenuLocationSettings[c[1]]=a,a.bind(function(){e.refreshAssignedLocations()}))}),e.assignedLocations.bind(function(a){e.updateAssignedLocationsInSectionTitle(a)}),e.refreshAssignedLocations(),a.bind("pane-contents-reflowed",function(){e.contentContainer.parent().length&&(e.container.find(".menu-item .menu-item-reorder-nav button").attr({tabindex:"0","aria-hidden":"false"}),e.container.find(".menu-item.move-up-disabled .menus-move-up").attr({tabindex:"-1","aria-hidden":"true"}),e.container.find(".menu-item.move-down-disabled .menus-move-down").attr({tabindex:"-1","aria-hidden":"true"}),e.container.find(".menu-item.move-left-disabled .menus-move-left").attr({tabindex:"-1","aria-hidden":"true"}),e.container.find(".menu-item.move-right-disabled .menus-move-right").attr({tabindex:"-1","aria-hidden":"true"}))}),d=function(){var a="field-"+c(this).val()+"-active";e.contentContainer.toggleClass(a,c(this).prop("checked"))},b=a.panel("nav_menus").contentContainer.find(".metabox-prefs:first").find(".hide-column-tog"),b.each(d),b.on("click",d)},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,f=this;b&&(wpNavMenu.menuList=f.contentContainer,wpNavMenu.targetList=wpNavMenu.menuList,c("#menu-to-edit").removeAttr("id"),wpNavMenu.menuList.attr("id","menu-to-edit").addClass("menu"),_.each(a.section(f.id).controls(),function(a){"nav_menu_item"===a.params.type&&a.actuallyEmbed()}),d.completeCallback&&(e=d.completeCallback),d.completeCallback=function(){"resolved"!==f.deferred.initSortables.state()&&(wpNavMenu.initSortables(),f.deferred.initSortables.resolve(wpNavMenu.menuList),a.control("nav_menu["+String(f.params.menu_id)+"]").reflowMenuItems()),_.isFunction(e)&&e()}),a.Section.prototype.onChangeExpanded.call(f,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.contentContainer,e=b.headContainer.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"))},getContent:function(){return this.container.find("ul:first")}}),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||c.original_title||a.Menus.data.l10n.untitled;c._invalid&&(e=a.Menus.data.l10n.invalidTitleTpl.replace("%s",e)),c.title||c.original_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(b){b=b||{};var c,d=this,e=b.completeCallback;c=function(){d.expandControlSection(),b.completeCallback=function(){var a;a=d.container.find(".menu-item-settings").find("input, select, textarea, button, object, a[href], [tabindex]").filter(":visible"),a.first().focus(),e&&e()},d.expandForm(b)},a.section.has(d.section())?a.section(d.section()).expand({completeCallback:c}):c()},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=a.section(g.section()),i=g.params.menu_id,j=g.setting();if("undefined"==typeof this.params.menu_id)throw new Error("params.menu_id was not defined");g.active.validate=function(){var a;return a=!!h&&h.active()},g.$controlSection=h.headContainer,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(),j&&(b=e(j.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(i)+"]").length&&f.append(new Option(b,i)))}),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(i)+"]").length&&f.append(new Option(b,i)))},_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=a.section(b.section()),g=b.params.menu_id,h=f.headContainer.find(".accordion-section-title"),i=f.contentContainer.find(".customize-section-title h3"),j=f.headContainer.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.contentContainer.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),void a.section(f).focus()):(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.state("changesetStatus").bind(function(b){"publish"===b&&(a("nav_menus_created_posts")._value=[])}),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 759802324478465a3d0654e9b0508e8a8234017c..25c1eb5b7a6274af7ad7c251c1c933530eeb7ba2 100644 (file)
@@ -70,8 +70,7 @@
                                this.search( this.terms );
                        }
 
-                       // If search is blank, show all themes
-                       // Useful for resetting the views when you clean the input
+                       // If search is blank, set all the widgets as they matched the search to reset the views.
                        if ( this.terms === '' ) {
                                this.each( function ( widget ) {
                                        widget.set( 'search_matched', true );
                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',
                // Cache sidebar control which has opened panel
                currentSidebarControl: null,
                $search: null,
+               $clearResults: null,
+               searchMatchesCount: null,
 
                initialize: function() {
                        var self = this;
 
                        this.$search = $( '#widgets-search' );
 
+                       this.$clearResults = this.$el.find( '.clear-results' );
+
                        _.bindAll( this, 'close' );
 
                        this.listenTo( this.collection, 'change', this.updateList );
 
                        this.updateList();
 
+                       // Set the initial search count to the number of available widgets.
+                       this.searchMatchesCount = this.collection.length;
+
                        // If the available widgets panel is open and the customize controls are
                        // interacted with (i.e. available widgets panel is blurred) then close the
                        // available widgets panel. Also close on back button click.
                                }
                        } );
 
+                       // Clear the search results and trigger a `keyup` event to fire a new search.
+                       this.$clearResults.on( 'click', function() {
+                               self.$search.val( '' ).focus().trigger( 'keyup' );
+                       } );
+
                        // Close the panel if the URL in the preview changes
                        api.previewer.bind( 'url', this.close );
                },
                        var firstVisible;
 
                        this.collection.doSearch( event.target.value );
+                       // Update the search matches count.
+                       this.updateSearchMatchesCount();
+                       // Announce how many search results.
+                       this.announceSearchMatches();
 
                        // Remove a widget from being selected if it is no longer visible
                        if ( this.selected && ! this.selected.is( ':visible' ) ) {
                                        this.select( firstVisible );
                                }
                        }
+
+                       // Toggle the clear search results button.
+                       if ( '' !== event.target.value ) {
+                               this.$clearResults.addClass( 'is-visible' );
+                       } else if ( '' === event.target.value ) {
+                               this.$clearResults.removeClass( 'is-visible' );
+                       }
+
+                       // Set a CSS class on the search container when there are no search results.
+                       if ( ! this.searchMatchesCount ) {
+                               this.$el.addClass( 'no-widgets-found' );
+                       } else {
+                               this.$el.removeClass( 'no-widgets-found' );
+                       }
                },
 
+               // Update the count of the available widgets that have the `search_matched` attribute.
+               updateSearchMatchesCount: function() {
+                       this.searchMatchesCount = this.collection.where({ search_matched: true }).length;
+               },
+
+               // Send a message to the aria-live region to announce how many search results.
+               announceSearchMatches: _.debounce( function() {
+                       var message = l10n.widgetsFound.replace( '%d', this.searchMatchesCount ) ;
+
+                       if ( ! this.searchMatchesCount ) {
+                               message = l10n.noWidgetsFound;
+                       }
+
+                       wp.a11y.speak( message );
+               }, 500 ),
+
                // Changes visibility of available widgets
                updateList: function() {
                        this.collection.each( function( widget ) {
                        $saveBtn = this.container.find( '.widget-control-save' );
                        $saveBtn.val( l10n.saveBtnLabel );
                        $saveBtn.attr( 'title', l10n.saveBtnTooltip );
-                       $saveBtn.removeClass( 'button-primary' ).addClass( 'button-secondary' );
+                       $saveBtn.removeClass( 'button-primary' );
                        $saveBtn.on( 'click', function( e ) {
                                e.preventDefault();
                                self.updateWidget( { disable_form: true } ); // @todo disable_form is unused?
                        params.action = 'update-widget';
                        params.wp_customize = 'on';
                        params.nonce = api.settings.nonce['update-widget'];
-                       params.theme = api.settings.theme.stylesheet;
+                       params.customize_theme = api.settings.theme.stylesheet;
                        params.customized = wp.customize.previewer.query().customized;
 
                        data = $.param( params );
                 * @param {Object} args  merged on top of this.defaultActiveArguments
                 */
                onChangeExpanded: function ( expanded, args ) {
-                       var self = this, $widget, $inside, complete, prevComplete;
+                       var self = this, $widget, $inside, complete, prevComplete, expandControl;
 
                        self.embedWidgetControl(); // Make sure the outer form is embedded so that the expanded state can be set in the UI.
                        if ( expanded ) {
                        $widget = this.container.find( 'div.widget:first' );
                        $inside = $widget.find( '.widget-inside:first' );
 
-                       if ( expanded ) {
-
-                               if ( self.section() && api.section( self.section() ) ) {
-                                       self.expandControlSection();
-                               }
+                       expandControl = function() {
 
                                // Close all other widget controls before expanding this one
                                api.control.each( function( otherControl ) {
 
                                self.container.trigger( 'expand' );
                                self.container.addClass( 'expanding' );
+                       };
+
+                       if ( expanded ) {
+                               if ( api.section.has( self.section() ) ) {
+                                       api.section( self.section() ).expand( {
+                                               completeCallback: expandControl
+                                       } );
+                               } else {
+                                       expandControl();
+                               }
                        } else {
 
                                complete = function() {
index 0cbcb3583c09fb136755db97b75c1326d20e773b..a10ae207f8e0547a399b6e18076a20c4b0acb0f1 100644 (file)
@@ -1 +1 @@
-!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
+!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","focus .widget-tpl":"focus","click .widget-tpl":"_submit","keypress .widget-tpl":"_submit",keydown:"keyboardAccessible"},selected:null,currentSidebarControl:null,$search:null,$clearResults:null,searchMatchesCount:null,initialize:function(){var a=this;this.$search=b("#widgets-search"),this.$clearResults=this.$el.find(".clear-results"),_.bindAll(this,"close"),this.listenTo(this.collection,"change",this.updateList),this.updateList(),this.searchMatchesCount=this.collection.length,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()}),this.$clearResults.on("click",function(){a.$search.val("").focus().trigger("keyup")}),g.previewer.bind("url",this.close)},search:function(a){var b;this.collection.doSearch(a.target.value),this.updateSearchMatchesCount(),this.announceSearchMatches(),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)),""!==a.target.value?this.$clearResults.addClass("is-visible"):""===a.target.value&&this.$clearResults.removeClass("is-visible"),this.searchMatchesCount?this.$el.removeClass("no-widgets-found"):this.$el.addClass("no-widgets-found")},updateSearchMatchesCount:function(){this.searchMatchesCount=this.collection.where({search_matched:!0}).length},announceSearchMatches:_.debounce(function(){var b=f.widgetsFound.replace("%d",this.searchMatchesCount);this.searchMatchesCount||(b=f.noWidgetsFound),a.a11y.speak(b)},500),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"),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.customize_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,i=this;return i.embedWidgetControl(),a&&i.embedWidgetContent(),b.unchanged?void(a&&g.Control.prototype.expand.call(i,{completeCallback:b.completeCallback})):(c=this.container.find("div.widget:first"),d=c.find(".widget-inside:first"),h=function(){g.control.each(function(a){i.params.type===a.params.type&&i!==a&&a.collapse()}),e=function(){i.container.removeClass("expanding"),i.container.addClass("expanded"),i.container.trigger("expanded")},b.completeCallback&&(f=e,e=function(){f(),b.completeCallback()}),i.params.is_wide?d.fadeIn(b.duration,e):d.slideDown(b.duration,e),i.container.trigger("expand"),i.container.addClass("expanding")},void(a?g.section.has(i.section())?g.section(i.section()).expand({completeCallback:h}):h():(e=function(){i.container.removeClass("collapsing"),i.container.removeClass("expanded"),i.container.trigger("collapsed")},b.completeCallback&&(f=e,e=function(){f(),b.completeCallback()}),i.container.trigger("collapse"),i.container.addClass("collapsing"),i.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 aaf34b0bb103590832ee54cfecc6b3971f4967ae..cc3aac4fc5f9ac68dd564b014a8e25db03859255 100644 (file)
                                topHeight = heights.textTopHeight;
                        }
 
-                       // TinyMCE still intializing.
+                       // TinyMCE still initializing.
                        if ( ! visual && ! $top.length ) {
                                return;
                        }
index c42611bb2da10e6a44c411811db5ee45ae034388..e3fbaab945bfd52b8a1e32a4693075798bf80baf 100644 (file)
 
                        text = text + '\n\n';
                        text = text.replace( /<br \/>\s*<br \/>/gi, '\n\n' );
-                       text = text.replace( new RegExp( '(<(?:' + blocklist + ')(?: [^>]*)?>)', 'gi' ), '\n$1' );
+                       text = text.replace( new RegExp( '(<(?:' + blocklist + ')(?: [^>]*)?>)', 'gi' ), '\n\n$1' );
                        text = text.replace( new RegExp( '(</(?:' + blocklist + ')>)', 'gi' ), '$1\n\n' );
                        text = text.replace( /<hr( [^>]*)?>/gi, '<hr$1>\n\n' ); // hr is self closing block element
                        text = text.replace( /\s*<option/gi, '<option' ); // No <p> or <br> around <option>
index 80a8a829e301d0e55cdc73f4e6b86e4fa46390f8..2fe055e6348b88eb2045e4f37373bfc3e3a0e2ae 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&&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
+!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\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 3a65805e3e6beedaa70e9018e07021d4730cabc1..84ffd788a95947cc2fd3dbe53e391428532bb9a7 100644 (file)
@@ -83,7 +83,7 @@ inlineEditPost = {
        },
 
        setBulk : function(){
-               var te = '', type = this.type, tax, c = true;
+               var te = '', type = this.type, c = true;
                this.revert();
 
                $( '#bulk-edit td' ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
@@ -114,9 +114,9 @@ inlineEditPost = {
 
                // enable autocomplete for tags
                if ( 'post' === type ) {
-                       // support multi taxonomies?
-                       tax = 'post_tag';
-                       $('tr.inline-editor textarea[name="tax_input['+tax+']"]').suggest( ajaxurl + '?action=ajax-tag-search&tax=' + tax, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma } );
+                       $( 'tr.inline-editor textarea[data-wp-taxonomy]' ).each( function ( i, element ) {
+                               $( element ).wpTagsSuggest();
+                       } );
                }
                $('html, body').animate( { scrollTop: 0 }, 'fast' );
        },
@@ -129,9 +129,9 @@ inlineEditPost = {
                        id = t.getId(id);
                }
 
-               fields = ['post_title', 'post_name', 'post_author', '_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'ss', 'post_password', 'post_format', 'menu_order'];
+               fields = ['post_title', 'post_name', 'post_author', '_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'ss', 'post_password', 'post_format', 'menu_order', 'page_template'];
                if ( t.type === 'page' ) {
-                       fields.push('post_parent', 'page_template');
+                       fields.push('post_parent');
                }
 
                // add the new edit row with an extra blank row underneath to maintain zebra striping.
@@ -196,7 +196,7 @@ inlineEditPost = {
                                textarea.val(terms);
                        }
 
-                       textarea.suggest( ajaxurl + '?action=ajax-tag-search&tax=' + taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma } );
+                       textarea.wpTagsSuggest();
                });
 
                // handle the post status
index ec42b17bfaa5a52353dc8321266ed9c7e5082fc5..aab6c3d4f705e12a6bda8b887c05e3ccfd9447a0 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){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
+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=this.type,d=!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")){d=!1;var c,e=a(this).val();c=a("#inline_"+e+" .post_title").html()||inlineEditL10n.notitle,b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+inlineEditL10n.ntdeltitle+'">X</a>'+c+"</div>"}}),d?this.revert():(a("#bulk-titles").html(b),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"===c&&a("tr.inline-editor textarea[data-wp-taxonomy]").each(function(b,c){a(c).wpTagsSuggest()}),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_template"],"page"===n.type&&c.push("post_parent"),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.wpTagsSuggest()}),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 3bbf4fb72ed8ed4c333108bcfb42d2e0ebfc11d6..daad73fd137cff9447f240e1d581b8e9d4cfece5 100644 (file)
@@ -1,10 +1,36 @@
 /* global inlineEditL10n, ajaxurl */
+/**
+ * This file is used on the term overview page to power quick-editing terms.
+ */
+
 window.wp = window.wp || {};
 
+/**
+ * Consists of functions relevant to the inline taxonomy editor.
+ *
+ * @namespace inlineEditTax
+ *
+ * @property {string} type The type of inline edit we are currently on.
+ * @property {string} what The type property with a hash prefixed and a dash
+ *                         suffixed.
+ */
 var inlineEditTax;
+
 ( function( $, wp ) {
+
 inlineEditTax = {
 
+       /**
+        * @summary Initializes the inline taxonomy editor.
+        *
+        * Adds event handlers to be able to quick edit.
+        *
+        * @since 2.7.0
+        *
+        * @this inlineEditTax
+        * @memberof inlineEditTax
+        * @returns {void}
+        */
        init : function() {
                var t = this, row = $('#inline-edit');
 
@@ -16,40 +42,87 @@ inlineEditTax = {
                        return false;
                });
 
-               // prepare the edit row
+               /*
+                * @summary Cancels inline editing when pressing escape inside the inline editor.
+                *
+                * @param {Object} e The keyup event that has been triggered.
+                */
                row.keyup( function( e ) {
+                       // 27 = [escape]
                        if ( e.which === 27 ) {
                                return inlineEditTax.revert();
                        }
                });
 
+               /**
+                * @summary Cancels inline editing when clicking the cancel button.
+                */
                $( '.cancel', row ).click( function() {
                        return inlineEditTax.revert();
                });
+
+               /**
+                * @summary Saves the inline edits when clicking the save button.
+                */
                $( '.save', row ).click( function() {
                        return inlineEditTax.save(this);
                });
+
+               /**
+                * @summary Saves the inline edits when pressing enter inside the inline editor.
+                */
                $( 'input, select', row ).keydown( function( e ) {
+                       // 13 = [enter]
                        if ( e.which === 13 ) {
                                return inlineEditTax.save( this );
                        }
                });
 
+               /**
+                * @summary Saves the inline edits on submitting the inline edit form.
+                */
                $( '#posts-filter input[type="submit"]' ).mousedown( function() {
                        t.revert();
                });
        },
 
+       /**
+        * Toggles the quick edit based on if it is currently shown or hidden.
+        *
+        * @since 2.7.0
+        *
+        * @this inlineEditTax
+        * @memberof inlineEditTax
+        *
+        * @param {HTMLElement} el An element within the table row or the table row
+        *                         itself that we want to quick edit.
+        * @returns {void}
+        */
        toggle : function(el) {
                var t = this;
+
                $(t.what+t.getId(el)).css('display') === 'none' ? t.revert() : t.edit(el);
        },
 
+       /**
+        * Shows the quick editor
+        *
+        * @since 2.7.0
+        *
+        * @this inlineEditTax
+        * @memberof inlineEditTax
+        *
+        * @param {string|HTMLElement} id The ID of the term we want to quick edit or an
+        *                                element within the table row or the
+        * table row itself.
+        * @returns {boolean} Always returns false.
+        */
        edit : function(id) {
                var editRow, rowData, val,
                        t = this;
                t.revert();
 
+               // Makes sure we can pass an HTMLElement as the ID.
                if ( typeof(id) === 'object' ) {
                        id = t.getId(id);
                }
@@ -75,9 +148,26 @@ inlineEditTax = {
                return false;
        },
 
+       /**
+        * @summary Saves the quick edit data.
+        *
+        * Saves the quick edit data to the server and replaces the table row with the
+        * HTML retrieved from the server.
+        *
+        * @since 2.7.0
+        *
+        * @this inlineEditTax
+        * @memberof inlineEditTax
+        *
+        * @param {string|HTMLElement} id The ID of the term we want to quick edit or an
+        *                                element within the table row or the
+        * table row itself.
+        * @returns {boolean} Always returns false.
+        */
        save : function(id) {
                var params, fields, tax = $('input[name="taxonomy"]').val() || '';
 
+               // Makes sure we can pass an HTMLElement as the ID.
                if( typeof(id) === 'object' ) {
                        id = this.getId(id);
                }
@@ -94,8 +184,16 @@ inlineEditTax = {
                fields = $('#edit-'+id).find(':input').serialize();
                params = fields + '&' + $.param(params);
 
-               // make ajax request
+               // Do the ajax request to save the data to the server.
                $.post( ajaxurl, params,
+                       /**
+                        * @summary Handles the response from the server.
+                        *
+                        * Handles the response from the server, replaces the table row with the response
+                        * from the server.
+                        *
+                        * @param {string} r The string with which to replace the table row.
+                        */
                        function(r) {
                                var row, new_id, option_value,
                                        $errorSpan = $( '#edit-' + id + ' .inline-edit-save .error' );
@@ -128,7 +226,10 @@ inlineEditTax = {
 
                                        } else {
                                                $errorSpan.html( r ).show();
-                                               // Some error strings may contain HTML entities (e.g. `&#8220`), let's use the HTML element's text.
+                                               /*
+                                                * Some error strings may contain HTML entities (e.g. `&#8220`), let's use
+                                                * the HTML element's text.
+                                                */
                                                wp.a11y.speak( $errorSpan.text() );
                                        }
                                } else {
@@ -137,10 +238,20 @@ inlineEditTax = {
                                }
                        }
                );
+
                // Prevent submitting the form when pressing Enter on a focused field.
                return false;
        },
 
+       /**
+        * Closes the quick edit form.
+        *
+        * @since 2.7.0
+        *
+        * @this inlineEditTax
+        * @memberof inlineEditTax
+        * @returns {void}
+        */
        revert : function() {
                var id = $('table.widefat tr.inline-editor').attr('id');
 
@@ -148,16 +259,29 @@ inlineEditTax = {
                        $( 'table.widefat .spinner' ).removeClass( 'is-active' );
                        $('#'+id).siblings('tr.hidden').addBack().remove();
                        id = id.substr( id.lastIndexOf('-') + 1 );
+
                        // Show the taxonomy row and move focus back to the Quick Edit link.
                        $( this.what + id ).show().find( '.editinline' ).focus();
                }
        },
 
+       /**
+        * Retrieves the ID of the term of the element inside the table row.
+        *
+        * @since 2.7.0
+        *
+        * @memberof inlineEditTax
+        *
+        * @param {HTMLElement} o An element within the table row or the table row itself.
+        * @returns {string} The ID of the term based on the element.
+        */
        getId : function(o) {
                var id = o.tagName === 'TR' ? o.id : $(o).parents('tr').attr('id'), parts = id.split('-');
+
                return parts[parts.length - 1];
        }
 };
 
 $(document).ready(function(){inlineEditTax.init();});
+
 })( jQuery, window.wp );
index efe593a6447542482b27bd5feb5aeb758e323fab..e9ae4b6cea3227763a9f90e0aff6f3cd931c3a94 100644 (file)
@@ -1,4 +1,4 @@
-/*! Iris Color Picker - v1.0.7 - 2014-11-28
+/*! Iris Color Picker - v1.1.0-beta - 2016-10-25
 * https://github.com/Automattic/Iris
-* Copyright (c) 2014 Matt Wiebe; Licensed GPLv2 */
-!function(a,b){function c(){var b,c,d="backgroundImage";j?k="filter":(b=a('<div id="iris-gradtest" />'),c="linear-gradient(top,#fff,#000)",a.each(l,function(a,e){return b.css(d,e+c),b.css(d).match("gradient")?(k=a,!1):void 0}),k===!1&&(b.css("background","-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))"),b.css(d).match("gradient")&&(k="webkit")),b.remove())}function d(b,c){return b="top"===b?"top":"left",c=a.isArray(c)?c:Array.prototype.slice.call(arguments,1),"webkit"===k?f(b,c):l[k]+"linear-gradient("+b+", "+c.join(", ")+")"}function e(b,c){var d,e,f,h,i,j,k,l,m;b="top"===b?"top":"left",c=a.isArray(c)?c:Array.prototype.slice.call(arguments,1),d="top"===b?0:1,e=a(this),f=c.length-1,h="filter",i=1===d?"left":"top",j=1===d?"right":"bottom",k=1===d?"height":"width",l='<div class="iris-ie-gradient-shim" style="position:absolute;'+k+":100%;"+i+":%start%;"+j+":%end%;"+h+':%filter%;" data-color:"%color%"></div>',m="","static"===e.css("position")&&e.css({position:"relative"}),c=g(c),a.each(c,function(a,b){var e,g,h;return a===f?!1:(e=c[a+1],b.stop!==e.stop&&(g=100-parseFloat(e.stop)+"%",b.octoHex=new Color(b.color).toIEOctoHex(),e.octoHex=new Color(e.color).toIEOctoHex(),h="progid:DXImageTransform.Microsoft.Gradient(GradientType="+d+", StartColorStr='"+b.octoHex+"', EndColorStr='"+e.octoHex+"')",m+=l.replace("%start%",b.stop).replace("%end%",g).replace("%filter%",h)),void 0)}),e.find(".iris-ie-gradient-shim").remove(),a(m).prependTo(e)}function f(b,c){var d=[];return b="top"===b?"0% 0%,0% 100%,":"0% 100%,100% 100%,",c=g(c),a.each(c,function(a,b){d.push("color-stop("+parseFloat(b.stop)/100+", "+b.color+")")}),"-webkit-gradient(linear,"+b+d.join(",")+")"}function g(b){var c=[],d=[],e=[],f=b.length-1;return a.each(b,function(a,b){var e=b,f=!1,g=b.match(/1?[0-9]{1,2}%$/);g&&(e=b.replace(/\s?1?[0-9]{1,2}%$/,""),f=g.shift()),c.push(e),d.push(f)}),d[0]===!1&&(d[0]="0%"),d[f]===!1&&(d[f]="100%"),d=h(d),a.each(d,function(a){e[a]={color:c[a],stop:d[a]}}),e}function h(b){var c,d,e,f,g=0,i=b.length-1,j=0,k=!1;if(b.length<=2||a.inArray(!1,b)<0)return b;for(;j<b.length-1;)k||b[j]!==!1?k&&b[j]!==!1&&(i=j,j=b.length):(g=j-1,k=!0),j++;for(d=i-g,f=parseInt(b[g].replace("%"),10),c=(parseFloat(b[i].replace("%"))-f)/d,j=g+1,e=1;i>j;)b[j]=f+e*c+"%",e++,j++;return h(b)}var i,j,k,l,m,n,o,p,q;return i='<div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="#"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div>',m='.iris-picker{display:block;position:relative}.iris-picker,.iris-picker *{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input+.iris-picker{margin-top:4px}.iris-error{background-color:#ffafaf}.iris-border{border-radius:3px;border:1px solid #aaa;width:200px;background-color:#fff}.iris-picker-inner{position:absolute;top:0;right:0;left:0;bottom:0}.iris-border .iris-picker-inner{top:10px;right:10px;left:10px;bottom:10px}.iris-picker .iris-square-inner{position:absolute;left:0;right:0;top:0;bottom:0}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,.4);height:100%;width:12.5%;float:left;margin-right:5%}.iris-picker .iris-square{width:76%;margin-right:10%;position:relative}.iris-picker .iris-square-inner{width:auto;margin:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-square-inner,.iris-ie-9 .iris-palette{box-shadow:none;border-radius:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-palette{outline:1px solid rgba(0,0,0,.1)}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-ie-lt9 .iris-square-inner,.iris-ie-lt9 .iris-palette{outline:1px solid #aaa}.iris-ie-lt9 .iris-square .ui-slider-handle{outline:1px solid #aaa;background-color:#fff;-ms-filter:"alpha(Opacity=30)"}.iris-ie-lt9 .iris-square .iris-square-handle{background:0;border:3px solid #fff;-ms-filter:"alpha(Opacity=50)"}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:0;margin:0;right:-3px;left:-3px;border:4px solid #aaa;border-width:4px 3px;width:auto;height:6px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;z-index:5;cursor:ns-resize}.iris-strip .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{position:absolute;top:11px;left:0;right:0;bottom:-3px;width:auto;height:auto;background:transparent;border:0;border-radius:0}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.iris-picker .iris-square-handle:hover{border-color:#999}.iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.iris-picker .iris-square-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.iris-palette-container{position:absolute;bottom:0;left:0;margin:0;padding:0}.iris-border .iris-palette-container{left:10px;bottom:10px}.iris-picker .iris-palette{margin:0;cursor:pointer}.iris-square-handle,.ui-slider-handle{border:0;outline:0}',o=navigator.userAgent.toLowerCase(),p="Microsoft Internet Explorer"===navigator.appName,q=p?parseFloat(o.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,j=p&&10>q,k=!1,l=["-moz-","-webkit-","-o-","-ms-"],j&&7>=q?(a.fn.iris=a.noop,a.support.iris=!1,void 0):(a.support.iris=!0,a.fn.gradient=function(){var b=arguments;return this.each(function(){j?e.apply(this,b):a(this).css("backgroundImage",d.apply(this,b))})},a.fn.raninbowGradient=function(b,c){var d,e,f,g;for(b=b||"top",d=a.extend({},{s:100,l:50},c),e="hsl(%h%,"+d.s+"%,"+d.l+"%)",f=0,g=[];360>=f;)g.push(e.replace("%h%",f)),f+=30;return this.each(function(){a(this).gradient(b,g)})},n={options:{color:!1,mode:"hsl",controls:{horiz:"s",vert:"l",strip:"h"},hide:!0,border:!0,target:!1,width:200,palettes:!1},_color:"",_palettes:["#000","#fff","#d33","#d93","#ee2","#81d742","#1e73be","#8224e3"],_inited:!1,_defaultHSLControls:{horiz:"s",vert:"l",strip:"h"},_defaultHSVControls:{horiz:"h",vert:"v",strip:"s"},_scale:{h:360,s:100,l:100,v:100},_create:function(){var b=this,d=b.element,e=b.options.color||d.val();k===!1&&c(),d.is("input")?(b.picker=b.options.target?a(i).appendTo(b.options.target):a(i).insertAfter(d),b._addInputListeners(d)):(d.append(i),b.picker=d.find(".iris-picker")),p?9===q?b.picker.addClass("iris-ie-9"):8>=q&&b.picker.addClass("iris-ie-lt9"):o.indexOf("compatible")<0&&o.indexOf("khtml")<0&&o.match(/mozilla/)&&b.picker.addClass("iris-mozilla"),b.options.palettes&&b._addPalettes(),b._color=new Color(e).setHSpace(b.options.mode),b.options.color=b._color.toString(),b.controls={square:b.picker.find(".iris-square"),squareDrag:b.picker.find(".iris-square-value"),horiz:b.picker.find(".iris-square-horiz"),vert:b.picker.find(".iris-square-vert"),strip:b.picker.find(".iris-strip"),stripSlider:b.picker.find(".iris-strip .iris-slider-offset")},"hsv"===b.options.mode&&b._has("l",b.options.controls)?b.options.controls=b._defaultHSVControls:"hsl"===b.options.mode&&b._has("v",b.options.controls)&&(b.options.controls=b._defaultHSLControls),b.hue=b._color.h(),b.options.hide&&b.picker.hide(),b.options.border&&b.picker.addClass("iris-border"),b._initControls(),b.active="external",b._dimensions(),b._change()},_has:function(b,c){var d=!1;return a.each(c,function(a,c){return b===c?(d=!0,!1):void 0}),d},_addPalettes:function(){var b=a('<div class="iris-palette-container" />'),c=a('<a class="iris-palette" tabindex="0" />'),d=a.isArray(this.options.palettes)?this.options.palettes:this._palettes;this.picker.find(".iris-palette-container").length&&(b=this.picker.find(".iris-palette-container").detach().html("")),a.each(d,function(a,d){c.clone().data("color",d).css("backgroundColor",d).appendTo(b).height(10).width(10)}),this.picker.append(b)},_paint:function(){var a=this;a._paintDimension("top","strip"),a._paintDimension("top","vert"),a._paintDimension("left","horiz")},_paintDimension:function(a,b){var c,d=this,e=d._color,f=d.options.mode,g=d._getHSpaceColor(),h=d.controls[b],i=d.options.controls;if(b!==d.active&&("square"!==d.active||"strip"===b))switch(i[b]){case"h":if("hsv"===f){switch(g=e.clone(),b){case"horiz":g[i.vert](100);break;case"vert":g[i.horiz](100);break;case"strip":g.setHSpace("hsl")}c=g.toHsl()}else c="strip"===b?{s:g.s,l:g.l}:{s:100,l:g.l};h.raninbowGradient(a,c);break;case"s":"hsv"===f?"vert"===b?c=[e.clone().a(0).s(0).toCSS("rgba"),e.clone().a(1).s(0).toCSS("rgba")]:"strip"===b?c=[e.clone().s(100).toCSS("hsl"),e.clone().s(0).toCSS("hsl")]:"horiz"===b&&(c=["#fff","hsl("+g.h+",100%,50%)"]):c="vert"===b&&"h"===d.options.controls.horiz?["hsla(0, 0%, "+g.l+"%, 0)","hsla(0, 0%, "+g.l+"%, 1)"]:["hsl("+g.h+",0%,50%)","hsl("+g.h+",100%,50%)"],h.gradient(a,c);break;case"l":c="strip"===b?["hsl("+g.h+",100%,100%)","hsl("+g.h+", "+g.s+"%,50%)","hsl("+g.h+",100%,0%)"]:["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%","rgba(0,0,0,1)"],h.gradient(a,c);break;case"v":c="strip"===b?[e.clone().v(100).toCSS(),e.clone().v(0).toCSS()]:["rgba(0,0,0,0)","#000"],h.gradient(a,c)}},_getHSpaceColor:function(){return"hsv"===this.options.mode?this._color.toHsv():this._color.toHsl()},_dimensions:function(b){var c,d,e,f,g=this,h=g.options,i=g.controls,j=i.square,k=g.picker.find(".iris-strip"),l="77.5%",m="12%",n=20,o=h.border?h.width-n:h.width,p=a.isArray(h.palettes)?h.palettes.length:g._palettes.length;return b&&(j.css("width",""),k.css("width",""),g.picker.css({width:"",height:""})),l=o*(parseFloat(l)/100),m=o*(parseFloat(m)/100),c=h.border?l+n:l,j.width(l).height(l),k.height(l).width(m),g.picker.css({width:h.width,height:c}),h.palettes?(d=2*l/100,f=l-(p-1)*d,e=f/p,g.picker.find(".iris-palette").each(function(b){var c=0===b?0:d;a(this).css({width:e,height:e,marginLeft:c})}),g.picker.css("paddingBottom",e+d),k.height(e+d+l),void 0):g.picker.css("paddingBottom","")},_addInputListeners:function(a){var b=this,c=100,d=function(c){var d=new Color(a.val()),e=a.val().replace(/^#/,"");a.removeClass("iris-error"),d.error?""!==e&&a.addClass("iris-error"):d.toString()!==b._color.toString()&&("keyup"===c.type&&e.match(/^[0-9a-fA-F]{3}$/)||b._setOption("color",d.toString()))};a.on("change",d).on("keyup",b._debounce(d,c)),b.options.hide&&a.one("focus",function(){b.show()})},_initControls:function(){var b=this,c=b.controls,d=c.square,e=b.options.controls,f=b._scale[e.strip];c.stripSlider.slider({orientation:"vertical",max:f,slide:function(a,c){b.active="strip","h"===e.strip&&(c.value=f-c.value),b._color[e.strip](c.value),b._change.apply(b,arguments)}}),c.squareDrag.draggable({containment:c.square.find(".iris-square-inner"),zIndex:1e3,cursor:"move",drag:function(a,c){b._squareDrag(a,c)},start:function(){d.addClass("iris-dragging"),a(this).addClass("ui-state-focus")},stop:function(){d.removeClass("iris-dragging"),a(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(c){var d="ui-state-focus";c.preventDefault(),"mousedown"===c.type?(b.picker.find("."+d).removeClass(d).blur(),a(this).addClass(d).focus()):a(this).removeClass(d)}).on("keydown",function(a){var d=c.square,e=c.squareDrag,f=e.position(),g=b.options.width/100;switch(a.altKey&&(g*=10),a.keyCode){case 37:f.left-=g;break;case 38:f.top-=g;break;case 39:f.left+=g;break;case 40:f.top+=g;break;default:return!0}f.left=Math.max(0,Math.min(f.left,d.width())),f.top=Math.max(0,Math.min(f.top,d.height())),e.css(f),b._squareDrag(a,{position:f}),a.preventDefault()}),d.mousedown(function(c){var d,e;1===c.which&&a(c.target).is("div")&&(d=b.controls.square.offset(),e={top:c.pageY-d.top,left:c.pageX-d.left},c.preventDefault(),b._squareDrag(c,{position:e}),c.target=b.controls.squareDrag.get(0),b.controls.squareDrag.css(e).trigger(c))}),b.options.palettes&&b._paletteListeners()},_paletteListeners:function(){var b=this;b.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){b._color.fromCSS(a(this).data("color")),b.active="external",b._change()}).on("keydown.palette",".iris-palette",function(b){return 13!==b.keyCode&&32!==b.keyCode?!0:(b.stopPropagation(),a(this).click(),void 0)})},_squareDrag:function(a,b){var c=this,d=c.options.controls,e=c._squareDimensions(),f=Math.round((e.h-b.position.top)/e.h*c._scale[d.vert]),g=c._scale[d.horiz]-Math.round((e.w-b.position.left)/e.w*c._scale[d.horiz]);c._color[d.horiz](g)[d.vert](f),c.active="square",c._change.apply(c,arguments)},_setOption:function(b,c){var d,e,f,g=this,h=g.options[b],i=!1;switch(g.options[b]=c,b){case"color":c=""+c,d=c.replace(/^#/,""),e=new Color(c).setHSpace(g.options.mode),e.error?g.options[b]=h:(g._color=e,g.options.color=g.options[b]=g._color.toString(),g.active="external",g._change());break;case"palettes":i=!0,c?g._addPalettes():g.picker.find(".iris-palette-container").remove(),h||g._paletteListeners();break;case"width":i=!0;break;case"border":i=!0,f=c?"addClass":"removeClass",g.picker[f]("iris-border");break;case"mode":case"controls":if(h===c)return;return f=g.element,h=g.options,h.hide=!g.picker.is(":visible"),g.destroy(),g.picker.remove(),a(g.element).iris(h)}i&&g._dimensions(!0)},_squareDimensions:function(a){var c,d,e=this.controls.square;return a!==b&&e.data("dimensions")?e.data("dimensions"):(d=this.controls.squareDrag,c={w:e.width(),h:e.height()},e.data("dimensions",c),c)},_isNonHueControl:function(a,b){return"square"===a&&"h"===this.options.controls.strip?!0:"external"===b||"h"===b&&"strip"===a?!1:!0},_change:function(){var b=this,c=b.controls,d=b._getHSpaceColor(),e=["square","strip"],f=b.options.controls,g=f[b.active]||"external",h=b.hue;"strip"===b.active?e=[]:"external"!==b.active&&e.pop(),a.each(e,function(a,e){var g,h,i;if(e!==b.active)switch(e){case"strip":g="h"===f.strip?b._scale[f.strip]-d[f.strip]:d[f.strip],c.stripSlider.slider("value",g);break;case"square":h=b._squareDimensions(),i={left:d[f.horiz]/b._scale[f.horiz]*h.w,top:h.h-d[f.vert]/b._scale[f.vert]*h.h},b.controls.squareDrag.css(i)}}),d.h!==h&&b._isNonHueControl(b.active,g)&&b._color.h(h),b.hue=b._color.h(),b.options.color=b._color.toString(),b._inited&&b._trigger("change",{type:b.active},{color:b._color}),b.element.is(":input")&&!b._color.error&&(b.element.removeClass("iris-error"),b.element.val()!==b._color.toString()&&b.element.val(b._color.toString())),b._paint(),b._inited=!0,b.active=!1},_debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},show:function(){this.picker.show()},hide:function(){this.picker.hide()},toggle:function(){this.picker.toggle()},color:function(a){return a===!0?this._color.clone():a===b?this._color.toString():(this.option("color",a),void 0)}},a.widget("a8c.iris",n),a('<style id="iris-css">'+m+"</style>").appendTo("head"),void 0)}(jQuery),function(a,b){var c=function(a,b){return this instanceof c?this._init(a,b):new c(a,b)};c.fn=c.prototype={_color:0,_alpha:1,error:!1,_hsl:{h:0,s:0,l:0},_hsv:{h:0,s:0,v:0},_hSpace:"hsl",_init:function(a){var c="noop";switch(typeof a){case"object":return a.a!==b&&this.a(a.a),c=a.r!==b?"fromRgb":a.l!==b?"fromHsl":a.v!==b?"fromHsv":c,this[c](a);case"string":return this.fromCSS(a);case"number":return this.fromInt(parseInt(a,10))}return this},_error:function(){return this.error=!0,this},clone:function(){for(var a=new c(this.toInt()),b=["_alpha","_hSpace","_hsl","_hsv","error"],d=b.length-1;d>=0;d--)a[b[d]]=this[b[d]];return a},setHSpace:function(a){return this._hSpace="hsv"===a?a:"hsl",this},noop:function(){return this},fromCSS:function(a){var b,c=/^(rgb|hs(l|v))a?\(/;if(this.error=!1,a=a.replace(/^\s+/,"").replace(/\s+$/,"").replace(/;$/,""),a.match(c)&&a.match(/\)$/)){if(b=a.replace(/(\s|%)/g,"").replace(c,"").replace(/,?\);?$/,"").split(","),b.length<3)return this._error();if(4===b.length&&(this.a(parseFloat(b.pop())),this.error))return this;for(var d=b.length-1;d>=0;d--)if(b[d]=parseInt(b[d],10),isNaN(b[d]))return this._error();return a.match(/^rgb/)?this.fromRgb({r:b[0],g:b[1],b:b[2]}):a.match(/^hsv/)?this.fromHsv({h:b[0],s:b[1],v:b[2]}):this.fromHsl({h:b[0],s:b[1],l:b[2]})}return this.fromHex(a)},fromRgb:function(a,c){return"object"!=typeof a||a.r===b||a.g===b||a.b===b?this._error():(this.error=!1,this.fromInt(parseInt((a.r<<16)+(a.g<<8)+a.b,10),c))},fromHex:function(a){return a=a.replace(/^#/,"").replace(/^0x/,""),3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),this.error=!/^[0-9A-F]{6}$/i.test(a),this.fromInt(parseInt(a,16))},fromHsl:function(a){var c,d,e,f,g,h,i,j;return"object"!=typeof a||a.h===b||a.s===b||a.l===b?this._error():(this._hsl=a,this._hSpace="hsl",h=a.h/360,i=a.s/100,j=a.l/100,0===i?c=d=e=j:(f=.5>j?j*(1+i):j+i-j*i,g=2*j-f,c=this.hue2rgb(g,f,h+1/3),d=this.hue2rgb(g,f,h),e=this.hue2rgb(g,f,h-1/3)),this.fromRgb({r:255*c,g:255*d,b:255*e},!0))},fromHsv:function(a){var c,d,e,f,g,h,i,j,k,l,m;if("object"!=typeof a||a.h===b||a.s===b||a.v===b)return this._error();switch(this._hsv=a,this._hSpace="hsv",c=a.h/360,d=a.s/100,e=a.v/100,i=Math.floor(6*c),j=6*c-i,k=e*(1-d),l=e*(1-j*d),m=e*(1-(1-j)*d),i%6){case 0:f=e,g=m,h=k;break;case 1:f=l,g=e,h=k;break;case 2:f=k,g=e,h=m;break;case 3:f=k,g=l,h=e;break;case 4:f=m,g=k,h=e;break;case 5:f=e,g=k,h=l}return this.fromRgb({r:255*f,g:255*g,b:255*h},!0)},fromInt:function(a,c){return this._color=parseInt(a,10),isNaN(this._color)&&(this._color=0),this._color>16777215?this._color=16777215:this._color<0&&(this._color=0),c===b&&(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(a,b,c){return 0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+6*(b-a)*(2/3-c):a},toString:function(){var a=parseInt(this._color,10).toString(16);if(this.error)return"";if(a.length<6)for(var b=6-a.length-1;b>=0;b--)a="0"+a;return"#"+a},toCSS:function(a,b){switch(a=a||"hex",b=parseFloat(b||this._alpha),a){case"rgb":case"rgba":var c=this.toRgb();return 1>b?"rgba( "+c.r+", "+c.g+", "+c.b+", "+b+" )":"rgb( "+c.r+", "+c.g+", "+c.b+" )";case"hsl":case"hsla":var d=this.toHsl();return 1>b?"hsla( "+d.h+", "+d.s+"%, "+d.l+"%, "+b+" )":"hsl( "+d.h+", "+d.s+"%, "+d.l+"% )";default:return this.toString()}},toRgb:function(){return{r:255&this._color>>16,g:255&this._color>>8,b:255&this._color}},toHsl:function(){var a,b,c=this.toRgb(),d=c.r/255,e=c.g/255,f=c.b/255,g=Math.max(d,e,f),h=Math.min(d,e,f),i=(g+h)/2;if(g===h)a=b=0;else{var j=g-h;switch(b=i>.5?j/(2-g-h):j/(g+h),g){case d:a=(e-f)/j+(f>e?6:0);break;case e:a=(f-d)/j+2;break;case f:a=(d-e)/j+4}a/=6}return a=Math.round(360*a),0===a&&this._hsl.h!==a&&(a=this._hsl.h),b=Math.round(100*b),0===b&&this._hsl.s&&(b=this._hsl.s),{h:a,s:b,l:Math.round(100*i)}},toHsv:function(){var a,b,c=this.toRgb(),d=c.r/255,e=c.g/255,f=c.b/255,g=Math.max(d,e,f),h=Math.min(d,e,f),i=g,j=g-h;if(b=0===g?0:j/g,g===h)a=b=0;else{switch(g){case d:a=(e-f)/j+(f>e?6:0);break;case e:a=(f-d)/j+2;break;case f:a=(d-e)/j+4}a/=6}return a=Math.round(360*a),0===a&&this._hsv.h!==a&&(a=this._hsv.h),b=Math.round(100*b),0===b&&this._hsv.s&&(b=this._hsv.s),{h:a,s:b,v:Math.round(100*i)}},toInt:function(){return this._color},toIEOctoHex:function(){var a=this.toString(),b=parseInt(255*this._alpha,10).toString(16);return 1===b.length&&(b="0"+b),"#"+b+a.replace(/^#/,"")},toLuminosity:function(){var a=this.toRgb();return.2126*Math.pow(a.r/255,2.2)+.7152*Math.pow(a.g/255,2.2)+.0722*Math.pow(a.b/255,2.2)},getDistanceLuminosityFrom:function(a){if(!(a instanceof c))throw"getDistanceLuminosityFrom requires a Color object";var b=this.toLuminosity(),d=a.toLuminosity();return b>d?(b+.05)/(d+.05):(d+.05)/(b+.05)},getMaxContrastColor:function(){var a=this.toLuminosity(),b=a>=.5?"000000":"ffffff";return new c(b)},getReadableContrastingColor:function(a,d){if(!a instanceof c)return this;var e=d===b?5:d,f=a.getDistanceLuminosityFrom(this),g=a.getMaxContrastColor(),h=g.getDistanceLuminosityFrom(a);if(e>=h)return g;if(f>=e)return this;for(var i=0===g.toInt()?-1:1;e>f&&(this.l(i,!0),f=this.getDistanceLuminosityFrom(a),0!==this._color&&16777215!==this._color););return this},a:function(a){if(a===b)return this._alpha;var c=parseFloat(a);return isNaN(c)?this._error():(this._alpha=c,this)},darken:function(a){return a=a||5,this.l(-a,!0)},lighten:function(a){return a=a||5,this.l(a,!0)},saturate:function(a){return a=a||15,this.s(a,!0)},desaturate:function(a){return a=a||15,this.s(-a,!0)},toGrayscale:function(){return this.setHSpace("hsl").s(0)},getComplement:function(){return this.h(180,!0)},getSplitComplement:function(a){a=a||1;var b=180+30*a;return this.h(b,!0)},getAnalog:function(a){a=a||1;var b=30*a;return this.h(b,!0)},getTetrad:function(a){a=a||1;var b=60*a;return this.h(b,!0)},getTriad:function(a){a=a||1;var b=120*a;return this.h(b,!0)},_partial:function(a){var c=d[a];return function(d,e){var f=this._spaceFunc("to",c.space);return d===b?f[a]:(e===!0&&(d=f[a]+d),c.mod&&(d%=c.mod),c.range&&(d=d<c.range[0]?c.range[0]:d>c.range[1]?c.range[1]:d),f[a]=d,this._spaceFunc("from",c.space,f))}},_spaceFunc:function(a,b,c){var d=b||this._hSpace,e=a+d.charAt(0).toUpperCase()+d.substr(1);return this[e](c)}};var d={h:{mod:360},s:{range:[0,100]},l:{space:"hsl",range:[0,100]},v:{space:"hsv",range:[0,100]},r:{space:"rgb",range:[0,255]},g:{space:"rgb",range:[0,255]},b:{space:"rgb",range:[0,255]}};for(var e in d)d.hasOwnProperty(e)&&(c.fn[e]=c.fn._partial(e));"object"==typeof exports?module.exports=c:a.Color=c}(this);
\ No newline at end of file
+* Copyright (c) 2016 Matt Wiebe; Licensed GPLv2 */
+!function(a,b){function c(){var b,c,d="backgroundImage";j?k="filter":(b=a('<div id="iris-gradtest" />'),c="linear-gradient(top,#fff,#000)",a.each(l,function(a,e){if(b.css(d,e+c),b.css(d).match("gradient"))return k=a,!1}),k===!1&&(b.css("background","-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))"),b.css(d).match("gradient")&&(k="webkit")),b.remove())}function d(b,c){return b="top"===b?"top":"left",c=a.isArray(c)?c:Array.prototype.slice.call(arguments,1),"webkit"===k?f(b,c):l[k]+"linear-gradient("+b+", "+c.join(", ")+")"}function e(b,c){var d,e,f,h,i,j,k,l,m;b="top"===b?"top":"left",c=a.isArray(c)?c:Array.prototype.slice.call(arguments,1),d="top"===b?0:1,e=a(this),f=c.length-1,h="filter",i=1===d?"left":"top",j=1===d?"right":"bottom",k=1===d?"height":"width",l='<div class="iris-ie-gradient-shim" style="position:absolute;'+k+":100%;"+i+":%start%;"+j+":%end%;"+h+':%filter%;" data-color:"%color%"></div>',m="","static"===e.css("position")&&e.css({position:"relative"}),c=g(c),a.each(c,function(a,b){var e,g,h;return a!==f&&(e=c[a+1],void(b.stop!==e.stop&&(g=100-parseFloat(e.stop)+"%",b.octoHex=new Color(b.color).toIEOctoHex(),e.octoHex=new Color(e.color).toIEOctoHex(),h="progid:DXImageTransform.Microsoft.Gradient(GradientType="+d+", StartColorStr='"+b.octoHex+"', EndColorStr='"+e.octoHex+"')",m+=l.replace("%start%",b.stop).replace("%end%",g).replace("%filter%",h))))}),e.find(".iris-ie-gradient-shim").remove(),a(m).prependTo(e)}function f(b,c){var d=[];return b="top"===b?"0% 0%,0% 100%,":"0% 100%,100% 100%,",c=g(c),a.each(c,function(a,b){d.push("color-stop("+parseFloat(b.stop)/100+", "+b.color+")")}),"-webkit-gradient(linear,"+b+d.join(",")+")"}function g(b){var c=[],d=[],e=[],f=b.length-1;return a.each(b,function(a,b){var e=b,f=!1,g=b.match(/1?[0-9]{1,2}%$/);g&&(e=b.replace(/\s?1?[0-9]{1,2}%$/,""),f=g.shift()),c.push(e),d.push(f)}),d[0]===!1&&(d[0]="0%"),d[f]===!1&&(d[f]="100%"),d=h(d),a.each(d,function(a){e[a]={color:c[a],stop:d[a]}}),e}function h(b){var c,d,e,f,g=0,i=b.length-1,j=0,k=!1;if(b.length<=2||a.inArray(!1,b)<0)return b;for(;j<b.length-1;)k||b[j]!==!1?k&&b[j]!==!1&&(i=j,j=b.length):(g=j-1,k=!0),j++;for(d=i-g,f=parseInt(b[g].replace("%"),10),c=(parseFloat(b[i].replace("%"))-f)/d,j=g+1,e=1;j<i;)b[j]=f+e*c+"%",e++,j++;return h(b)}var i,j,k,l,m,n,o,p,q;return i='<div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="#"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div>',m='.iris-picker{display:block;position:relative}.iris-picker,.iris-picker *{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input+.iris-picker{margin-top:4px}.iris-error{background-color:#ffafaf}.iris-border{border-radius:3px;border:1px solid #aaa;width:200px;background-color:#fff}.iris-picker-inner{position:absolute;top:0;right:0;left:0;bottom:0}.iris-border .iris-picker-inner{top:10px;right:10px;left:10px;bottom:10px}.iris-picker .iris-square-inner{position:absolute;left:0;right:0;top:0;bottom:0}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,.4);height:100%;width:12.5%;float:left;margin-right:5%}.iris-only-strip .iris-slider{width:100%}.iris-picker .iris-square{width:76%;margin-right:10%;position:relative}.iris-only-strip .iris-square{display:none}.iris-picker .iris-square-inner{width:auto;margin:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-square-inner,.iris-ie-9 .iris-palette{box-shadow:none;border-radius:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-palette{outline:1px solid rgba(0,0,0,.1)}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-ie-lt9 .iris-square-inner,.iris-ie-lt9 .iris-palette{outline:1px solid #aaa}.iris-ie-lt9 .iris-square .ui-slider-handle{outline:1px solid #aaa;background-color:#fff;-ms-filter:"alpha(Opacity=30)"}.iris-ie-lt9 .iris-square .iris-square-handle{background:0 0;border:3px solid #fff;-ms-filter:"alpha(Opacity=50)"}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:0 0;margin:0;right:-3px;left:-3px;border:4px solid #aaa;border-width:4px 3px;width:auto;height:6px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;z-index:5;cursor:ns-resize}.iris-strip-horiz .iris-strip .ui-slider-handle{right:auto;left:auto;bottom:-3px;top:-3px;height:auto;width:6px;cursor:ew-resize}.iris-strip .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{position:absolute;top:11px;left:0;right:0;bottom:-3px;width:auto;height:auto;background:transparent;border:0;border-radius:0}.iris-strip-horiz .iris-slider-offset{top:0;bottom:0;right:11px;left:-3px}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.iris-picker .iris-square-handle:hover{border-color:#999}.iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.iris-picker .iris-square-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.iris-palette-container{position:absolute;bottom:0;left:0;margin:0;padding:0}.iris-border .iris-palette-container{left:10px;bottom:10px}.iris-picker .iris-palette{margin:0;cursor:pointer}.iris-square-handle,.ui-slider-handle{border:0;outline:0}',o=navigator.userAgent.toLowerCase(),p="Microsoft Internet Explorer"===navigator.appName,q=p?parseFloat(o.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,j=p&&q<10,k=!1,l=["-moz-","-webkit-","-o-","-ms-"],j&&q<=7?(a.fn.iris=a.noop,void(a.support.iris=!1)):(a.support.iris=!0,a.fn.gradient=function(){var b=arguments;return this.each(function(){j?e.apply(this,b):a(this).css("backgroundImage",d.apply(this,b))})},a.fn.rainbowGradient=function(b,c){var d,e,f,g;for(b=b||"top",d=a.extend({},{s:100,l:50},c),e="hsl(%h%,"+d.s+"%,"+d.l+"%)",f=0,g=[];f<=360;)g.push(e.replace("%h%",f)),f+=30;return this.each(function(){a(this).gradient(b,g)})},n={options:{color:!1,mode:"hsl",controls:{horiz:"s",vert:"l",strip:"h"},hide:!0,border:!0,target:!1,width:200,palettes:!1,type:"full",slider:"horizontal"},_color:"",_palettes:["#000","#fff","#d33","#d93","#ee2","#81d742","#1e73be","#8224e3"],_inited:!1,_defaultHSLControls:{horiz:"s",vert:"l",strip:"h"},_defaultHSVControls:{horiz:"h",vert:"v",strip:"s"},_scale:{h:360,s:100,l:100,v:100},_create:function(){var b=this,d=b.element,e=b.options.color||d.val();k===!1&&c(),d.is("input")?(b.options.target?b.picker=a(i).appendTo(b.options.target):b.picker=a(i).insertAfter(d),b._addInputListeners(d)):(d.append(i),b.picker=d.find(".iris-picker")),p?9===q?b.picker.addClass("iris-ie-9"):q<=8&&b.picker.addClass("iris-ie-lt9"):o.indexOf("compatible")<0&&o.indexOf("khtml")<0&&o.match(/mozilla/)&&b.picker.addClass("iris-mozilla"),b.options.palettes&&b._addPalettes(),b.onlySlider="hue"===b.options.type,b.horizontalSlider=b.onlySlider&&"horizontal"===b.options.slider,b.onlySlider&&(b.options.controls.strip="h",e||(e="hsl(10,100,50)")),b._color=new Color(e).setHSpace(b.options.mode),b.options.color=b._color.toString(),b.controls={square:b.picker.find(".iris-square"),squareDrag:b.picker.find(".iris-square-value"),horiz:b.picker.find(".iris-square-horiz"),vert:b.picker.find(".iris-square-vert"),strip:b.picker.find(".iris-strip"),stripSlider:b.picker.find(".iris-strip .iris-slider-offset")},"hsv"===b.options.mode&&b._has("l",b.options.controls)?b.options.controls=b._defaultHSVControls:"hsl"===b.options.mode&&b._has("v",b.options.controls)&&(b.options.controls=b._defaultHSLControls),b.hue=b._color.h(),b.options.hide&&b.picker.hide(),b.options.border&&!b.onlySlider&&b.picker.addClass("iris-border"),b._initControls(),b.active="external",b._dimensions(),b._change()},_has:function(b,c){var d=!1;return a.each(c,function(a,c){if(b===c)return d=!0,!1}),d},_addPalettes:function(){var b=a('<div class="iris-palette-container" />'),c=a('<a class="iris-palette" tabindex="0" />'),d=a.isArray(this.options.palettes)?this.options.palettes:this._palettes;this.picker.find(".iris-palette-container").length&&(b=this.picker.find(".iris-palette-container").detach().html("")),a.each(d,function(a,d){c.clone().data("color",d).css("backgroundColor",d).appendTo(b).height(10).width(10)}),this.picker.append(b)},_paint:function(){var a=this;a.horizontalSlider?a._paintDimension("left","strip"):a._paintDimension("top","strip"),a._paintDimension("top","vert"),a._paintDimension("left","horiz")},_paintDimension:function(a,b){var c,d=this,e=d._color,f=d.options.mode,g=d._getHSpaceColor(),h=d.controls[b],i=d.options.controls;if(b!==d.active&&("square"!==d.active||"strip"===b))switch(i[b]){case"h":if("hsv"===f){switch(g=e.clone(),b){case"horiz":g[i.vert](100);break;case"vert":g[i.horiz](100);break;case"strip":g.setHSpace("hsl")}c=g.toHsl()}else c="strip"===b?{s:g.s,l:g.l}:{s:100,l:g.l};h.rainbowGradient(a,c);break;case"s":"hsv"===f?"vert"===b?c=[e.clone().a(0).s(0).toCSS("rgba"),e.clone().a(1).s(0).toCSS("rgba")]:"strip"===b?c=[e.clone().s(100).toCSS("hsl"),e.clone().s(0).toCSS("hsl")]:"horiz"===b&&(c=["#fff","hsl("+g.h+",100%,50%)"]):c="vert"===b&&"h"===d.options.controls.horiz?["hsla(0, 0%, "+g.l+"%, 0)","hsla(0, 0%, "+g.l+"%, 1)"]:["hsl("+g.h+",0%,50%)","hsl("+g.h+",100%,50%)"],h.gradient(a,c);break;case"l":c="strip"===b?["hsl("+g.h+",100%,100%)","hsl("+g.h+", "+g.s+"%,50%)","hsl("+g.h+",100%,0%)"]:["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%","rgba(0,0,0,1)"],h.gradient(a,c);break;case"v":c="strip"===b?[e.clone().v(100).toCSS(),e.clone().v(0).toCSS()]:["rgba(0,0,0,0)","#000"],h.gradient(a,c)}},_getHSpaceColor:function(){return"hsv"===this.options.mode?this._color.toHsv():this._color.toHsl()},_stripOnlyDimensions:function(){var a=this,b=this.options.width,c=.12*b;a.horizontalSlider?a.picker.css({width:b,height:c}).addClass("iris-only-strip iris-strip-horiz"):a.picker.css({width:c,height:b}).addClass("iris-only-strip iris-strip-vert")},_dimensions:function(b){if("hue"===this.options.type)return this._stripOnlyDimensions();var c,d,e,f,g=this,h=g.options,i=g.controls,j=i.square,k=g.picker.find(".iris-strip"),l="77.5%",m="12%",n=20,o=h.border?h.width-n:h.width,p=a.isArray(h.palettes)?h.palettes.length:g._palettes.length;return b&&(j.css("width",""),k.css("width",""),g.picker.css({width:"",height:""})),l=o*(parseFloat(l)/100),m=o*(parseFloat(m)/100),c=h.border?l+n:l,j.width(l).height(l),k.height(l).width(m),g.picker.css({width:h.width,height:c}),h.palettes?(d=2*l/100,f=l-(p-1)*d,e=f/p,g.picker.find(".iris-palette").each(function(b){var c=0===b?0:d;a(this).css({width:e,height:e,marginLeft:c})}),g.picker.css("paddingBottom",e+d),void k.height(e+d+l)):g.picker.css("paddingBottom","")},_addInputListeners:function(a){var b=this,c=100,d=function(c){var d=new Color(a.val()),e=a.val().replace(/^#/,"");a.removeClass("iris-error"),d.error?""!==e&&a.addClass("iris-error"):d.toString()!==b._color.toString()&&("keyup"===c.type&&e.match(/^[0-9a-fA-F]{3}$/)||b._setOption("color",d.toString()))};a.on("change",d).on("keyup",b._debounce(d,c)),b.options.hide&&a.one("focus",function(){b.show()})},_initControls:function(){var b=this,c=b.controls,d=c.square,e=b.options.controls,f=b._scale[e.strip],g=b.horizontalSlider?"horizontal":"vertical";c.stripSlider.slider({orientation:g,max:f,slide:function(a,c){b.active="strip","h"===e.strip&&"vertical"===g&&(c.value=f-c.value),b._color[e.strip](c.value),b._change.apply(b,arguments)}}),c.squareDrag.draggable({containment:c.square.find(".iris-square-inner"),zIndex:1e3,cursor:"move",drag:function(a,c){b._squareDrag(a,c)},start:function(){d.addClass("iris-dragging"),a(this).addClass("ui-state-focus")},stop:function(){d.removeClass("iris-dragging"),a(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(c){var d="ui-state-focus";c.preventDefault(),"mousedown"===c.type?(b.picker.find("."+d).removeClass(d).blur(),a(this).addClass(d).focus()):a(this).removeClass(d)}).on("keydown",function(a){var d=c.square,e=c.squareDrag,f=e.position(),g=b.options.width/100;switch(a.altKey&&(g*=10),a.keyCode){case 37:f.left-=g;break;case 38:f.top-=g;break;case 39:f.left+=g;break;case 40:f.top+=g;break;default:return!0}f.left=Math.max(0,Math.min(f.left,d.width())),f.top=Math.max(0,Math.min(f.top,d.height())),e.css(f),b._squareDrag(a,{position:f}),a.preventDefault()}),d.mousedown(function(c){var d,e;1===c.which&&a(c.target).is("div")&&(d=b.controls.square.offset(),e={top:c.pageY-d.top,left:c.pageX-d.left},c.preventDefault(),b._squareDrag(c,{position:e}),c.target=b.controls.squareDrag.get(0),b.controls.squareDrag.css(e).trigger(c))}),b.options.palettes&&b._paletteListeners()},_paletteListeners:function(){var b=this;b.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){b._color.fromCSS(a(this).data("color")),b.active="external",b._change()}).on("keydown.palette",".iris-palette",function(b){return 13!==b.keyCode&&32!==b.keyCode||(b.stopPropagation(),void a(this).click())})},_squareDrag:function(a,b){var c=this,d=c.options.controls,e=c._squareDimensions(),f=Math.round((e.h-b.position.top)/e.h*c._scale[d.vert]),g=c._scale[d.horiz]-Math.round((e.w-b.position.left)/e.w*c._scale[d.horiz]);c._color[d.horiz](g)[d.vert](f),c.active="square",c._change.apply(c,arguments)},_setOption:function(b,c){var d,e,f,g=this,h=g.options[b],i=!1;switch(g.options[b]=c,b){case"color":g.onlySlider?(c=parseInt(c,10),c=isNaN(c)||c<0||c>359?h:"hsl("+c+",100,50)",g.options.color=g.options[b]=c,g._color=new Color(c).setHSpace(g.options.mode),g.active="external",g._change()):(c=""+c,d=c.replace(/^#/,""),e=new Color(c).setHSpace(g.options.mode),e.error?g.options[b]=h:(g._color=e,g.options.color=g.options[b]=g._color.toString(),g.active="external",g._change()));break;case"palettes":i=!0,c?g._addPalettes():g.picker.find(".iris-palette-container").remove(),h||g._paletteListeners();break;case"width":i=!0;break;case"border":i=!0,f=c?"addClass":"removeClass",g.picker[f]("iris-border");break;case"mode":case"controls":if(h===c)return;return f=g.element,h=g.options,h.hide=!g.picker.is(":visible"),g.destroy(),g.picker.remove(),a(g.element).iris(h)}i&&g._dimensions(!0)},_squareDimensions:function(a){var c,d,e=this.controls.square;return a!==b&&e.data("dimensions")?e.data("dimensions"):(d=this.controls.squareDrag,c={w:e.width(),h:e.height()},e.data("dimensions",c),c)},_isNonHueControl:function(a,b){return"square"===a&&"h"===this.options.controls.strip||"external"!==b&&("h"!==b||"strip"!==a)},_change:function(){var b=this,c=b.controls,d=b._getHSpaceColor(),e=["square","strip"],f=b.options.controls,g=f[b.active]||"external",h=b.hue;"strip"===b.active?e=[]:"external"!==b.active&&e.pop(),a.each(e,function(a,e){var g,h,i;if(e!==b.active)switch(e){case"strip":g="h"!==f.strip||b.horizontalSlider?d[f.strip]:b._scale[f.strip]-d[f.strip],c.stripSlider.slider("value",g);break;case"square":h=b._squareDimensions(),i={left:d[f.horiz]/b._scale[f.horiz]*h.w,top:h.h-d[f.vert]/b._scale[f.vert]*h.h},b.controls.squareDrag.css(i)}}),d.h!==h&&b._isNonHueControl(b.active,g)&&b._color.h(h),b.hue=b._color.h(),b.options.color=b._color.toString(),b._inited&&b._trigger("change",{type:b.active},{color:b._color}),b.element.is(":input")&&!b._color.error&&(b.element.removeClass("iris-error"),b.onlySlider?b.element.val()!==b.hue&&b.element.val(b.hue):b.element.val()!==b._color.toString()&&b.element.val(b._color.toString())),b._paint(),b._inited=!0,b.active=!1},_debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},show:function(){this.picker.show()},hide:function(){this.picker.hide()},toggle:function(){this.picker.toggle()},color:function(a){return a===!0?this._color.clone():a===b?this._color.toString():void this.option("color",a)}},a.widget("a8c.iris",n),void a('<style id="iris-css">'+m+"</style>").appendTo("head"))}(jQuery),function(a,b){var c=function(a,b){return this instanceof c?this._init(a,b):new c(a,b)};c.fn=c.prototype={_color:0,_alpha:1,error:!1,_hsl:{h:0,s:0,l:0},_hsv:{h:0,s:0,v:0},_hSpace:"hsl",_init:function(a){var c="noop";switch(typeof a){case"object":return a.a!==b&&this.a(a.a),c=a.r!==b?"fromRgb":a.l!==b?"fromHsl":a.v!==b?"fromHsv":c,this[c](a);case"string":return this.fromCSS(a);case"number":return this.fromInt(parseInt(a,10))}return this},_error:function(){return this.error=!0,this},clone:function(){for(var a=new c(this.toInt()),b=["_alpha","_hSpace","_hsl","_hsv","error"],d=b.length-1;d>=0;d--)a[b[d]]=this[b[d]];return a},setHSpace:function(a){return this._hSpace="hsv"===a?a:"hsl",this},noop:function(){return this},fromCSS:function(a){var b,c=/^(rgb|hs(l|v))a?\(/;if(this.error=!1,a=a.replace(/^\s+/,"").replace(/\s+$/,"").replace(/;$/,""),a.match(c)&&a.match(/\)$/)){if(b=a.replace(/(\s|%)/g,"").replace(c,"").replace(/,?\);?$/,"").split(","),b.length<3)return this._error();if(4===b.length&&(this.a(parseFloat(b.pop())),this.error))return this;for(var d=b.length-1;d>=0;d--)if(b[d]=parseInt(b[d],10),isNaN(b[d]))return this._error();return a.match(/^rgb/)?this.fromRgb({r:b[0],g:b[1],b:b[2]}):a.match(/^hsv/)?this.fromHsv({h:b[0],s:b[1],v:b[2]}):this.fromHsl({h:b[0],s:b[1],l:b[2]})}return this.fromHex(a)},fromRgb:function(a,c){return"object"!=typeof a||a.r===b||a.g===b||a.b===b?this._error():(this.error=!1,this.fromInt(parseInt((a.r<<16)+(a.g<<8)+a.b,10),c))},fromHex:function(a){return a=a.replace(/^#/,"").replace(/^0x/,""),3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),this.error=!/^[0-9A-F]{6}$/i.test(a),this.fromInt(parseInt(a,16))},fromHsl:function(a){var c,d,e,f,g,h,i,j;return"object"!=typeof a||a.h===b||a.s===b||a.l===b?this._error():(this._hsl=a,this._hSpace="hsl",h=a.h/360,i=a.s/100,j=a.l/100,0===i?c=d=e=j:(f=j<.5?j*(1+i):j+i-j*i,g=2*j-f,c=this.hue2rgb(g,f,h+1/3),d=this.hue2rgb(g,f,h),e=this.hue2rgb(g,f,h-1/3)),this.fromRgb({r:255*c,g:255*d,b:255*e},!0))},fromHsv:function(a){var c,d,e,f,g,h,i,j,k,l,m;if("object"!=typeof a||a.h===b||a.s===b||a.v===b)return this._error();switch(this._hsv=a,this._hSpace="hsv",c=a.h/360,d=a.s/100,e=a.v/100,i=Math.floor(6*c),j=6*c-i,k=e*(1-d),l=e*(1-j*d),m=e*(1-(1-j)*d),i%6){case 0:f=e,g=m,h=k;break;case 1:f=l,g=e,h=k;break;case 2:f=k,g=e,h=m;break;case 3:f=k,g=l,h=e;break;case 4:f=m,g=k,h=e;break;case 5:f=e,g=k,h=l}return this.fromRgb({r:255*f,g:255*g,b:255*h},!0)},fromInt:function(a,c){return this._color=parseInt(a,10),isNaN(this._color)&&(this._color=0),this._color>16777215?this._color=16777215:this._color<0&&(this._color=0),c===b&&(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(a,b,c){return c<0&&(c+=1),c>1&&(c-=1),c<1/6?a+6*(b-a)*c:c<.5?b:c<2/3?a+(b-a)*(2/3-c)*6:a},toString:function(){var a=parseInt(this._color,10).toString(16);if(this.error)return"";if(a.length<6)for(var b=6-a.length-1;b>=0;b--)a="0"+a;return"#"+a},toCSS:function(a,b){switch(a=a||"hex",b=parseFloat(b||this._alpha),a){case"rgb":case"rgba":var c=this.toRgb();return b<1?"rgba( "+c.r+", "+c.g+", "+c.b+", "+b+" )":"rgb( "+c.r+", "+c.g+", "+c.b+" )";case"hsl":case"hsla":var d=this.toHsl();return b<1?"hsla( "+d.h+", "+d.s+"%, "+d.l+"%, "+b+" )":"hsl( "+d.h+", "+d.s+"%, "+d.l+"% )";default:return this.toString()}},toRgb:function(){return{r:255&this._color>>16,g:255&this._color>>8,b:255&this._color}},toHsl:function(){var a,b,c=this.toRgb(),d=c.r/255,e=c.g/255,f=c.b/255,g=Math.max(d,e,f),h=Math.min(d,e,f),i=(g+h)/2;if(g===h)a=b=0;else{var j=g-h;switch(b=i>.5?j/(2-g-h):j/(g+h),g){case d:a=(e-f)/j+(e<f?6:0);break;case e:a=(f-d)/j+2;break;case f:a=(d-e)/j+4}a/=6}return a=Math.round(360*a),0===a&&this._hsl.h!==a&&(a=this._hsl.h),b=Math.round(100*b),0===b&&this._hsl.s&&(b=this._hsl.s),{h:a,s:b,l:Math.round(100*i)}},toHsv:function(){var a,b,c=this.toRgb(),d=c.r/255,e=c.g/255,f=c.b/255,g=Math.max(d,e,f),h=Math.min(d,e,f),i=g,j=g-h;if(b=0===g?0:j/g,g===h)a=b=0;else{switch(g){case d:a=(e-f)/j+(e<f?6:0);break;case e:a=(f-d)/j+2;break;case f:a=(d-e)/j+4}a/=6}return a=Math.round(360*a),0===a&&this._hsv.h!==a&&(a=this._hsv.h),b=Math.round(100*b),0===b&&this._hsv.s&&(b=this._hsv.s),{h:a,s:b,v:Math.round(100*i)}},toInt:function(){return this._color},toIEOctoHex:function(){var a=this.toString(),b=parseInt(255*this._alpha,10).toString(16);return 1===b.length&&(b="0"+b),"#"+b+a.replace(/^#/,"")},toLuminosity:function(){var a=this.toRgb(),b={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c]/255;b[c]=d<=.03928?d/12.92:Math.pow((d+.055)/1.055,2.4)}return.2126*b.r+.7152*b.g+.0722*b.b},getDistanceLuminosityFrom:function(a){if(!(a instanceof c))throw"getDistanceLuminosityFrom requires a Color object";var b=this.toLuminosity(),d=a.toLuminosity();return b>d?(b+.05)/(d+.05):(d+.05)/(b+.05)},getMaxContrastColor:function(){var a=this.getDistanceLuminosityFrom(new c("#000")),b=this.getDistanceLuminosityFrom(new c("#fff")),d=a>=b?"#000":"#fff";return new c(d)},getReadableContrastingColor:function(a,d){if(!(a instanceof c))return this;var e,f,g,h=d===b?5:d,i=a.getDistanceLuminosityFrom(this);if(i>=h)return this;if(e=a.getMaxContrastColor(),f=e.getDistanceLuminosityFrom(a),f<=h)return e;for(g=0===e.toInt()?-1:1;i<h&&(this.l(g,!0),i=this.getDistanceLuminosityFrom(a),0!==this._color&&16777215!==this._color););return this},a:function(a){if(a===b)return this._alpha;var c=parseFloat(a);return isNaN(c)?this._error():(this._alpha=c,this)},darken:function(a){return a=a||5,this.l(-a,!0)},lighten:function(a){return a=a||5,this.l(a,!0)},saturate:function(a){return a=a||15,this.s(a,!0)},desaturate:function(a){return a=a||15,this.s(-a,!0)},toGrayscale:function(){return this.setHSpace("hsl").s(0)},getComplement:function(){return this.h(180,!0)},getSplitComplement:function(a){a=a||1;var b=180+30*a;return this.h(b,!0)},getAnalog:function(a){a=a||1;var b=30*a;return this.h(b,!0)},getTetrad:function(a){a=a||1;var b=60*a;return this.h(b,!0)},getTriad:function(a){a=a||1;var b=120*a;return this.h(b,!0)},_partial:function(a){var c=d[a];return function(d,e){var f=this._spaceFunc("to",c.space);return d===b?f[a]:(e===!0&&(d=f[a]+d),c.mod&&(d%=c.mod),c.range&&(d=d<c.range[0]?c.range[0]:d>c.range[1]?c.range[1]:d),f[a]=d,this._spaceFunc("from",c.space,f))}},_spaceFunc:function(a,b,c){var d=b||this._hSpace,e=a+d.charAt(0).toUpperCase()+d.substr(1);return this[e](c)}};var d={h:{mod:360},s:{range:[0,100]},l:{space:"hsl",range:[0,100]},v:{space:"hsv",range:[0,100]},r:{space:"rgb",range:[0,255]},g:{space:"rgb",range:[0,255]},b:{space:"rgb",range:[0,255]}};for(var e in d)d.hasOwnProperty(e)&&(c.fn[e]=c.fn._partial(e));"object"==typeof exports?module.exports=c:a.Color=c}(this);
\ No newline at end of file
index 52da393dcc5b1a16e3e22d481a84f1b1e46b0928..a71d8fe17f5ce311367ffe8ca72e2bfafd3afa4a 100644 (file)
@@ -1,20 +1,33 @@
 /* global ajaxurl */
-jQuery(function($){
-       $( 'body' ).bind( 'click.wp-gallery', function(e){
+
+/**
+ * This file is used on media-upload.php which has been replaced by media-new.php and upload.php
+ * Deprecated since 3.5.0
+ */
+jQuery(function($) {
+       /**
+        * Adds a click event handler to the element with a 'wp-gallery' class.
+        */
+       $( 'body' ).bind( 'click.wp-gallery', function(e) {
                var target = $( e.target ), id, img_size;
 
                if ( target.hasClass( 'wp-set-header' ) ) {
+                       // Opens the image to preview it full size.
                        ( window.dialogArguments || opener || parent || top ).location.href = target.data( 'location' );
                        e.preventDefault();
                } else if ( target.hasClass( 'wp-set-background' ) ) {
+                       // Sets the image as background of the theme.
                        id = target.data( 'attachment-id' );
                        img_size = $( 'input[name="attachments[' + id + '][image-size]"]:checked').val();
 
+                       /**
+                        * This AJAX action has been deprecated since 3.5.0, see custom-background.php
+                        */
                        jQuery.post(ajaxurl, {
                                action: 'set-background-image',
                                attachment_id: id,
                                size: img_size
-                       }, function(){
+                       }, function() {
                                var win = window.dialogArguments || opener || parent || top;
                                win.tb_remove();
                                win.location.reload();
index 5a685a31509fb8ce0238020d7adf312cc42bde15..535aaf12aff8751fb4a98bb1b677a14f4d7e0c90 100644 (file)
@@ -82,9 +82,15 @@ var wpNavMenu;
                                shiftDepthClass : function(change) {
                                        return this.each(function(){
                                                var t = $(this),
-                                                       depth = t.menuItemDepth();
-                                               $(this).removeClass('menu-item-depth-'+ depth )
-                                                       .addClass('menu-item-depth-'+ (depth + change) );
+                                                       depth = t.menuItemDepth(),
+                                                       newDepth = depth + change;
+
+                                               t.removeClass( 'menu-item-depth-'+ depth )
+                                                       .addClass( 'menu-item-depth-'+ ( newDepth ) );
+
+                                               if ( 0 === newDepth ) {
+                                                       t.find( '.is-submenu' ).hide();
+                                               }
                                        });
                                },
                                childMenuItems : function() {
@@ -400,14 +406,13 @@ var wpNavMenu;
                        } );
 
                        // Links for moving items
-                       menu.on( 'click', '.menus-move', function ( e ) {
+                       menu.on( 'click', '.menus-move', function () {
                                var $this = $( this ),
                                        dir = $this.data( 'dir' );
 
                                if ( 'undefined' !== typeof dir ) {
                                        api.moveMenuItem( $( this ).parents( 'li.menu-item' ).find( 'a.item-edit' ), dir );
                                }
-                               e.preventDefault();
                        });
                },
 
@@ -509,8 +514,8 @@ var wpNavMenu;
                 */
                refreshAdvancedAccessibility : function() {
 
-                       // Hide all links by default
-                       $( '.menu-item-settings .field-move a' ).hide();
+                       // Hide all the move buttons by default.
+                       $( '.menu-item-settings .field-move .menus-move' ).hide();
 
                        // Mark all menu items as unprocessed
                        $( 'a.item-edit' ).data( 'needs_accessibility_refresh', true );
@@ -882,17 +887,21 @@ var wpNavMenu;
                                inputEvent = 'keyup';
                        }
 
-                       $( '.quick-search' ).on( inputEvent, function() {
-                               var t = $(this);
+                       $( '#nav-menu-meta' ).on( inputEvent, '.quick-search', function() {
+                               var $this = $( this );
+
+                               $this.attr( 'autocomplete', 'off' );
 
-                               if( searchTimer ) clearTimeout(searchTimer);
+                               if ( searchTimer ) {
+                                       clearTimeout( searchTimer );
+                               }
 
-                               searchTimer = setTimeout(function(){
-                                       api.updateQuickSearchResults( t );
-                               }, 500 );
-                       }).on( 'blur', function() {
+                               searchTimer = setTimeout( function() {
+                                       api.updateQuickSearchResults( $this );
+                               }, 500 );
+                       }).on( 'blur', '.quick-search', function() {
                                api.lastSearch = '';
-                       }).attr('autocomplete','off');
+                       });
                },
 
                updateQuickSearchResults : function(input) {
@@ -1054,6 +1063,13 @@ var wpNavMenu;
                                        // select the search bar
                                        $('.quick-search', wrapper).focus();
 
+                                       // Hide controls in the search tab if no items found.
+                                       if ( ! wrapper.find( '.tabs-panel-active .menu-item-title' ).length ) {
+                                               wrapper.addClass( 'has-no-menu-item' );
+                                       } else {
+                                               wrapper.removeClass( 'has-no-menu-item' );
+                                       }
+
                                        e.preventDefault();
                                } else if ( target.hasClass('select-all') ) {
                                        selectAreaMatch = /#(.*)$/.exec(e.target.href);
@@ -1073,34 +1089,38 @@ var wpNavMenu;
                                        else if ( e.target.id && -1 != e.target.id.indexOf('submit-') )
                                                $('#' + e.target.id.replace(/submit-/, '')).addSelectedToMenu( api.addMenuItemToBottom );
                                        return false;
-                               } else if ( target.hasClass('page-numbers') ) {
-                                       $.post( ajaxurl, e.target.href.replace(/.*\?/, '').replace(/action=([^&]*)/, '') + '&action=menu-get-metabox',
-                                               function( resp ) {
-                                                       if ( -1 == resp.indexOf('replace-id') )
-                                                               return;
-
-                                                       var metaBoxData = $.parseJSON(resp),
-                                                       toReplace = document.getElementById(metaBoxData['replace-id']),
-                                                       placeholder = document.createElement('div'),
-                                                       wrap = document.createElement('div');
-
-                                                       if ( ! metaBoxData.markup || ! toReplace )
-                                                               return;
+                               }
+                       });
 
-                                                       wrap.innerHTML = metaBoxData.markup ? metaBoxData.markup : '';
+                       /*
+                        * Delegate the `click` event and attach it just to the pagination
+                        * links thus excluding the current page `<span>`. See ticket #35577.
+                        */
+                       $( '#nav-menu-meta' ).on( 'click', 'a.page-numbers', function() {
+                               var $container = $( this ).closest( '.inside' );
 
-                                                       toReplace.parentNode.insertBefore( placeholder, toReplace );
-                                                       placeholder.parentNode.removeChild( toReplace );
+                               $.post( ajaxurl, this.href.replace( /.*\?/, '' ).replace( /action=([^&]*)/, '' ) + '&action=menu-get-metabox',
+                                       function( resp ) {
+                                               var metaBoxData = $.parseJSON( resp ),
+                                                       toReplace;
 
-                                                       placeholder.parentNode.insertBefore( wrap, placeholder );
+                                               if ( -1 === resp.indexOf( 'replace-id' ) ) {
+                                                       return;
+                                               }
 
-                                                       placeholder.parentNode.removeChild( placeholder );
+                                               // Get the post type menu meta box to update.
+                                               toReplace = document.getElementById( metaBoxData['replace-id'] );
 
+                                               if ( ! metaBoxData.markup || ! toReplace ) {
+                                                       return;
                                                }
-                                       );
 
-                                       return false;
-                               }
+                                               // Update the post type menu meta box with new content from the response.
+                                               $container.html( metaBoxData.markup );
+                                       }
+                               );
+
+                               return false;
                        });
                },
 
@@ -1186,11 +1206,13 @@ var wpNavMenu;
                        form = document.getElementById('nav-menu-meta'),
                        pattern = /menu-item[(\[^]\]*/,
                        $items = $('<div>').html(resp).find('li'),
+                       wrapper = panel.closest( '.accordion-section-content' ),
                        $item;
 
                        if( ! $items.length ) {
                                $('.categorychecklist', panel).html( '<li><p>' + navMenuL10n.noResultsFound + '</p></li>' );
                                $( '.spinner', panel ).removeClass( 'is-active' );
+                               wrapper.addClass( 'has-no-menu-item' );
                                return;
                        }
 
@@ -1218,6 +1240,7 @@ var wpNavMenu;
 
                        $('.categorychecklist', panel).html( $items );
                        $( '.spinner', panel ).removeClass( 'is-active' );
+                       wrapper.removeClass( 'has-no-menu-item' );
                },
 
                removeMenuItem : function(el) {
index 8fda6814e66521d60aeebfe7cf56ac993bd62dad..62c0dbc49dc8a9dea2340fda5b2dbc4367ca2078 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&&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
+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(),e=d+b;c.removeClass("menu-item-depth-"+d).addClass("menu-item-depth-"+e),0===e&&c.find(".is-submenu").hide()})},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(){var c=a(this),d=c.data("dir");"undefined"!=typeof d&&b.moveMenuItem(a(this).parents("li.menu-item").find("a.item-edit"),d)})},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 .menus-move").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("#nav-menu-meta").on(d,".quick-search",function(){var d=a(this);d.attr("autocomplete","off"),c&&clearTimeout(c),c=setTimeout(function(){b.updateQuickSearchResults(d)},500)}).on("blur",".quick-search",function(){b.lastSearch=""})},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(),f.find(".tabs-panel-active .menu-item-title").length?f.removeClass("has-no-menu-item"):f.addClass("has-no-menu-item"),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}),a("#nav-menu-meta").on("click","a.page-numbers",function(){var b=a(this).closest(".inside");return a.post(ajaxurl,this.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(c){var d,e=a.parseJSON(c);-1!==c.indexOf("replace-id")&&(d=document.getElementById(e["replace-id"]),e.markup&&d&&b.html(e.markup))}),!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"),l=d.closest(".accordion-section-content");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),a(".spinner",d).removeClass("is-active"),void l.removeClass("has-no-menu-item")):(a(".categorychecklist",d).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>"),a(".spinner",d).removeClass("is-active"),void l.addClass("has-no-menu-item"))},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 1ead4bed1cc0e4c3bb06ee513f91a6930f637f84..662c62bff1ddf24237f0868ff8045e4fde69d65f 100644 (file)
 /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */
 /* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply */
 
+/**
+ * Contains all dynamic functionality needed on post and term pages.
+ *
+ * @summary Control page and term functionality.
+ */
+
 var commentsBox, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint, makeSlugeditClickable, editPermalink;
-// Back-compat: prevent fatal errors
+// Backwards compatibility: prevent fatal errors.
 makeSlugeditClickable = editPermalink = function(){};
 
+// Make sure the wp object exists.
 window.wp = window.wp || {};
 
 ( function( $ ) {
        var titleHasFocus = false;
 
-commentsBox = {
-       st : 0,
-
-       get : function(total, num) {
-               var st = this.st, data;
-               if ( ! num )
-                       num = 20;
-
-               this.st += num;
-               this.total = total;
-               $( '#commentsdiv .spinner' ).addClass( 'is-active' );
-
-               data = {
-                       'action' : 'get-comments',
-                       'mode' : 'single',
-                       '_ajax_nonce' : $('#add_comment_nonce').val(),
-                       'p' : $('#post_ID').val(),
-                       'start' : st,
-                       'number' : num
-               };
-
-               $.post(ajaxurl, data,
-                       function(r) {
-                               r = wpAjax.parseAjaxResponse(r);
-                               $('#commentsdiv .widefat').show();
-                               $( '#commentsdiv .spinner' ).removeClass( 'is-active' );
-
-                               if ( 'object' == typeof r && r.responses[0] ) {
-                                       $('#the-comment-list').append( r.responses[0].data );
+       /**
+        * Control loading of comments on the post and term edit pages.
+        *
+        * @type {{st: number, get: commentsBox.get, load: commentsBox.load}}
+        *
+        * @namespace commentsBox
+        */
+       commentsBox = {
+               // Comment offset to use when fetching new comments.
+               st : 0,
+
+               /**
+                * Fetch comments using AJAX and display them in the box.
+                *
+                * @param {int} total Total number of comments for this post.
+                * @param {int} num   Optional. Number of comments to fetch, defaults to 20.
+                * @returns {boolean} Always returns false.
+                *
+                * @memberof commentsBox
+                */
+               get : function(total, num) {
+                       var st = this.st, data;
+                       if ( ! num )
+                               num = 20;
+
+                       this.st += num;
+                       this.total = total;
+                       $( '#commentsdiv .spinner' ).addClass( 'is-active' );
+
+                       data = {
+                               'action' : 'get-comments',
+                               'mode' : 'single',
+                               '_ajax_nonce' : $('#add_comment_nonce').val(),
+                               'p' : $('#post_ID').val(),
+                               'start' : st,
+                               'number' : num
+                       };
+
+                       $.post(
+                               ajaxurl,
+                               data,
+                               function(r) {
+                                       r = wpAjax.parseAjaxResponse(r);
+                                       $('#commentsdiv .widefat').show();
+                                       $( '#commentsdiv .spinner' ).removeClass( 'is-active' );
+
+                                       if ( 'object' == typeof r && r.responses[0] ) {
+                                               $('#the-comment-list').append( r.responses[0].data );
+
+                                               theList = theExtraList = null;
+                                               $( 'a[className*=\':\']' ).unbind();
+
+                                               // If the offset is over the total number of comments we cannot fetch any more, so hide the button.
+                                               if ( commentsBox.st > commentsBox.total )
+                                                       $('#show-comments').hide();
+                                               else
+                                                       $('#show-comments').show().children('a').html(postL10n.showcomm);
+
+                                               return;
+                                       } else if ( 1 == r ) {
+                                               $('#show-comments').html(postL10n.endcomm);
+                                               return;
+                                       }
 
-                                       theList = theExtraList = null;
-                                       $( 'a[className*=\':\']' ).unbind();
+                                       $('#the-comment-list').append('<tr><td colspan="2">'+wpAjax.broken+'</td></tr>');
+                               }
+                       );
+
+                       return false;
+               },
+
+               /**
+                * Load the next batch of comments.
+                *
+                * @param {int} total Total number of comments to load.
+                *
+                * @memberof commentsBox
+                */
+               load: function(total){
+                       this.st = jQuery('#the-comment-list tr.comment:visible').length;
+                       this.get(total);
+               }
+       };
 
-                                       if ( commentsBox.st > commentsBox.total )
-                                               $('#show-comments').hide();
-                                       else
-                                               $('#show-comments').show().children('a').html(postL10n.showcomm);
+       /**
+        * Overwrite the content of the Featured Image postbox
+        *
+        * @param {string} html New HTML to be displayed in the content area of the postbox.
+        *
+        * @global
+        */
+       WPSetThumbnailHTML = function(html){
+               $('.inside', '#postimagediv').html(html);
+       };
 
-                                       return;
-                               } else if ( 1 == r ) {
-                                       $('#show-comments').html(postL10n.endcomm);
-                                       return;
-                               }
+       /**
+        * Set the Image ID of the Featured Image
+        *
+        * @param {int} id The post_id of the image to use as Featured Image.
+        *
+        * @global
+        */
+       WPSetThumbnailID = function(id){
+               var field = $('input[value="_thumbnail_id"]', '#list-table');
+               if ( field.length > 0 ) {
+                       $('#meta\\[' + field.attr('id').match(/[0-9]+/) + '\\]\\[value\\]').text(id);
+               }
+       };
 
-                               $('#the-comment-list').append('<tr><td colspan="2">'+wpAjax.broken+'</td></tr>');
+       /**
+        * Remove the Featured Image
+        *
+        * @param {string} nonce Nonce to use in the request.
+        *
+        * @global
+        */
+       WPRemoveThumbnail = function(nonce){
+               $.post(ajaxurl, {
+                       action: 'set-post-thumbnail', post_id: $( '#post_ID' ).val(), thumbnail_id: -1, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie )
+               },
+                       /**
+                        * Handle server response
+                        *
+                        * @param {string} str Response, will be '0' when an error occurred otherwise contains link to add Featured Image.
+                        */
+                       function(str){
+                       if ( str == '0' ) {
+                               alert( setPostThumbnailL10n.error );
+                       } else {
+                               WPSetThumbnailHTML(str);
                        }
+               }
                );
+       };
 
-               return false;
-       },
-
-       load: function(total){
-               this.st = jQuery('#the-comment-list tr.comment:visible').length;
-               this.get(total);
-       }
-};
-
-WPSetThumbnailHTML = function(html){
-       $('.inside', '#postimagediv').html(html);
-};
-
-WPSetThumbnailID = function(id){
-       var field = $('input[value="_thumbnail_id"]', '#list-table');
-       if ( field.length > 0 ) {
-               $('#meta\\[' + field.attr('id').match(/[0-9]+/) + '\\]\\[value\\]').text(id);
-       }
-};
-
-WPRemoveThumbnail = function(nonce){
-       $.post(ajaxurl, {
-               action: 'set-post-thumbnail', post_id: $( '#post_ID' ).val(), thumbnail_id: -1, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie )
-       }, function(str){
-               if ( str == '0' ) {
-                       alert( setPostThumbnailL10n.error );
-               } else {
-                       WPSetThumbnailHTML(str);
-               }
-       }
-       );
-};
+       /**
+        * Heartbeat locks.
+        *
+        * Used to lock editing of an object by only one user at a time.
+        *
+        * When the user does not send a heartbeat in a heartbeat-time
+        * the user is no longer editing and another user can start editing.
+        */
+       $(document).on( 'heartbeat-send.refresh-lock', function( e, data ) {
+               var lock = $('#active_post_lock').val(),
+                       post_id = $('#post_ID').val(),
+                       send = {};
+
+               if ( ! post_id || ! $('#post-lock-dialog').length )
+                       return;
 
-$(document).on( 'heartbeat-send.refresh-lock', function( e, data ) {
-       var lock = $('#active_post_lock').val(),
-               post_id = $('#post_ID').val(),
-               send = {};
+               send.post_id = post_id;
 
-       if ( ! post_id || ! $('#post-lock-dialog').length )
-               return;
+               if ( lock )
+                       send.lock = lock;
 
-       send.post_id = post_id;
+               data['wp-refresh-post-lock'] = send;
 
-       if ( lock )
-               send.lock = lock;
+       }).on( 'heartbeat-tick.refresh-lock', function( e, data ) {
+               // Post locks: update the lock string or show the dialog if somebody has taken over editing.
+               var received, wrap, avatar;
 
-       data['wp-refresh-post-lock'] = send;
+               if ( data['wp-refresh-post-lock'] ) {
+                       received = data['wp-refresh-post-lock'];
 
-}).on( 'heartbeat-tick.refresh-lock', function( e, data ) {
-       // Post locks: update the lock string or show the dialog if somebody has taken over editing
-       var received, wrap, avatar;
+                       if ( received.lock_error ) {
+                               // Show "editing taken over" message.
+                               wrap = $('#post-lock-dialog');
 
-       if ( data['wp-refresh-post-lock'] ) {
-               received = data['wp-refresh-post-lock'];
+                               if ( wrap.length && ! wrap.is(':visible') ) {
+                                       if ( wp.autosave ) {
+                                               // Save the latest changes and disable.
+                                               $(document).one( 'heartbeat-tick', function() {
+                                                       wp.autosave.server.suspend();
+                                                       wrap.removeClass('saving').addClass('saved');
+                                                       $(window).off( 'beforeunload.edit-post' );
+                                               });
 
-               if ( received.lock_error ) {
-                       // show "editing taken over" message
-                       wrap = $('#post-lock-dialog');
+                                               wrap.addClass('saving');
+                                               wp.autosave.server.triggerSave();
+                                       }
 
-                       if ( wrap.length && ! wrap.is(':visible') ) {
-                               if ( wp.autosave ) {
-                                       // Save the latest changes and disable
-                                       $(document).one( 'heartbeat-tick', function() {
-                                               wp.autosave.server.suspend();
-                                               wrap.removeClass('saving').addClass('saved');
-                                               $(window).off( 'beforeunload.edit-post' );
-                                       });
-
-                                       wrap.addClass('saving');
-                                       wp.autosave.server.triggerSave();
-                               }
+                                       if ( received.lock_error.avatar_src ) {
+                                               avatar = $( '<img class="avatar avatar-64 photo" width="64" height="64" alt="" />' ).attr( 'src', received.lock_error.avatar_src.replace( /&amp;/g, '&' ) );
+                                               wrap.find('div.post-locked-avatar').empty().append( avatar );
+                                       }
 
-                               if ( received.lock_error.avatar_src ) {
-                                       avatar = $( '<img class="avatar avatar-64 photo" width="64" height="64" alt="" />' ).attr( 'src', received.lock_error.avatar_src.replace( /&amp;/g, '&' ) );
-                                       wrap.find('div.post-locked-avatar').empty().append( avatar );
+                                       wrap.show().find('.currently-editing').text( received.lock_error.text );
+                                       wrap.find('.wp-tab-first').focus();
                                }
-
-                               wrap.show().find('.currently-editing').text( received.lock_error.text );
-                               wrap.find('.wp-tab-first').focus();
+                       } else if ( received.new_lock ) {
+                               $('#active_post_lock').val( received.new_lock );
                        }
-               } else if ( received.new_lock ) {
-                       $('#active_post_lock').val( received.new_lock );
                }
-       }
-}).on( 'before-autosave.update-post-slug', function() {
-       titleHasFocus = document.activeElement && document.activeElement.id === 'title';
-}).on( 'after-autosave.update-post-slug', function() {
-       // Create slug area only if not already there
-       // and the title field was not focused (user was not typing a title) when autosave ran
-       if ( ! $('#edit-slug-box > *').length && ! titleHasFocus ) {
-               $.post( ajaxurl, {
-                               action: 'sample-permalink',
-                               post_id: $('#post_ID').val(),
-                               new_title: $('#title').val(),
-                               samplepermalinknonce: $('#samplepermalinknonce').val()
-                       },
-                       function( data ) {
-                               if ( data != '-1' ) {
-                                       $('#edit-slug-box').html(data);
+       }).on( 'before-autosave.update-post-slug', function() {
+               titleHasFocus = document.activeElement && document.activeElement.id === 'title';
+       }).on( 'after-autosave.update-post-slug', function() {
+
+               /*
+                * Create slug area only if not already there
+                * and the title field was not focused (user was not typing a title) when autosave ran.
+                */
+               if ( ! $('#edit-slug-box > *').length && ! titleHasFocus ) {
+                       $.post( ajaxurl, {
+                                       action: 'sample-permalink',
+                                       post_id: $('#post_ID').val(),
+                                       new_title: $('#title').val(),
+                                       samplepermalinknonce: $('#samplepermalinknonce').val()
+                               },
+                               function( data ) {
+                                       if ( data != '-1' ) {
+                                               $('#edit-slug-box').html(data);
+                                       }
                                }
-                       }
-               );
-       }
-});
+                       );
+               }
+       });
 
 }(jQuery));
 
+/**
+ * Heartbeat refresh nonces.
+ */
 (function($) {
        var check, timeout;
 
+       /**
+        * Only allow to check for nonce refresh every 30 seconds.
+        */
        function schedule() {
                check = false;
                window.clearTimeout( timeout );
@@ -205,6 +283,9 @@ $(document).on( 'heartbeat-send.refresh-lock', function( e, data ) {
        });
 }(jQuery));
 
+/**
+ * All post and postbox controls and functionality.
+ */
 jQuery(document).ready( function($) {
        var stamp, visibility, $submitButtons, updateVisibility, updateText,
                sticky = '',
@@ -220,32 +301,37 @@ jQuery(document).ready( function($) {
 
        postboxes.add_postbox_toggles(pagenow);
 
-       // Clear the window name. Otherwise if this is a former preview window where the user navigated to edit another post,
-       // and the first post is still being edited, clicking Preview there will use this window to show the preview.
+       /*
+        * Clear the window name. Otherwise if this is a former preview window where the user navigated to edit another post,
+        * and the first post is still being edited, clicking Preview there will use this window to show the preview.
+        */
        window.name = '';
 
        // Post locks: contain focus inside the dialog. If the dialog is shown, focus the first item.
        $('#post-lock-dialog .notification-dialog').on( 'keydown', function(e) {
+               // Don't do anything when [tab] is pressed.
                if ( e.which != 9 )
                        return;
 
                var target = $(e.target);
 
+               // [shift] + [tab] on first tab cycles back to last tab.
                if ( target.hasClass('wp-tab-first') && e.shiftKey ) {
                        $(this).find('.wp-tab-last').focus();
                        e.preventDefault();
+               // [tab] on last tab cycles back to first tab.
                } else if ( target.hasClass('wp-tab-last') && ! e.shiftKey ) {
                        $(this).find('.wp-tab-first').focus();
                        e.preventDefault();
                }
        }).filter(':visible').find('.wp-tab-first').focus();
 
-       // Set the heartbeat interval to 15 sec. if post lock dialogs are enabled
+       // Set the heartbeat interval to 15 sec. if post lock dialogs are enabled.
        if ( wp.heartbeat && $('#post-lock-dialog').length ) {
                wp.heartbeat.interval( 15 );
        }
 
-       // The form is being submitted by the user
+       // The form is being submitted by the user.
        $submitButtons = $submitpost.find( ':submit, a.submitdelete, #post-preview' ).on( 'click.edit-post', function( event ) {
                var $button = $(this);
 
@@ -265,7 +351,7 @@ jQuery(document).ready( function($) {
                                return;
                        }
 
-                       // Stop autosave
+                       // Stop auto save.
                        if ( wp.autosave ) {
                                wp.autosave.server.suspend();
                        }
@@ -350,7 +436,7 @@ jQuery(document).ready( function($) {
                }
        });
 
-       // Autosave new posts after a title is typed
+       // Auto save new posts after a title is typed.
        if ( $( '#auto_draft' ).val() ) {
                $( '#title' ).blur( function() {
                        var cancel;
@@ -359,7 +445,7 @@ jQuery(document).ready( function($) {
                                return;
                        }
 
-                       // Cancel the autosave when the blur was triggered by the user submitting the form
+                       // Cancel the auto save when the blur was triggered by the user submitting the form.
                        $('form#post').one( 'submit', function() {
                                cancel = true;
                        });
@@ -388,6 +474,10 @@ jQuery(document).ready( function($) {
                }
        });
 
+       /*
+        * When the user is trying to load another page, or reloads current page
+        * show a confirmation dialog when there are unsaved changes.
+        */
        $(window).on( 'beforeunload.edit-post', function() {
                var editor = typeof tinymce !== 'undefined' && tinymce.get('content');
 
@@ -401,26 +491,50 @@ jQuery(document).ready( function($) {
                        return;
                }
 
-               // Unload is triggered (by hand) on removing the Thickbox iframe.
-               // Make sure we process only the main document unload.
+               /*
+                * Unload is triggered (by hand) on removing the Thickbox iframe.
+                * Make sure we process only the main document unload.
+                */
                if ( event.target && event.target.nodeName != '#document' ) {
                        return;
                }
 
-               $.ajax({
-                       type: 'POST',
-                       url: ajaxurl,
-                       async: false,
-                       data: {
-                               action: 'wp-remove-post-lock',
-                               _wpnonce: $('#_wpnonce').val(),
-                               post_ID: $('#post_ID').val(),
-                               active_post_lock: $('#active_post_lock').val()
+               var postID = $('#post_ID').val();
+               var postLock = $('#active_post_lock').val();
+
+               if ( ! postID || ! postLock ) {
+                       return;
+               }
+
+               var data = {
+                       action: 'wp-remove-post-lock',
+                       _wpnonce: $('#_wpnonce').val(),
+                       post_ID: postID,
+                       active_post_lock: postLock
+               };
+
+               if ( window.FormData && window.navigator.sendBeacon ) {
+                       var formData = new window.FormData();
+
+                       $.each( data, function( key, value ) {
+                               formData.append( key, value );
+                       });
+
+                       if ( window.navigator.sendBeacon( ajaxurl, formData ) ) {
+                               return;
                        }
+               }
+
+               // Fall back to a synchronous POST request.
+               // See https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon
+               $.post({
+                       async: false,
+                       data: data,
+                       url: ajaxurl
                });
        });
 
-       // multi-taxonomies
+       // Multiple Taxonomies.
        if ( $('#tagsdiv-post_tag').length ) {
                window.tagBox && window.tagBox.init();
        } else {
@@ -432,7 +546,7 @@ jQuery(document).ready( function($) {
                });
        }
 
-       // categories
+       // Handle categories.
        $('.categorydiv').each( function(){
                var this_id = $(this).attr('id'), catAddBefore, catAddAfter, taxonomyParts, taxonomy, settingName;
 
@@ -440,8 +554,10 @@ jQuery(document).ready( function($) {
                taxonomyParts.shift();
                taxonomy = taxonomyParts.join('-');
                settingName = taxonomy + '_tab';
-               if ( taxonomy == 'category' )
+
+               if ( taxonomy == 'category' ) {
                        settingName = 'cats';
+               }
 
                // TODO: move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.js
                $('a', '#' + taxonomy + '-tabs').click( function( e ) {
@@ -450,34 +566,62 @@ jQuery(document).ready( function($) {
                        $(this).parent().addClass('tabs').siblings('li').removeClass('tabs');
                        $('#' + taxonomy + '-tabs').siblings('.tabs-panel').hide();
                        $(t).show();
-                       if ( '#' + taxonomy + '-all' == t )
+                       if ( '#' + taxonomy + '-all' == t ) {
                                deleteUserSetting( settingName );
-                       else
+                       } else {
                                setUserSetting( settingName, 'pop' );
+                       }
                });
 
                if ( getUserSetting( settingName ) )
                        $('a[href="#' + taxonomy + '-pop"]', '#' + taxonomy + '-tabs').click();
 
-               // Ajax Cat
-               $( '#new' + taxonomy ).one( 'focus', function() { $( this ).val( '' ).removeClass( 'form-input-tip' ); } );
+               // Add category button controls.
+               $('#new' + taxonomy).one( 'focus', function() {
+                       $( this ).val( '' ).removeClass( 'form-input-tip' );
+               });
 
+               // On [enter] submit the taxonomy.
                $('#new' + taxonomy).keypress( function(event){
                        if( 13 === event.keyCode ) {
                                event.preventDefault();
                                $('#' + taxonomy + '-add-submit').click();
                        }
                });
-               $('#' + taxonomy + '-add-submit').click( function(){ $('#new' + taxonomy).focus(); });
 
+               // After submitting a new taxonomy, re-focus the input field.
+               $('#' + taxonomy + '-add-submit').click( function() {
+                       $('#new' + taxonomy).focus();
+               });
+
+               /**
+                * Before adding a new taxonomy, disable submit button.
+                *
+                * @param {Object} s Taxonomy object which will be added.
+                *
+                * @returns {Object}
+                */
                catAddBefore = function( s ) {
-                       if ( !$('#new'+taxonomy).val() )
+                       if ( !$('#new'+taxonomy).val() ) {
                                return false;
+                       }
+
                        s.data += '&' + $( ':checked', '#'+taxonomy+'checklist' ).serialize();
                        $( '#' + taxonomy + '-add-submit' ).prop( 'disabled', true );
                        return s;
                };
 
+               /**
+                * Re-enable submit button after a taxonomy has been added.
+                *
+                * Re-enable submit button.
+                * If the taxonomy has a parent place the taxonomy underneath the parent.
+                *
+                * @param {Object} r Response.
+                * @param {Object} s Taxonomy data.
+                *
+                * @returns void
+                */
                catAddAfter = function( r, s ) {
                        var sup, drop = $('#new'+taxonomy+'_parent');
 
@@ -495,6 +639,7 @@ jQuery(document).ready( function($) {
                        addAfter: catAddAfter
                });
 
+               // Add new taxonomy button toggles input form visibility.
                $('#' + taxonomy + '-add-toggle').click( function( e ) {
                        e.preventDefault();
                        $('#' + taxonomy + '-adder').toggleClass( 'wp-hidden-children' );
@@ -502,6 +647,7 @@ jQuery(document).ready( function($) {
                        $('#new'+taxonomy).focus();
                });
 
+               // Sync checked items between "All {taxonomy}" and "Most used" lists.
                $('#' + taxonomy + 'checklist, #' + taxonomy + 'checklist-pop').on( 'click', 'li.popular-category > label input[type="checkbox"]', function() {
                        var t = $(this), c = t.is(':checked'), id = t.val();
                        if ( id && t.parents('#taxonomy-'+taxonomy).length )
@@ -510,29 +656,51 @@ jQuery(document).ready( function($) {
 
        }); // end cats
 
-       // Custom Fields
+       // Custom Fields postbox.
        if ( $('#postcustom').length ) {
-               $( '#the-list' ).wpList( { addAfter: function() {
-                       $('table#list-table').show();
-               }, addBefore: function( s ) {
-                       s.data += '&post_id=' + $('#post_ID').val();
-                       return s;
-               }
+               $( '#the-list' ).wpList( {
+                       /**
+                        * Add current post_ID to request to fetch custom fields
+                        *
+                        * @param {Object} s Request object.
+                        *
+                        * @returns {Object} Data modified with post_ID attached.
+                        */
+                       addBefore: function( s ) {
+                               s.data += '&post_id=' + $('#post_ID').val();
+                               return s;
+                       },
+                       /**
+                        * Show the listing of custom fields after fetching.
+                        */
+                       addAfter: function() {
+                               $('table#list-table').show();
+                       }
                });
        }
 
-       // submitdiv
+       /*
+        * Publish Post box (#submitdiv)
+        */
        if ( $('#submitdiv').length ) {
                stamp = $('#timestamp').html();
                visibility = $('#post-visibility-display').html();
 
+               /**
+                * When the visibility of a post changes sub-options should be shown or hidden.
+                *
+                * @returns void
+                */
                updateVisibility = function() {
+                       // Show sticky for public posts.
                        if ( $postVisibilitySelect.find('input:radio:checked').val() != 'public' ) {
                                $('#sticky').prop('checked', false);
                                $('#sticky-span').hide();
                        } else {
                                $('#sticky-span').show();
                        }
+
+                       // Show password input field for password protected post.
                        if ( $postVisibilitySelect.find('input:radio:checked').val() != 'password' ) {
                                $('#password-span').hide();
                        } else {
@@ -540,6 +708,11 @@ jQuery(document).ready( function($) {
                        }
                };
 
+               /**
+                * Make sure all labels represent the current settings.
+                *
+                * @returns {boolean} False when an invalid timestamp has been selected, otherwise True.
+                */
                updateText = function() {
 
                        if ( ! $timestampdiv.length )
@@ -553,6 +726,7 @@ jQuery(document).ready( function($) {
                        originalDate = new Date( $('#hidden_aa').val(), $('#hidden_mm').val() -1, $('#hidden_jj').val(), $('#hidden_hh').val(), $('#hidden_mn').val() );
                        currentDate = new Date( $('#cur_aa').val(), $('#cur_mm').val() -1, $('#cur_jj').val(), $('#cur_hh').val(), $('#cur_mn').val() );
 
+                       // Catch unexpected date problems.
                        if ( attemptedDate.getFullYear() != aa || (1 + attemptedDate.getMonth()) != mm || attemptedDate.getDate() != jj || attemptedDate.getMinutes() != mn ) {
                                $timestampdiv.find('.timestamp-wrap').addClass('form-invalid');
                                return false;
@@ -560,6 +734,7 @@ jQuery(document).ready( function($) {
                                $timestampdiv.find('.timestamp-wrap').removeClass('form-invalid');
                        }
 
+                       // Determine what the publish should be depending on the date and post status.
                        if ( attemptedDate > currentDate && $('#original_post_status').val() != 'future' ) {
                                publishOn = postL10n.publishOnFuture;
                                $('#publish').val( postL10n.schedule );
@@ -570,7 +745,10 @@ jQuery(document).ready( function($) {
                                publishOn = postL10n.publishOnPast;
                                $('#publish').val( postL10n.update );
                        }
-                       if ( originalDate.toUTCString() == attemptedDate.toUTCString() ) { //hack
+
+                       // If the date is the same, set it to trigger update events.
+                       if ( originalDate.toUTCString() == attemptedDate.toUTCString() ) {
+                               // Re-set to the current value.
                                $('#timestamp').html(stamp);
                        } else {
                                $('#timestamp').html(
@@ -585,6 +763,7 @@ jQuery(document).ready( function($) {
                                );
                        }
 
+                       // Add "privately published" to post status when applies.
                        if ( $postVisibilitySelect.find('input:radio:checked').val() == 'private' ) {
                                $('#publish').val( postL10n.update );
                                if ( 0 === optPublish.length ) {
@@ -606,7 +785,11 @@ jQuery(document).ready( function($) {
                                if ( postStatus.is(':hidden') )
                                        $('#misc-publishing-actions .edit-post-status').show();
                        }
+
+                       // Update "Status:" to currently selected status.
                        $('#post-status-display').html($('option:selected', postStatus).text());
+
+                       // Show or hide the "Save Draft" button.
                        if ( $('option:selected', postStatus).val() == 'private' || $('option:selected', postStatus).val() == 'publish' ) {
                                $('#save-post').hide();
                        } else {
@@ -620,6 +803,7 @@ jQuery(document).ready( function($) {
                        return true;
                };
 
+               // Show the visibility options and hide the toggle button when opened.
                $( '#visibility .edit-visibility').click( function( e ) {
                        e.preventDefault();
                        if ( $postVisibilitySelect.is(':hidden') ) {
@@ -631,6 +815,7 @@ jQuery(document).ready( function($) {
                        }
                });
 
+               // Cancel visibility selection area and hide it from view.
                $postVisibilitySelect.find('.cancel-post-visibility').click( function( event ) {
                        $postVisibilitySelect.slideUp('fast');
                        $('#visibility-radio-' + $('#hidden-post-visibility').val()).prop('checked', true);
@@ -642,6 +827,7 @@ jQuery(document).ready( function($) {
                        event.preventDefault();
                });
 
+               // Set the selected visibility as current.
                $postVisibilitySelect.find('.save-post-visibility').click( function( event ) { // crazyhorse - multiple ok cancels
                        $postVisibilitySelect.slideUp('fast');
                        $('#visibility .edit-visibility').show().focus();
@@ -649,7 +835,7 @@ jQuery(document).ready( function($) {
 
                        if ( $postVisibilitySelect.find('input:radio:checked').val() != 'public' ) {
                                $('#sticky').prop('checked', false);
-                       } // WEAPON LOCKED
+                       }
 
                        if ( $('#sticky').prop('checked') ) {
                                sticky = 'Sticky';
@@ -661,10 +847,12 @@ jQuery(document).ready( function($) {
                        event.preventDefault();
                });
 
+               // When the selection changes, update labels.
                $postVisibilitySelect.find('input:radio').change( function() {
                        updateVisibility();
                });
 
+               // Edit publish time click.
                $timestampdiv.siblings('a.edit-timestamp').click( function( event ) {
                        if ( $timestampdiv.is( ':hidden' ) ) {
                                $timestampdiv.slideDown( 'fast', function() {
@@ -675,6 +863,7 @@ jQuery(document).ready( function($) {
                        event.preventDefault();
                });
 
+               // Cancel editing the publish time and hide the settings.
                $timestampdiv.find('.cancel-timestamp').click( function( event ) {
                        $timestampdiv.slideUp('fast').siblings('a.edit-timestamp').show().focus();
                        $('#mm').val($('#hidden_mm').val());
@@ -686,6 +875,7 @@ jQuery(document).ready( function($) {
                        event.preventDefault();
                });
 
+               // Save the changed timestamp.
                $timestampdiv.find('.save-timestamp').click( function( event ) { // crazyhorse - multiple ok cancels
                        if ( updateText() ) {
                                $timestampdiv.slideUp('fast');
@@ -694,6 +884,7 @@ jQuery(document).ready( function($) {
                        event.preventDefault();
                });
 
+               // Cancel submit when an invalid timestamp has been selected.
                $('#post').on( 'submit', function( event ) {
                        if ( ! updateText() ) {
                                event.preventDefault();
@@ -707,6 +898,7 @@ jQuery(document).ready( function($) {
                        }
                });
 
+               // Post Status edit click.
                $postStatusSelect.siblings('a.edit-post-status').click( function( event ) {
                        if ( $postStatusSelect.is( ':hidden' ) ) {
                                $postStatusSelect.slideDown( 'fast', function() {
@@ -717,21 +909,31 @@ jQuery(document).ready( function($) {
                        event.preventDefault();
                });
 
+               // Save the Post Status changes and hide the options.
                $postStatusSelect.find('.save-post-status').click( function( event ) {
                        $postStatusSelect.slideUp( 'fast' ).siblings( 'a.edit-post-status' ).show().focus();
                        updateText();
                        event.preventDefault();
                });
 
+               // Cancel Post Status editing and hide the options.
                $postStatusSelect.find('.cancel-post-status').click( function( event ) {
                        $postStatusSelect.slideUp( 'fast' ).siblings( 'a.edit-post-status' ).show().focus();
                        $('#post_status').val( $('#hidden_post_status').val() );
                        updateText();
                        event.preventDefault();
                });
-       } // end submitdiv
+       }
 
-       // permalink
+       /**
+        * Handle the editing of the post_name. Create the required HTML elements and update the changes via AJAX.
+        *
+        * @summary Permalink aka slug aka post_name editing
+        *
+        * @global
+        *
+        * @returns void
+        */
        function editPermalink() {
                var i, slug_value,
                        $el, revert_e,
@@ -745,15 +947,19 @@ jQuery(document).ready( function($) {
                        buttonsOrig = buttons.html(),
                        full = $('#editable-post-name-full');
 
-               // Deal with Twemoji in the post-name
+               // Deal with Twemoji in the post-name.
                full.find( 'img' ).replaceWith( function() { return this.alt; } );
                full = full.html();
 
                permalink.html( permalinkInner );
+
+               // Save current content to revert to when cancelling.
                $el = $( '#editable-post-name' );
                revert_e = $el.html();
 
                buttons.html( '<button type="button" class="save button button-small">' + postL10n.ok + '</button> <button type="button" class="cancel button-link">' + postL10n.cancel + '</button>' );
+
+               // Save permalink changes.
                buttons.children( '.save' ).click( function() {
                        var new_slug = $el.children( 'input' ).val();
 
@@ -761,29 +967,35 @@ jQuery(document).ready( function($) {
                                buttons.children('.cancel').click();
                                return;
                        }
-                       $.post(ajaxurl, {
-                               action: 'sample-permalink',
-                               post_id: postId,
-                               new_slug: new_slug,
-                               new_title: $('#title').val(),
-                               samplepermalinknonce: $('#samplepermalinknonce').val()
-                       }, function(data) {
-                               var box = $('#edit-slug-box');
-                               box.html(data);
-                               if (box.hasClass('hidden')) {
-                                       box.fadeIn('fast', function () {
-                                               box.removeClass('hidden');
-                                       });
-                               }
 
-                               buttons.html(buttonsOrig);
-                               permalink.html(permalinkOrig);
-                               real_slug.val(new_slug);
-                               $( '.edit-slug' ).focus();
-                               wp.a11y.speak( postL10n.permalinkSaved );
-                       });
+                       $.post(
+                               ajaxurl,
+                               {
+                                       action: 'sample-permalink',
+                                       post_id: postId,
+                                       new_slug: new_slug,
+                                       new_title: $('#title').val(),
+                                       samplepermalinknonce: $('#samplepermalinknonce').val()
+                               },
+                               function(data) {
+                                       var box = $('#edit-slug-box');
+                                       box.html(data);
+                                       if (box.hasClass('hidden')) {
+                                               box.fadeIn('fast', function () {
+                                                       box.removeClass('hidden');
+                                               });
+                                       }
+
+                                       buttons.html(buttonsOrig);
+                                       permalink.html(permalinkOrig);
+                                       real_slug.val(new_slug);
+                                       $( '.edit-slug' ).focus();
+                                       wp.a11y.speak( postL10n.permalinkSaved );
+                               }
+                       );
                });
 
+               // Cancel editing of permalink.
                buttons.children( '.cancel' ).click( function() {
                        $('#view-post-btn').show();
                        $el.html(revert_e);
@@ -793,19 +1005,21 @@ jQuery(document).ready( function($) {
                        $( '.edit-slug' ).focus();
                });
 
+               // If more than 1/4th of 'full' is '%', make it empty.
                for ( i = 0; i < full.length; ++i ) {
                        if ( '%' == full.charAt(i) )
                                c++;
                }
-
                slug_value = ( c > full.length / 4 ) ? '' : full;
+
                $el.html( '<input type="text" id="new-post-slug" value="' + slug_value + '" autocomplete="off" />' ).children( 'input' ).keydown( function( e ) {
                        var key = e.which;
-                       // On enter, just save the new slug, don't save the post.
+                       // On [enter], just save the new slug, don't save the post.
                        if ( 13 === key ) {
                                e.preventDefault();
                                buttons.children( '.save' ).click();
                        }
+                       // On [esc] cancel the editing.
                        if ( 27 === key ) {
                                buttons.children( '.cancel' ).click();
                        }
@@ -818,6 +1032,17 @@ jQuery(document).ready( function($) {
                editPermalink();
        });
 
+       /**
+        * Add screen reader text to the title prompt when needed.
+        *
+        * @summary Title screen reader text handler.
+        *
+        * @param {string} id Optional. HTML ID to add the screen reader helper text to.
+        *
+        * @global
+        *
+        * @returns void
+        */
        wptitlehint = function(id) {
                id = id || 'title';
 
@@ -844,19 +1069,24 @@ jQuery(document).ready( function($) {
 
        wptitlehint();
 
-       // Resize the visual and text editors
+       // Resize the WYSIWYG and plain text editors.
        ( function() {
                var editor, offset, mce,
                        $handle = $('#post-status-info'),
                        $postdivrich = $('#postdivrich');
 
-               // No point for touch devices
+               // If there are no textareas or we are on a touch device, we can't do anything.
                if ( ! $textarea.length || 'ontouchstart' in window ) {
-                       // Hide the resize handle
+                       // Hide the resize handle.
                        $('#content-resize-handle').hide();
                        return;
                }
 
+               /**
+                * Handle drag event.
+                *
+                * @param {Object} event Event containing details about the drag.
+                */
                function dragging( event ) {
                        if ( $postdivrich.hasClass( 'wp-editor-expand' ) ) {
                                return;
@@ -871,6 +1101,9 @@ jQuery(document).ready( function($) {
                        event.preventDefault();
                }
 
+               /**
+                * When the dragging stopped make sure we return focus and do a sanity check on the height.
+                */
                function endDrag() {
                        var height, toolbarHeight;
 
@@ -894,7 +1127,7 @@ jQuery(document).ready( function($) {
 
                        $document.off( '.wp-editor-resize' );
 
-                       // sanity check
+                       // Sanity check: normalize height to stay within acceptable ranges.
                        if ( height && height > 50 && height < 5000 ) {
                                setUserSetting( 'ed_size', height );
                        }
@@ -921,8 +1154,9 @@ jQuery(document).ready( function($) {
                }).on( 'mouseup.wp-editor-resize', endDrag );
        })();
 
+       // TinyMCE specific handling of Post Format changes to reflect in the editor.
        if ( typeof tinymce !== 'undefined' ) {
-               // When changing post formats, change the editor body class
+               // When changing post formats, change the editor body class.
                $( '#post-formats-select input.post-format' ).on( 'change.set-editor-class', function() {
                        var editor, body, format = this.id;
 
@@ -933,10 +1167,28 @@ jQuery(document).ready( function($) {
                                $( document ).trigger( 'editor-classchange' );
                        }
                });
+
+               // When changing page template, change the editor body class
+               $( '#page_template' ).on( 'change.set-editor-class', function() {
+                       var editor, body, pageTemplate = $( this ).val() || '';
+
+                       pageTemplate = pageTemplate.substr( pageTemplate.lastIndexOf( '/' ) + 1, pageTemplate.length )
+                               .replace( /\.php$/, '' )
+                               .replace( /\./g, '-' );
+
+                       if ( pageTemplate && ( editor = tinymce.get( 'content' ) ) ) {
+                               body = editor.getBody();
+                               body.className = body.className.replace( /\bpage-template-[^ ]+/, '' );
+                               editor.dom.addClass( body, 'page-template-' + pageTemplate );
+                               $( document ).trigger( 'editor-classchange' );
+                       }
+               });
+
        }
 
-       // Save on pressing Ctrl/Command + S in the Text editor
+       // Save on pressing [ctrl]/[command] + [s] in the Text editor.
        $textarea.on( 'keydown.wp-autosave', function( event ) {
+               // Key [s] has code 83.
                if ( event.which === 83 ) {
                        if ( event.shiftKey || event.altKey || ( isMac && ( ! event.metaKey || event.ctrlKey ) ) || ( ! isMac && ! event.ctrlKey ) ) {
                                return;
@@ -947,6 +1199,7 @@ jQuery(document).ready( function($) {
                }
        });
 
+       // If the last status was auto-draft and the save is triggered, edit the current URL.
        if ( $( '#original_post_status' ).val() === 'auto-draft' && window.history.replaceState ) {
                var location;
 
@@ -960,6 +1213,9 @@ jQuery(document).ready( function($) {
        }
 });
 
+/**
+ * TinyMCE word count display
+ */
 ( function( $, counter ) {
        $( function() {
                var $content = $( '#content' ),
@@ -967,6 +1223,9 @@ jQuery(document).ready( function($) {
                        prevCount = 0,
                        contentEditor;
 
+               /**
+                * Get the word count from TinyMCE and display it
+                */
                function update() {
                        var text, count;
 
@@ -985,6 +1244,12 @@ jQuery(document).ready( function($) {
                        prevCount = count;
                }
 
+               /**
+                * Bind the word count update triggers.
+                *
+                * When a node change in the main TinyMCE editor has been triggered.
+                * When a key has been released in the plain text content editor.
+                */
                $( document ).on( 'tinymce-editor-init', function( event, editor ) {
                        if ( editor.id !== 'content' ) {
                                return;
index 769ff9215e985c3093860da345e664e6e63fdbaa..db128fb1914cc89b37fef162b4d7c10ef3d1cceb 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&&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
+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){if(m&&(!b.target||"#document"==b.target.nodeName)){var c=a("#post_ID").val(),d=a("#active_post_lock").val();if(c&&d){var e={action:"wp-remove-post-lock",_wpnonce:a("#_wpnonce").val(),post_ID:c,active_post_lock:d};if(window.FormData&&window.navigator.sendBeacon){var f=new window.FormData;if(a.each(e,function(a,b){f.append(a,b)}),window.navigator.sendBeacon(ajaxurl,f))return}a.post({async:!1,data:e,url:ajaxurl})}}}),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({addBefore:function(b){return b.data+="&post_id="+a("#post_ID").val(),b},addAfter:function(){a("table#list-table").show()}}),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"))}),a("#page_template").on("change.set-editor-class",function(){var b,c,d=a(this).val()||"";d=d.substr(d.lastIndexOf("/")+1,d.length).replace(/\.php$/,"").replace(/\./g,"-"),d&&(b=tinymce.get("content"))&&(c=b.getBody(),c.className=c.className.replace(/\bpage-template-[^ ]+/,""),b.dom.addClass(c,"page-template-"+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 a8222ee296fc2dbf80fea8f1faba0aaa4cb6632d..bbc73b2a699de3876d9aea782e55338ff36fd13e 100644 (file)
@@ -1,11 +1,45 @@
+/**
+ * Contains the postboxes logic, opening and closing postboxes, reordering and saving
+ * the state and ordering to the database.
+ *
+ * @summary Contains postboxes logic
+ *
+ * @since 2.5.0
+ * @requires jQuery
+ */
+
 /* global ajaxurl, postBoxL10n */
 
+/**
+ * This object contains all function to handle the behaviour of the post boxes. The post boxes are the boxes you see
+ * around the content on the edit page.
+ *
+ * @since 2.7.0
+ *
+ * @namespace postboxes
+ *
+ * @type {Object}
+ */
 var postboxes;
 
 (function($) {
        var $document = $( document );
 
        postboxes = {
+
+               /**
+                * @summary Handles a click on either the postbox heading or the postbox open/close icon.
+                *
+                * Opens or closes the postbox. Expects `this` to equal the clicked element.
+                * Calls postboxes.pbshow if the postbox has been opened, calls postboxes.pbhide
+                * if the postbox has been closed.
+                *
+                * @since 4.4.0
+                * @memberof postboxes
+                * @fires postboxes#postbox-toggled
+                *
+                * @returns {void}
+                */
                handle_click : function () {
                        var $el = $( this ),
                                p = $el.parent( '.postbox' ),
@@ -41,9 +75,30 @@ var postboxes;
                                }
                        }
 
+                       /**
+                        * @summary Fires when a postbox has been opened or closed.
+                        *
+                        * Contains a jQuery object with the relevant postbox element.
+                        *
+                        * @since 4.0.0
+                        * @event postboxes#postbox-toggled
+                        * @type {Object}
+                        */
                        $document.trigger( 'postbox-toggled', p );
                },
 
+               /**
+                * Adds event handlers to all postboxes and screen option on the current page.
+                *
+                * @since 2.7.0
+                * @memberof postboxes
+                *
+                * @param {string} page The page we are currently on.
+                * @param {Object} [args]
+                * @param {Function} args.pbshow A callback that is called when a postbox opens.
+                * @param {Function} args.pbhide A callback that is called when a postbox closes.
+                * @returns {void}
+                */
                add_postbox_toggles : function (page, args) {
                        var $handles = $( '.postbox .hndle, .postbox .handlediv' );
 
@@ -52,16 +107,40 @@ var postboxes;
 
                        $handles.on( 'click.postboxes', this.handle_click );
 
+                       /**
+                        * @since 2.7.0
+                        */
                        $('.postbox .hndle a').click( function(e) {
                                e.stopPropagation();
                        });
 
+                       /**
+                        * @summary Hides a postbox.
+                        *
+                        * Event handler for the postbox dismiss button. After clicking the button
+                        * the postbox will be hidden.
+                        *
+                        * @since 3.2.0
+                        *
+                        * @returns {void}
+                        */
                        $( '.postbox a.dismiss' ).on( 'click.postboxes', function( e ) {
                                var hide_id = $(this).parents('.postbox').attr('id') + '-hide';
                                e.preventDefault();
                                $( '#' + hide_id ).prop('checked', false).triggerHandler('click');
                        });
 
+                       /**
+                        * @summary Hides the postbox element
+                        *
+                        * Event handler for the screen options checkboxes. When a checkbox is
+                        * clicked this function will hide or show the relevant postboxes.
+                        *
+                        * @since 2.7.0
+                        * @fires postboxes#postbox-toggled
+                        *
+                        * @returns {void}
+                        */
                        $('.hide-postbox-tog').bind('click.postboxes', function() {
                                var $el = $(this),
                                        boxId = $el.val(),
@@ -78,11 +157,24 @@ var postboxes;
                                                postboxes.pbhide( boxId );
                                        }
                                }
+
                                postboxes.save_state( page );
                                postboxes._mark_area();
+
+                               /**
+                                * @since 4.0.0
+                                * @see postboxes.handle_click
+                                */
                                $document.trigger( 'postbox-toggled', $postbox );
                        });
 
+                       /**
+                        * @summary Changes the amount of columns based on the layout preferences.
+                        *
+                        * @since 2.8.0
+                        *
+                        * @returns {void}
+                        */
                        $('.columns-prefs input[type="radio"]').bind('click.postboxes', function(){
                                var n = parseInt($(this).val(), 10);
 
@@ -93,6 +185,20 @@ var postboxes;
                        });
                },
 
+               /**
+                * @summary Initializes all the postboxes, mainly their sortable behaviour.
+                *
+                * @since 2.7.0
+                * @memberof postboxes
+                *
+                * @param {string} page The page we are currently on.
+                * @param {Object} [args={}] The arguments for the postbox initializer.
+                * @param {Function} args.pbshow A callback that is called when a postbox opens.
+                * @param {Function} args.pbhide A callback that is called when a postbox
+                *                               closes.
+                *
+                * @returns {void}
+                */
                init : function(page, args) {
                        var isMobile = $( document.body ).hasClass( 'mobile' ),
                                $handleButtons = $( '.postbox .handlediv' );
@@ -110,12 +216,13 @@ var postboxes;
                                tolerance: 'pointer',
                                forcePlaceholderSize: true,
                                helper: function( event, element ) {
-                                       // `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,
-                                       // when the helper is inserted into the DOM for the sortable, no radios are
-                                       // duplicated, and no original radio gets unchecked.
+                                       /* `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,
+                                        * when the helper is inserted into the DOM for the sortable, no radios are
+                                        * duplicated, and no original radio gets unchecked.
+                                        */
                                        return element.clone()
                                                .find( ':input' )
                                                        .attr( 'name', function( i, currentName ) {
@@ -157,6 +264,18 @@ var postboxes;
                        });
                },
 
+               /**
+                * @summary Saves the state of the postboxes to the server.
+                *
+                * Saves the state of the postboxes to the server. It sends two lists, one with
+                * all the closed postboxes, one with all the hidden postboxes.
+                *
+                * @since 2.7.0
+                * @memberof postboxes
+                *
+                * @param {string} page The page we are currently on.
+                * @returns {void}
+                */
                save_state : function(page) {
                        var closed, hidden;
 
@@ -177,6 +296,18 @@ var postboxes;
                        });
                },
 
+               /**
+                * @summary Saves the order of the postboxes to the server.
+                *
+                * Saves the order of the postboxes to the server. Sends a list of all postboxes
+                * inside a sortable area to the server.
+                *
+                * @since 2.8.0
+                * @memberof postboxes
+                *
+                * @param {string} page The page we are currently on.
+                * @returns {void}
+                */
                save_order : function(page) {
                        var postVars, page_columns = $('.columns-prefs input:checked').val() || 0;
 
@@ -186,12 +317,27 @@ var postboxes;
                                page_columns: page_columns,
                                page: page
                        };
+
                        $('.meta-box-sortables').each( function() {
                                postVars[ 'order[' + this.id.split( '-' )[0] + ']' ] = $( this ).sortable( 'toArray' ).join( ',' );
                        } );
+
                        $.post( ajaxurl, postVars );
                },
 
+               /**
+                * @summary Marks empty postbox areas.
+                *
+                * Adds a message to empty sortable areas on the dashboard page. Also adds a
+                * border around the side area on the post edit screen if there are no postboxes
+                * present.
+                *
+                * @since 3.3.0
+                * @memberof postboxes
+                * @access private
+                *
+                * @returns {void}
+                */
                _mark_area : function() {
                        var visible = $('div.postbox:visible').length, side = $('#post-body #side-sortables');
 
@@ -215,6 +361,17 @@ var postboxes;
                        }
                },
 
+               /**
+                * @summary Changes the amount of columns on the post edit page.
+                *
+                * @since 3.3.0
+                * @memberof postboxes
+                * @fires postboxes#postboxes-columnchange
+                * @access private
+                *
+                * @param {number} n The amount of columns to divide the post edit page in.
+                * @returns {void}
+                */
                _pb_edit : function(n) {
                        var el = $('.metabox-holder').get(0);
 
@@ -222,9 +379,25 @@ var postboxes;
                                el.className = el.className.replace(/columns-\d+/, 'columns-' + n);
                        }
 
+                       /**
+                        * Fires when the amount of columns on the post edit page has been changed.
+                        *
+                        * @since 4.0.0
+                        * @event postboxes#postboxes-columnchange
+                        */
                        $( document ).trigger( 'postboxes-columnchange' );
                },
 
+               /**
+                * @summary Changes the amount of columns the postboxes are in based on the
+                *          current orientation of the browser.
+                *
+                * @since 3.3.0
+                * @memberof postboxes
+                * @access private
+                *
+                * @returns {void}
+                */
                _pb_change : function() {
                        var check = $( 'label.columns-prefs-1 input[type="radio"]' );
 
@@ -247,8 +420,23 @@ var postboxes;
                },
 
                /* Callbacks */
+
+               /**
+                * @since 2.7.0
+                * @memberof postboxes
+                * @access public
+                * @property {Function|boolean} pbshow A callback that is called when a postbox
+                *                                     is opened.
+                */
                pbshow : false,
 
+               /**
+                * @since 2.7.0
+                * @memberof postboxes
+                * @access public
+                * @property {Function|boolean} pbhide A callback that is called when a postbox
+                *                                     is closed.
+                */
                pbhide : false
        };
 
index af823ac4e6f08abd1c627ffe4707d8711afb6a0f..7535fbffd046d54bb0656c9494f67272db024b7a 100644 (file)
@@ -4,6 +4,8 @@
 var tagBox, array_unique_noempty;
 
 ( function( $ ) {
+       var tagDelimiter = ( window.tagsSuggestL10n && window.tagsSuggestL10n.tagDelimiter ) || ',';
+
        // Return an array with any duplicate, whitespace or empty values removed
        array_unique_noempty = function( array ) {
                var out = [];
@@ -20,13 +22,17 @@ var tagBox, array_unique_noempty;
        };
 
        tagBox = {
-               clean : function(tags) {
-                       var comma = window.tagsBoxL10n.tagDelimiter;
-                       if ( ',' !== comma )
-                               tags = tags.replace(new RegExp(comma, 'g'), ',');
+               clean : function( tags ) {
+                       if ( ',' !== tagDelimiter ) {
+                               tags = tags.replace( new RegExp( tagDelimiter, 'g' ), ',' );
+                       }
+
                        tags = tags.replace(/\s*,\s*/g, ',').replace(/,+/g, ',').replace(/[,\s]+$/, '').replace(/^[,\s]+/, '');
-                       if ( ',' !== comma )
-                               tags = tags.replace(/,/g, comma);
+
+                       if ( ',' !== tagDelimiter ) {
+                               tags = tags.replace( /,/g, tagDelimiter );
+                       }
+
                        return tags;
                },
 
@@ -35,8 +41,7 @@ var tagBox, array_unique_noempty;
                                num = id.split('-check-num-')[1],
                                taxbox = $(el).closest('.tagsdiv'),
                                thetags = taxbox.find('.the-tags'),
-                               comma = window.tagsBoxL10n.tagDelimiter,
-                               current_tags = thetags.val().split( comma ),
+                               current_tags = thetags.val().split( tagDelimiter ),
                                new_tags = [];
 
                        delete current_tags[num];
@@ -48,7 +53,7 @@ var tagBox, array_unique_noempty;
                                }
                        });
 
-                       thetags.val( this.clean( new_tags.join( comma ) ) );
+                       thetags.val( this.clean( new_tags.join( tagDelimiter ) ) );
 
                        this.quickClicks( taxbox );
                        return false;
@@ -65,7 +70,7 @@ var tagBox, array_unique_noempty;
 
                        disabled = thetags.prop('disabled');
 
-                       current_tags = thetags.val().split( window.tagsBoxL10n.tagDelimiter );
+                       current_tags = thetags.val().split( tagDelimiter );
                        tagchecklist.empty();
 
                        $.each( current_tags, function( key, val ) {
@@ -81,16 +86,28 @@ var tagBox, array_unique_noempty;
 
                                // If tags editing isn't disabled, create the X button.
                                if ( ! disabled ) {
-                                       xbutton = $( '<a id="' + id + '-check-num-' + key + '" class="ntdelbutton" tabindex="0">X</a>' );
+                                       /*
+                                        * Build the X buttons, hide the X icon with aria-hidden and
+                                        * use visually hidden text for screen readers.
+                                        */
+                                       xbutton = $( '<button type="button" id="' + id + '-check-num-' + key + '" class="ntdelbutton">' +
+                                               '<span class="remove-tag-icon" aria-hidden="true"></span>' +
+                                               '<span class="screen-reader-text">' + window.tagsSuggestL10n.removeTerm + ' ' + val + '</span>' +
+                                               '</button>' );
 
                                        xbutton.on( 'click keypress', function( e ) {
-                                               // Trigger function if pressed Enter - keyboard navigation
-                                               if ( e.type === 'click' || e.keyCode === 13 ) {
-                                                       // When using keyboard, move focus back to the new tag field.
-                                                       if ( e.keyCode === 13 ) {
-                                                               $( this ).closest( '.tagsdiv' ).find( 'input.newtag' ).focus();
-                                                       }
-
+                                               // On click or when using the Enter/Spacebar keys.
+                                               if ( 'click' === e.type || 13 === e.keyCode || 32 === e.keyCode ) {
+                                                       /*
+                                                        * When using the keyboard, move focus back to the
+                                                        * add new tag field. Note: when releasing the pressed
+                                                        * key this will fire the `keyup` event on the input.
+                                                        */
+                                                       if ( 13 === e.keyCode || 32 === e.keyCode ) {
+                                                               $( this ).closest( '.tagsdiv' ).find( 'input.newtag' ).focus();
+                                                       }
+
+                                                       tagBox.userAction = 'remove';
                                                        tagBox.parseTags( this );
                                                }
                                        });
@@ -101,27 +118,35 @@ var tagBox, array_unique_noempty;
                                // Append the span to the tag list.
                                tagchecklist.append( span );
                        });
+                       // The buttons list is built now, give feedback to screen reader users.
+                       tagBox.screenReadersMessage();
                },
 
                flushTags : function( el, a, f ) {
                        var tagsval, newtags, text,
                                tags = $( '.the-tags', el ),
-                               newtag = $( 'input.newtag', el ),
-                               comma = window.tagsBoxL10n.tagDelimiter;
+                               newtag = $( 'input.newtag', el );
 
                        a = a || false;
 
                        text = a ? $(a).text() : newtag.val();
 
-                       if ( 'undefined' == typeof( text ) ) {
+                       /*
+                        * Return if there's no new tag or if the input field is empty.
+                        * Note: when using the keyboard to add tags, focus is moved back to
+                        * the input field and the `keyup` event attached on this field will
+                        * fire when releasing the pressed key. Checking also for the field
+                        * emptiness avoids to set the tags and call quickClicks() again.
+                        */
+                       if ( 'undefined' == typeof( text ) || '' === text ) {
                                return false;
                        }
 
                        tagsval = tags.val();
-                       newtags = tagsval ? tagsval + comma + text : text;
+                       newtags = tagsval ? tagsval + tagDelimiter + text : text;
 
                        newtags = this.clean( newtags );
-                       newtags = array_unique_noempty( newtags.split( comma ) ).join( comma );
+                       newtags = array_unique_noempty( newtags.split( tagDelimiter ) ).join( tagDelimiter );
                        tags.val( newtags );
                        this.quickClicks( el );
 
@@ -144,6 +169,7 @@ var tagBox, array_unique_noempty;
                                r = $( '<p id="tagcloud-' + tax + '" class="the-tagcloud">' + r + '</p>' );
 
                                $( 'a', r ).click( function() {
+                                       tagBox.userAction = 'add';
                                        tagBox.flushTags( $( '#' + tax ), this );
                                        return false;
                                });
@@ -152,33 +178,63 @@ var tagBox, array_unique_noempty;
                        });
                },
 
+               /**
+                * Track the user's last action.
+                *
+                * @since 4.7.0
+                */
+               userAction: '',
+
+               /**
+                * Dispatch an audible message to screen readers.
+                *
+                * @since 4.7.0
+                */
+               screenReadersMessage: function() {
+                       var message;
+
+                       switch ( this.userAction ) {
+                               case 'remove':
+                                       message = window.tagsSuggestL10n.termRemoved;
+                                       break;
+
+                               case 'add':
+                                       message = window.tagsSuggestL10n.termAdded;
+                                       break;
+
+                               default:
+                                       return;
+                       }
+
+                       window.wp.a11y.speak( message, 'assertive' );
+               },
+
                init : function() {
-                       var t = this, ajaxtag = $('div.ajaxtag');
+                       var ajaxtag = $('div.ajaxtag');
 
                        $('.tagsdiv').each( function() {
-                               tagBox.quickClicks(this);
+                               tagBox.quickClicks( this );
                        });
 
-                       $('.tagadd', ajaxtag).click(function(){
-                               t.flushTags( $(this).closest('.tagsdiv') );
+                       $( '.tagadd', ajaxtag ).click( function() {
+                               tagBox.userAction = 'add';
+                               tagBox.flushTags( $( this ).closest( '.tagsdiv' ) );
                        });
 
-                       $('input.newtag', ajaxtag).keyup(function(e){
-                               if ( 13 == e.which ) {
-                                       tagBox.flushTags( $(this).closest('.tagsdiv') );
-                                       return false;
+                       $( 'input.newtag', ajaxtag ).keyup( function( event ) {
+                               if ( 13 == event.which ) {
+                                       tagBox.userAction = 'add';
+                                       tagBox.flushTags( $( this ).closest( '.tagsdiv' ) );
+                                       event.preventDefault();
+                                       event.stopPropagation();
                                }
-                       }).keypress(function(e){
-                               if ( 13 == e.which ) {
-                                       e.preventDefault();
-                                       return false;
+                       }).keypress( function( event ) {
+                               if ( 13 == event.which ) {
+                                       event.preventDefault();
+                                       event.stopPropagation();
                                }
-                       }).each( function() {
-                               var tax = $(this).closest('div.tagsdiv').attr('id');
-                               $(this).suggest(
-                                       ajaxurl + '?action=ajax-tag-search&tax=' + tax,
-                                       { delay: 500, minchars: 2, multiple: true, multipleSep: window.tagsBoxL10n.tagDelimiter }
-                               );
+                       }).each( function( i, element ) {
+                               $( element ).wpTagsSuggest();
                        });
 
                        // save tags on post save/publish
@@ -188,14 +244,19 @@ var tagBox, array_unique_noempty;
                                });
                        });
 
-                       // tag cloud
+                       // Fetch and toggle the Tag cloud.
                        $('.tagcloud-link').click(function(){
-                               tagBox.get( $(this).attr('id') );
-                               $(this).unbind().click(function(){
-                                       $(this).siblings('.the-tagcloud').toggle();
-                                       return false;
-                               });
-                               return false;
+                               // On the first click, fetch the tag cloud and insert it in the DOM.
+                               tagBox.get( $( this ).attr( 'id' ) );
+                               // Update button state, remove previous click event and attach a new one to toggle the cloud.
+                               $( this )
+                                       .attr( 'aria-expanded', 'true' )
+                                       .unbind()
+                                       .click( function() {
+                                               $( this )
+                                                       .attr( 'aria-expanded', 'false' === $( this ).attr( 'aria-expanded' ) ? 'true' : 'false' )
+                                                       .siblings( '.the-tagcloud' ).toggle();
+                                       });
                        });
                }
        };
index c08fc30fe48bf3ef57fb037da640dcdba3a69581..f66ec0264a30aa03dfdd176d051f8aa2cc199bd5 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&&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
+var tagBox,array_unique_noempty;!function(a){var b=window.tagsSuggestL10n&&window.tagsSuggestL10n.tagDelimiter||",";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){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(c){var d=c.id,e=d.split("-check-num-")[1],f=a(c).closest(".tagsdiv"),g=f.find(".the-tags"),h=g.val().split(b),i=[];return delete h[e],a.each(h,function(b,c){c=a.trim(c),c&&i.push(c)}),g.val(this.clean(i.join(b))),this.quickClicks(f),!1},quickClicks:function(c){var d,e,f=a(".the-tags",c),g=a(".tagchecklist",c),h=a(c).attr("id");f.length&&(e=f.prop("disabled"),d=f.val().split(b),g.empty(),a.each(d,function(b,c){var d,f;c=a.trim(c),c&&(d=a("<span />").text(c),e||(f=a('<button type="button" id="'+h+"-check-num-"+b+'" class="ntdelbutton"><span class="remove-tag-icon" aria-hidden="true"></span><span class="screen-reader-text">'+window.tagsSuggestL10n.removeTerm+" "+c+"</span></button>"),f.on("click keypress",function(b){"click"!==b.type&&13!==b.keyCode&&32!==b.keyCode||(13!==b.keyCode&&32!==b.keyCode||a(this).closest(".tagsdiv").find("input.newtag").focus(),tagBox.userAction="remove",tagBox.parseTags(this))}),d.prepend("&nbsp;").prepend(f)),g.append(d))}),tagBox.screenReadersMessage())},flushTags:function(c,d,e){var f,g,h,i=a(".the-tags",c),j=a("input.newtag",c);return d=d||!1,h=d?a(d).text():j.val(),"undefined"!=typeof h&&""!==h&&(f=i.val(),g=f?f+b+h:h,g=this.clean(g),g=array_unique_noempty(g.split(b)).join(b),i.val(g),this.quickClicks(c),d||j.val(""),"undefined"==typeof e&&j.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.userAction="add",tagBox.flushTags(a("#"+c),this),!1}),a("#"+b).after(d))})},userAction:"",screenReadersMessage:function(){var a;switch(this.userAction){case"remove":a=window.tagsSuggestL10n.termRemoved;break;case"add":a=window.tagsSuggestL10n.termAdded;break;default:return}window.wp.a11y.speak(a,"assertive")},init:function(){var b=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)}),a(".tagadd",b).click(function(){tagBox.userAction="add",tagBox.flushTags(a(this).closest(".tagsdiv"))}),a("input.newtag",b).keyup(function(b){13==b.which&&(tagBox.userAction="add",tagBox.flushTags(a(this).closest(".tagsdiv")),b.preventDefault(),b.stopPropagation())}).keypress(function(a){13==a.which&&(a.preventDefault(),a.stopPropagation())}).each(function(b,c){a(c).wpTagsSuggest()}),a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,!1,1)})}),a(".tagcloud-link").click(function(){tagBox.get(a(this).attr("id")),a(this).attr("aria-expanded","true").unbind().click(function(){a(this).attr("aria-expanded","false"===a(this).attr("aria-expanded")?"true":"false").siblings(".the-tagcloud").toggle()})})}}}(jQuery);
\ No newline at end of file
diff --git a/wp-admin/js/tags-suggest.js b/wp-admin/js/tags-suggest.js
new file mode 100644 (file)
index 0000000..a678bdc
--- /dev/null
@@ -0,0 +1,183 @@
+/**
+ * Default settings for jQuery UI Autocomplete for use with non-hierarchical taxonomies.
+ */
+( function( $ ) {
+       if ( typeof window.tagsSuggestL10n === 'undefined' || typeof window.uiAutocompleteL10n === 'undefined' ) {
+               return;
+       }
+
+       var tempID = 0;
+       var separator = window.tagsSuggestL10n.tagDelimiter || ',';
+
+       function split( val ) {
+               return val.split( new RegExp( separator + '\\s*' ) );
+       }
+
+       function getLast( term ) {
+               return split( term ).pop();
+       }
+
+       /**
+        * Add UI Autocomplete to an input or textarea element with presets for use
+        * with non-hierarchical taxonomies.
+        *
+        * Example: `$( element ).wpTagsSuggest( options )`.
+        *
+        * The taxonomy can be passed in a `data-wp-taxonomy` attribute on the element or
+        * can be in `options.taxonomy`.
+        *
+        * @since 4.7.0
+        *
+        * @param {object} options Options that are passed to UI Autocomplete. Can be used to override the default settings.
+        * @returns {object} jQuery instance.
+        */
+       $.fn.wpTagsSuggest = function( options ) {
+               var cache;
+               var last;
+               var $element = $( this );
+
+               options = options || {};
+
+               var taxonomy = options.taxonomy || $element.attr( 'data-wp-taxonomy' ) || 'post_tag';
+
+               delete( options.taxonomy );
+
+               options = $.extend( {
+                       source: function( request, response ) {
+                               var term;
+
+                               if ( last === request.term ) {
+                                       response( cache );
+                                       return;
+                               }
+
+                               term = getLast( request.term );
+
+                               $.get( window.ajaxurl, {
+                                       action: 'ajax-tag-search',
+                                       tax: taxonomy,
+                                       q: term
+                               } ).always( function() {
+                                       $element.removeClass( 'ui-autocomplete-loading' ); // UI fails to remove this sometimes?
+                               } ).done( function( data ) {
+                                       var tagName;
+                                       var tags = [];
+
+                                       if ( data ) {
+                                               data = data.split( '\n' );
+
+                                               for ( tagName in data ) {
+                                                       var id = ++tempID;
+
+                                                       tags.push({
+                                                               id: id,
+                                                               name: data[tagName]
+                                                       });
+                                               }
+
+                                               cache = tags;
+                                               response( tags );
+                                       } else {
+                                               response( tags );
+                                       }
+                               } );
+
+                               last = request.term;
+                       },
+                       focus: function( event, ui ) {
+                               $element.attr( 'aria-activedescendant', 'wp-tags-autocomplete-' + ui.item.id );
+
+                               // Don't empty the input field when using the arrow keys to
+                               // highlight items. See api.jqueryui.com/autocomplete/#event-focus
+                               event.preventDefault();
+                       },
+                       select: function( event, ui ) {
+                               var tags = split( $element.val() );
+                               // Remove the last user input.
+                               tags.pop();
+                               // Append the new tag and an empty element to get one more separator at the end.
+                               tags.push( ui.item.name, '' );
+
+                               $element.val( tags.join( separator + ' ' ) );
+
+                               if ( $.ui.keyCode.TAB === event.keyCode ) {
+                                       // Audible confirmation message when a tag has been selected.
+                                       window.wp.a11y.speak( window.tagsSuggestL10n.termSelected, 'assertive' );
+                                       event.preventDefault();
+                               } else if ( $.ui.keyCode.ENTER === event.keyCode ) {
+                                       // Do not close Quick Edit / Bulk Edit
+                                       event.preventDefault();
+                                       event.stopPropagation();
+                               }
+
+                               return false;
+                       },
+                       open: function() {
+                               $element.attr( 'aria-expanded', 'true' );
+                       },
+                       close: function() {
+                               $element.attr( 'aria-expanded', 'false' );
+                       },
+                       minLength: 2,
+                       position: {
+                               my: 'left top+2'
+                       },
+                       messages: {
+                               noResults: window.uiAutocompleteL10n.noResults,
+                               results: function( number ) {
+                                       if ( number > 1 ) {
+                                               return window.uiAutocompleteL10n.manyResults.replace( '%d', number );
+                                       }
+
+                                       return window.uiAutocompleteL10n.oneResult;
+                               }
+                       }
+               }, options );
+
+               $element.on( 'keydown', function() {
+                       $element.removeAttr( 'aria-activedescendant' );
+               } )
+               .autocomplete( options )
+               .autocomplete( 'instance' )._renderItem = function( ul, item ) {
+                       return $( '<li role="option" id="wp-tags-autocomplete-' + item.id + '">' )
+                               .text( item.name )
+                               .appendTo( ul );
+               };
+
+               $element.attr( {
+                       'role': 'combobox',
+                       'aria-autocomplete': 'list',
+                       'aria-expanded': 'false',
+                       'aria-owns': $element.autocomplete( 'widget' ).attr( 'id' )
+               } )
+               .on( 'focus', function() {
+                       var inputValue = split( $element.val() ).pop();
+
+                       // Don't trigger a search if the field is empty.
+                       // Also, avoids screen readers announce `No search results`.
+                       if ( inputValue ) {
+                               $element.autocomplete( 'search' );
+                       }
+               } )
+               // Returns a jQuery object containing the menu element.
+               .autocomplete( 'widget' )
+                       .addClass( 'wp-tags-autocomplete' )
+                       .attr( 'role', 'listbox' )
+                       .removeAttr( 'tabindex' ) // Remove the `tabindex=0` attribute added by jQuery UI.
+
+                       // Looks like Safari and VoiceOver need an `aria-selected` attribute. See ticket #33301.
+                       // The `menufocus` and `menublur` events are the same events used to add and remove
+                       // the `ui-state-focus` CSS class on the menu items. See jQuery UI Menu Widget.
+                       .on( 'menufocus', function( event, ui ) {
+                               ui.item.attr( 'aria-selected', 'true' );
+                       })
+                       .on( 'menublur', function() {
+                               // The `menublur` event returns an object where the item is `null`
+                               // so we need to find the active item with other means.
+                               $( this ).find( '[aria-selected="true"]' ).removeAttr( 'aria-selected' );
+                       });
+
+               return this;
+       };
+
+}( jQuery ) );
diff --git a/wp-admin/js/tags-suggest.min.js b/wp-admin/js/tags-suggest.min.js
new file mode 100644 (file)
index 0000000..28e426a
--- /dev/null
@@ -0,0 +1 @@
+!function(a){function b(a){return a.split(new RegExp(e+"\\s*"))}function c(a){return b(a).pop()}if("undefined"!=typeof window.tagsSuggestL10n&&"undefined"!=typeof window.uiAutocompleteL10n){var d=0,e=window.tagsSuggestL10n.tagDelimiter||",";a.fn.wpTagsSuggest=function(f){var g,h,i=a(this);f=f||{};var j=f.taxonomy||i.attr("data-wp-taxonomy")||"post_tag";return delete f.taxonomy,f=a.extend({source:function(b,e){var f;return h===b.term?void e(g):(f=c(b.term),a.get(window.ajaxurl,{action:"ajax-tag-search",tax:j,q:f}).always(function(){i.removeClass("ui-autocomplete-loading")}).done(function(a){var b,c=[];if(a){a=a.split("\n");for(b in a){var f=++d;c.push({id:f,name:a[b]})}g=c,e(c)}else e(c)}),void(h=b.term))},focus:function(a,b){i.attr("aria-activedescendant","wp-tags-autocomplete-"+b.item.id),a.preventDefault()},select:function(c,d){var f=b(i.val());return f.pop(),f.push(d.item.name,""),i.val(f.join(e+" ")),a.ui.keyCode.TAB===c.keyCode?(window.wp.a11y.speak(window.tagsSuggestL10n.termSelected,"assertive"),c.preventDefault()):a.ui.keyCode.ENTER===c.keyCode&&(c.preventDefault(),c.stopPropagation()),!1},open:function(){i.attr("aria-expanded","true")},close:function(){i.attr("aria-expanded","false")},minLength:2,position:{my:"left top+2"},messages:{noResults:window.uiAutocompleteL10n.noResults,results:function(a){return a>1?window.uiAutocompleteL10n.manyResults.replace("%d",a):window.uiAutocompleteL10n.oneResult}}},f),i.on("keydown",function(){i.removeAttr("aria-activedescendant")}).autocomplete(f).autocomplete("instance")._renderItem=function(b,c){return a('<li role="option" id="wp-tags-autocomplete-'+c.id+'">').text(c.name).appendTo(b)},i.attr({role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-owns":i.autocomplete("widget").attr("id")}).on("focus",function(){var a=b(i.val()).pop();a&&i.autocomplete("search")}).autocomplete("widget").addClass("wp-tags-autocomplete").attr("role","listbox").removeAttr("tabindex").on("menufocus",function(a,b){b.item.attr("aria-selected","true")}).on("menublur",function(){a(this).find('[aria-selected="true"]').removeAttr("aria-selected")}),this}}}(jQuery);
\ No newline at end of file
index 18596e824d30048f9013b332235cf2889becf12c..924f29971643749069dc294641693ec89e24da67 100644 (file)
@@ -610,6 +610,11 @@ themes.view.Theme = wp.Backbone.View.extend({
 
        updateTheme: function( event ) {
                var _this = this;
+
+               if ( ! this.model.get( 'hasPackage' ) ) {
+                       return;
+               }
+
                event.preventDefault();
 
                wp.updates.maybeRequestFilesystemCredentials( event );
@@ -866,8 +871,12 @@ themes.view.Preview = themes.view.Details.extend({
        html: themes.template( 'theme-preview' ),
 
        render: function() {
-               var self = this, currentPreviewDevice,
-                       data = this.model.toJSON();
+               var self = this,
+                       currentPreviewDevice,
+                       data = this.model.toJSON(),
+                       $body = $( document.body );
+
+               $body.attr( 'aria-busy', 'true' );
 
                this.$el.removeClass( 'iframe-ready' ).html( this.html( data ) );
 
@@ -879,8 +888,7 @@ themes.view.Preview = themes.view.Details.extend({
                themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.get( 'id' ) ), { replace: true } );
 
                this.$el.fadeIn( 200, function() {
-                       $( 'body' ).addClass( 'theme-installer-active full-overlay-active' );
-                       $( '.close-full-overlay' ).focus();
+                       $body.addClass( 'theme-installer-active full-overlay-active' );
                });
 
                this.$el.find( 'iframe' ).one( 'load', function() {
@@ -890,6 +898,7 @@ themes.view.Preview = themes.view.Details.extend({
 
        iframeLoaded: function() {
                this.$el.addClass( 'iframe-ready' );
+               $( document.body ).attr( 'aria-busy', 'false' );
        },
 
        close: function() {
@@ -1519,6 +1528,7 @@ themes.view.InstallerSearch =  themes.view.Search.extend({
 
                $( '.filter-links li > a.current' ).removeClass( 'current' );
                $( 'body' ).removeClass( 'show-filters filters-applied show-favorites-form' );
+               $( '.drawer-toggle' ).attr( 'aria-expanded', 'false' );
 
                // Get the themes by sending Ajax POST request to api.wordpress.org/themes
                // or searching the local cache
@@ -1541,7 +1551,7 @@ themes.view.Installer = themes.view.Appearance.extend({
                'click .filter-drawer .apply-filters': 'applyFilters',
                'click .filter-group [type="checkbox"]': 'addFilter',
                'click .filter-drawer .clear-filters': 'clearFilters',
-               'click .filtered-by': 'backToFilters',
+               'click .edit-filters': 'backToFilters',
                'click .favorites-form-submit' : 'saveUsername',
                'keyup #wporg-username-input': 'saveUsername'
        },
@@ -1617,6 +1627,7 @@ themes.view.Installer = themes.view.Appearance.extend({
                event.preventDefault();
 
                $( 'body' ).removeClass( 'filters-applied show-filters' );
+               $( '.drawer-toggle' ).attr( 'aria-expanded', 'false' );
 
                // Bail if this is already active
                if ( $el.hasClass( this.activeClass ) ) {
@@ -1636,9 +1647,9 @@ themes.view.Installer = themes.view.Appearance.extend({
                $( '[data-sort="' + sort + '"]' ).addClass( this.activeClass );
 
                if ( 'favorites' === sort ) {
-                       $ ( 'body' ).addClass( 'show-favorites-form' );
+                       $( 'body' ).addClass( 'show-favorites-form' );
                } else {
-                       $ ( 'body' ).removeClass( 'show-favorites-form' );
+                       $( 'body' ).removeClass( 'show-favorites-form' );
                }
 
                this.browse( sort );
@@ -1688,6 +1699,11 @@ themes.view.Installer = themes.view.Appearance.extend({
                        event.preventDefault();
                }
 
+               if ( ! tags ) {
+                       wp.a11y.speak( l10n.selectFeatureFilter );
+                       return;
+               }
+
                $( 'body' ).addClass( 'filters-applied' );
                $( '.filter-links li > a.current' ).removeClass( 'current' );
                filteringBy.empty();
@@ -1778,22 +1794,22 @@ themes.view.Installer = themes.view.Appearance.extend({
 
        // Toggle the full filters navigation
        moreFilters: function( event ) {
+               var $body = $( 'body' ),
+                       $toggleButton = $( '.drawer-toggle' );
+
                event.preventDefault();
 
-               if ( $( 'body' ).hasClass( 'filters-applied' ) ) {
+               if ( $body.hasClass( 'filters-applied' ) ) {
                        return this.backToFilters();
                }
 
-               // If the filters section is opened and filters are checked
-               // run the relevant query collapsing to filtered-by state
-               if ( $( 'body' ).hasClass( 'show-filters' ) && this.filtersChecked() ) {
-                       return this.addFilter();
-               }
-
                this.clearSearch();
 
                themes.router.navigate( themes.router.baseUrl( '' ) );
-               $( 'body' ).toggleClass( 'show-filters' );
+               // Toggle the feature filters view.
+               $body.toggleClass( 'show-filters' );
+               // Toggle the `aria-expanded` button attribute.
+               $toggleButton.attr( 'aria-expanded', $body.hasClass( 'show-filters' ) );
        },
 
        // Clears all the checked filters
index 2a025b19054d9eccd601c770b8c8f09dd868ae9c..6608523ee2e3f1bab5da6da3eddf742e316dd196 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;_.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
+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;this.model.get("hasPackage")&&(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(),f=a(document.body);f.attr("aria-busy","true"),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(){f.addClass("theme-installer-active full-overlay-active")}),this.$el.find("iframe").one("load",function(){d.iframeLoaded()})},iframeLoaded:function(){this.$el.addClass("iframe-ready"),a(document.body).attr("aria-busy","false")},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"),a(".drawer-toggle").attr("aria-expanded","false"),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 .edit-filters":"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"),a(".drawer-toggle").attr("aria-expanded","false"),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 d,e=this.filtersChecked(),f={tag:e},g=a(".filtered-by .tags");return b&&b.preventDefault(),e?(a("body").addClass("filters-applied"),a(".filter-links li > a.current").removeClass("current"),g.empty(),_.each(e,function(b){d=a('label[for="filter-id-'+b+'"]').text(),g.append('<span class="tag">'+d+"</span>")}),void this.collection.query(f)):void wp.a11y.speak(c.selectFeatureFilter)},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){var d=a("body"),e=a(".drawer-toggle");return c.preventDefault(),d.hasClass("filters-applied")?this.backToFilters():(this.clearSearch(),b.router.navigate(b.router.baseUrl("")),d.toggleClass("show-filters"),void e.attr("aria-expanded",d.hasClass("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 239829fe3252294c2c0f8b7077d90966f836adf4..400842ebd462426846e0063dd991c6a309f36d66 100644 (file)
  * @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.
+ * @param {object=} settings.themes                     Plugin/theme status information or null.
+ * @param {number}  settings.themes.all                 Amount of all themes.
+ * @param {number}  settings.themes.upgrade             Amount of themes with updates available.
+ * @param {number}  settings.themes.disabled            Amount of disabled themes.
+ * @param {object=} settings.totals                     Combined information for available update counts.
+ * @param {number}  settings.totals.count               Holds the amount of available updates.
  */
 (function( $, wp, settings ) {
        var $document = $( document );
        };
 
        /**
-        * Decrements the update counts throughout the various menus.
-        *
-        * This includes the toolbar, the "Updates" menu item and the menu items
-        * for plugins and themes.
+        * Refreshes update counts everywhere on the screen.
         *
-        * @since 3.9.0
-        *
-        * @param {string} type The type of item that was updated or deleted.
-        *                      Can be 'plugin', 'theme'.
+        * @since 4.7.0
         */
-       wp.updates.decrementCount = function( type ) {
-               var $adminBarUpdates             = $( '#wp-admin-bar-updates' ),
-                       $dashboardNavMenuUpdateCount = $( 'a[href="update-core.php"] .update-plugins' ),
-                       count                        = $adminBarUpdates.find( '.ab-label' ).text(),
-                       $menuItem, $itemCount, itemCount;
-
-               count = parseInt( count, 10 ) - 1;
-
-               if ( count < 0 || isNaN( count ) ) {
-                       return;
-               }
+       wp.updates.refreshCount = function() {
+               var $adminBarUpdates              = $( '#wp-admin-bar-updates' ),
+                       $dashboardNavMenuUpdateCount  = $( 'a[href="update-core.php"] .update-plugins' ),
+                       $pluginsNavMenuUpdateCount    = $( 'a[href="plugins.php"] .update-plugins' ),
+                       $appearanceNavMenuUpdateCount = $( 'a[href="themes.php"] .update-plugins' ),
+                       itemCount;
 
                $adminBarUpdates.find( '.ab-item' ).removeAttr( 'title' );
-               $adminBarUpdates.find( '.ab-label' ).text( count );
+               $adminBarUpdates.find( '.ab-label' ).text( settings.totals.counts.total );
 
                // Remove the update count from the toolbar if it's zero.
-               if ( ! count ) {
+               if ( 0 === settings.totals.counts.total ) {
                        $adminBarUpdates.find( '.ab-label' ).parents( 'li' ).remove();
                }
 
                // Update the "Updates" menu item.
                $dashboardNavMenuUpdateCount.each( function( index, element ) {
-                       element.className = element.className.replace( /count-\d+/, 'count-' + count );
+                       element.className = element.className.replace( /count-\d+/, 'count-' + settings.totals.counts.total );
                } );
+               if ( settings.totals.counts.total > 0 ) {
+                       $dashboardNavMenuUpdateCount.find( '.update-count' ).text( settings.totals.counts.total );
+               } else {
+                       $dashboardNavMenuUpdateCount.remove();
+               }
 
-               $dashboardNavMenuUpdateCount.removeAttr( 'title' );
-               $dashboardNavMenuUpdateCount.find( '.update-count' ).text( count );
-
-               if ( 'plugin' === type ) {
-                       $menuItem  = $( '#menu-plugins' );
-                       $itemCount = $menuItem.find( '.plugin-count' );
-               } else if ( 'theme' === type ) {
-                       $menuItem  = $( '#menu-appearance' );
-                       $itemCount = $menuItem.find( '.theme-count' );
+               // Update the "Plugins" menu item.
+               $pluginsNavMenuUpdateCount.each( function( index, element ) {
+                       element.className = element.className.replace( /count-\d+/, 'count-' + settings.totals.counts.plugins );
+               } );
+               if ( settings.totals.counts.total > 0 ) {
+                       $pluginsNavMenuUpdateCount.find( '.plugin-count' ).text( settings.totals.counts.plugins );
+               } else {
+                       $pluginsNavMenuUpdateCount.remove();
                }
 
-               // Decrement the counter of the other menu items.
-               if ( $itemCount ) {
-                       itemCount = $itemCount.eq( 0 ).text();
-                       itemCount = parseInt( itemCount, 10 ) - 1;
+               // Update the "Appearance" menu item.
+               $appearanceNavMenuUpdateCount.each( function( index, element ) {
+                       element.className = element.className.replace( /count-\d+/, 'count-' + settings.totals.counts.themes );
+               } );
+               if ( settings.totals.counts.total > 0 ) {
+                       $appearanceNavMenuUpdateCount.find( '.theme-count' ).text( settings.totals.counts.themes );
+               } else {
+                       $appearanceNavMenuUpdateCount.remove();
                }
 
-               if ( itemCount < 0 || isNaN( itemCount ) ) {
-                       return;
+               // Update list table filter navigation.
+               if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
+                       itemCount = settings.totals.counts.plugins;
+               } else if ( 'themes' === pagenow || 'themes-network' === pagenow ) {
+                       itemCount = settings.totals.counts.themes;
                }
 
                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();
                }
        };
 
+       /**
+        * 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} type The type of item that was updated or deleted.
+        *                      Can be 'plugin', 'theme'.
+        */
+       wp.updates.decrementCount = function( type ) {
+               settings.totals.counts.total = Math.max( --settings.totals.counts.total, 0 );
+
+               if ( 'plugin' === type ) {
+                       settings.totals.counts.plugins = Math.max( --settings.totals.counts.plugins, 0 );
+               } else if ( 'theme' === type ) {
+                       settings.totals.counts.themes = Math.max( --settings.totals.counts.themes, 0 );
+               }
+
+               wp.updates.refreshCount( type );
+       };
+
        /**
         * Sends an Ajax request to the server to update a plugin.
         *
                                $message.siblings( '.preview' ).replaceWith( function () {
                                        return $( '<a>' )
                                                .attr( 'href', response.customizeUrl )
-                                               .addClass( 'button button-secondary load-customize' )
+                                               .addClass( 'button load-customize' )
                                                .text( wp.updates.l10n.livePreview );
                                } );
                        }
                        $themeRows.css( { backgroundColor: '#faafaa' } ).fadeOut( 350, function() {
                                var $views     = $( '.subsubsub' ),
                                        $themeRow  = $( this ),
-                                       totals     = settings.totals,
+                                       totals     = settings.themes,
                                        deletedRow = wp.template( 'item-deleted-row' );
 
                                if ( ! $themeRow.hasClass( 'plugin-update-tr' ) ) {
                        $pluginSearch        = $( '.plugins-php .wp-filter-search' ),
                        $pluginInstallSearch = $( '.plugin-install-php .wp-filter-search' );
 
+               settings = _.extend( settings, window._wpUpdatesItemCounts || {} );
+
+               if ( settings.totals ) {
+                       wp.updates.refreshCount();
+               }
+
                /*
                 * Whether a user needs to submit filesystem credentials.
                 *
 
                        wp.updates.installPlugin( {
                                slug:    $button.data( 'slug' ),
+                               pagenow: pagenow,
                                success: wp.updates.installImporterSuccess,
                                error:   wp.updates.installImporterError
                        } );
                 */
                $pluginSearch.on( 'keyup input', _.debounce( function( event ) {
                        var data = {
-                               _ajax_nonce: wp.updates.ajaxNonce,
-                               s:           event.target.value,
-                               pagenow:     pagenow
-                       };
+                               _ajax_nonce:   wp.updates.ajaxNonce,
+                               s:             event.target.value,
+                               pagenow:       pagenow,
+                               plugin_status: 'all'
+                       },
+                       queryArgs;
 
                        // Clear on escape.
                        if ( 'keyup' === event.type && 27 === event.which ) {
                                wp.updates.searchTerm = data.s;
                        }
 
+                       queryArgs = _.object( _.compact( _.map( location.search.slice( 1 ).split( '&' ), function( item ) {
+                               if ( item ) return item.split( '=' );
+                       } ) ) );
+
+                       data.plugin_status = queryArgs.plugin_status || 'all';
+
                        if ( window.history && window.history.replaceState ) {
-                               window.history.replaceState( null, '', location.href.split( '?' )[ 0 ] + '?s=' + data.s );
+                               window.history.replaceState( null, '', location.href.split( '?' )[ 0 ] + '?s=' + data.s + '&plugin_status=' + data.plugin_status );
                        }
 
                        if ( 'undefined' !== typeof wp.updates.searchRequest ) {
 
                        $bulkActionForm.empty();
                        $( 'body' ).addClass( 'loading-content' );
+                       $( '.subsubsub .current' ).removeClass( 'current' );
 
                        wp.updates.searchRequest = wp.ajax.post( 'search-plugins', data ).done( function( response ) {
 
 
                                if ( ! data.s.length ) {
                                        $oldSubTitle.remove();
+                                       $( '.subsubsub .' + data.plugin_status + ' a' ).addClass( 'current' );
                                } else if ( $oldSubTitle.length ) {
                                        $oldSubTitle.replaceWith( $subTitle );
                                } else {
                 */
                $( window ).on( 'beforeunload', wp.updates.beforeunload );
        } );
-})( jQuery, window.wp, _.extend( window._wpUpdatesSettings, window._wpUpdatesItemCounts || {} ) );
+})( jQuery, window.wp, window._wpUpdatesSettings );
index 3dd4de5b8925637cf691c7ff72ef97c9875c908e..1bee866ee46b75005be1e8ffd6a830269b5cd712 100644 (file)
@@ -1,2 +1,2 @@
-!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
+!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.refreshCount=function(){var b,d=a("#wp-admin-bar-updates"),e=a('a[href="update-core.php"] .update-plugins'),f=a('a[href="plugins.php"] .update-plugins'),g=a('a[href="themes.php"] .update-plugins');d.find(".ab-item").removeAttr("title"),d.find(".ab-label").text(c.totals.counts.total),0===c.totals.counts.total&&d.find(".ab-label").parents("li").remove(),e.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+c.totals.counts.total)}),c.totals.counts.total>0?e.find(".update-count").text(c.totals.counts.total):e.remove(),f.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+c.totals.counts.plugins)}),c.totals.counts.total>0?f.find(".plugin-count").text(c.totals.counts.plugins):f.remove(),g.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+c.totals.counts.themes)}),c.totals.counts.total>0?g.find(".theme-count").text(c.totals.counts.themes):g.remove(),"plugins"===pagenow||"plugins-network"===pagenow?b=c.totals.counts.plugins:"themes"!==pagenow&&"themes-network"!==pagenow||(b=c.totals.counts.themes),b>0?a(".subsubsub .upgrade .count").text("("+b+")"):a(".subsubsub .upgrade").remove()},b.updates.decrementCount=function(a){c.totals.counts.total=Math.max(--c.totals.counts.total,0),"plugin"===a?c.totals.counts.plugins=Math.max(--c.totals.counts.plugins,0):"theme"===a&&(c.totals.counts.themes=Math.max(--c.totals.counts.themes,0)),b.updates.refreshCount(a)},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 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.themes,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 e=a("#plugin-filter"),f=a("#bulk-action-form"),g=a("#request-filesystem-credentials-dialog"),h=a(".plugins-php .wp-filter-search"),i=a(".plugin-install-php .wp-filter-search");c=_.extend(c,window._wpUpdatesItemCounts||{}),c.totals&&b.updates.refreshCount(),b.updates.shouldRequestFilesystemCredentials=g.length>0,g.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()}),g.on("click",'[data-js-action="close"], .notification-dialog-background',b.updates.requestForCredentialsModalCancel),g.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")}),f.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")}))}),e.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")}))}),e.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"),pagenow:pagenow,success:b.updates.installImporterSuccess,error:b.updates.installImporterError}))}),f.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")}))}),f.on("click",'[type="submit"]',function(c){var e,g,h=a(c.target).siblings("select").val(),i=f.find('input[name="checked[]"]:checked'),j=0,k=0,l=[];switch(pagenow){case"plugins":case"plugins-network":e="plugin";break;case"themes-network":e="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",e);break;case"delete-selected":if(!window.confirm("plugin"===e?b.updates.l10n.aysBulkDelete:b.updates.l10n.aysBulkDeleteThemes))return void c.preventDefault();g=h.replace("selected",e);break;default:return}b.updates.maybeRequestFilesystemCredentials(c),c.preventDefault(),f.find('.manage-column [type="checkbox"]').prop("checked",!1),d.trigger("wp-"+e+"-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()}),i.length&&i.attr("aria-describedby","live-search-desc"),i.on("keyup input",_.debounce(function(c,d){var f,g,h=a(".plugin-install-search");f={_ajax_nonce:b.updates.ajaxNonce,s:c.target.value,tab:"search",type:a("#typeselector").val(),pagenow:pagenow},g=location.href.split("?")[0]+"?"+a.param(_.omit(f,["_ajax_nonce","pagenow"])),"keyup"===c.type&&27===c.which&&(c.target.value=""),b.updates.searchTerm===f.s&&"typechange"!==d||(e.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),e.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(c){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)),h.length&&h.attr("aria-describedby","live-search-desc"),h.on("keyup input",_.debounce(function(c){var d,e={_ajax_nonce:b.updates.ajaxNonce,s:c.target.value,pagenow:pagenow,plugin_status:"all"};"keyup"===c.type&&27===c.which&&(c.target.value=""),b.updates.searchTerm!==e.s&&(b.updates.searchTerm=e.s,d=_.object(_.compact(_.map(location.search.slice(1).split("&"),function(a){if(a)return a.split("=")}))),e.plugin_status=d.plugin_status||"all",window.history&&window.history.replaceState&&window.history.replaceState(null,"",location.href.split("?")[0]+"?s="+e.s+"&plugin_status="+e.plugin_status),"undefined"!=typeof b.updates.searchRequest&&b.updates.searchRequest.abort(),
+f.empty(),a("body").addClass("loading-content"),a(".subsubsub .current").removeClass("current"),b.updates.searchRequest=b.ajax.post("search-plugins",e).done(function(c){var d=a("<span />").addClass("subtitle").html(b.updates.l10n.searchResults.replace("%s",_.escape(e.s))),g=a(".wrap .subtitle");e.s.length?g.length?g.replaceWith(d):a(".wrap h1").append(d):(g.remove(),a(".subsubsub ."+e.plugin_status+" a").addClass("current")),a("body").removeClass("loading-content"),f.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,window._wpUpdatesSettings);
\ No newline at end of file
index c5f5db36eaefe80d502642217b1baa4946f802b6..650fbd5d006d1f35e9f1840384d9b59bb414b6b7 100644 (file)
 
                        resetToggle();
 
-                       // Clear password field to prevent update
-                       $pass1.val( '' ).trigger( 'pwupdate' );
-                       $submitButtons.prop( 'disabled', false );
+                       if ( $pass1Row.closest( 'form' ).is( '#your-profile' ) ) {
+                               // Clear password field to prevent update
+                               $pass1.val( '' ).trigger( 'pwupdate' );
+                               $submitButtons.prop( 'disabled', false );
+                       }
                } );
 
-               $pass1Row.closest('form').on( 'submit', function () {
+               $pass1Row.closest( 'form' ).on( 'submit', function () {
                        updateLock = false;
 
                        $pass1.prop( 'disabled', false );
index cea8d6aa00d29ab7265202b2b1899ca47cc42d1f..a80fe426057cb08b14f80ace0e83ac7fbff6a512 100644 (file)
@@ -1 +1 @@
-!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
+!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(),i.closest("form").is("#your-profile")&&(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 de64533bdfaa3e0f5ffd052d14d6ca1dc7e31d0e..aa439ea552bd058ac74c00ae5b7872ccc146e3c6 100644 (file)
@@ -354,12 +354,12 @@ wpWidgets = {
                        if ( $target.hasClass('button-primary') ) {
                                self.addWidget( chooser );
                                self.closeChooser();
-                       } else if ( $target.hasClass('button-secondary') ) {
+                       } else if ( $target.hasClass( 'widgets-chooser-cancel' ) ) {
                                self.closeChooser();
                        }
                }).on( 'keyup.widgets-chooser', function( event ) {
                        if ( event.which === $.ui.keyCode.ENTER ) {
-                               if ( $( event.target ).hasClass('button-secondary') ) {
+                               if ( $( event.target ).hasClass( 'widgets-chooser-cancel' ) ) {
                                        // Close instead of adding when pressing Enter on the Cancel button
                                        self.closeChooser();
                                } else {
index d74660672003839f7642082d5b39a4ae86250a17..ba4e094219717c9a917f87d48fb47422794c741a 100644 (file)
@@ -1 +1 @@
-var wpWidgets;!function(a){var b=a(document);wpWidgets={hoveredSidebar:null,init:function(){var c,d,e=this,f=a(".widgets-chooser"),g=f.find(".widgets-chooser-sidebars"),h=a("div.widgets-sortables"),i=!("undefined"==typeof isRtl||!isRtl);a("#widgets-right .sidebar-name").click(function(){var c=a(this),d=c.closest(".widgets-holder-wrap");d.hasClass("closed")?(d.removeClass("closed"),c.parent().sortable("refresh")):d.addClass("closed"),b.triggerHandler("wp-pin-menu")}),a("#widgets-left .sidebar-name").click(function(){a(this).closest(".widgets-holder-wrap").toggleClass("closed"),b.triggerHandler("wp-pin-menu")}),a(document.body).bind("click.widgets-toggle",function(b){var c,d,e,f,g,h=a(b.target),j={"z-index":100};h.parents(".widget-top").length&&!h.parents("#available-widgets").length?(c=h.closest("div.widget"),d=c.children(".widget-inside"),e=parseInt(c.find("input.widget-width").val(),10),f=c.parent().width(),d.is(":hidden")?(e>250&&e+30>f&&c.closest("div.widgets-sortables").length&&(g=c.closest("div.widget-liquid-right").length?i?"margin-right":"margin-left":i?"margin-left":"margin-right",j[g]=f-(e+30)+"px",c.css(j)),c.addClass("open"),d.slideDown("fast")):d.slideUp("fast",function(){c.attr("style",""),c.removeClass("open")}),b.preventDefault()):h.hasClass("widget-control-save")?(wpWidgets.save(h.closest("div.widget"),0,1,0),b.preventDefault()):h.hasClass("widget-control-remove")?(wpWidgets.save(h.closest("div.widget"),1,1,0),b.preventDefault()):h.hasClass("widget-control-close")?(c=h.closest("div.widget"),c.removeClass("open"),wpWidgets.close(c),b.preventDefault()):"inactive-widgets-control-remove"===h.attr("id")&&(wpWidgets.removeInactiveWidgets(),b.preventDefault())}),h.children(".widget").each(function(){var b=a(this);wpWidgets.appendTitle(this),b.find("p.widget-error").length&&b.find("a.widget-action").trigger("click")}),a("#widget-list").children(".widget").draggable({connectToSortable:"div.widgets-sortables",handle:"> .widget-top > .widget-title",distance:2,helper:"clone",zIndex:100,containment:"#wpwrap",refreshPositions:!0,start:function(b,c){var f=a(this).find(".widgets-chooser");c.helper.find("div.widget-description").hide(),d=this.id,f.length&&(a("#wpbody-content").append(f.hide()),c.helper.find(".widgets-chooser").remove(),e.clearWidgetSelection())},stop:function(){c&&a(c).hide(),c=""}}),h.droppable({tolerance:"intersect",over:function(b){var c=a(b.target).parent();wpWidgets.hoveredSidebar&&!c.is(wpWidgets.hoveredSidebar)&&wpWidgets.closeSidebar(b),c.hasClass("closed")&&(wpWidgets.hoveredSidebar=c,c.removeClass("closed")),a(this).sortable("refresh")},out:function(a){wpWidgets.hoveredSidebar&&wpWidgets.closeSidebar(a)}}),h.sortable({placeholder:"widget-placeholder",items:"> .widget",handle:"> .widget-top > .widget-title",cursor:"move",distance:2,containment:"#wpwrap",tolerance:"pointer",refreshPositions:!0,start:function(b,c){var d,e=a(this),f=e.parent(),g=c.item.children(".widget-inside");"block"===g.css("display")&&(c.item.removeClass("open"),g.hide(),a(this).sortable("refreshPositions")),f.hasClass("closed")||(d=c.item.hasClass("ui-draggable")?e.height():1+e.height(),e.css("min-height",d+"px"))},stop:function(e,f){var g,h,i,j,k,l,m=f.item,n=d;return wpWidgets.hoveredSidebar=null,m.hasClass("deleting")?(wpWidgets.save(m,1,0,1),void m.remove()):(g=m.find("input.add_new").val(),h=m.find("input.multi_number").val(),m.attr("style","").removeClass("ui-draggable"),d="",g&&("multi"===g?(m.html(m.html().replace(/<[^<>]+>/g,function(a){return a.replace(/__i__|%i%/g,h)})),m.attr("id",n.replace("__i__",h)),h++,a("div#"+n).find("input.multi_number").val(h)):"single"===g&&(m.attr("id","new-"+n),c="div#"+n),wpWidgets.save(m,0,0,1),m.find("input.add_new").val(""),b.trigger("widget-added",[m])),i=m.parent(),i.parent().hasClass("closed")&&(i.parent().removeClass("closed"),j=i.children(".widget"),j.length>1&&(k=j.get(0),l=m.get(0),k.id&&l.id&&k.id!==l.id&&a(k).before(m))),void(g?m.find("a.widget-action").trigger("click"):wpWidgets.saveOrder(i.attr("id"))))},activate:function(){a(this).parent().addClass("widget-hover")},deactivate:function(){a(this).css("min-height","").parent().removeClass("widget-hover")},receive:function(b,c){var d=a(c.sender);return this.id.indexOf("orphaned_widgets")>-1?void d.sortable("cancel"):void(d.attr("id").indexOf("orphaned_widgets")>-1&&!d.children(".widget").length&&d.parents(".orphan-sidebar").slideUp(400,function(){a(this).remove()}))}}).sortable("option","connectWith","div.widgets-sortables"),a("#available-widgets").droppable({tolerance:"pointer",accept:function(b){return"widget-list"!==a(b).parent().attr("id")},drop:function(b,c){c.draggable.addClass("deleting"),a("#removing-widget").hide().children("span").empty()},over:function(b,c){c.draggable.addClass("deleting"),a("div.widget-placeholder").hide(),c.draggable.hasClass("ui-sortable-helper")&&a("#removing-widget").show().children("span").html(c.draggable.find("div.widget-title").children("h3").html())},out:function(b,c){c.draggable.removeClass("deleting"),a("div.widget-placeholder").show(),a("#removing-widget").hide().children("span").empty()}}),a("#widgets-right .widgets-holder-wrap").each(function(b,c){var d=a(c),e=d.find(".sidebar-name h2").text(),f=d.find(".widgets-sortables").attr("id"),h=a('<li tabindex="0">').text(a.trim(e));0===b&&h.addClass("widgets-chooser-selected"),g.append(h),h.data("sidebarId",f)}),a("#available-widgets .widget .widget-title").on("click.widgets-chooser",function(){var b=a(this).closest(".widget");b.hasClass("widget-in-question")||a("#widgets-left").hasClass("chooser")?e.closeChooser():(e.clearWidgetSelection(),a("#widgets-left").addClass("chooser"),b.addClass("widget-in-question").children(".widget-description").after(f),f.slideDown(300,function(){g.find(".widgets-chooser-selected").focus()}),g.find("li").on("focusin.widgets-chooser",function(){g.find(".widgets-chooser-selected").removeClass("widgets-chooser-selected"),a(this).addClass("widgets-chooser-selected")}))}),f.on("click.widgets-chooser",function(b){var c=a(b.target);c.hasClass("button-primary")?(e.addWidget(f),e.closeChooser()):c.hasClass("button-secondary")&&e.closeChooser()}).on("keyup.widgets-chooser",function(b){b.which===a.ui.keyCode.ENTER?a(b.target).hasClass("button-secondary")?e.closeChooser():(e.addWidget(f),e.closeChooser()):b.which===a.ui.keyCode.ESCAPE&&e.closeChooser()})},saveOrder:function(b){var c={action:"widgets-order",savewidgets:a("#_wpnonce_widgets").val(),sidebars:[]};b&&a("#"+b).find(".spinner:first").addClass("is-active"),a("div.widgets-sortables").each(function(){a(this).sortable&&(c["sidebars["+a(this).attr("id")+"]"]=a(this).sortable("toArray").join(","))}),a.post(ajaxurl,c,function(){a("#inactive-widgets-control-remove").prop("disabled",!a("#wp_inactive_widgets .widget").length),a(".spinner").removeClass("is-active")})},save:function(c,d,e,f){var g,h=c.closest("div.widgets-sortables").attr("id"),i=c.find("form").serialize();c=a(c),a(".spinner",c).addClass("is-active"),g={action:"save-widget",savewidgets:a("#_wpnonce_widgets").val(),sidebar:h},d&&(g.delete_widget=1),i+="&"+a.param(g),a.post(ajaxurl,i,function(g){var i;d?(a("input.widget_number",c).val()||(i=a("input.widget-id",c).val(),a("#available-widgets").find("input.widget-id").each(function(){a(this).val()===i&&a(this).closest("div.widget").show()})),e?(f=0,c.slideUp("fast",function(){a(this).remove(),wpWidgets.saveOrder()})):(c.remove(),"wp_inactive_widgets"===h&&a("#inactive-widgets-control-remove").prop("disabled",!a("#wp_inactive_widgets .widget").length))):(a(".spinner").removeClass("is-active"),g&&g.length>2&&(a("div.widget-content",c).html(g),wpWidgets.appendTitle(c),b.trigger("widget-updated",[c]),"wp_inactive_widgets"===h&&a("#inactive-widgets-control-remove").prop("disabled",!a("#wp_inactive_widgets .widget").length))),f&&wpWidgets.saveOrder()})},removeInactiveWidgets:function(){var b,c,d=a(".remove-inactive-widgets");a(".spinner",d).addClass("is-active"),b={action:"delete-inactive-widgets",removeinactivewidgets:a("#_wpnonce_remove_inactive_widgets").val()},c=a.param(b),a.post(ajaxurl,c,function(){a("#wp_inactive_widgets .widget").remove(),a("#inactive-widgets-control-remove").prop("disabled",!0),a(".spinner",d).removeClass("is-active")})},appendTitle:function(b){var c=a('input[id*="-title"]',b).val()||"";c&&(c=": "+c.replace(/<[^<>]+>/g,"").replace(/</g,"&lt;").replace(/>/g,"&gt;")),a(b).children(".widget-top").children(".widget-title").children().children(".in-widget-title").html(c)},close:function(a){a.children(".widget-inside").slideUp("fast",function(){a.attr("style","")})},addWidget:function(c){var d,e,f,g,h,i,j,k=c.find(".widgets-chooser-selected").data("sidebarId"),l=a("#"+k);d=a("#available-widgets").find(".widget-in-question").clone(),e=d.attr("id"),f=d.find("input.add_new").val(),g=d.find("input.multi_number").val(),d.find(".widgets-chooser").remove(),"multi"===f?(d.html(d.html().replace(/<[^<>]+>/g,function(a){return a.replace(/__i__|%i%/g,g)})),d.attr("id",e.replace("__i__",g)),g++,a("#"+e).find("input.multi_number").val(g)):"single"===f&&(d.attr("id","new-"+e),a("#"+e).hide()),l.closest(".widgets-holder-wrap").removeClass("closed"),l.append(d),l.sortable("refresh"),wpWidgets.save(d,0,0,1),d.find("input.add_new").val(""),b.trigger("widget-added",[d]),h=a(window).scrollTop(),i=h+a(window).height(),j=l.offset(),j.bottom=j.top+l.outerHeight(),(h>j.bottom||i<j.top)&&a("html, body").animate({scrollTop:j.top-130},200),window.setTimeout(function(){d.find(".widget-title").trigger("click")},250)},closeChooser:function(){var b=this;a(".widgets-chooser").slideUp(200,function(){a("#wpbody-content").append(this),b.clearWidgetSelection()})},clearWidgetSelection:function(){a("#widgets-left").removeClass("chooser"),a(".widget-in-question").removeClass("widget-in-question")},closeSidebar:function(b){this.hoveredSidebar.addClass("closed"),a(b.target).css("min-height",""),this.hoveredSidebar=null}},b.ready(function(){wpWidgets.init()})}(jQuery);
\ No newline at end of file
+var wpWidgets;!function(a){var b=a(document);wpWidgets={hoveredSidebar:null,init:function(){var c,d,e=this,f=a(".widgets-chooser"),g=f.find(".widgets-chooser-sidebars"),h=a("div.widgets-sortables"),i=!("undefined"==typeof isRtl||!isRtl);a("#widgets-right .sidebar-name").click(function(){var c=a(this),d=c.closest(".widgets-holder-wrap");d.hasClass("closed")?(d.removeClass("closed"),c.parent().sortable("refresh")):d.addClass("closed"),b.triggerHandler("wp-pin-menu")}),a("#widgets-left .sidebar-name").click(function(){a(this).closest(".widgets-holder-wrap").toggleClass("closed"),b.triggerHandler("wp-pin-menu")}),a(document.body).bind("click.widgets-toggle",function(b){var c,d,e,f,g,h=a(b.target),j={"z-index":100};h.parents(".widget-top").length&&!h.parents("#available-widgets").length?(c=h.closest("div.widget"),d=c.children(".widget-inside"),e=parseInt(c.find("input.widget-width").val(),10),f=c.parent().width(),d.is(":hidden")?(e>250&&e+30>f&&c.closest("div.widgets-sortables").length&&(g=c.closest("div.widget-liquid-right").length?i?"margin-right":"margin-left":i?"margin-left":"margin-right",j[g]=f-(e+30)+"px",c.css(j)),c.addClass("open"),d.slideDown("fast")):d.slideUp("fast",function(){c.attr("style",""),c.removeClass("open")}),b.preventDefault()):h.hasClass("widget-control-save")?(wpWidgets.save(h.closest("div.widget"),0,1,0),b.preventDefault()):h.hasClass("widget-control-remove")?(wpWidgets.save(h.closest("div.widget"),1,1,0),b.preventDefault()):h.hasClass("widget-control-close")?(c=h.closest("div.widget"),c.removeClass("open"),wpWidgets.close(c),b.preventDefault()):"inactive-widgets-control-remove"===h.attr("id")&&(wpWidgets.removeInactiveWidgets(),b.preventDefault())}),h.children(".widget").each(function(){var b=a(this);wpWidgets.appendTitle(this),b.find("p.widget-error").length&&b.find("a.widget-action").trigger("click")}),a("#widget-list").children(".widget").draggable({connectToSortable:"div.widgets-sortables",handle:"> .widget-top > .widget-title",distance:2,helper:"clone",zIndex:100,containment:"#wpwrap",refreshPositions:!0,start:function(b,c){var f=a(this).find(".widgets-chooser");c.helper.find("div.widget-description").hide(),d=this.id,f.length&&(a("#wpbody-content").append(f.hide()),c.helper.find(".widgets-chooser").remove(),e.clearWidgetSelection())},stop:function(){c&&a(c).hide(),c=""}}),h.droppable({tolerance:"intersect",over:function(b){var c=a(b.target).parent();wpWidgets.hoveredSidebar&&!c.is(wpWidgets.hoveredSidebar)&&wpWidgets.closeSidebar(b),c.hasClass("closed")&&(wpWidgets.hoveredSidebar=c,c.removeClass("closed")),a(this).sortable("refresh")},out:function(a){wpWidgets.hoveredSidebar&&wpWidgets.closeSidebar(a)}}),h.sortable({placeholder:"widget-placeholder",items:"> .widget",handle:"> .widget-top > .widget-title",cursor:"move",distance:2,containment:"#wpwrap",tolerance:"pointer",refreshPositions:!0,start:function(b,c){var d,e=a(this),f=e.parent(),g=c.item.children(".widget-inside");"block"===g.css("display")&&(c.item.removeClass("open"),g.hide(),a(this).sortable("refreshPositions")),f.hasClass("closed")||(d=c.item.hasClass("ui-draggable")?e.height():1+e.height(),e.css("min-height",d+"px"))},stop:function(e,f){var g,h,i,j,k,l,m=f.item,n=d;return wpWidgets.hoveredSidebar=null,m.hasClass("deleting")?(wpWidgets.save(m,1,0,1),void m.remove()):(g=m.find("input.add_new").val(),h=m.find("input.multi_number").val(),m.attr("style","").removeClass("ui-draggable"),d="",g&&("multi"===g?(m.html(m.html().replace(/<[^<>]+>/g,function(a){return a.replace(/__i__|%i%/g,h)})),m.attr("id",n.replace("__i__",h)),h++,a("div#"+n).find("input.multi_number").val(h)):"single"===g&&(m.attr("id","new-"+n),c="div#"+n),wpWidgets.save(m,0,0,1),m.find("input.add_new").val(""),b.trigger("widget-added",[m])),i=m.parent(),i.parent().hasClass("closed")&&(i.parent().removeClass("closed"),j=i.children(".widget"),j.length>1&&(k=j.get(0),l=m.get(0),k.id&&l.id&&k.id!==l.id&&a(k).before(m))),void(g?m.find("a.widget-action").trigger("click"):wpWidgets.saveOrder(i.attr("id"))))},activate:function(){a(this).parent().addClass("widget-hover")},deactivate:function(){a(this).css("min-height","").parent().removeClass("widget-hover")},receive:function(b,c){var d=a(c.sender);return this.id.indexOf("orphaned_widgets")>-1?void d.sortable("cancel"):void(d.attr("id").indexOf("orphaned_widgets")>-1&&!d.children(".widget").length&&d.parents(".orphan-sidebar").slideUp(400,function(){a(this).remove()}))}}).sortable("option","connectWith","div.widgets-sortables"),a("#available-widgets").droppable({tolerance:"pointer",accept:function(b){return"widget-list"!==a(b).parent().attr("id")},drop:function(b,c){c.draggable.addClass("deleting"),a("#removing-widget").hide().children("span").empty()},over:function(b,c){c.draggable.addClass("deleting"),a("div.widget-placeholder").hide(),c.draggable.hasClass("ui-sortable-helper")&&a("#removing-widget").show().children("span").html(c.draggable.find("div.widget-title").children("h3").html())},out:function(b,c){c.draggable.removeClass("deleting"),a("div.widget-placeholder").show(),a("#removing-widget").hide().children("span").empty()}}),a("#widgets-right .widgets-holder-wrap").each(function(b,c){var d=a(c),e=d.find(".sidebar-name h2").text(),f=d.find(".widgets-sortables").attr("id"),h=a('<li tabindex="0">').text(a.trim(e));0===b&&h.addClass("widgets-chooser-selected"),g.append(h),h.data("sidebarId",f)}),a("#available-widgets .widget .widget-title").on("click.widgets-chooser",function(){var b=a(this).closest(".widget");b.hasClass("widget-in-question")||a("#widgets-left").hasClass("chooser")?e.closeChooser():(e.clearWidgetSelection(),a("#widgets-left").addClass("chooser"),b.addClass("widget-in-question").children(".widget-description").after(f),f.slideDown(300,function(){g.find(".widgets-chooser-selected").focus()}),g.find("li").on("focusin.widgets-chooser",function(){g.find(".widgets-chooser-selected").removeClass("widgets-chooser-selected"),a(this).addClass("widgets-chooser-selected")}))}),f.on("click.widgets-chooser",function(b){var c=a(b.target);c.hasClass("button-primary")?(e.addWidget(f),e.closeChooser()):c.hasClass("widgets-chooser-cancel")&&e.closeChooser()}).on("keyup.widgets-chooser",function(b){b.which===a.ui.keyCode.ENTER?a(b.target).hasClass("widgets-chooser-cancel")?e.closeChooser():(e.addWidget(f),e.closeChooser()):b.which===a.ui.keyCode.ESCAPE&&e.closeChooser()})},saveOrder:function(b){var c={action:"widgets-order",savewidgets:a("#_wpnonce_widgets").val(),sidebars:[]};b&&a("#"+b).find(".spinner:first").addClass("is-active"),a("div.widgets-sortables").each(function(){a(this).sortable&&(c["sidebars["+a(this).attr("id")+"]"]=a(this).sortable("toArray").join(","))}),a.post(ajaxurl,c,function(){a("#inactive-widgets-control-remove").prop("disabled",!a("#wp_inactive_widgets .widget").length),a(".spinner").removeClass("is-active")})},save:function(c,d,e,f){var g,h=c.closest("div.widgets-sortables").attr("id"),i=c.find("form").serialize();c=a(c),a(".spinner",c).addClass("is-active"),g={action:"save-widget",savewidgets:a("#_wpnonce_widgets").val(),sidebar:h},d&&(g.delete_widget=1),i+="&"+a.param(g),a.post(ajaxurl,i,function(g){var i;d?(a("input.widget_number",c).val()||(i=a("input.widget-id",c).val(),a("#available-widgets").find("input.widget-id").each(function(){a(this).val()===i&&a(this).closest("div.widget").show()})),e?(f=0,c.slideUp("fast",function(){a(this).remove(),wpWidgets.saveOrder()})):(c.remove(),"wp_inactive_widgets"===h&&a("#inactive-widgets-control-remove").prop("disabled",!a("#wp_inactive_widgets .widget").length))):(a(".spinner").removeClass("is-active"),g&&g.length>2&&(a("div.widget-content",c).html(g),wpWidgets.appendTitle(c),b.trigger("widget-updated",[c]),"wp_inactive_widgets"===h&&a("#inactive-widgets-control-remove").prop("disabled",!a("#wp_inactive_widgets .widget").length))),f&&wpWidgets.saveOrder()})},removeInactiveWidgets:function(){var b,c,d=a(".remove-inactive-widgets");a(".spinner",d).addClass("is-active"),b={action:"delete-inactive-widgets",removeinactivewidgets:a("#_wpnonce_remove_inactive_widgets").val()},c=a.param(b),a.post(ajaxurl,c,function(){a("#wp_inactive_widgets .widget").remove(),a("#inactive-widgets-control-remove").prop("disabled",!0),a(".spinner",d).removeClass("is-active")})},appendTitle:function(b){var c=a('input[id*="-title"]',b).val()||"";c&&(c=": "+c.replace(/<[^<>]+>/g,"").replace(/</g,"&lt;").replace(/>/g,"&gt;")),a(b).children(".widget-top").children(".widget-title").children().children(".in-widget-title").html(c)},close:function(a){a.children(".widget-inside").slideUp("fast",function(){a.attr("style","")})},addWidget:function(c){var d,e,f,g,h,i,j,k=c.find(".widgets-chooser-selected").data("sidebarId"),l=a("#"+k);d=a("#available-widgets").find(".widget-in-question").clone(),e=d.attr("id"),f=d.find("input.add_new").val(),g=d.find("input.multi_number").val(),d.find(".widgets-chooser").remove(),"multi"===f?(d.html(d.html().replace(/<[^<>]+>/g,function(a){return a.replace(/__i__|%i%/g,g)})),d.attr("id",e.replace("__i__",g)),g++,a("#"+e).find("input.multi_number").val(g)):"single"===f&&(d.attr("id","new-"+e),a("#"+e).hide()),l.closest(".widgets-holder-wrap").removeClass("closed"),l.append(d),l.sortable("refresh"),wpWidgets.save(d,0,0,1),d.find("input.add_new").val(""),b.trigger("widget-added",[d]),h=a(window).scrollTop(),i=h+a(window).height(),j=l.offset(),j.bottom=j.top+l.outerHeight(),(h>j.bottom||i<j.top)&&a("html, body").animate({scrollTop:j.top-130},200),window.setTimeout(function(){d.find(".widget-title").trigger("click")},250)},closeChooser:function(){var b=this;a(".widgets-chooser").slideUp(200,function(){a("#wpbody-content").append(this),b.clearWidgetSelection()})},clearWidgetSelection:function(){a("#widgets-left").removeClass("chooser"),a(".widget-in-question").removeClass("widget-in-question")},closeSidebar:function(b){this.hoveredSidebar.addClass("closed"),a(b.target).css("min-height",""),this.hoveredSidebar=null}},b.ready(function(){wpWidgets.init()})}(jQuery);
\ No newline at end of file
index c0255fd295bed314e8af6bc9402eb103bde71a16..89afdcc06ec8ff9793515854ae8d28406f412392 100644 (file)
@@ -1,10 +1,57 @@
+/**
+ * Word or character counting functionality. Count words or characters in a provided text string.
+ *
+ * @summary   Count words or characters in a text.
+ *
+ * @namespace wp.utils
+ * @since     2.6
+ */
+
 ( function() {
+       /**
+        * Word counting utility
+        *
+        * @namespace wp.utils.wordcounter
+        * @memberof  wp.utils
+        *
+        * @class
+        *
+        * @param {Object} settings                                   Optional. Key-value object containing overrides for
+        *                                                            settings.
+        * @param {RegExp} settings.HTMLRegExp                        Optional. Regular expression to find HTML elements.
+        * @param {RegExp} settings.HTMLcommentRegExp                 Optional. Regular expression to find HTML comments.
+        * @param {RegExp} settings.spaceRegExp                       Optional. Regular expression to find irregular space
+        *                                                            characters.
+        * @param {RegExp} settings.HTMLEntityRegExp                  Optional. Regular expression to find HTML entities.
+        * @param {RegExp} settings.connectorRegExp                   Optional. Regular expression to find connectors that
+        *                                                            split words.
+        * @param {RegExp} settings.removeRegExp                      Optional. Regular expression to find remove unwanted
+        *                                                            characters to reduce false-positives.
+        * @param {RegExp} settings.astralRegExp                      Optional. Regular expression to find unwanted
+        *                                                            characters when searching for non-words.
+        * @param {RegExp} settings.wordsRegExp                       Optional. Regular expression to find words by spaces.
+        * @param {RegExp} settings.characters_excluding_spacesRegExp Optional. Regular expression to find characters which
+        *                                                            are non-spaces.
+        * @param {RegExp} settings.characters_including_spacesRegExp Optional. Regular expression to find characters
+        *                                                            including spaces.
+        * @param {RegExp} settings.shortcodesRegExp                  Optional. Regular expression to find shortcodes.
+        * @param {Object} settings.l10n                              Optional. Localization object containing specific
+        *                                                            configuration for the current localization.
+        * @param {String} settings.l10n.type                         Optional. Method of finding words to count.
+        * @param {Array}  settings.l10n.shortcodes                   Optional. Array of shortcodes that should be removed
+        *                                                            from the text.
+        *
+        * @return void
+        */
        function WordCounter( settings ) {
                var key,
                        shortcodes;
 
+               // Apply provided settings to object settings.
                if ( settings ) {
                        for ( key in settings ) {
+
+                               // Only apply valid settings.
                                if ( settings.hasOwnProperty( key ) ) {
                                        this.settings[ key ] = settings[ key ];
                                }
 
                shortcodes = this.settings.l10n.shortcodes;
 
+               // If there are any localization shortcodes, add this as type in the settings.
                if ( shortcodes && shortcodes.length ) {
                        this.settings.shortcodesRegExp = new RegExp( '\\[\\/?(?:' + shortcodes.join( '|' ) + ')[^\\]]*?\\]', 'g' );
                }
        }
 
+       // Default settings.
        WordCounter.prototype.settings = {
                HTMLRegExp: /<\/?[a-z][^>]*?>/gi,
                HTMLcommentRegExp: /<!--[\s\S]*?-->/g,
                spaceRegExp: /&nbsp;|&#160;/gi,
                HTMLEntityRegExp: /&\S+?;/g,
+
+               // \u2014 = em-dash
                connectorRegExp: /--|\u2014/g,
+
+               // Characters to be removed from input text.
                removeRegExp: new RegExp( [
                        '[',
+
                                // Basic Latin (extract)
                                '\u0021-\u0040\u005B-\u0060\u007B-\u007E',
+
                                // Latin-1 Supplement (extract)
                                '\u0080-\u00BF\u00D7\u00F7',
-                               // General Punctuation
-                               // Superscripts and Subscripts
-                               // Currency Symbols
-                               // Combining Diacritical Marks for Symbols
-                               // Letterlike Symbols
-                               // Number Forms
-                               // Arrows
-                               // Mathematical Operators
-                               // Miscellaneous Technical
-                               // Control Pictures
-                               // Optical Character Recognition
-                               // Enclosed Alphanumerics
-                               // Box Drawing
-                               // Block Elements
-                               // Geometric Shapes
-                               // Miscellaneous Symbols
-                               // Dingbats
-                               // Miscellaneous Mathematical Symbols-A
-                               // Supplemental Arrows-A
-                               // Braille Patterns
-                               // Supplemental Arrows-B
-                               // Miscellaneous Mathematical Symbols-B
-                               // Supplemental Mathematical Operators
-                               // Miscellaneous Symbols and Arrows
+
+                               /*
+                                * The following range consists of:
+                                * General Punctuation
+                                * Superscripts and Subscripts
+                                * Currency Symbols
+                                * Combining Diacritical Marks for Symbols
+                                * Letterlike Symbols
+                                * Number Forms
+                                * Arrows
+                                * Mathematical Operators
+                                * Miscellaneous Technical
+                                * Control Pictures
+                                * Optical Character Recognition
+                                * Enclosed Alphanumerics
+                                * Box Drawing
+                                * Block Elements
+                                * Geometric Shapes
+                                * Miscellaneous Symbols
+                                * Dingbats
+                                * Miscellaneous Mathematical Symbols-A
+                                * Supplemental Arrows-A
+                                * Braille Patterns
+                                * Supplemental Arrows-B
+                                * Miscellaneous Mathematical Symbols-B
+                                * Supplemental Mathematical Operators
+                                * Miscellaneous Symbols and Arrows
+                                */
                                '\u2000-\u2BFF',
+
                                // Supplemental Punctuation
                                '\u2E00-\u2E7F',
                        ']'
                ].join( '' ), 'g' ),
+
+               // Remove UTF-16 surrogate points, see https://en.wikipedia.org/wiki/UTF-16#U.2BD800_to_U.2BDFFF
                astralRegExp: /[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
                wordsRegExp: /\S\s+/g,
                characters_excluding_spacesRegExp: /\S/g,
+
+               /*
+                * Match anything that is not a formatting character, excluding:
+                * \f = form feed
+                * \n = new line
+                * \r = carriage return
+                * \t = tab
+                * \v = vertical tab
+                * \u00AD = soft hyphen
+                * \u2028 = line separator
+                * \u2029 = paragraph separator
+                */
                characters_including_spacesRegExp: /[^\f\n\r\t\v\u00AD\u2028\u2029]/g,
                l10n: window.wordCountL10n || {}
        };
 
+       /**
+        * Counts the number of words (or other specified type) in the specified text.
+        *
+        * @summary  Count the number of elements in a text.
+        *
+        * @since    2.6
+        * @memberof wp.utils.wordcounter
+        *
+        * @param {String}  text Text to count elements in.
+        * @param {String}  type Optional. Specify type to use.
+        *
+        * @return {Number} The number of items counted.
+        */
        WordCounter.prototype.count = function( text, type ) {
                var count = 0;
 
+               // Use default type if none was provided.
                type = type || this.settings.l10n.type;
 
+               // Sanitize type to one of three possibilities: 'words', 'characters_excluding_spaces' or 'characters_including_spaces'.
                if ( type !== 'characters_excluding_spaces' && type !== 'characters_including_spaces' ) {
                        type = 'words';
                }
 
+               // If we have any text at all.
                if ( text ) {
                        text = text + '\n';
 
+                       // Replace all HTML with a new-line.
                        text = text.replace( this.settings.HTMLRegExp, '\n' );
+
+                       // Remove all HTML comments.
                        text = text.replace( this.settings.HTMLcommentRegExp, '' );
 
+                       // If a shortcode regular expression has been provided use it to remove shortcodes.
                        if ( this.settings.shortcodesRegExp ) {
                                text = text.replace( this.settings.shortcodesRegExp, '\n' );
                        }
 
+                       // Normalize non-breaking space to a normal space.
                        text = text.replace( this.settings.spaceRegExp, ' ' );
 
                        if ( type === 'words' ) {
+
+                               // Remove HTML Entities.
                                text = text.replace( this.settings.HTMLEntityRegExp, '' );
+
+                               // Convert connectors to spaces to count attached text as words.
                                text = text.replace( this.settings.connectorRegExp, ' ' );
+
+                               // Remove unwanted characters.
                                text = text.replace( this.settings.removeRegExp, '' );
                        } else {
+
+                               // Convert HTML Entities to "a".
                                text = text.replace( this.settings.HTMLEntityRegExp, 'a' );
+
+                               // Remove surrogate points.
                                text = text.replace( this.settings.astralRegExp, 'a' );
                        }
 
+                       // Match with the selected type regular expression to count the items.
                        text = text.match( this.settings[ type + 'RegExp' ] );
 
+                       // If we have any matches, set the count to the number of items found.
                        if ( text ) {
                                count = text.length;
                        }
                return count;
        };
 
+       // Add the WordCounter to the WP Utils.
        window.wp = window.wp || {};
        window.wp.utils = window.wp.utils || {};
        window.wp.utils.WordCounter = WordCounter;
index 79abe65b77093e65b1007869a0a53b1fddafc715..25e456459700a238c945437530ea5be760ee920c 100644 (file)
@@ -19,17 +19,23 @@ $doaction = $wp_list_table->current_action();
 if ( $doaction && isset( $_REQUEST['linkcheck'] ) ) {
        check_admin_referer( 'bulk-bookmarks' );
 
+       $redirect_to = admin_url( 'link-manager.php' );
+       $bulklinks = (array) $_REQUEST['linkcheck'];
+
        if ( 'delete' == $doaction ) {
-               $bulklinks = (array) $_REQUEST['linkcheck'];
                foreach ( $bulklinks as $link_id ) {
                        $link_id = (int) $link_id;
 
                        wp_delete_link( $link_id );
                }
 
-               wp_redirect( add_query_arg('deleted', count( $bulklinks ), admin_url( 'link-manager.php' ) ) );
-               exit;
+               $redirect_to = add_query_arg( 'deleted', count( $bulklinks ), $redirect_to );
+       } else {
+               /** This action is documented in wp-admin/edit-comments.php */
+               $redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $bulklinks );
        }
+       wp_redirect( $redirect_to );
+       exit;
 } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
         wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
         exit;
@@ -57,8 +63,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Links_Screen" target="_blank">Documentation on Managing Links</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Links_Screen">Documentation on Managing Links</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
index 1d051b523729e73a42c3d2825fc3038a2317f533..42bf52cefc9c75f2dadb0297e9581c3573a3e7ab 100644 (file)
@@ -72,6 +72,11 @@ function endElement($parser, $tagName) {
 }
 
 // Create an XML parser
+if ( ! function_exists( 'xml_parser_create' ) ) {
+       trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );
+       wp_die( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );
+}
+
 $xml_parser = xml_parser_create();
 
 // Set the functions to handle opening and closing tags
index 86d8810a9c58117a63e608b2c7420654f3c972b4..75ddb16b3f811729fb7a5beb0bae65c4dae75051 100644 (file)
@@ -53,8 +53,8 @@ get_current_screen()->add_help_tab( array(
 ) );
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen" target="_blank">Documentation on Uploading Media Files</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen">Documentation on Uploading Media Files</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
index 5f87301e2b7dfb40584eb0053ad65a3368165dfa..ebede4e8f822b9deb8b61ab10022029a14ddf3c4 100644 (file)
@@ -95,7 +95,7 @@ if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab , media_up
         *
         * @since 2.5.0
         */
-       do_action( "media_upload_$type" );
+       do_action( "media_upload_{$type}" );
 } else {
        /**
         * Fires inside limited and specific upload-tab views in the legacy
@@ -107,6 +107,6 @@ if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab , media_up
         *
         * @since 2.5.0
         */
-       do_action( "media_upload_$tab" );
+       do_action( "media_upload_{$tab}" );
 }
 
index 88fa51ed483d332d644490a1a8f37ca7143da667..3fbb9265d5b2a31526d78fa58dbfa76b3876785d 100644 (file)
@@ -80,8 +80,8 @@ case 'edit' :
 
        get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media" target="_blank">Documentation on Edit Media</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media">Documentation on Edit Media</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
        );
 
        require( ABSPATH . 'wp-admin/admin-header.php' );
index df7744db56985453b9dad652d2f4a5779c247b98..31a35c772300044da5147576a4f63cfe06c76a63 100644 (file)
@@ -234,9 +234,11 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
                echo "</li>";
        }
 
-       echo '<li id="collapse-menu" class="hide-if-no-js"><div id="collapse-button"><div></div></div>';
-       echo '<span>' . esc_html__( 'Collapse menu' ) . '</span>';
-       echo '</li>';
+       echo '<li id="collapse-menu" class="hide-if-no-js">' .
+               '<button type="button" id="collapse-button" aria-label="' . esc_attr__( 'Collapse Main menu' ) . '" aria-expanded="true">' .
+               '<span class="collapse-button-icon" aria-hidden="true"></span>' .
+               '<span class="collapse-button-label">' . __( 'Collapse menu' ) . '</span>' .
+               '</button></li>';
 }
 
 ?>
index 6c0b38f723b1edfff79891bc098b176313e9a6b7..2fd146bd1af54e307b2f44fc263688f259324bbf 100644 (file)
@@ -38,7 +38,7 @@ if ( ! is_multisite() ) {
                $cap = 'update_plugins';
        else
                $cap = 'update_themes';
-       $submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-{$update_data['counts']['total']}' title='{$update_data['title']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), $cap, 'update-core.php');
+       $submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-{$update_data['counts']['total']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), $cap, 'update-core.php');
        unset( $cap );
 }
 
index 9424ae19702bac6b9e461def14b3e3e938f3d2db..6bc3cfcd89d4db3e6c3f826bf5b5a3c52e02eef2 100644 (file)
@@ -18,13 +18,13 @@ if ( ! current_user_can( 'delete_site' ) )
 if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false ) {
        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 ) );
+               wp_die( sprintf( __( 'Thank you for using %s, your site has been deleted. Happy trails to you until we meet again.' ), get_network()->site_name ) );
        } else {
                wp_die( __( "I'm sorry, the link you clicked is stale. Please select another option." ) );
        }
 }
 
-$blog = get_blog_details();
+$blog = get_site();
 $user = wp_get_current_user();
 
 $title = __( 'Delete Site' );
@@ -42,6 +42,8 @@ if ( isset( $_POST['action'] ) && $_POST['action'] == 'deleteblog' && isset( $_P
 
        $url_delete = esc_url( admin_url( 'ms-delete-site.php?h=' . $hash ) );
 
+       $switched_locale = switch_to_locale( get_locale() );
+
        /* translators: Do not translate USERNAME, URL_DELETE, SITE_NAME: those are placeholders. */
        $content = __( "Howdy ###USERNAME###,
 
@@ -70,22 +72,32 @@ Webmaster
 
        $content = str_replace( '###USERNAME###', $user->user_login, $content );
        $content = str_replace( '###URL_DELETE###', $url_delete, $content );
-       $content = str_replace( '###SITE_NAME###', $current_site->site_name, $content );
+       $content = str_replace( '###SITE_NAME###', get_network()->site_name, $content );
 
        wp_mail( get_option( 'admin_email' ), "[ " . wp_specialchars_decode( get_option( 'blogname' ) ) . " ] ".__( 'Delete My Site' ), $content );
+
+       if ( $switched_locale ) {
+               restore_previous_locale();
+       }
        ?>
 
        <p><?php _e( 'Thank you. Please check your email for a link to confirm your action. Your site will not be deleted until this link is clicked.' ) ?></p>
 
 <?php } else {
        ?>
-       <p><?php printf( __( 'If you do not want to use your %s site any more, you can delete it using the form below. When you click <strong>Delete My Site Permanently</strong> you will be sent an email with a link in it. Click on this link to delete your site.'), $current_site->site_name); ?></p>
+       <p><?php printf( __( 'If you do not want to use your %s site any more, you can delete it using the form below. When you click <strong>Delete My Site Permanently</strong> you will be sent an email with a link in it. Click on this link to delete your site.'), get_network()->site_name); ?></p>
        <p><?php _e( 'Remember, once deleted your site cannot be restored.' ) ?></p>
 
        <form method="post" name="deletedirect">
                <?php wp_nonce_field( 'delete-blog' ) ?>
                <input type="hidden" name="action" value="deleteblog" />
-               <p><input id="confirmdelete" type="checkbox" name="confirmdelete" value="1" /> <label for="confirmdelete"><strong><?php printf( __( "I'm sure I want to permanently disable my site, and I am aware I can never get it back or use %s again." ), is_subdomain_install() ? $blog->domain : $blog->domain . $blog->path ); ?></strong></label></p>
+               <p><input id="confirmdelete" type="checkbox" name="confirmdelete" value="1" /> <label for="confirmdelete"><strong><?php
+                       printf(
+                               /* translators: %s: site address */
+                               __( "I'm sure I want to permanently disable my site, and I am aware I can never get it back or use %s again." ),
+                               $blog->domain . $blog->path
+                       );
+               ?></strong></label></p>
                <?php submit_button( __( 'Delete My Site Permanently' ) ); ?>
        </form>
        <?php
index 6ec3367c929644e0f67c3370eb45e9a2ed5195c4..2478b39b129645c6fdffe6a6c4e49a4e4bd2cd5a 100644 (file)
@@ -23,7 +23,7 @@ $updated = false;
 if ( 'updateblogsettings' == $action && isset( $_POST['primary_blog'] ) ) {
        check_admin_referer( 'update-my-sites' );
 
-       $blog = get_blog_details( (int) $_POST['primary_blog'] );
+       $blog = get_site( (int) $_POST['primary_blog'] );
        if ( $blog && isset( $blog->domain ) ) {
                update_user_option( $current_user->ID, 'primary_blog', (int) $_POST['primary_blog'], true );
                $updated = true;
@@ -39,14 +39,13 @@ get_current_screen()->add_help_tab( array(
        'id'      => 'overview',
        'title'   => __('Overview'),
        'content' =>
-               '<p>' . __('This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.') . '</p>' .
-               '<p>' . __('Up until WordPress version 3.0, what is now called a Multisite Network had to be installed separately as WordPress MU (multi-user).') . '</p>'
+               '<p>' . __('This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.') . '</p>'
 ) );
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen" target="_blank">Documentation on My Sites</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen">Documentation on My Sites</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
index 72de2a92c9ed6d3235151e7af9d495f66b1ec0b4..19348c2348d0d7b0738bec0f28482f1313dcc360 100644 (file)
@@ -518,7 +518,8 @@ if ( ! current_theme_supports( 'menus' ) && ! $num_locations )
 
 if ( ! $locations_screen ) : // Main tab
        $overview  = '<p>' . __( 'This screen is used for managing your custom navigation menus.' ) . '</p>';
-       $overview .= '<p>' . sprintf( __( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a &#8220;Custom Menu&#8221; widget on the <a href="%1$s">Widgets</a> screen. If your theme does not support the custom menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the Documentation link to the side.' ), admin_url( 'widgets.php' ), 'Twenty Fifteen', 'Twenty Fourteen' ) . '</p>';
+       /* translators: 1: Widgets admin screen URL, 2 and 3: The name of the default themes */
+       $overview .= '<p>' . sprintf( __( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a &#8220;Custom Menu&#8221; widget on the <a href="%1$s">Widgets</a> screen. If your theme does not support the custom menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the Documentation link to the side.' ), admin_url( 'widgets.php' ), 'Twenty Sixteen', 'Twenty Seventeen' ) . '</p>';
        $overview .= '<p>' . __( 'From this screen you can:' ) . '</p>';
        $overview .= '<ul><li>' . __( 'Create, edit, and delete menus' ) . '</li>';
        $overview .= '<li>' . __( 'Add, organize, and modify individual menu items' ) . '</li></ul>';
@@ -567,8 +568,8 @@ endif;
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Appearance_Menus_Screen" target="_blank">Documentation on Menus</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Appearance_Menus_Screen">Documentation on Menus</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 // Get the admin header.
@@ -713,7 +714,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
                                        </option>
                                <?php endforeach; ?>
                        </select>
-                       <span class="submit-btn"><input type="submit" class="button-secondary" value="<?php esc_attr_e( 'Select' ); ?>"></span>
+                       <span class="submit-btn"><input type="submit" class="button" value="<?php esc_attr_e( 'Select' ); ?>"></span>
                        <span class="add-new-menu-action">
                                <?php printf( __( 'or <a href="%s">create a new menu</a>.' ), esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => 0 ), admin_url( 'nav-menus.php' ) ) ) ); ?>
                        </span><!-- /add-new-menu-action -->
@@ -759,7 +760,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
                                                        <label class="menu-name-label" for="menu-name"><?php _e( 'Menu Name' ); ?></label>
                                                        <input name="menu-name" id="menu-name" type="text" class="menu-name regular-text menu-item-textbox" <?php echo $menu_name_val . $menu_name_aria_desc; ?> />
                                                        <div class="publishing-action">
-                                                               <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'button-primary menu-save', 'save_menu', false, array( 'id' => 'save_menu_header' ) ); ?>
+                                                               <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_header' ) ); ?>
                                                        </div><!-- END .publishing-action -->
                                                </div><!-- END .major-publishing-actions -->
                                        </div><!-- END .nav-menu-header -->
@@ -798,17 +799,19 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
                                                                                $auto_add = false;
                                                                } ?>
 
-                                                               <dl class="auto-add-pages">
-                                                                       <dt class="howto"><?php _e( 'Auto add pages' ); ?></dt>
-                                                                       <dd class="checkbox-input"><input type="checkbox"<?php checked( $auto_add ); ?> name="auto-add-pages" id="auto-add-pages" value="1" /> <label for="auto-add-pages"><?php printf( __('Automatically add new top-level pages to this menu' ), esc_url( admin_url( 'edit.php?post_type=page' ) ) ); ?></label></dd>
-                                                               </dl>
+                                                               <fieldset class="menu-settings-group auto-add-pages">
+                                                                       <legend class="menu-settings-group-name howto"><?php _e( 'Auto add pages' ); ?></legend>
+                                                                       <div class="menu-settings-input checkbox-input">
+                                                                               <input type="checkbox"<?php checked( $auto_add ); ?> name="auto-add-pages" id="auto-add-pages" value="1" /> <label for="auto-add-pages"><?php printf( __('Automatically add new top-level pages to this menu' ), esc_url( admin_url( 'edit.php?post_type=page' ) ) ); ?></label>
+                                                                       </div>
+                                                               </fieldset>
 
                                                                <?php if ( current_theme_supports( 'menus' ) ) : ?>
 
-                                                                       <dl class="menu-theme-locations">
-                                                                               <dt class="howto"><?php _e( 'Theme locations' ); ?></dt>
+                                                                       <fieldset class="menu-settings-group menu-theme-locations">
+                                                                               <legend class="menu-settings-group-name howto"><?php _e( 'Display location' ); ?></legend>
                                                                                <?php foreach ( $locations as $location => $description ) : ?>
-                                                                               <dd class="checkbox-input">
+                                                                               <div class="menu-settings-input checkbox-input">
                                                                                        <input type="checkbox"<?php checked( isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] == $nav_menu_selected_id ); ?> name="menu-locations[<?php echo esc_attr( $location ); ?>]" id="locations-<?php echo esc_attr( $location ); ?>" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
                                                                                        <label for="locations-<?php echo esc_attr( $location ); ?>"><?php echo $description; ?></label>
                                                                                        <?php if ( ! empty( $menu_locations[ $location ] ) && $menu_locations[ $location ] != $nav_menu_selected_id ) : ?>
@@ -819,9 +822,9 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
                                                                                                        );
                                                                                                ?></span>
                                                                                        <?php endif; ?>
-                                                                               </dd>
+                                                                               </div>
                                                                                <?php endforeach; ?>
-                                                                       </dl>
+                                                                       </fieldset>
 
                                                                <?php endif; ?>
 
@@ -836,7 +839,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
                                                        </span><!-- END .delete-action -->
                                                        <?php endif; ?>
                                                        <div class="publishing-action">
-                                                               <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'button-primary menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?>
+                                                               <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?>
                                                        </div><!-- END .publishing-action -->
                                                </div><!-- END .major-publishing-actions -->
                                        </div><!-- /#nav-menu-footer -->
index 386bb33bbe463884f2cb178b820a119c5d6306ac..cce5ebfbf1170bfcc329603080dec77ef4bcc42c 100644 (file)
@@ -63,8 +63,8 @@ $network_help = '<p>' . __('This screen allows you to configure a network as hav
        '<p>' . __('Once you add this code and refresh your browser, multisite should be enabled. This screen, now in the Network Admin navigation menu, will keep an archive of the added code. You can toggle between Network Admin and Site Admin by clicking on the Network Admin or an individual site name under the My Sites dropdown in the Toolbar.') . '</p>' .
        '<p>' . __('The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with &#8220;/blog/&#8221; from the main site. This disabling will be addressed in a future version.') . '</p>' .
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Create_A_Network" target="_blank">Documentation on Creating a Network</a>') . '</p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Tools_Network_Screen" target="_blank">Documentation on the Network Screen</a>') . '</p>';
+       '<p>' . __( '<a href="https://codex.wordpress.org/Create_A_Network">Documentation on Creating a Network</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://codex.wordpress.org/Tools_Network_Screen">Documentation on the Network Screen</a>' ) . '</p>';
 
 get_current_screen()->add_help_tab( array(
        'id'      => 'network',
@@ -74,9 +74,9 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Create_A_Network" target="_blank">Documentation on Creating a Network</a>') . '</p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Tools_Network_Screen" target="_blank">Documentation on the Network Screen</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __( '<a href="https://codex.wordpress.org/Create_A_Network">Documentation on Creating a Network</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://codex.wordpress.org/Tools_Network_Screen">Documentation on the Network Screen</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
index 4ad541268aefae85373be89afa8aed07ce71a333..829fa1beefff3220f962c87cf044705ec7d0ef1f 100644 (file)
@@ -10,7 +10,4 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/about.php' );
index 66b899984304c62000aaf761c77093240dec31d4..693fa5aa1168cf8f619df6ea220d66d64cba66a1 100644 (file)
@@ -12,8 +12,10 @@ define( 'WP_NETWORK_ADMIN', true );
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
 
-if ( ! is_multisite() )
+// Do not remove this check. It is required by individual network admin pages.
+if ( ! is_multisite() ) {
        wp_die( __( 'Multisite support is not enabled.' ) );
+}
 
 $redirect_network_admin_request = 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path );
 
index 3d3ae1496b60be1eb7ed39558a4412be88b9bbba..75ee6e73372e90717d8202c114cedc01b81ec351 100644 (file)
@@ -10,7 +10,4 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/credits.php' );
index a5bb19602e00988cf60b04869cadf6869d20c600..66f19426249ff88abdf2d5bf0d22ad68aeb3ac72 100644 (file)
@@ -10,9 +10,6 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 if ( empty( $_GET['action'] ) ) {
        wp_redirect( network_admin_url() );
        exit;
index da7f86bd2277c0939f7ebdab57908a5befd76dff..9afbe82f34efccf231db437b9328825ff6ca368c 100644 (file)
@@ -10,7 +10,4 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/freedoms.php' );
index 796191f0183b9b30df2134eb8dcbb892fc37a5f5..81ededbe3713138505114131715273658a24986a 100644 (file)
@@ -13,9 +13,6 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
 /** Load WordPress dashboard API */
 require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
 
-if ( !is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 if ( ! current_user_can( 'manage_network' ) )
        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
@@ -50,8 +47,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin" target="_blank">Documentation on the Network Admin</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin">Documentation on the Network Admin</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
 );
 
 wp_dashboard_setup();
index 8b5f00269b3c0b8e537200e65ac32451c8aaa9a7..1cb22f22237e5a3ca666ff49c8f13e7a62d6537e 100644 (file)
@@ -14,7 +14,7 @@ $submenu['index.php'][0] = array( __( 'Home' ), 'read', 'index.php' );
 
 $update_data = wp_get_update_data();
 if ( $update_data['counts']['total'] ) {
-       $submenu['index.php'][10] = array( sprintf( __( 'Updates %s' ), "<span class='update-plugins count-{$update_data['counts']['total']}' title='{$update_data['title']}'><span class='update-count'>" . number_format_i18n( $update_data['counts']['total'] ) . "</span></span>" ), 'update_core', 'update-core.php' );
+       $submenu['index.php'][10] = array( sprintf( __( 'Updates %s' ), "<span class='update-plugins count-{$update_data['counts']['total']}'><span class='update-count'>" . number_format_i18n( $update_data['counts']['total'] ) . "</span></span>" ), 'update_core', 'update-core.php' );
 } else {
        $submenu['index.php'][10] = array( __( 'Updates' ), 'update_core', 'update-core.php' );
 }
index 9af590c45a1d0d7c4409e22db6b8b8ed443572aa..7171e7252c3135ffb2635ead38a7957af39ea54f 100644 (file)
@@ -10,7 +10,4 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/plugin-editor.php' );
index a8a1c17297cb358bc69cdf5a757a8cb8d1c8555e..26b3b0c8671204e546fc6fb2b458df37b9e26227 100644 (file)
@@ -13,7 +13,4 @@ if ( isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) )
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/plugin-install.php' );
index e9970605267a10f63266485db141dc25bc6ae8a4..56c3debd0131eb5a5bc0dfcb617dda4899e4014c 100644 (file)
@@ -10,7 +10,4 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/plugins.php' );
index df6b782711bb734f23fb56bdf921acca2736d4ab..240ef980a466c0e6b2331ef72f89df9694222a68 100644 (file)
@@ -10,7 +10,4 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/profile.php' );
index bad65475e75d3d4394089ed6ef0256a7ec6f472e..5d81cdf36924a293fd5ee6762f6d7b2938e5b2a7 100644 (file)
@@ -13,9 +13,6 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
 /** WordPress Translation Install API */
 require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 if ( ! current_user_can( 'manage_network_options' ) )
        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
@@ -40,8 +37,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Settings_Screen" target="_blank">Documentation on Network Settings</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Settings_Screen">Documentation on Network Settings</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 if ( $_POST ) {
@@ -107,7 +104,7 @@ if ( isset( $_GET['updated'] ) ) {
                        <tr>
                                <th scope="row"><label for="site_name"><?php _e( 'Network Title' ) ?></label></th>
                                <td>
-                                       <input name="site_name" type="text" id="site_name" class="regular-text" value="<?php echo esc_attr( $current_site->site_name ) ?>" />
+                                       <input name="site_name" type="text" id="site_name" class="regular-text" value="<?php echo esc_attr( get_network()->site_name ) ?>" />
                                </td>
                        </tr>
 
@@ -309,7 +306,13 @@ if ( isset( $_GET['updated'] ) ) {
                        <tr>
                                <th scope="row"><label for="fileupload_maxk"><?php _e( 'Max upload file size' ) ?></label></th>
                                <td>
-                                       <?php printf( _x( '%s KB', 'File size in kilobytes' ), '<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" aria-describedby="fileupload-maxk-desc" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />' ); ?>
+                                       <?php
+                                               printf(
+                                                       /* translators: %s: File size in kilobytes */
+                                                       __( '%s KB' ),
+                                                       '<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" aria-describedby="fileupload-maxk-desc" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />'
+                                               );
+                                       ?>
                                        <p class="screen-reader-text" id="fileupload-maxk-desc">
                                                <?php _e( 'Size in kilobytes' ) ?>
                                        </p>
index 35938990e6542e70a25b571cd670f11fd0af2825..9a642bbb922a713be4bf93bc84ba394189abb906 100644 (file)
@@ -10,7 +10,4 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/network.php' );
index cb5ec6e249180969a229143377abb52b91b24227..d5d5ce4507042cf837fc6d4cee44a5455739c16c 100644 (file)
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() ) {
-       wp_die( __( 'Multisite support is not enabled.' ) );
-}
-
 if ( ! current_user_can( 'manage_sites' ) ) {
        wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
 }
@@ -31,8 +27,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen" target="_blank">Documentation on Site Management</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>' ) . '</p>'
+       '<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
 );
 
 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
@@ -41,7 +37,7 @@ if ( ! $id ) {
        wp_die( __('Invalid site ID.') );
 }
 
-$details = get_blog_details( $id );
+$details = get_site( $id );
 if ( ! $details ) {
        wp_die( __( 'The requested site does not exist.' ) );
 }
@@ -88,7 +84,7 @@ if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] ) {
                $blog_data['path'] = $update_parsed_url['path'];
        }
 
-       $existing_details = get_blog_details( $id, false );
+       $existing_details = get_site( $id );
        $blog_data_checkboxes = array( 'public', 'archived', 'spam', 'mature', 'deleted' );
        foreach ( $blog_data_checkboxes as $c ) {
                if ( ! in_array( $existing_details->$c, array( 0, 1 ) ) ) {
@@ -101,7 +97,7 @@ if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] ) {
        update_blog_details( $id, $blog_data );
 
        // Maybe update home and siteurl options.
-       $new_details = get_blog_details( $id, false );
+       $new_details = get_site( $id );
 
        $old_home_url = trailingslashit( esc_url( get_option( 'home' ) ) );
        $old_home_parsed = parse_url( $old_home_url );
@@ -131,6 +127,7 @@ if ( isset( $_GET['update'] ) ) {
        }
 }
 
+/* translators: %s: site name */
 $title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
 
 $parent_file = 'sites.php';
index 7882d0e378865ea81a258aa056003608d64ae127..0be051ec878d572345f528c102a0631c2a760248 100644 (file)
@@ -13,9 +13,6 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
 /** WordPress Translation Install API */
 require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 if ( ! current_user_can( 'manage_sites' ) )
        wp_die( __( 'Sorry, you are not allowed to add sites to this network.' ) );
 
@@ -29,8 +26,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen" target="_blank">Documentation on Site Management</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
 );
 
 if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
@@ -65,10 +62,14 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
        );
 
        // Handle translation install for the new site.
-       if ( ! empty( $_POST['WPLANG'] ) && wp_can_install_language_pack() ) {
-               $language = wp_download_language_pack( wp_unslash( $_POST['WPLANG'] ) );
-               if ( $language ) {
-                       $meta['WPLANG'] = $language;
+       if ( isset( $_POST['WPLANG'] ) ) {
+               if ( '' === $_POST['WPLANG'] ) {
+                       $meta['WPLANG'] = ''; // en_US
+               } elseif ( wp_can_install_language_pack() ) {
+                       $language = wp_download_language_pack( wp_unslash( $_POST['WPLANG'] ) );
+                       if ( $language ) {
+                               $meta['WPLANG'] = $language;
+                       }
                }
        }
 
@@ -85,11 +86,11 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
        }
 
        if ( is_subdomain_install() ) {
-               $newdomain = $domain . '.' . preg_replace( '|^www\.|', '', $current_site->domain );
-               $path      = $current_site->path;
+               $newdomain = $domain . '.' . preg_replace( '|^www\.|', '', get_network()->domain );
+               $path      = get_network()->path;
        } else {
-               $newdomain = $current_site->domain;
-               $path      = $current_site->path . $domain . '/';
+               $newdomain = get_network()->domain;
+               $path      = get_network()->path . $domain . '/';
        }
 
        $password = 'N/A';
@@ -125,7 +126,7 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
        }
 
        $wpdb->hide_errors();
-       $id = wpmu_create_blog( $newdomain, $path, $title, $user_id, $meta, $current_site->id );
+       $id = wpmu_create_blog( $newdomain, $path, $title, $user_id, $meta, get_current_network_id() );
        $wpdb->show_errors();
        if ( ! is_wp_error( $id ) ) {
                if ( ! is_super_admin( $user_id ) && !get_user_option( 'primary_blog', $user_id ) ) {
@@ -137,7 +138,7 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
                        sprintf(
                                /* translators: %s: network name */
                                __( '[%s] New Site Created' ),
-                               $current_site->site_name
+                               get_network()->site_name
                        ),
                        sprintf(
                                /* translators: 1: user login, 2: site url, 3: site name/title */
@@ -197,9 +198,9 @@ if ( ! empty( $messages ) ) {
                        <th scope="row"><label for="site-address"><?php _e( 'Site Address (URL)' ) ?></label></th>
                        <td>
                        <?php if ( is_subdomain_install() ) { ?>
-                               <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', $current_site->domain ); ?></span>
+                               <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span>
                        <?php } else {
-                               echo $current_site->domain . $current_site->path ?><input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc"  autocapitalize="none" autocorrect="off" />
+                               echo get_network()->domain . get_network()->path ?><input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc"  autocapitalize="none" autocorrect="off" />
                        <?php }
                        echo '<p class="description" id="site-address-desc">' . __( 'Only lowercase letters (a-z), numbers, and hyphens are allowed.' ) . '</p>';
                        ?>
index 550fae96a96a72604cdc06895dcfec84f880f05d..9d13d307f2ed137fc13f9ac2b3e0c37d5a275db5 100644 (file)
@@ -10,9 +10,6 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 if ( ! current_user_can( 'manage_sites' ) )
        wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
 
@@ -29,8 +26,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen" target="_blank">Documentation on Site Management</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
 );
 
 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
@@ -38,7 +35,7 @@ $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
 if ( ! $id )
        wp_die( __('Invalid site ID.') );
 
-$details = get_blog_details( $id );
+$details = get_site( $id );
 if ( ! $details ) {
        wp_die( __( 'The requested site does not exist.' ) );
 }
@@ -83,6 +80,7 @@ if ( isset($_GET['update']) ) {
                $messages[] = __('Site options updated.');
 }
 
+/* translators: %s: site name */
 $title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
 
 $parent_file = 'sites.php';
index f545f475625142c49e53e73bccfd8b04936463d2..a500c5333fe58a8bff64caa067a773c2432cabb5 100644 (file)
@@ -10,9 +10,6 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 if ( ! current_user_can( 'manage_sites' ) )
        wp_die( __( 'Sorry, you are not allowed to manage themes for this site.' ) );
 
@@ -29,8 +26,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen" target="_blank">Documentation on Site Management</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -61,7 +58,7 @@ if ( ! $id )
 
 $wp_list_table->prepare_items();
 
-$details = get_blog_details( $id );
+$details = get_site( $id );
 if ( ! $details ) {
        wp_die( __( 'The requested site does not exist.' ) );
 }
@@ -122,6 +119,29 @@ if ( $action ) {
                                $n = 'none';
                        }
                        break;
+               default:
+                       if ( isset( $_POST['checked'] ) ) {
+                               check_admin_referer( 'bulk-themes' );
+                               $themes = (array) $_POST['checked'];
+                               $n = count( $themes );
+                               /**
+                                * Fires when a custom bulk action should be handled.
+                                *
+                                * The redirect link should be modified with success or failure feedback
+                                * from the action to be used to display feedback to the user.
+                                *
+                                * @since 4.7.0
+                                *
+                                * @param string $redirect_url The redirect URL.
+                                * @param string $action       The action being taken.
+                                * @param array  $items        The items to take the action on.
+                                * @param int    $site_id      The site id.
+                                */
+                               $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes, $id );
+                       } else {
+                               $action = 'error';
+                               $n = 'none';
+                       }
        }
 
        update_option( 'allowedthemes', $allowed_themes );
@@ -139,6 +159,7 @@ if ( isset( $_GET['action'] ) && 'update-site' == $_GET['action'] ) {
 add_thickbox();
 add_screen_option( 'per_page' );
 
+/* translators: %s: site name */
 $title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
 
 $parent_file = 'sites.php';
index a3857b70d84fdc2f19ba645a06c76599773084b6..fcd1a863d040d451c8145de06965aa7b5fc3c055 100644 (file)
@@ -10,9 +10,6 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 if ( ! current_user_can('manage_sites') )
        wp_die(__('Sorry, you are not allowed to edit this site.'));
 
@@ -32,8 +29,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen" target="_blank">Documentation on Site Management</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -54,7 +51,7 @@ $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
 if ( ! $id )
        wp_die( __('Invalid site ID.') );
 
-$details = get_blog_details( $id );
+$details = get_site( $id );
 if ( ! $details ) {
        wp_die( __( 'The requested site does not exist.' ) );
 }
@@ -117,8 +114,10 @@ if ( $action ) {
                        break;
 
                case 'remove':
-                       if ( ! current_user_can( 'remove_users' )  )
-                               die(__('You can&#8217;t remove users.'));
+                       if ( ! current_user_can( 'remove_users' ) ) {
+                               wp_die( __( 'Sorry, you are not allowed to remove users.' ) );
+                       }
+
                        check_admin_referer( 'bulk-users' );
 
                        $update = 'remove';
@@ -139,8 +138,9 @@ if ( $action ) {
                case 'promote':
                        check_admin_referer( 'bulk-users' );
                        $editable_roles = get_editable_roles();
-                       if ( empty( $editable_roles[$_REQUEST['new_role']] ) )
-                               wp_die(__('You can&#8217;t give users that role.'));
+                       if ( empty( $editable_roles[ $_REQUEST['new_role'] ] ) ) {
+                               wp_die( __( 'Sorry, you are not allowed to give users that role.' ) );
+                       }
 
                        if ( isset( $_REQUEST['users'] ) ) {
                                $userids = $_REQUEST['users'];
@@ -164,6 +164,16 @@ if ( $action ) {
                                $update = 'err_promote';
                        }
                        break;
+               default:
+                       if ( ! isset( $_REQUEST['users'] ) ) {
+                               break;
+                       }
+                       check_admin_referer( 'bulk-users' );
+                       $userids = $_REQUEST['users'];
+                       /** This action is documented in wp-admin/network/site-themes.php */
+                       $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $userids, $id );
+                       $update = $action;
+                       break;
        }
 
        wp_safe_redirect( add_query_arg( 'update', $update, $referer ) );
@@ -179,6 +189,7 @@ if ( isset( $_GET['action'] ) && 'update-site' == $_GET['action'] ) {
 
 add_screen_option( 'per_page' );
 
+/* translators: %s: site name */
 $title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
 
 $parent_file = 'sites.php';
index 724c2cf52ffa0b0eeb5c6650c121864008b476f5..96d708ac52c220fe3c484f3ee86dcabf3f4b3bdf 100644 (file)
@@ -10,9 +10,6 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 if ( ! current_user_can( 'manage_sites' ) )
        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
@@ -42,8 +39,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen" target="_blank">Documentation on Site Management</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -90,11 +87,11 @@ if ( isset( $_GET['action'] ) ) {
                        header( 'Content-Type: text/html; charset=utf-8' );
                }
 
-               if ( $current_site->blog_id == $id ) {
+               if ( get_network()->site_id == $id ) {
                        wp_die( __( 'Sorry, you are not allowed to change the current site.' ) );
                }
 
-               $site_details = get_blog_details( $id );
+               $site_details = get_site( $id );
                $site_address = untrailingslashit( $site_details->domain . $site_details->path );
 
                require_once( ABSPATH . 'wp-admin/admin-header.php' );
@@ -129,7 +126,7 @@ if ( isset( $_GET['action'] ) ) {
                                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 ) ) {
+                       if ( $id != '0' && $id != get_network()->site_id && current_user_can( 'delete_site', $id ) ) {
                                wpmu_delete_blog( $id, true );
                                $updated_action = 'delete';
                        }
@@ -140,7 +137,7 @@ if ( isset( $_GET['action'] ) ) {
                                $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
 
                                foreach ( (array) $_POST['allblogs'] as $key => $val ) {
-                                       if ( $val != '0' && $val != $current_site->blog_id ) {
+                                       if ( $val != '0' && $val != get_network()->site_id ) {
                                                switch ( $doaction ) {
                                                        case 'delete':
                                                                if ( ! current_user_can( 'delete_site', $val ) )
@@ -160,6 +157,14 @@ if ( isset( $_GET['action'] ) ) {
                                                wp_die( __( 'Sorry, you are not allowed to change the current site.' ) );
                                        }
                                }
+                               if ( ! in_array( $doaction, array( 'delete', 'spam', 'notspam' ), true ) ) {
+                                       $redirect_to = wp_get_referer();
+                                       $blogs = (array) $_POST['allblogs'];
+                                       /** This action is documented in wp-admin/network/site-themes.php */
+                                       $redirect_to = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $blogs, $id );
+                                       wp_safe_redirect( $redirect_to );
+                                       exit();
+                               }
                        } else {
                                $location = network_admin_url( 'sites.php' );
                                if ( ! empty( $_REQUEST['paged'] ) ) {
@@ -273,7 +278,7 @@ if ( isset( $_GET['updated'] ) ) {
        }
 
        if ( ! empty( $msg ) )
-               $msg = '<div class="updated" id="message notice is-dismissible"><p>' . $msg . '</p></div>';
+               $msg = '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
 }
 
 $wp_list_table->prepare_items();
index 621c506c2682afd7f3f8e366f3254ce2b17213eb..c28c9675cccfa8772563c0c64e8fd477a341da3b 100644 (file)
@@ -10,7 +10,4 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/theme-editor.php' );
index c666eaff1c0e9c18627b4ae779347e8f78733638..4d4ee5ce86d29719c24c147ce6fac1b87edd9967 100644 (file)
@@ -13,7 +13,4 @@ if ( isset( $_GET['tab'] ) && ( 'theme-information' == $_GET['tab'] ) )
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/theme-install.php' );
index 171afc359da942bff2052b8765deefadbbad38d3..baaa6d802953f9fb46879f19461d947c10d7b69b 100644 (file)
@@ -10,9 +10,6 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 if ( !current_user_can('manage_network_themes') )
        wp_die( __( 'Sorry, you are not allowed to manage network themes.' ) );
 
@@ -161,9 +158,9 @@ if ( $action ) {
                                                wp_nonce_field( 'bulk-themes' );
 
                                                if ( 1 == $themes_to_delete ) {
-                                                       submit_button( __( 'Yes, delete this theme' ), 'button', 'submit', false );
+                                                       submit_button( __( 'Yes, delete this theme' ), '', 'submit', false );
                                                } else {
-                                                       submit_button( __( 'Yes, delete these themes' ), 'button', 'submit', false );
+                                                       submit_button( __( 'Yes, delete these themes' ), '', 'submit', false );
                                                }
                                        ?>
                                </form>
@@ -171,7 +168,7 @@ if ( $action ) {
                                $referer = wp_get_referer();
                                ?>
                                <form method="post" action="<?php echo $referer ? esc_url( $referer ) : ''; ?>" style="display:inline;">
-                                       <?php submit_button( __( 'No, return me to the theme list' ), 'button', 'submit', false ); ?>
+                                       <?php submit_button( __( 'No, return me to the theme list' ), '', 'submit', false ); ?>
                                </form>
                        </div>
                                <?php
@@ -195,7 +192,21 @@ if ( $action ) {
                                's' => $s
                        ), network_admin_url( 'themes.php' ) ) );
                        exit;
+               default:
+                       $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
+                       if ( empty( $themes ) ) {
+                               wp_safe_redirect( add_query_arg( 'error', 'none', $referer ) );
+                               exit;
+                       }
+                       check_admin_referer( 'bulk-themes' );
+
+                       /** This action is documented in wp-admin/network/site-themes.php */
+                       $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes );
+
+                       wp_safe_redirect( $referer );
+                       exit;
        }
+
 }
 
 $wp_list_table->prepare_items();
@@ -215,8 +226,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Themes_Screen" target="_blank">Documentation on Network Themes</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Themes_Screen">Documentation on Network Themes</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
index 3d2825a958b17d3d5cf1de3e2f584c7e26fe98d5..55f2aca32ae2e2c875d5afc79e5d7a762239df3d 100644 (file)
@@ -10,7 +10,4 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/update-core.php' );
index c90098b25b27355a6793e3a57a1b5633fe9b42d6..db63968d1007ef754f82871af0883df059af636a 100644 (file)
@@ -13,7 +13,4 @@ if ( isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'update-selec
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/update.php' );
index 199838cf57233b44c367ffd181aeae2e27cab23e..5c2d3f990ffda0f4aafbac11c4af7fabe1afd451 100644 (file)
@@ -10,9 +10,6 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require_once( ABSPATH . WPINC . '/http.php' );
 
 $title = __( 'Upgrade Network' );
@@ -29,8 +26,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Updates_Screen" target="_blank">Documentation on Upgrade Network</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Updates_Screen">Documentation on Upgrade Network</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
@@ -55,14 +52,24 @@ switch ( $action ) {
                        update_site_option( 'wpmu_upgrade_site', $wp_db_version );
                }
 
-               $blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A );
-               if ( empty( $blogs ) ) {
+               $site_ids = get_sites( array(
+                       'spam'       => 0,
+                       'deleted'    => 0,
+                       'archived'   => 0,
+                       'network_id' => get_current_network_id(),
+                       'number'     => 5,
+                       'offset'     => $n,
+                       'fields'     => 'ids',
+                       'order'      => 'DESC',
+                       'orderby'    => 'id',
+               ) );
+               if ( empty( $site_ids ) ) {
                        echo '<p>' . __( 'All done!' ) . '</p>';
                        break;
                }
                echo "<ul>";
-               foreach ( (array) $blogs as $details ) {
-                       switch_to_blog( $details['blog_id'] );
+               foreach ( (array) $site_ids as $site_id ) {
+                       switch_to_blog( $site_id );
                        $siteurl = site_url();
                        $upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' );
                        restore_current_blog();
@@ -96,9 +103,9 @@ switch ( $action ) {
                         *
                         * @since MU
                         *
-                        * @param int $blog_id The Site ID.
+                        * @param int $site_id The Site ID.
                         */
-                       do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
+                       do_action( 'wpmu_upgrade_site', $site_id );
                }
                echo "</ul>";
                ?><p><?php _e( 'If your browser doesn&#8217;t start loading the next page automatically, click this link:' ); ?> <a class="button" href="upgrade.php?action=upgrade&amp;n=<?php echo ($n + 5) ?>"><?php _e("Next Sites"); ?></a></p>
index effaaf8a0ebe376e73b7059e82317811f2128a2e..ef3c2720f1a1c15172a9770e8f87ce8319e0eabc 100644 (file)
@@ -10,7 +10,4 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 require( ABSPATH . 'wp-admin/user-edit.php' );
index fae3fcb0039f2ff93d88ac150b8032730013912c..52941e29204714d1612d79af8d0b57b4c717c372 100644 (file)
@@ -10,9 +10,6 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 if ( ! current_user_can('create_users') )
        wp_die(__('Sorry, you are not allowed to add users to this network.'));
 
@@ -26,8 +23,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Users_Screen" target="_blank">Documentation on Network Users</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Users_Screen">Documentation on Network Users</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
 );
 
 if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) {
index cc3edc2ca34e29076ef9fc1819218ac6c0ea394a..90ece927dca6a7c1bb505a9017925f34f359d2a4 100644 (file)
@@ -10,9 +10,6 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! is_multisite() )
-       wp_die( __( 'Multisite support is not enabled.' ) );
-
 if ( ! current_user_can( 'manage_network_users' ) )
        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
@@ -75,7 +72,7 @@ if ( isset( $_GET['action'] ) ) {
                                                                $userfunction = 'all_spam';
                                                                $blogs = get_blogs_of_user( $user_id, true );
                                                                foreach ( (array) $blogs as $details ) {
-                                                                       if ( $details->userblog_id != $current_site->blog_id ) // main blog not a spam !
+                                                                       if ( $details->userblog_id != get_network()->site_id ) // main blog not a spam !
                                                                                update_blog_status( $details->userblog_id, 'spam', '1' );
                                                                }
                                                                update_user_status( $user_id, 'spam', '1' );
@@ -93,6 +90,17 @@ if ( isset( $_GET['action'] ) ) {
                                        }
                                }
 
+                               if ( ! in_array( $doaction, array( 'delete', 'spam', 'notspam' ), true ) ) {
+                                       $sendback = wp_get_referer();
+
+                                       $user_ids = (array) $_POST['allusers'];
+                                       /** This action is documented in wp-admin/network/site-themes.php */
+                                       $sendback = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $user_ids );
+
+                                       wp_safe_redirect( $sendback );
+                                       exit();
+                               }
+
                                wp_safe_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $userfunction ), wp_get_referer() ) );
                        } else {
                                $location = network_admin_url( 'users.php' );
@@ -168,8 +176,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Users_Screen" target="_blank">Documentation on Network Users</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Users_Screen">Documentation on Network Users</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
index 5b27e14a3cefbc68f8e3ff48a9b5c457e3d4fb62..fefc0d82df1287ab19a302739f69be05100b1642 100644 (file)
@@ -25,8 +25,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Discussion_Screen" target="_blank">Documentation on Discussion Settings</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Discussion_Screen">Documentation on Discussion Settings</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
@@ -107,6 +107,7 @@ $default_comments_page .= '>' . __('last') . '</option><option value="oldest"';
 if ( 'oldest' == get_option('default_comments_page') ) $default_comments_page .= ' selected="selected"';
 $default_comments_page .= '>' . __('first') . '</option></select>';
 
+/* translators: 1: Form field control for number of top level comments per page, 2: Form field control for the 'first' or 'last' page */
 printf( __('Break comments into pages with %1$s top level comments per page and the %2$s page displayed by default'), '</label><label for="comments_per_page"><input name="comments_per_page" type="number" step="1" min="0" id="comments_per_page" value="' . esc_attr(get_option('comments_per_page')) . '" class="small-text" />', $default_comments_page );
 
 ?></label>
index 426ebaae10343d8c0e98448afb0397a6140a3d32..22d475c2e206ae7716a67b8952fd463e848bd074 100644 (file)
@@ -42,8 +42,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Settings_General_Screen" target="_blank">Documentation on General Settings</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Settings_General_Screen">Documentation on General Settings</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
@@ -147,17 +147,17 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
 <td>
 
 <select id="timezone_string" name="timezone_string" aria-describedby="timezone-description">
-<?php echo wp_timezone_choice($tzstring); ?>
+       <?php echo wp_timezone_choice( $tzstring, get_user_locale() ); ?>
 </select>
 
-<p class="description" id="timezone-description"><?php _e( 'Choose a city in the same timezone as you.' ); ?></p>
+<p class="description" id="timezone-description"><?php _e( 'Choose either a city in the same timezone as you or a UTC timezone offset.' ); ?></p>
 
 <p class="timezone-info">
        <span id="utc-time"><?php
                /* translators: 1: UTC abbreviation, 2: UTC time */
                printf( __( 'Universal time (%1$s) is %2$s.' ),
                        '<abbr>' . __( 'UTC' ) . '</abbr>',
-                       '<code>' . date_i18n( $timezone_format, false, 'gmt' ) . '</code>'
+                       '<code>' . date_i18n( $timezone_format, false, true ) . '</code>'
                );
        ?></span>
 <?php if ( get_option( 'timezone_string' ) || ! empty( $current_offset ) ) : ?>
index 2f7e0abbda89840768ec5a9e0b4fa4e9a16fc6b9..698b98dce66b142822c477d12bba4f4b8cff2c41 100644 (file)
@@ -31,8 +31,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Media_Screen" target="_blank">Documentation on Media Settings</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Media_Screen">Documentation on Media Settings</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
index b6c52c517afd055aa8041810fdd31e85b671f5ee..95c1a3e0bac2027986674a0b61d16c7241afa19d 100644 (file)
@@ -41,9 +41,9 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Permalinks_Screen" target="_blank">Documentation on Permalinks Settings</a>') . '</p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Using_Permalinks" target="_blank">Documentation on Using Permalinks</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Permalinks_Screen">Documentation on Permalinks Settings</a>') . '</p>' .
+       '<p>' . __('<a href="https://codex.wordpress.org/Using_Permalinks">Documentation on Using Permalinks</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 add_filter('admin_head', 'options_permalink_add_js');
index 7ad94fbad4f2dc2a9d8137adaba1fedd809f501d..69c425f75912a76b8d4d69c0e21b69a7b575d9fd 100644 (file)
@@ -35,8 +35,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Reading_Screen" target="_blank">Documentation on Reading Settings</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Reading_Screen">Documentation on Reading Settings</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
index 6248ba9e15a645a4d2156a87e9e3d0444e11ac72..aa314f3bf2af574cde65d13390369b78200477bf 100644 (file)
@@ -42,8 +42,8 @@ if ( apply_filters( 'enable_update_services_configuration', true ) ) {
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Writing_Screen" target="_blank">Documentation on Writing Settings</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Writing_Screen">Documentation on Writing Settings</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
index f319d5208e79b185dd2657999ec4cb30ff7da0bb..17474890840b2fc05c5797476bdb111e6db465ec 100644 (file)
@@ -47,7 +47,7 @@ if ( empty($option_page) ) {
 if ( ! current_user_can( $capability ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to manage these options.' ) . '</p>',
                403
        );
 }
@@ -194,6 +194,8 @@ if ( 'update' == $action ) {
        }
 
        if ( $options ) {
+               $user_language_old = get_user_locale();
+
                foreach ( $options as $option ) {
                        if ( $unregistered ) {
                                _deprecated_argument( 'options.php', '2.7.0',
@@ -209,19 +211,23 @@ if ( 'update' == $action ) {
                        $value = null;
                        if ( isset( $_POST[ $option ] ) ) {
                                $value = $_POST[ $option ];
-                               if ( ! is_array( $value ) )
+                               if ( ! is_array( $value ) ) {
                                        $value = trim( $value );
+                               }
                                $value = wp_unslash( $value );
                        }
                        update_option( $option, $value );
                }
 
-               // Switch translation in case WPLANG was changed.
-               $language = get_option( 'WPLANG' );
-               if ( $language ) {
-                       load_default_textdomain( $language );
-               } else {
-                       unload_textdomain( 'default' );
+               /*
+                * Switch translation in case WPLANG was changed.
+                * The global $locale is used in get_locale() which is
+                * used as a fallback in get_user_locale().
+                */
+               unset( $GLOBALS['locale'] );
+               $user_language_new = get_user_locale();
+               if ( $user_language_old !== $user_language_new  ) {
+                       load_default_textdomain( $user_language_new );
                }
        }
 
index 754c4265b261098a3dce404b25806b8199ab64dc..ab8968db87029f1120a92aea5ddcce00ab2bfd79 100644 (file)
@@ -20,8 +20,6 @@ if ( !current_user_can('edit_plugins') )
 $title = __("Edit Plugins");
 $parent_file = 'plugins.php';
 
-wp_reset_vars( array( 'action', 'error', 'file', 'plugin' ) );
-
 $plugins = get_plugins();
 
 if ( empty( $plugins ) ) {
@@ -36,11 +34,23 @@ if ( empty( $plugins ) ) {
        exit;
 }
 
-if ( $file ) {
-       $plugin = $file;
-} elseif ( empty( $plugin ) ) {
-       $plugin = array_keys($plugins);
-       $plugin = $plugin[0];
+$file = '';
+$plugin = '';
+if ( isset( $_REQUEST['file'] ) ) {
+       $file = sanitize_text_field( $_REQUEST['file'] );
+}
+
+if ( isset( $_REQUEST['plugin'] ) ) {
+       $plugin = sanitize_text_field( $_REQUEST['plugin'] );
+}
+
+if ( empty( $plugin ) ) {
+       if ( $file ) {
+               $plugin = $file;
+       } else {
+               $plugin = array_keys( $plugins );
+               $plugin = $plugin[0];
+       }
 }
 
 $plugin_files = get_plugin_files($plugin);
@@ -52,9 +62,7 @@ $file = validate_file_to_edit($file, $plugin_files);
 $real_file = WP_PLUGIN_DIR . '/' . $file;
 $scrollto = isset($_REQUEST['scrollto']) ? (int) $_REQUEST['scrollto'] : 0;
 
-switch ( $action ) {
-
-case 'update':
+if ( isset( $_REQUEST['action'] ) && 'update' === $_REQUEST['action'] ) {
 
        check_admin_referer('edit-plugin_' . $file);
 
@@ -67,9 +75,10 @@ case 'update':
                $network_wide = is_plugin_active_for_network( $file );
 
                // Deactivate so we can test it.
-               if ( is_plugin_active($file) || isset($_POST['phperror']) ) {
-                       if ( is_plugin_active($file) )
-                               deactivate_plugins($file, true);
+               if ( is_plugin_active( $plugin ) || isset( $_POST['phperror'] ) ) {
+                       if ( is_plugin_active( $plugin ) ) {
+                               deactivate_plugins( $plugin, true );
+                       }
 
                        if ( ! is_network_admin() ) {
                                update_option( 'recently_activated', array( $file => time() ) + (array) get_option( 'recently_activated' ) );
@@ -77,28 +86,31 @@ case 'update':
                                update_site_option( 'recently_activated', array( $file => time() ) + (array) get_site_option( 'recently_activated' ) );
                        }
 
-                       wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1&scrollto=$scrollto&networkwide=" . $network_wide));
+                       wp_redirect( add_query_arg( '_wpnonce', wp_create_nonce( 'edit-plugin-test_' . $file ), "plugin-editor.php?file=$file&plugin=$plugin&liveupdate=1&scrollto=$scrollto&networkwide=" . $network_wide ) );
                        exit;
                }
-               wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") );
+               wp_redirect( self_admin_url( "plugin-editor.php?file=$file&plugin=$plugin&a=te&scrollto=$scrollto" ) );
        } else {
-               wp_redirect( self_admin_url("plugin-editor.php?file=$file&scrollto=$scrollto") );
+               wp_redirect( self_admin_url( "plugin-editor.php?file=$file&plugin=$plugin&scrollto=$scrollto" ) );
        }
        exit;
 
-default:
+} else {
 
        if ( isset($_GET['liveupdate']) ) {
                check_admin_referer('edit-plugin-test_' . $file);
 
-               $error = validate_plugin($file);
-               if ( is_wp_error($error) )
+               $error = validate_plugin( $plugin );
+
+               if ( is_wp_error( $error ) ) {
                        wp_die( $error );
+               }
 
-               if ( ( ! empty( $_GET['networkwide'] ) && ! is_plugin_active_for_network($file) ) || ! is_plugin_active($file) )
-                       activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error
+               if ( ( ! empty( $_GET['networkwide'] ) && ! is_plugin_active_for_network( $file ) ) || ! is_plugin_active( $file ) ) {
+                       activate_plugin( $plugin, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) );
+               } // we'll override this later if the plugin can be included without fatal error
 
-               wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") );
+               wp_redirect( self_admin_url("plugin-editor.php?file=$file&plugin=$plugin&a=te&scrollto=$scrollto") );
                exit;
        }
 
@@ -140,9 +152,9 @@ default:
 
        get_current_screen()->set_help_sidebar(
                '<p><strong>' . __('For more information:') . '</strong></p>' .
-               '<p>' . __('<a href="https://codex.wordpress.org/Plugins_Editor_Screen" target="_blank">Documentation on Editing Plugins</a>') . '</p>' .
-               '<p>' . __('<a href="https://codex.wordpress.org/Writing_a_Plugin" target="_blank">Documentation on Writing Plugins</a>') . '</p>' .
-               '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+               '<p>' . __('<a href="https://codex.wordpress.org/Plugins_Editor_Screen">Documentation on Editing Plugins</a>') . '</p>' .
+               '<p>' . __('<a href="https://codex.wordpress.org/Writing_a_Plugin">Documentation on Writing Plugins</a>') . '</p>' .
+               '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
        );
 
        require_once(ABSPATH . 'wp-admin/admin-header.php');
@@ -224,7 +236,7 @@ default:
        }
 ?>
                </select>
-               <?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?>
+               <?php submit_button( __( 'Select' ), '', 'Submit', false ); ?>
        </form>
 </div>
 <br class="clear" />
@@ -260,10 +272,10 @@ foreach ( $plugin_files as $plugin_file ) :
                <input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" />
                </div>
                <?php if ( !empty( $docs_select ) ) : ?>
-               <div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" /></div>
+               <div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ) ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ) ?>&amp;redirect=true'); }" /></div>
                <?php endif; ?>
 <?php if ( is_writeable($real_file) ) : ?>
-       <?php if ( in_array( $file, (array) get_option( 'active_plugins', array() ) ) ) { ?>
+       <?php if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ) ) ) { ?>
                <p><?php _e('<strong>Warning:</strong> Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated.'); ?></p>
        <?php } ?>
        <p class="submit">
@@ -289,6 +301,6 @@ jQuery(document).ready(function($){
 });
 </script>
 <?php
-       break;
 }
+
 include(ABSPATH . "wp-admin/admin-footer.php");
index 637424b507eb93c0a0e485f046d8eb4e962343d2..490e671d3e3774e29ba4d2cd8a6ebc1f21ddc874 100644 (file)
@@ -64,7 +64,7 @@ wp_enqueue_script( 'updates' );
  *
  * @since 2.7.0
  */
-do_action( "install_plugins_pre_$tab" );
+do_action( "install_plugins_pre_{$tab}" );
 
 /*
  * Call the pre upload action on every non-upload plugin install screen
@@ -79,7 +79,7 @@ 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 Plugin Directory</a> are compatible with the license WordPress uses.' ), '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">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>'
 
 ) );
@@ -95,8 +95,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Plugins_Add_New_Screen" target="_blank">Documentation on Installing Plugins</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Plugins_Add_New_Screen">Documentation on Installing Plugins</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -129,7 +129,7 @@ include(ABSPATH . 'wp-admin/admin-header.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' ) {
+if ( 'upload' !== $tab ) {
        ?>
        <div class="upload-plugin-wrap">
                <?php
@@ -138,9 +138,6 @@ if ( $tab !== 'upload' ) {
                ?>
        </div>
        <?php
-}
-
-if ( $tab !== 'upload' ) {
        $wp_list_table->views();
        echo '<br class="clear" />';
 }
@@ -155,7 +152,7 @@ if ( $tab !== 'upload' ) {
  *
  * @param int $paged The current page number of the plugins list table.
  */
-do_action( "install_plugins_$tab", $paged ); ?>
+do_action( "install_plugins_{$tab}", $paged ); ?>
 
        <span class="spinner"></span>
 </div>
index 1d462381935d360336bf9bc84c7e90548b89a0fc..ae5ea58c5057b5cf679892b86593b284bbd30f68 100644 (file)
@@ -327,13 +327,13 @@ if ( $action ) {
                                                }
                                        ?>
                                        <?php wp_nonce_field('bulk-plugins') ?>
-                                       <?php submit_button( $data_to_delete ? __( 'Yes, delete these files and data' ) : __( 'Yes, delete these files' ), 'button', 'submit', false ); ?>
+                                       <?php submit_button( $data_to_delete ? __( 'Yes, delete these files and data' ) : __( 'Yes, delete these files' ), '', 'submit', false ); ?>
                                </form>
                                <?php
                                $referer = wp_get_referer();
                                ?>
                                <form method="post" action="<?php echo $referer ? esc_url( $referer ) : ''; ?>" style="display:inline;">
-                                       <?php submit_button( __( 'No, return me to the plugin list' ), 'button', 'submit', false ); ?>
+                                       <?php submit_button( __( 'No, return me to the plugin list' ), '', 'submit', false ); ?>
                                </form>
                        </div>
                                <?php
@@ -356,7 +356,21 @@ if ( $action ) {
                                update_site_option( 'recently_activated', array() );
                        }
                        break;
+
+               default:
+                       if ( isset( $_POST['checked'] ) ) {
+                               check_admin_referer('bulk-plugins');
+                               $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
+                               $sendback = wp_get_referer();
+
+                               /** This action is documented in wp-admin/edit-comments.php */
+                               $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $action, $plugins );
+                               wp_safe_redirect( $sendback );
+                               exit;
+                       }
+                       break;
        }
+
 }
 
 $wp_list_table->prepare_items();
@@ -374,8 +388,8 @@ get_current_screen()->add_help_tab( array(
        '<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: %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/'
+               __( '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">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(
@@ -392,8 +406,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Managing_Plugins#Plugin_Management" target="_blank">Documentation on Managing Plugins</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Managing_Plugins#Plugin_Management">Documentation on Managing Plugins</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
index e0a4c90166e993abbd0c46267e99bfd171d66005..46322bc41c96930fa3b748b3d1bd54b3745192db 100644 (file)
@@ -19,11 +19,6 @@ if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_obj
        );
 }
 
-/**
- * @global WP_Press_This $wp_press_this
- */
-if ( empty( $GLOBALS['wp_press_this'] ) ) {
-       include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
-}
-
-$GLOBALS['wp_press_this']->html();
+include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' ); 
+$wp_press_this = new WP_Press_This();
+$wp_press_this->html();
index 547b3546fe935faf26680d56916d67db34b59587..c86f78a451f0a842064a6666f61e7f19fd51ca20 100644 (file)
@@ -74,6 +74,7 @@ default :
 
        $post_edit_link = get_edit_post_link();
        $post_title     = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>';
+       /* translators: 1: Post title */
        $h1             = sprintf( __( 'Compare Revisions of &#8220;%1$s&#8221;' ), $post_title );
        $return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Return to editor' ) . '</a>';
        $title          = __( 'Revisions' );
@@ -116,8 +117,8 @@ get_current_screen()->add_help_tab( array(
 ) );
 
 $revisions_sidebar  = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
-$revisions_sidebar .= '<p>' . __( '<a href="https://codex.wordpress.org/Revision_Management" target="_blank">Revisions Management</a>' ) . '</p>';
-$revisions_sidebar .= '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>';
+$revisions_sidebar .= '<p>' . __( '<a href="https://codex.wordpress.org/Revision_Management">Revisions Management</a>' ) . '</p>';
+$revisions_sidebar .= '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>';
 
 get_current_screen()->set_help_sidebar( $revisions_sidebar );
 
index 1ad40fcb6ae71bf629289d1dfab5b85cc7efd36f..1404c32599163e9a0b56b6cf3f0b39ac36de764c 100644 (file)
@@ -5,8 +5,6 @@
  * The permissions for the base directory must allow for writing files in order
  * for the wp-config.php to be created using this page.
  *
- * @internal This file must be parsable by PHP4.
- *
  * @package WordPress
  * @subpackage Administration
  */
@@ -101,7 +99,7 @@ function setup_config_display_header( $body_classes = array() ) {
        <?php wp_admin_css( 'install', true ); ?>
 </head>
 <body class="<?php echo implode( ' ', $body_classes ); ?>">
-<p id="logo"><a href="<?php esc_attr_e( 'https://wordpress.org/' ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
+<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
 <?php
 } // end function setup_config_display_header();
 
@@ -316,7 +314,6 @@ switch($step) {
        }
 
        $key = 0;
-       // Not a PHP5-style by-reference foreach, as this file must be parseable by PHP4.
        foreach ( $config_file as $line_num => $line ) {
                if ( '$table_prefix  =' == substr( $line, 0, 16 ) ) {
                        $config_file[ $line_num ] = '$table_prefix  = \'' . addcslashes( $prefix, "\\'" ) . "';\r\n";
index dc3f1d5fef3f9c2b16aa77e4fba7d50258ddd45e..2018ac04159efd6d37bbde9e5a632cb7c31d7498 100644 (file)
@@ -31,11 +31,11 @@ $taxonomy = $tax->name;
 $title    = $tax->labels->edit_item;
 
 if ( ! in_array( $taxonomy, get_taxonomies( array( 'show_ui' => true ) ) ) ||
-     ! current_user_can( $tax->cap->manage_terms )
+     ! current_user_can( 'edit_term', $tag->term_id )
 ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'Sorry, you are not allowed to manage this item.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
                403
        );
 }
index 9fb2c41e478dce268e0eefce0db5c74d660cd8ca..03b91944ea15ef5361b1f6e00ec8c01920ae3bb5 100644 (file)
@@ -30,17 +30,17 @@ get_current_screen()->add_help_tab( array(
        <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>
        <p>' . __('<strong>Advice:</strong> think very carefully about your site crashing if you are live-editing the theme currently in use.') . '</p>
-       <p>' . sprintf( __('Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a <a href="%s" target="_blank">child theme</a> instead.'), __('https://codex.wordpress.org/Child_Themes') ) . '</p>' .
+       <p>' . sprintf( __('Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a <a href="%s">child theme</a> instead.'), __('https://codex.wordpress.org/Child_Themes') ) . '</p>' .
        ( is_network_admin() ? '<p>' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '</p>' : '' )
 ) );
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Theme_Development" target="_blank">Documentation on Theme Development</a>') . '</p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Using_Themes" target="_blank">Documentation on Using Themes</a>') . '</p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Editing_Files" target="_blank">Documentation on Editing Files</a>') . '</p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Template_Tags" target="_blank">Documentation on Template Tags</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Theme_Development">Documentation on Theme Development</a>') . '</p>' .
+       '<p>' . __('<a href="https://codex.wordpress.org/Using_Themes">Documentation on Using Themes</a>') . '</p>' .
+       '<p>' . __('<a href="https://codex.wordpress.org/Editing_Files">Documentation on Editing Files</a>') . '</p>' .
+       '<p>' . __('<a href="https://codex.wordpress.org/Template_Tags">Documentation on Template Tags</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 wp_reset_vars( array( 'action', 'error', 'file', 'theme' ) );
@@ -182,7 +182,7 @@ foreach ( wp_get_themes( array( 'errors' => null ) ) as $a_stylesheet => $a_them
 }
 ?>
                </select>
-               <?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?>
+               <?php submit_button( __( 'Select' ), '', 'Submit', false ); ?>
        </form>
 </div>
 <br class="clear" />
@@ -263,7 +263,7 @@ else : ?>
                <div id="documentation" class="hide-if-no-js">
                <label for="docs-list"><?php _e('Documentation:') ?></label>
                <?php echo $docs_select; ?>
-               <input type="button" class="button" value=" <?php esc_attr_e( 'Look Up' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
+               <input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ) ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ) ?>&amp;redirect=true'); }" />
                </div>
        <?php endif; ?>
 
index 6b38465531e909289f6f98075de913ea488cca15..dadef0dd4b864d95a34394a27adbdb5c281a6b52 100644 (file)
@@ -37,22 +37,28 @@ foreach ( $installed_themes as $k => $v ) {
 wp_localize_script( 'theme', '_wpThemeSettings', array(
        'themes'   => false,
        'settings' => array(
-               'isInstall'     => true,
-               'canInstall'    => current_user_can( 'install_themes' ),
-               'installURI'    => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null,
-               'adminUrl'      => parse_url( self_admin_url(), PHP_URL_PATH )
+               'isInstall'  => true,
+               'canInstall' => current_user_can( 'install_themes' ),
+               'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null,
+               'adminUrl'   => parse_url( self_admin_url(), PHP_URL_PATH )
        ),
        'l10n' => array(
-               'addNew' => __( 'Add New Theme' ),
-               'search' => __( 'Search Themes' ),
-               'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis)
-               'upload' => __( 'Upload Theme' ),
-               'back'   => __( 'Back' ),
-               'error'  => __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ),
-               'themesFound'   => __( 'Number of Themes found: %d' ),
-               'noThemesFound' => __( 'No themes found. Try a different search.' ),
-               'collapseSidebar'    => __( 'Collapse Sidebar' ),
-               'expandSidebar'      => __( 'Expand Sidebar' ),
+               'addNew'              => __( 'Add New Theme' ),
+               'search'              => __( 'Search Themes' ),
+               'searchPlaceholder'   => __( 'Search themes...' ), // placeholder (no ellipsis)
+               'upload'              => __( 'Upload Theme' ),
+               'back'                => __( 'Back' ),
+               'error'               => sprintf(
+                       /* translators: %s: support forums URL */
+                       __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                       __( 'https://wordpress.org/support/' )
+               ),
+               'themesFound'         => __( 'Number of Themes found: %d' ),
+               'noThemesFound'       => __( 'No themes found. Try a different search.' ),
+               'collapseSidebar'     => __( 'Collapse Sidebar' ),
+               'expandSidebar'       => __( 'Expand Sidebar' ),
+               /* translators: hidden accessibility text */
+               'selectFeatureFilter' => __( 'Select one or more Theme features to filter by' ),
        ),
        'installedThemes' => array_keys( $installed_themes ),
 ) );
@@ -76,7 +82,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 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">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>' .
@@ -105,8 +111,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Using_Themes#Adding_New_Themes" target="_blank">Documentation on Adding New Themes</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Using_Themes#Adding_New_Themes">Documentation on Adding New Themes</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 include(ABSPATH . 'wp-admin/admin-header.php');
@@ -152,7 +158,7 @@ include(ABSPATH . 'wp-admin/admin-header.php');
                        <li><a href="#" data-sort="favorites"><?php _ex( 'Favorites', 'themes' ); ?></a></li>
                </ul>
 
-               <a class="drawer-toggle" href="#"><?php _e( 'Feature Filter' ); ?></a>
+               <button type="button" class="button drawer-toggle" aria-expanded="false"><?php _e( 'Feature Filter' ); ?></button>
 
                <div class="search-form"></div>
 
@@ -172,14 +178,14 @@ include(ABSPATH . 'wp-admin/admin-header.php');
                                <label for="wporg-username-input"><?php _e( 'Your WordPress.org username:' ); ?></label>
                                <input type="hidden" id="wporg-username-nonce" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( $action ) ); ?>" />
                                <input type="search" id="wporg-username-input" value="<?php echo esc_attr( $user ); ?>" />
-                               <input type="button" class="button button-secondary favorites-form-submit" value="<?php esc_attr_e( 'Get Favorites' ); ?>" />
+                               <input type="button" class="button favorites-form-submit" value="<?php esc_attr_e( 'Get Favorites' ); ?>" />
                        </p>
                </div>
 
                <div class="filter-drawer">
                        <div class="buttons">
-                               <a class="apply-filters button button-secondary" href="#"><?php _e( 'Apply Filters' ); ?><span></span></a>
-                               <a class="clear-filters button button-secondary" href="#"><?php _e( 'Clear' ); ?></a>
+                               <button type="button" class="apply-filters button"><?php _e( 'Apply Filters' ); ?><span></span></button>
+                               <button type="button" class="clear-filters button" aria-label="<?php esc_attr_e( 'Clear current filters' ); ?>"><?php _e( 'Clear' ); ?></button>
                        </div>
                <?php
                $feature_list = get_theme_feature_list();
@@ -197,10 +203,14 @@ include(ABSPATH . 'wp-admin/admin-header.php');
                        echo '</fieldset>';
                }
                ?>
+                       <div class="buttons">
+                               <button type="button" class="apply-filters button"><?php _e( 'Apply Filters' ); ?><span></span></button>
+                               <button type="button" class="clear-filters button" aria-label="<?php esc_attr_e( 'Clear current filters' ); ?>"><?php _e( 'Clear' ); ?></button>
+                       </div>
                        <div class="filtered-by">
                                <span><?php _e( 'Filtering by:' ); ?></span>
                                <div class="tags"></div>
-                               <a href="#"><?php _e( 'Edit' ); ?></a>
+                               <button type="button" class="button-link edit-filters"><?php _e( 'Edit Filters' ); ?></button>
                        </div>
                </div>
        </div>
@@ -256,9 +266,9 @@ if ( $tab ) {
                                <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>
+                               <a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
                        <# } else { #>
-                               <button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
+                               <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
                        <# } #>
                <# } else { #>
                        <?php
@@ -266,7 +276,7 @@ if ( $tab ) {
                        $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>
+                       <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
                <# } #>
        </div>
 
@@ -319,7 +329,7 @@ if ( $tab ) {
                                </div>
                        </div>
                        <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' ); ?>">
+                               <button type="button" class="collapse-sidebar button" 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>
index c601cd555dc6732fcec4ceadf15fabd8ad7812dd..6aa129d7653a90d7edb072b2c4394899102b62c8 100644 (file)
@@ -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 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>';
+               $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">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(
@@ -115,8 +115,8 @@ if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' )
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Using_Themes" target="_blank">Documentation on Using Themes</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
+       '<p>' . __( '<a href="https://codex.wordpress.org/Using_Themes">Documentation on Using Themes</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 if ( current_user_can( 'switch_themes' ) ) {
@@ -177,7 +177,7 @@ endif;
 $ct = wp_get_theme();
 
 if ( $ct->errors() && ( ! is_multisite() || current_user_can( 'manage_network_themes' ) ) ) {
-       echo '<div class="error"><p>' . sprintf( __( 'ERROR: %s' ), $ct->errors()->get_error_message() ) . '</p></div>';
+       echo '<div class="error"><p>' . __( 'ERROR:' ) . ' ' . $ct->errors()->get_error_message() . '</p></div>';
 }
 
 /*
@@ -200,17 +200,17 @@ if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() )
                                $submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
                                $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
                                if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
-                                       $current_theme_actions[] = "<a class='button button-secondary$class' href='admin.php?page={$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
+                                       $current_theme_actions[] = "<a class='button$class' href='admin.php?page={$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
                                else
-                                       $current_theme_actions[] = "<a class='button button-secondary$class' href='{$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
+                                       $current_theme_actions[] = "<a class='button$class' href='{$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
                        } elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) {
                                $menu_file = $item[2];
 
                                if ( current_user_can( 'customize' ) ) {
                                        if ( 'custom-header' === $menu_file ) {
-                                               $current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href='customize.php?autofocus[control]=header_image'>{$item[0]}</a>";
+                                               $current_theme_actions[] = "<a class='button hide-if-no-customize$class' href='customize.php?autofocus[control]=header_image'>{$item[0]}</a>";
                                        } elseif ( 'custom-background' === $menu_file ) {
-                                               $current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href='customize.php?autofocus[control]=background_image'>{$item[0]}</a>";
+                                               $current_theme_actions[] = "<a class='button hide-if-no-customize$class' href='customize.php?autofocus[control]=background_image'>{$item[0]}</a>";
                                        }
                                }
 
@@ -219,9 +219,9 @@ if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() )
                                }
 
                                if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) {
-                                       $current_theme_actions[] = "<a class='button button-secondary$class' href='{$item[2]}'>{$item[0]}</a>";
+                                       $current_theme_actions[] = "<a class='button$class' href='{$item[2]}'>{$item[0]}</a>";
                                } else {
-                                       $current_theme_actions[] = "<a class='button button-secondary$class' href='themes.php?page={$item[2]}'>{$item[0]}</a>";
+                                       $current_theme_actions[] = "<a class='button$class' href='themes.php?page={$item[2]}'>{$item[0]}</a>";
                                }
                        }
                }
@@ -252,7 +252,11 @@ foreach ( $themes as $theme ) :
 
        <?php if ( $theme['hasUpdate'] ) : ?>
                <div class="update-message notice inline notice-warning notice-alt">
+               <?php if ( $theme['hasPackage'] ) : ?>
                        <p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p>
+               <?php else : ?>
+                       <p><?php _e( 'New version available.' ); ?></p>
+               <?php endif; ?>
                </div>
        <?php endif; ?>
 
@@ -281,7 +285,7 @@ foreach ( $themes as $theme ) :
                /* 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>
+               <a class="button 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 } ?>
@@ -333,7 +337,7 @@ $can_install = current_user_can( 'install_themes' );
                                ), admin_url( 'themes.php' ) );
                                $delete_url = wp_nonce_url( $delete_url, 'delete-theme_' . $stylesheet );
                                ?>
-                               <td><a href="<?php echo esc_url( $delete_url ); ?>" class="button button-secondary delete-theme"><?php _e( 'Delete' ); ?></a></td>
+                               <td><a href="<?php echo esc_url( $delete_url ); ?>" class="button delete-theme"><?php _e( 'Delete' ); ?></a></td>
                                <?php
                        }
 
@@ -348,7 +352,7 @@ $can_install = current_user_can( 'install_themes' );
                                        ), admin_url( 'update.php' ) );
                                        $install_url = wp_nonce_url( $install_url, 'install-theme_' . $parent_theme_name );
                                        ?>
-                                       <td><a href="<?php echo esc_url( $install_url ); ?>" class="button button-secondary install-theme"><?php _e( 'Install Parent Theme' ); ?></a></td>
+                                       <td><a href="<?php echo esc_url( $install_url ); ?>" class="button install-theme"><?php _e( 'Install Parent Theme' ); ?></a></td>
                                        <?php
                                }
                        }
@@ -378,7 +382,11 @@ $can_install = current_user_can( 'install_themes' );
        <# } #>
 
        <# 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>
+               <# if ( data.hasPackage ) { #>
+                       <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>
+               <# } else { #>
+                       <div class="update-message notice inline notice-warning notice-alt"><p><?php _e( 'New version available.' ); ?></p></div>
+               <# } #>
        <# } #>
 
        <span class="more-details" id="{{ data.id }}-action"><?php _e( 'Theme Details' ); ?></span>
@@ -410,7 +418,7 @@ $can_install = current_user_can( 'install_themes' );
                        /* 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 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>
                <# } #>
        </div>
@@ -469,13 +477,13 @@ $can_install = current_user_can( 'install_themes' );
                                $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
                                ?>
                                <# if ( data.actions.activate ) { #>
-                                       <a href="{{{ data.actions.activate }}}" class="button button-secondary activate" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
+                                       <a href="{{{ data.actions.activate }}}" class="button 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>
 
                        <# if ( ! data.active && data.actions['delete'] ) { #>
-                               <a href="{{{ data.actions['delete'] }}}" class="button button-secondary delete-theme"><?php _e( 'Delete' ); ?></a>
+                               <a href="{{{ data.actions['delete'] }}}" class="button delete-theme"><?php _e( 'Delete' ); ?></a>
                        <# } #>
                </div>
        </div>
@@ -486,4 +494,8 @@ wp_print_request_filesystem_credentials_modal();
 wp_print_admin_notice_templates();
 wp_print_update_row_templates();
 
+wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
+       'totals'  => wp_get_update_data(),
+) );
+
 require( ABSPATH . 'wp-admin/admin-footer.php' );
index b6de3c8183d52cef32cc07cb7448b071c97980b5..2110fb5e4a97f542cf69c66bebe816aa4eaed944 100644 (file)
@@ -25,8 +25,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Tools_Screen" target="_blank">Documentation on Tools</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Tools_Screen">Documentation on Tools</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
@@ -49,7 +49,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
                <p class="pressthis-bookmarklet-wrapper">
                        <a class="pressthis-bookmarklet" onclick="return false;" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e( 'Press This' ); ?></span></a>
-                       <button type="button" class="button button-secondary pressthis-js-toggle js-show-pressthis-code-wrap" aria-expanded="false" aria-controls="pressthis-code-wrap">
+                       <button type="button" class="button pressthis-js-toggle js-show-pressthis-code-wrap" aria-expanded="false" aria-controls="pressthis-code-wrap">
                                <span class="dashicons dashicons-clipboard"></span>
                                <span class="screen-reader-text"><?php _e( 'Copy &#8220;Press This&#8221; bookmarklet code' ) ?></span>
                        </button>
@@ -68,7 +68,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
                <p><?php _e( 'Follow the link to open Press This. Then add it to your device&#8217;s bookmarks or home screen.' ); ?></p>
 
                <p>
-                       <a class="button button-secondary" href="<?php echo htmlspecialchars( admin_url( 'press-this.php' ) ); ?>"><?php _e( 'Open Press This' ) ?></a>
+                       <a class="button" href="<?php echo htmlspecialchars( admin_url( 'press-this.php' ) ); ?>"><?php _e( 'Open Press This' ) ?></a>
                </p>
                <script>
                        jQuery( document ).ready( function( $ ) {
index e123463bb0caa33695a80f855f4f9f56a08a8c92..c6c21ead5c410733d3046d831c11d7e95f9abce0 100644 (file)
@@ -26,16 +26,17 @@ if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes'
  *
  * @global string $wp_local_package
  * @global wpdb   $wpdb
- * @global string $wp_version
  *
  * @staticvar bool $first_pass
  *
  * @param object $update
  */
 function list_core_update( $update ) {
-       global $wp_local_package, $wpdb, $wp_version;
+       global $wp_local_package, $wpdb;
        static $first_pass = true;
 
+       $wp_version = get_bloginfo( 'version' );
+
        if ( 'en_US' == $update->locale && 'en_US' == get_locale() )
                $version_string = $update->current;
        // If the only available update is a partial builds, it doesn't need a language-specific version string.
@@ -53,11 +54,10 @@ function list_core_update( $update ) {
        $mysql_version  = $wpdb->db_version();
        $show_buttons = true;
        if ( 'development' == $update->response ) {
-               $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically or download the nightly build and install it manually:');
-               $download = __('Download nightly build');
+               $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically:');
        } else {
                if ( $current ) {
-                       $message = sprintf( __( 'If you need to re-install version %s, you can do so here or download the package and re-install manually:' ), $version_string );
+                       $message = sprintf( __( 'If you need to re-install version %s, you can do so here:' ), $version_string );
                        $submit = __('Re-install Now');
                        $form_action = 'update-core.php?action=do-core-reinstall';
                } else {
@@ -68,17 +68,20 @@ function list_core_update( $update ) {
                                $mysql_compat = version_compare( $mysql_version, $update->mysql_version, '>=' );
 
                        if ( !$mysql_compat && !$php_compat )
+                               /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */
                                $message = sprintf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );
                        elseif ( !$php_compat )
+                               /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
                                $message = sprintf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version );
                        elseif ( !$mysql_compat )
+                               /* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
                                $message = sprintf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version );
                        else
-                               $message =      sprintf(__('You can update to <a href="https://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically or download the package and install it manually:'), $update->current, $version_string);
+                               /* translators: 1: WordPress version number, 2: WordPress version number including locale if necessary */
+                               $message =      sprintf(__('You can update to <a href="https://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically:'), $update->current, $version_string);
                        if ( !$mysql_compat || !$php_compat )
                                $show_buttons = false;
                }
-               $download = sprintf(__('Download %s'), $version_string);
        }
 
        echo '<p>';
@@ -91,18 +94,17 @@ function list_core_update( $update ) {
        echo '<input name="locale" value="'. esc_attr($update->locale) .'" type="hidden"/>';
        if ( $show_buttons ) {
                if ( $first_pass ) {
-                       submit_button( $submit, $current ? 'button' : 'primary regular', 'upgrade', false );
+                       submit_button( $submit, $current ? '' : 'primary regular', 'upgrade', false );
                        $first_pass = false;
                } else {
-                       submit_button( $submit, 'button', 'upgrade', false );
+                       submit_button( $submit, '', 'upgrade', false );
                }
-               echo '&nbsp;<a href="' . esc_url( $update->download ) . '" class="button">' . $download . '</a>&nbsp;';
        }
        if ( 'en_US' != $update->locale )
                if ( !isset( $update->dismissed ) || !$update->dismissed )
-                       submit_button( __('Hide this update'), 'button', 'dismiss', false );
+                       submit_button( __( 'Hide this update' ), '', 'dismiss', false );
                else
-                       submit_button( __('Bring back this update'), 'button', 'undismiss', false );
+                       submit_button( __( 'Bring back this update' ), '', 'undismiss', false );
        echo '</p>';
        if ( 'en_US' != $update->locale && ( !isset($wp_local_package) || $wp_local_package != $update->locale ) )
            echo '<p class="hint">'.__('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.').'</p>';
@@ -149,13 +151,13 @@ function dismissed_updates() {
  *
  * @since 2.7.0
  *
- * @global string $wp_version
  * @global string $required_php_version
  * @global string $required_mysql_version
  */
 function core_upgrade_preamble() {
-       global $wp_version, $required_php_version, $required_mysql_version;
+       global $required_php_version, $required_mysql_version;
 
+       $wp_version = get_bloginfo( 'version' );
        $updates = get_core_updates();
 
        if ( !isset($updates[0]->response) || 'latest' == $updates[0]->response ) {
@@ -213,14 +215,9 @@ function core_upgrade_preamble() {
        dismissed_updates();
 }
 
-/**
- *
- * @global string $wp_version
- */
 function list_plugin_updates() {
-       global $wp_version;
-
-       $cur_wp_version = preg_replace('/-.*$/', '', $wp_version);
+       $wp_version = get_bloginfo( 'version' );
+       $cur_wp_version = preg_replace( '/-.*$/', '', $wp_version );
 
        require_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
        $plugins = get_plugin_updates();
@@ -253,8 +250,6 @@ function list_plugin_updates() {
        <tbody class="plugins">
 <?php
        foreach ( (array) $plugins as $plugin_file => $plugin_data ) {
-               $plugin_data = (object) _get_plugin_data_markup_translate( $plugin_file, (array) $plugin_data, false, true );
-
                // Get plugin compat for running version of WordPress.
                if ( isset($plugin_data->update->tested) && version_compare($plugin_data->update->tested, $cur_wp_version, '>=') ) {
                        $compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: 100%% (according to its author)'), $cur_wp_version);
@@ -575,8 +570,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_Updates_Screen" target="_blank">Documentation on Updating WordPress</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
+       '<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_Updates_Screen">Documentation on Updating WordPress</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 if ( 'upgrade-core' == $action ) {
@@ -598,9 +593,16 @@ if ( 'upgrade-core' == $action ) {
                echo '</p></div>';
        }
 
+       $last_update_check = false;
+       $current = get_site_transient( 'update_core' );
+
+       if ( $current && isset ( $current->last_checked ) )     {
+               $last_update_check = $current->last_checked + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
+       }
+
        echo '<p>';
        /* translators: %1 date, %2 time. */
-       printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ) ), date_i18n( __( 'g:i a' ) ) );
+       printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ), $last_update_check ), date_i18n( __( 'g:i a' ), $last_update_check ) );
        echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php?force-check=1') ) . '">' . __( 'Check Again' ) . '</a>';
        echo '</p>';
 
@@ -620,6 +622,11 @@ if ( 'upgrade-core' == $action ) {
         */
        do_action( 'core_upgrade_preamble' );
        echo '</div>';
+
+       wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
+               'totals'  => wp_get_update_data(),
+       ) );
+
        include(ABSPATH . 'wp-admin/admin-footer.php');
 
 } elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) {
@@ -644,6 +651,10 @@ if ( 'upgrade-core' == $action ) {
        if ( isset( $_POST['upgrade'] ) )
                do_core_upgrade($reinstall);
 
+       wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
+               'totals'  => wp_get_update_data(),
+       ) );
+
        include(ABSPATH . 'wp-admin/admin-footer.php');
 
 } elseif ( 'do-plugin-upgrade' == $action ) {
@@ -672,6 +683,11 @@ if ( 'upgrade-core' == $action ) {
        echo '<h1>' . __( 'Update Plugins' ) . '</h1>';
        echo '<iframe src="', $url, '" style="width: 100%; height: 100%; min-height: 750px;" frameborder="0" title="' . esc_attr__( 'Update progress' ) . '"></iframe>';
        echo '</div>';
+
+       wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
+               'totals'  => wp_get_update_data(),
+       ) );
+
        include(ABSPATH . 'wp-admin/admin-footer.php');
 
 } elseif ( 'do-theme-upgrade' == $action ) {
@@ -702,6 +718,11 @@ if ( 'upgrade-core' == $action ) {
                <iframe src="<?php echo $url ?>" style="width: 100%; height: 100%; min-height: 750px;" frameborder="0" title="<?php esc_attr_e( 'Update progress' ); ?>"></iframe>
        </div>
        <?php
+
+       wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
+               'totals'  => wp_get_update_data(),
+       ) );
+
        include(ABSPATH . 'wp-admin/admin-footer.php');
 
 } elseif ( 'do-translation-upgrade' == $action ) {
@@ -722,6 +743,10 @@ if ( 'upgrade-core' == $action ) {
        $upgrader = new Language_Pack_Upgrader( new Language_Pack_Upgrader_Skin( compact( 'url', 'nonce', 'title', 'context' ) ) );
        $result = $upgrader->bulk_upgrade();
 
+       wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
+               'totals'  => wp_get_update_data(),
+       ) );
+
        require_once( ABSPATH . 'wp-admin/admin-footer.php' );
 
 } else {
index b9495ac059a256da1017e7cbbc85cbb0eb891f85..80e73b4e7dbe441e0e797a39f51054a1d5cf9b68 100644 (file)
@@ -63,8 +63,8 @@ if ( 'grid' === $mode ) {
 
        get_current_screen()->set_help_sidebar(
                '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-               '<p>' . __( '<a href="https://codex.wordpress.org/Media_Library_Screen" target="_blank">Documentation on Media Library</a>' ) . '</p>' .
-               '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
+               '<p>' . __( '<a href="https://codex.wordpress.org/Media_Library_Screen">Documentation on Media Library</a>' ) . '</p>' .
+               '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
        );
 
        $title = __('Media Library');
@@ -163,6 +163,9 @@ if ( $doaction ) {
                        }
                        $location = add_query_arg( 'deleted', count( $post_ids ), $location );
                        break;
+               default:
+                       /** This action is documented in wp-admin/edit-comments.php */
+                       $location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $doaction, $post_ids );
        }
 
        wp_redirect( $location );
@@ -204,8 +207,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-       '<p>' . __( '<a href="https://codex.wordpress.org/Media_Library_Screen" target="_blank">Documentation on Media Library</a>' ) . '</p>' .
-       '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
+       '<p>' . __( '<a href="https://codex.wordpress.org/Media_Library_Screen">Documentation on Media Library</a>' ) . '</p>' .
+       '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
index aa6ed7f5ebde39d096f568dda6ccea21d55d71aa..2222ae261704c7a3bb4a8a970709202da4726117 100644 (file)
@@ -38,6 +38,7 @@ else
 
 $profile_help = '<p>' . __('Your profile contains information about you (your &#8220;account&#8221;) as well as some personal options related to using WordPress.') . '</p>' .
        '<p>' . __('You can change your password, turn on keyboard shortcuts, change the color scheme of your WordPress administration screens, and turn off the WYSIWYG (Visual) editor, among other things. You can hide the Toolbar (formerly called the Admin Bar) from the front end of your site, however it cannot be disabled on the admin screens.') . '</p>' .
+       '<p>' . __( 'You can select the language you wish to use while using the WordPress administration screen without affecting the language site visitors see.' ) . '</p>' .
        '<p>' . __('Your username cannot be changed, but you can use other fields to enter your real name or a nickname, and change which name to display on your posts.') . '</p>' .
        '<p>' . __( 'You can log out of other devices, such as your phone or a public computer, by clicking the Log Out Everywhere Else button.' ) . '</p>' .
        '<p>' . __('Required fields are indicated; the rest are optional. Profile information will only be displayed if your theme is set up to do so.') . '</p>' .
@@ -51,8 +52,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
     '<p><strong>' . __('For more information:') . '</strong></p>' .
-    '<p>' . __('<a href="https://codex.wordpress.org/Users_Your_Profile_Screen" target="_blank">Documentation on User Profiles</a>') . '</p>' .
-    '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+    '<p>' . __('<a href="https://codex.wordpress.org/Users_Your_Profile_Screen">Documentation on User Profiles</a>') . '</p>' .
+    '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 $wp_http_referer = remove_query_arg( array( 'update', 'delete_count', 'user_id' ), $wp_http_referer );
@@ -269,6 +270,40 @@ if ( !( IS_PROFILE_PAGE && !$user_can_edit ) ) : ?>
 </fieldset>
 </td>
 </tr>
+
+<?php
+$languages = get_available_languages();
+if ( $languages ) : ?>
+<tr class="user-language-wrap">
+       <th scope="row">
+               <?php /* translators: The user language selection field label */ ?>
+               <label for="locale"><?php _e( 'Language' ); ?></label>
+       </th>
+       <td>
+               <?php
+               $user_locale = $profileuser->locale;
+
+               if ( 'en_US' === $user_locale ) {
+                       $user_locale = '';
+               } elseif ( '' === $user_locale || ! in_array( $user_locale, $languages, true ) ) {
+                       $user_locale = 'site-default';
+               }
+
+               wp_dropdown_languages( array(
+                       'name'                        => 'locale',
+                       'id'                          => 'locale',
+                       'selected'                    => $user_locale,
+                       'languages'                   => $languages,
+                       'show_available_translations' => false,
+                       'show_option_site_default'    => true
+               ) );
+               ?>
+       </td>
+</tr>
+<?php
+endif;
+?>
+
 <?php
 /**
  * Fires at the end of the 'Personal Options' settings table on the user editing screen.
@@ -473,10 +508,12 @@ if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c
                         * Filters the user profile picture description displayed under the Gravatar.
                         *
                         * @since 4.4.0
+                        * @since 4.7.0 Added the `$profileuser` parameter.
                         *
-                        * @param string $description The description that will be printed.
+                        * @param string  $description The description that will be printed.
+                        * @param WP_User $profileuser The current WP_User object.
                         */
-                       echo apply_filters( 'user_profile_picture_description', $description );
+                       echo apply_filters( 'user_profile_picture_description', $description, $profileuser );
                ?></p>
        </td>
 </tr>
@@ -503,16 +540,16 @@ if ( $show_password_fields = apply_filters( 'show_password_fields', true, $profi
        <th><label for="pass1"><?php _e( 'New Password' ); ?></label></th>
        <td>
                <input class="hidden" value=" " /><!-- #24364 workaround -->
-               <button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Generate Password' ); ?></button>
+               <button type="button" class="button wp-generate-pw hide-if-no-js"><?php _e( 'Generate Password' ); ?></button>
                <div class="wp-pwd hide-if-js">
                        <span class="password-input-wrapper">
                                <input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
                        </span>
-                       <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
+                       <button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
                                <span class="dashicons dashicons-hidden"></span>
                                <span class="text"><?php _e( 'Hide' ); ?></span>
                        </button>
-                       <button type="button" class="button button-secondary wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
+                       <button type="button" class="button wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
                                <span class="text"><?php _e( 'Cancel' ); ?></span>
                        </button>
                        <div style="display:none" id="pass-strength-result" aria-live="polite"></div>
@@ -542,7 +579,7 @@ if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
        <tr class="user-sessions-wrap hide-if-no-js">
                <th><?php _e( 'Sessions' ); ?></th>
                <td aria-live="assertive">
-                       <div class="destroy-sessions"><button type="button" disabled class="button button-secondary"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
+                       <div class="destroy-sessions"><button type="button" disabled class="button"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
                        <p class="description">
                                <?php _e( 'You are only logged in at this location.' ); ?>
                        </p>
@@ -552,7 +589,7 @@ if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
        <tr class="user-sessions-wrap hide-if-no-js">
                <th><?php _e( 'Sessions' ); ?></th>
                <td aria-live="assertive">
-                       <div class="destroy-sessions"><button type="button" class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
+                       <div class="destroy-sessions"><button type="button" class="button" id="destroy-sessions"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
                        <p class="description">
                                <?php _e( 'Did you lose your phone or leave your account logged in at a public computer? You can log out everywhere else, and stay logged in here.' ); ?>
                        </p>
@@ -562,7 +599,7 @@ if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
        <tr class="user-sessions-wrap hide-if-no-js">
                <th><?php _e( 'Sessions' ); ?></th>
                <td>
-                       <p><button type="button" class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out Everywhere' ); ?></button></p>
+                       <p><button type="button" class="button" id="destroy-sessions"><?php _e( 'Log Out Everywhere' ); ?></button></p>
                        <p class="description">
                                <?php
                                /* translators: 1: User's display name. */
index 42732434a1566dd2936ac74f2de7989d13cd2a41..e039d711ef2598ff2128d9ed62096f019b53ee03 100644 (file)
@@ -87,6 +87,8 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
                         */
                        do_action( 'invite_user', $user_id, $role, $newuser_key );
 
+                       $switched_locale = switch_to_locale( get_user_locale( $user_details ) );
+
                        /* translators: 1: Site name, 2: site URL, 3: role, 4: activation URL */
                        $message = __( 'Hi,
 
@@ -96,6 +98,11 @@ You\'ve been invited to join \'%1$s\' at
 Please click the following link to confirm the invite:
 %4$s' );
                        wp_mail( $new_user_email, sprintf( __( '[%s] Joining confirmation' ), wp_specialchars_decode( get_option( 'blogname' ) ) ), sprintf( $message, get_option( 'blogname' ), home_url(), wp_specialchars_decode( translate_user_role( $role['name'] ) ), home_url( "/newbloguser/$newuser_key/" ) ) );
+
+                       if ( $switched_locale ) {
+                               restore_previous_locale();
+                       }
+
                        $redirect = add_query_arg( array('update' => 'add'), 'user-new.php' );
                }
        }
@@ -203,8 +210,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
     '<p><strong>' . __('For more information:') . '</strong></p>' .
-    '<p>' . __('<a href="https://codex.wordpress.org/Users_Add_New_Screen" target="_blank">Documentation on Adding New Users</a>') . '</p>' .
-    '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+    '<p>' . __('<a href="https://codex.wordpress.org/Users_Add_New_Screen">Documentation on Adding New Users</a>') . '</p>' .
+    '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 wp_enqueue_script('wp-ajax-response');
@@ -270,9 +277,9 @@ if ( isset($_GET['update']) ) {
 <div class="wrap">
 <h1 id="add-new-user"><?php
 if ( current_user_can( 'create_users' ) ) {
-       echo _x( 'Add New User', 'user' );
+       _e( 'Add New User' );
 } elseif ( current_user_can( 'promote_users' ) ) {
-       echo _x( 'Add Existing User', 'user' );
+       _e( 'Add Existing User' );
 } ?>
 </h1>
 
@@ -341,8 +348,11 @@ if ( is_multisite() ) {
        </tr>
 <?php if ( current_user_can( 'manage_network_users' ) ) { ?>
        <tr>
-               <th scope="row"><label for="adduser-noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
-               <td><label for="adduser-noconfirmation"><input type="checkbox" name="noconfirmation" id="adduser-noconfirmation" value="1" /> <?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label></td>
+               <th scope="row"><?php _e( 'Skip Confirmation Email' ); ?></th>
+               <td>
+                       <input type="checkbox" name="noconfirmation" id="adduser-noconfirmation" value="1" />
+                       <label for="adduser-noconfirmation"><?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label>
+               </td>
        </tr>
 <?php } ?>
 </table>
@@ -421,17 +431,17 @@ $new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unsl
                </th>
                <td>
                        <input class="hidden" value=" " /><!-- #24364 workaround -->
-                       <button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Show password' ); ?></button>
+                       <button type="button" class="button wp-generate-pw hide-if-no-js"><?php _e( 'Show password' ); ?></button>
                        <div class="wp-pwd hide-if-js">
                                <?php $initial_password = wp_generate_password( 24 ); ?>
                                <span class="password-input-wrapper">
                                        <input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
                                </span>
-                               <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
+                               <button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
                                        <span class="dashicons dashicons-hidden"></span>
                                        <span class="text"><?php _e( 'Hide' ); ?></span>
                                </button>
-                               <button type="button" class="button button-secondary wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
+                               <button type="button" class="button wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
                                        <span class="text"><?php _e( 'Cancel' ); ?></span>
                                </button>
                                <div style="display:none" id="pass-strength-result" aria-live="polite"></div>
@@ -455,7 +465,10 @@ $new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unsl
        </tr>
        <tr>
                <th scope="row"><?php _e( 'Send User Notification' ) ?></th>
-               <td><label for="send_user_notification"><input type="checkbox" name="send_user_notification" id="send_user_notification" value="1" <?php checked( $new_user_send_notification ); ?> /> <?php _e( 'Send the new user an email about their account.' ); ?></label></td>
+               <td>
+                       <input type="checkbox" name="send_user_notification" id="send_user_notification" value="1" <?php checked( $new_user_send_notification ); ?> />
+                       <label for="send_user_notification"><?php _e( 'Send the new user an email about their account.' ); ?></label>
+               </td>
        </tr>
 <?php } // !is_multisite ?>
        <tr class="form-field">
@@ -471,8 +484,11 @@ $new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unsl
        </tr>
        <?php if ( is_multisite() && current_user_can( 'manage_network_users' ) ) { ?>
        <tr>
-               <th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
-               <td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> /> <?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label></td>
+               <th scope="row"><?php _e( 'Skip Confirmation Email' ); ?></th>
+               <td>
+                       <input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> />
+                       <label for="noconfirmation"><?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label>
+               </td>
        </tr>
        <?php } ?>
 </table>
index 194ced94d055225bcc59987010e7fc531f70d68e..24367647b25584821420078a486c5d4aba46d60c 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>' . __( 'Sorry, you are not allowed to browse users.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to list users.' ) . '</p>',
                403
        );
 }
@@ -64,9 +64,9 @@ unset( $help );
 
 get_current_screen()->set_help_sidebar(
     '<p><strong>' . __('For more information:') . '</strong></p>' .
-    '<p>' . __('<a href="https://codex.wordpress.org/Users_Screen" target="_blank">Documentation on Managing Users</a>') . '</p>' .
-    '<p>' . __('<a href="https://codex.wordpress.org/Roles_and_Capabilities" target="_blank">Descriptions of Roles and Capabilities</a>') . '</p>' .
-    '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+    '<p>' . __('<a href="https://codex.wordpress.org/Users_Screen">Documentation on Managing Users</a>') . '</p>' .
+    '<p>' . __('<a href="https://codex.wordpress.org/Roles_and_Capabilities">Descriptions of Roles and Capabilities</a>') . '</p>' .
+    '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -94,7 +94,7 @@ case 'promote':
        check_admin_referer('bulk-users');
 
        if ( ! current_user_can( 'promote_users' ) )
-               wp_die( __( 'You can&#8217;t edit that user.' ) );
+               wp_die( __( 'Sorry, you are not allowed to edit this user.' ) );
 
        if ( empty($_REQUEST['users']) ) {
                wp_redirect($redirect);
@@ -110,7 +110,7 @@ case 'promote':
        }
 
        if ( ! $role || empty( $editable_roles[ $role ] ) ) {
-               wp_die( __( 'You can&#8217;t give users that role.' ) );
+               wp_die( __( 'Sorry, you are not allowed to give users that role.' ) );
        }
 
        $userids = $_REQUEST['users'];
@@ -119,7 +119,7 @@ case 'promote':
                $id = (int) $id;
 
                if ( ! current_user_can('promote_user', $id) )
-                       wp_die(__('You can&#8217;t edit that user.'));
+                       wp_die(__('Sorry, you are not allowed to edit this user.'));
                // The new role of the current user must also have the promote_users cap or be a multisite super admin
                if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $role ]->has_cap('promote_users')
                        && ! ( is_multisite() && is_super_admin() ) ) {
@@ -164,14 +164,14 @@ case 'dodelete':
        }
 
        if ( ! current_user_can( 'delete_users' ) )
-               wp_die(__('You can&#8217;t delete users.'));
+               wp_die(__('Sorry, you are not allowed to delete users.'));
 
        $update = 'del';
        $delete_count = 0;
 
        foreach ( $userids as $id ) {
                if ( ! current_user_can( 'delete_user', $id ) )
-                       wp_die(__( 'You can&#8217;t delete that user.' ) );
+                       wp_die(__( 'Sorry, you are not allowed to delete that user.' ) );
 
                if ( $id == $current_user->ID ) {
                        $update = 'err_admin_del';
@@ -204,7 +204,7 @@ case 'delete':
        }
 
        if ( ! current_user_can( 'delete_users' ) )
-               $errors = new WP_Error( 'edit_users', __( 'You can&#8217;t delete users.' ) );
+               $errors = new WP_Error( 'edit_users', __( 'Sorry, you are not allowed to delete users.' ) );
 
        if ( empty($_REQUEST['users']) )
                $userids = array( intval( $_REQUEST['user'] ) );
@@ -314,7 +314,7 @@ case 'doremove':
        }
 
        if ( ! current_user_can( 'remove_users' ) )
-               wp_die( __( 'You can&#8217;t remove users.' ) );
+               wp_die( __( 'Sorry, you are not allowed to remove users.' ) );
 
        $userids = $_REQUEST['users'];
 
@@ -349,7 +349,7 @@ case 'remove':
        }
 
        if ( !current_user_can('remove_users') )
-               $error = new WP_Error('edit_users', __('You can&#8217;t remove users.'));
+               $error = new WP_Error('edit_users', __('Sorry, you are not allowed to remove users.'));
 
        if ( empty($_REQUEST['users']) )
                $userids = array(intval($_REQUEST['user']));
@@ -382,7 +382,7 @@ case 'remove':
                        echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>The current user will not be removed.</strong>'), $id, $user->user_login) . "</li>\n";
                } elseif ( !current_user_can('remove_user', $id) ) {
                        /* translators: 1: user id, 2: user login */
-                       echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>You don&#8217;t have permission to remove this user.</strong>'), $id, $user->user_login) . "</li>\n";
+                       echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>Sorry, you are not allowed to remove this user.</strong>'), $id, $user->user_login) . "</li>\n";
                } else {
                        /* translators: 1: user id, 2: user login */
                        echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf(__('ID #%1$s: %2$s'), $id, $user->user_login) . "</li>\n";
@@ -410,6 +410,17 @@ default:
                exit;
        }
 
+       if ( $wp_list_table->current_action() && ! empty( $_REQUEST['users'] ) ) {
+               $userids = $_REQUEST['users'];
+               $sendback = wp_get_referer();
+
+               /** This action is documented in wp-admin/edit-comments.php */
+               $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $wp_list_table->current_action(), $userids );
+
+               wp_safe_redirect( $sendback );
+               exit;
+       }
+
        $wp_list_table->prepare_items();
        $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
        if ( $pagenum > $total_pages && $total_pages > 0 ) {
index c70b1d1ad72ee86a099bda4cae986587ba045f48..e1ae09132fe4a978d6f81b0906db06dab98aabe3 100644 (file)
@@ -22,8 +22,6 @@ if ( ! current_user_can( 'edit_theme_options' ) ) {
 
 $widgets_access = get_user_setting( 'widgets_access' );
 if ( isset($_GET['widgets-access']) ) {
-       check_admin_referer( 'widgets-access' );
-
        $widgets_access = 'on' == $_GET['widgets-access'] ? 'on' : 'off';
        set_user_setting( 'widgets_access', $widgets_access );
 }
@@ -73,8 +71,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Appearance_Widgets_Screen" target="_blank">Documentation on Widgets</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Appearance_Widgets_Screen">Documentation on Widgets</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 if ( ! current_theme_supports( 'widgets' ) ) {
@@ -317,9 +315,9 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) {
        <a href="widgets.php" class="button alignleft"><?php _e('Cancel'); ?></a>
 <?php
        } else {
-               submit_button( __( 'Delete' ), 'button alignleft', 'removewidget', false );
+               submit_button( __( 'Delete' ), 'alignleft', 'removewidget', false );
        }
-       submit_button( __( 'Save Widget' ), 'button-primary alignright', 'savewidget', false ); ?>
+       submit_button( __( 'Save Widget' ), 'primary alignright', 'savewidget', false ); ?>
        <input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($widget_id); ?>" />
        <input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" />
        <input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" />
@@ -502,8 +500,8 @@ foreach ( $theme_sidebars as $sidebar => $registered_sidebar ) {
 <div class="widgets-chooser">
        <ul class="widgets-chooser-sidebars"></ul>
        <div class="widgets-chooser-actions">
-               <button class="button-secondary"><?php _e( 'Cancel' ); ?></button>
-               <button class="button-primary"><?php _e( 'Add Widget' ); ?></button>
+               <button class="button widgets-chooser-cancel"><?php _e( 'Cancel' ); ?></button>
+               <button class="button button-primary widgets-chooser-add"><?php _e( 'Add Widget' ); ?></button>
        </div>
 </div>
 
index 4e9f1fcfb0e0e339de8e0697af790b4b0116ae8b..2c421d327adee02c9bad3f6820d4bb76bfad1e3c 100644 (file)
@@ -6,8 +6,13 @@
  */
 
 if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) {
+       $protocol = $_SERVER['SERVER_PROTOCOL'];
+       if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) {
+               $protocol = 'HTTP/1.0';
+       }
+
        header('Allow: POST');
-       header('HTTP/1.1 405 Method Not Allowed');
+       header("$protocol 405 Method Not Allowed");
        header('Content-Type: text/plain');
        exit;
 }
index a21862a01a1201bfbc88b794067a38d608e27fbb..41c75408d14b8b2437d9deb8f8fd36820192a1e2 100644 (file)
@@ -2,7 +2,7 @@
 Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs
 Tags: akismet, comments, spam, antispam, anti-spam, anti spam, comment moderation, comment spam, contact form spam, spam comments
 Requires at least: 3.7
-Tested up to: 4.7
+Tested up to: 4.6.1
 Stable tag: 3.2
 License: GPLv2 or later
 
index 056a3613e681478d2ea187caf847095d0fd4c71d..8ae7e1daccd42d0e8d488d57e980a12489bdc19e 100644 (file)
@@ -118,6 +118,19 @@ function twentyfifteen_setup() {
        $default_color = trim( $color_scheme[0], '#' );
 
        // Setup the WordPress core custom background feature.
+
+       /**
+        * Filter Twenty Fifteen custom-header support arguments.
+        *
+        * @since Twenty Fifteen 1.0
+        *
+        * @param array $args {
+        *     An array of custom-header support arguments.
+        *
+        *     @type string $default-color              Default color of the header.
+        *     @type string $default-attachment     Default attachment of the header.
+        * }
+        */
        add_theme_support( 'custom-background', apply_filters( 'twentyfifteen_custom_background_args', array(
                'default-color'      => $default_color,
                'default-attachment' => 'fixed',
@@ -272,6 +285,31 @@ function twentyfifteen_scripts() {
 }
 add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' );
 
+/**
+ * Add preconnect for Google Fonts.
+ *
+ * @since Twenty Fifteen 1.7
+ *
+ * @param array   $urls          URLs to print for resource hints.
+ * @param string  $relation_type The relation type the URLs are printed.
+ * @return array URLs to print for resource hints.
+ */
+function twentyfifteen_resource_hints( $urls, $relation_type ) {
+       if ( wp_style_is( 'twentyfifteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) {
+               if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) {
+                       $urls[] = array(
+                               'href' => 'https://fonts.gstatic.com',
+                               'crossorigin',
+                       );
+               } else {
+                       $urls[] = 'https://fonts.gstatic.com';
+               }
+       }
+
+       return $urls;
+}
+add_filter( 'wp_resource_hints', 'twentyfifteen_resource_hints', 10, 2 );
+
 /**
  * Add featured image as background image to post navigation elements.
  *
index 36ef940456d95f02000ef8b49eb2aace08c9b4e3..8ca828082992b6aa1ab29053e3c0f4181dbebab0 100644 (file)
@@ -1,8 +1,8 @@
 === Twenty Fifteen ===
 Contributors: the WordPress team
 Requires at least: WordPress 4.1
-Tested up to: WordPress 4.7-trunk
-Version: 1.6
+Tested up to: WordPress 4.8-trunk
+Version: 1.7
 License: GPLv2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 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
@@ -55,6 +55,11 @@ Source: http://www.genericons.com
 
 == Changelog ==
 
+= 1.7 =
+* Released: December 6, 2016
+
+https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_1.7
+
 = 1.6 =
 * Released: August 15, 2016
 
index 56e46b688979db0d8b582942bf945f2581b8c01d..13048ba9d6adfc1463edfd0ef8013630b74766e7 100644 (file)
@@ -4,7 +4,7 @@ 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.6
+Version: 1.7
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 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
diff --git a/wp-content/themes/twentyfourteen/404.php b/wp-content/themes/twentyfourteen/404.php
deleted file mode 100644 (file)
index 7f5bef8..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-/**
- * The template for displaying 404 pages (Not Found)
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-
-       <div id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-
-                       <header class="page-header">
-                               <h1 class="page-title"><?php _e( 'Not Found', 'twentyfourteen' ); ?></h1>
-                       </header>
-
-                       <div class="page-content">
-                               <p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentyfourteen' ); ?></p>
-
-                               <?php get_search_form(); ?>
-                       </div><!-- .page-content -->
-
-               </div><!-- #content -->
-       </div><!-- #primary -->
-
-<?php
-get_sidebar( 'content' );
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/archive.php b/wp-content/themes/twentyfourteen/archive.php
deleted file mode 100644 (file)
index f4c9181..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * The template for displaying Archive pages
- *
- * Used to display archive-type pages if nothing more specific matches a query.
- * For example, puts together date-based pages if no date.php file exists.
- *
- * If you'd like to further customize these archive views, you may create a
- * new template file for each specific one. For example, Twenty Fourteen
- * already has tag.php for Tag archives, category.php for Category archives,
- * and author.php for Author archives.
- *
- * @link https://codex.wordpress.org/Template_Hierarchy
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-       <section id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-
-                       <?php if ( have_posts() ) : ?>
-
-                       <header class="page-header">
-                               <h1 class="page-title">
-                                       <?php
-                                               if ( is_day() ) :
-                                                       printf( __( 'Daily Archives: %s', 'twentyfourteen' ), get_the_date() );
-
-                                               elseif ( is_month() ) :
-                                                       printf( __( 'Monthly Archives: %s', 'twentyfourteen' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyfourteen' ) ) );
-
-                                               elseif ( is_year() ) :
-                                                       printf( __( 'Yearly Archives: %s', 'twentyfourteen' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentyfourteen' ) ) );
-
-                                               else :
-                                                       _e( 'Archives', 'twentyfourteen' );
-
-                                               endif;
-                                       ?>
-                               </h1>
-                       </header><!-- .page-header -->
-
-                       <?php
-                                       // Start the Loop.
-                                       while ( have_posts() ) : the_post();
-
-                                               /*
-                                                * Include the post format-specific template for the content. If you want to
-                                                * use this in a child theme, then include a file called called content-___.php
-                                                * (where ___ is the post format) and that will be used instead.
-                                                */
-                                               get_template_part( 'content', get_post_format() );
-
-                                       endwhile;
-                                       // Previous/next page navigation.
-                                       twentyfourteen_paging_nav();
-
-                               else :
-                                       // If no content, include the "No posts found" template.
-                                       get_template_part( 'content', 'none' );
-
-                               endif;
-                       ?>
-               </div><!-- #content -->
-       </section><!-- #primary -->
-
-<?php
-get_sidebar( 'content' );
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/author.php b/wp-content/themes/twentyfourteen/author.php
deleted file mode 100644 (file)
index 62d9165..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * The template for displaying Author archive pages
- *
- * @link https://codex.wordpress.org/Template_Hierarchy
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-       <section id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-
-                       <?php if ( have_posts() ) : ?>
-
-                       <header class="archive-header">
-                               <h1 class="archive-title">
-                                       <?php
-                                               /*
-                                                * Queue the first post, that way we know what author
-                                                * we're dealing with (if that is the case).
-                                                *
-                                                * We reset this later so we can run the loop properly
-                                                * with a call to rewind_posts().
-                                                */
-                                               the_post();
-
-                                               printf( __( 'All posts by %s', 'twentyfourteen' ), get_the_author() );
-                                       ?>
-                               </h1>
-                               <?php if ( get_the_author_meta( 'description' ) ) : ?>
-                               <div class="author-description"><?php the_author_meta( 'description' ); ?></div>
-                               <?php endif; ?>
-                       </header><!-- .archive-header -->
-
-                       <?php
-                                       /*
-                                        * Since we called the_post() above, we need to rewind
-                                        * the loop back to the beginning that way we can run
-                                        * the loop properly, in full.
-                                        */
-                                       rewind_posts();
-
-                                       // Start the Loop.
-                                       while ( have_posts() ) : the_post();
-
-                                               /*
-                                                * Include the post format-specific template for the content. If you want to
-                                                * use this in a child theme, then include a file called called content-___.php
-                                                * (where ___ is the post format) and that will be used instead.
-                                                */
-                                               get_template_part( 'content', get_post_format() );
-
-                                       endwhile;
-                                       // Previous/next page navigation.
-                                       twentyfourteen_paging_nav();
-
-                               else :
-                                       // If no content, include the "No posts found" template.
-                                       get_template_part( 'content', 'none' );
-
-                               endif;
-                       ?>
-
-               </div><!-- #content -->
-       </section><!-- #primary -->
-
-<?php
-get_sidebar( 'content' );
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/category.php b/wp-content/themes/twentyfourteen/category.php
deleted file mode 100644 (file)
index 2b05f8d..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-/**
- * The template for displaying Category pages
- *
- * @link https://codex.wordpress.org/Template_Hierarchy
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-       <section id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-
-                       <?php if ( have_posts() ) : ?>
-
-                       <header class="archive-header">
-                               <h1 class="archive-title"><?php printf( __( 'Category Archives: %s', 'twentyfourteen' ), single_cat_title( '', false ) ); ?></h1>
-
-                               <?php
-                                       // Show an optional term description.
-                                       $term_description = term_description();
-                                       if ( ! empty( $term_description ) ) :
-                                               printf( '<div class="taxonomy-description">%s</div>', $term_description );
-                                       endif;
-                               ?>
-                       </header><!-- .archive-header -->
-
-                       <?php
-                                       // Start the Loop.
-                                       while ( have_posts() ) : the_post();
-
-                                       /*
-                                        * Include the post format-specific template for the content. If you want to
-                                        * use this in a child theme, then include a file called called content-___.php
-                                        * (where ___ is the post format) and that will be used instead.
-                                        */
-                                       get_template_part( 'content', get_post_format() );
-
-                                       endwhile;
-                                       // Previous/next page navigation.
-                                       twentyfourteen_paging_nav();
-
-                               else :
-                                       // If no content, include the "No posts found" template.
-                                       get_template_part( 'content', 'none' );
-
-                               endif;
-                       ?>
-               </div><!-- #content -->
-       </section><!-- #primary -->
-
-<?php
-get_sidebar( 'content' );
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/comments.php b/wp-content/themes/twentyfourteen/comments.php
deleted file mode 100644 (file)
index 781c06d..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/**
- * The template for displaying Comments
- *
- * The area of the page that contains comments and the comment form.
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-/*
- * If the current post is protected by a password and the visitor has not yet
- * entered the password we will return early without loading the comments.
- */
-if ( post_password_required() ) {
-       return;
-}
-?>
-
-<div id="comments" class="comments-area">
-
-       <?php if ( have_comments() ) : ?>
-
-       <h2 class="comments-title">
-               <?php
-                       printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyfourteen' ),
-                               number_format_i18n( get_comments_number() ), get_the_title() );
-               ?>
-       </h2>
-
-       <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
-       <nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
-               <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
-               <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
-               <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
-       </nav><!-- #comment-nav-above -->
-       <?php endif; // Check for comment navigation. ?>
-
-       <ol class="comment-list">
-               <?php
-                       wp_list_comments( array(
-                               'style'       => 'ol',
-                               'short_ping'  => true,
-                               'avatar_size' => 34,
-                       ) );
-               ?>
-       </ol><!-- .comment-list -->
-
-       <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
-       <nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
-               <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
-               <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
-               <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
-       </nav><!-- #comment-nav-below -->
-       <?php endif; // Check for comment navigation. ?>
-
-       <?php if ( ! comments_open() ) : ?>
-       <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
-       <?php endif; ?>
-
-       <?php endif; // have_comments() ?>
-
-       <?php comment_form(); ?>
-
-</div><!-- #comments -->
diff --git a/wp-content/themes/twentyfourteen/content-aside.php b/wp-content/themes/twentyfourteen/content-aside.php
deleted file mode 100644 (file)
index 0401579..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * The template for displaying posts in the Aside post format
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-       <?php twentyfourteen_post_thumbnail(); ?>
-
-       <header class="entry-header">
-               <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
-               <div class="entry-meta">
-                       <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
-               </div><!-- .entry-meta -->
-               <?php
-                       endif;
-
-                       if ( is_single() ) :
-                               the_title( '<h1 class="entry-title">', '</h1>' );
-                       else :
-                               the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
-                       endif;
-               ?>
-
-               <div class="entry-meta">
-                       <span class="post-format">
-                               <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'aside' ) ); ?>"><?php echo get_post_format_string( 'aside' ); ?></a>
-                       </span>
-
-                       <?php twentyfourteen_posted_on(); ?>
-
-                       <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
-                       <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
-                       <?php endif; ?>
-
-                       <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
-               </div><!-- .entry-meta -->
-       </header><!-- .entry-header -->
-
-       <div class="entry-content">
-               <?php
-                       /* translators: %s: Name of current post */
-                       the_content( sprintf(
-                               __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
-                               the_title( '<span class="screen-reader-text">', '</span>', false )
-                       ) );
-
-                       wp_link_pages( array(
-                               'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
-                               'after'       => '</div>',
-                               'link_before' => '<span>',
-                               'link_after'  => '</span>',
-                       ) );
-               ?>
-       </div><!-- .entry-content -->
-
-       <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
-</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyfourteen/content-audio.php b/wp-content/themes/twentyfourteen/content-audio.php
deleted file mode 100644 (file)
index 9fa9df4..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * The template for displaying posts in the Audio post format
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-       <?php twentyfourteen_post_thumbnail(); ?>
-
-       <header class="entry-header">
-               <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
-               <div class="entry-meta">
-                       <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
-               </div><!-- .entry-meta -->
-               <?php
-                       endif;
-
-                       if ( is_single() ) :
-                               the_title( '<h1 class="entry-title">', '</h1>' );
-                       else :
-                               the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
-                       endif;
-               ?>
-
-               <div class="entry-meta">
-                       <span class="post-format">
-                               <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'audio' ) ); ?>"><?php echo get_post_format_string( 'audio' ); ?></a>
-                       </span>
-
-                       <?php twentyfourteen_posted_on(); ?>
-
-                       <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
-                       <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
-                       <?php endif; ?>
-
-                       <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
-               </div><!-- .entry-meta -->
-       </header><!-- .entry-header -->
-
-       <div class="entry-content">
-               <?php
-                       /* translators: %s: Name of current post */
-                       the_content( sprintf(
-                               __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
-                               the_title( '<span class="screen-reader-text">', '</span>', false )
-                       ) );
-
-                       wp_link_pages( array(
-                               'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
-                               'after'       => '</div>',
-                               'link_before' => '<span>',
-                               'link_after'  => '</span>',
-                       ) );
-               ?>
-       </div><!-- .entry-content -->
-
-       <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
-</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyfourteen/content-featured-post.php b/wp-content/themes/twentyfourteen/content-featured-post.php
deleted file mode 100644 (file)
index 6cc8822..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/**
- * The template for displaying featured posts on the front page
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-       <a class="post-thumbnail" href="<?php the_permalink(); ?>">
-       <?php
-               // Output the featured image.
-               if ( has_post_thumbnail() ) :
-                       if ( 'grid' == get_theme_mod( 'featured_content_layout' ) ) {
-                               the_post_thumbnail();
-                       } else {
-                               the_post_thumbnail( 'twentyfourteen-full-width' );
-                       }
-               endif;
-       ?>
-       </a>
-
-       <header class="entry-header">
-               <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
-               <div class="entry-meta">
-                       <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
-               </div><!-- .entry-meta -->
-               <?php endif; ?>
-
-               <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">','</a></h1>' ); ?>
-       </header><!-- .entry-header -->
-</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyfourteen/content-gallery.php b/wp-content/themes/twentyfourteen/content-gallery.php
deleted file mode 100644 (file)
index 6e3fe83..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * The template for displaying posts in the Gallery post format
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-       <?php twentyfourteen_post_thumbnail(); ?>
-
-       <header class="entry-header">
-               <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
-               <div class="entry-meta">
-                       <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
-               </div><!-- .entry-meta -->
-               <?php
-                       endif;
-
-                       if ( is_single() ) :
-                               the_title( '<h1 class="entry-title">', '</h1>' );
-                       else :
-                               the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
-                       endif;
-               ?>
-
-               <div class="entry-meta">
-                       <span class="post-format">
-                               <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>"><?php echo get_post_format_string( 'gallery' ); ?></a>
-                       </span>
-
-                       <?php twentyfourteen_posted_on(); ?>
-
-                       <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
-                       <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
-                       <?php endif; ?>
-
-                       <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
-               </div><!-- .entry-meta -->
-       </header><!-- .entry-header -->
-
-       <div class="entry-content">
-               <?php
-                       /* translators: %s: Name of current post */
-                       the_content( sprintf(
-                               __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
-                               the_title( '<span class="screen-reader-text">', '</span>', false )
-                       ) );
-
-                       wp_link_pages( array(
-                               'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
-                               'after'       => '</div>',
-                               'link_before' => '<span>',
-                               'link_after'  => '</span>',
-                       ) );
-               ?>
-       </div><!-- .entry-content -->
-
-       <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
-</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyfourteen/content-image.php b/wp-content/themes/twentyfourteen/content-image.php
deleted file mode 100644 (file)
index a81e493..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * The template for displaying posts in the Image post format
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-       <?php twentyfourteen_post_thumbnail(); ?>
-
-       <header class="entry-header">
-               <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
-               <div class="entry-meta">
-                       <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
-               </div><!-- .entry-meta -->
-               <?php
-                       endif;
-
-                       if ( is_single() ) :
-                               the_title( '<h1 class="entry-title">', '</h1>' );
-                       else :
-                               the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
-                       endif;
-               ?>
-
-               <div class="entry-meta">
-                       <span class="post-format">
-                               <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'image' ) ); ?>"><?php echo get_post_format_string( 'image' ); ?></a>
-                       </span>
-
-                       <?php twentyfourteen_posted_on(); ?>
-
-                       <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
-                       <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
-                       <?php endif; ?>
-
-                       <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
-               </div><!-- .entry-meta -->
-       </header><!-- .entry-header -->
-
-       <div class="entry-content">
-               <?php
-                       /* translators: %s: Name of current post */
-                       the_content( sprintf(
-                               __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
-                               the_title( '<span class="screen-reader-text">', '</span>', false )
-                       ) );
-
-                       wp_link_pages( array(
-                               'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
-                               'after'       => '</div>',
-                               'link_before' => '<span>',
-                               'link_after'  => '</span>',
-                       ) );
-               ?>
-       </div><!-- .entry-content -->
-
-       <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
-</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyfourteen/content-link.php b/wp-content/themes/twentyfourteen/content-link.php
deleted file mode 100644 (file)
index 858301e..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * The template for displaying posts in the Link post format
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-       <?php twentyfourteen_post_thumbnail(); ?>
-
-       <header class="entry-header">
-               <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
-               <div class="entry-meta">
-                       <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
-               </div><!-- .entry-meta -->
-               <?php
-                       endif;
-
-                       if ( is_single() ) :
-                               the_title( '<h1 class="entry-title">', '</h1>' );
-                       else :
-                               the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
-                       endif;
-               ?>
-
-               <div class="entry-meta">
-                       <span class="post-format">
-                               <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'link' ) ); ?>"><?php echo get_post_format_string( 'link' ); ?></a>
-                       </span>
-
-                       <?php twentyfourteen_posted_on(); ?>
-
-                       <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
-                       <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
-                       <?php endif; ?>
-
-                       <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
-               </div><!-- .entry-meta -->
-       </header><!-- .entry-header -->
-
-       <div class="entry-content">
-               <?php
-                       /* translators: %s: Name of current post */
-                       the_content( sprintf(
-                               __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
-                               the_title( '<span class="screen-reader-text">', '</span>', false )
-                       ) );
-
-                       wp_link_pages( array(
-                               'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
-                               'after'       => '</div>',
-                               'link_before' => '<span>',
-                               'link_after'  => '</span>',
-                       ) );
-               ?>
-       </div><!-- .entry-content -->
-
-       <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
-</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyfourteen/content-none.php b/wp-content/themes/twentyfourteen/content-none.php
deleted file mode 100644 (file)
index a83e06e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/**
- * The template for displaying a "No posts found" message
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<header class="page-header">
-       <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1>
-</header>
-
-<div class="page-content">
-       <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
-
-       <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfourteen' ), admin_url( 'post-new.php' ) ); ?></p>
-
-       <?php elseif ( is_search() ) : ?>
-
-       <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p>
-       <?php get_search_form(); ?>
-
-       <?php else : ?>
-
-       <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
-       <?php get_search_form(); ?>
-
-       <?php endif; ?>
-</div><!-- .page-content -->
diff --git a/wp-content/themes/twentyfourteen/content-page.php b/wp-content/themes/twentyfourteen/content-page.php
deleted file mode 100644 (file)
index 9839419..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/**
- * The template used for displaying page content
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-       <?php
-               // Page thumbnail and title.
-               twentyfourteen_post_thumbnail();
-               the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' );
-       ?>
-
-       <div class="entry-content">
-               <?php
-                       the_content();
-                       wp_link_pages( array(
-                               'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
-                               'after'       => '</div>',
-                               'link_before' => '<span>',
-                               'link_after'  => '</span>',
-                       ) );
-
-                       edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
-               ?>
-       </div><!-- .entry-content -->
-</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyfourteen/content-quote.php b/wp-content/themes/twentyfourteen/content-quote.php
deleted file mode 100644 (file)
index 10a5d11..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * The template for displaying posts in the Quote post format
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-       <?php twentyfourteen_post_thumbnail(); ?>
-
-       <header class="entry-header">
-               <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
-               <div class="entry-meta">
-                       <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
-               </div><!-- .entry-meta -->
-               <?php
-                       endif;
-
-                       if ( is_single() ) :
-                               the_title( '<h1 class="entry-title">', '</h1>' );
-                       else :
-                               the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
-                       endif;
-               ?>
-
-               <div class="entry-meta">
-                       <span class="post-format">
-                               <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'quote' ) ); ?>"><?php echo get_post_format_string( 'quote' ); ?></a>
-                       </span>
-
-                       <?php twentyfourteen_posted_on(); ?>
-
-                       <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
-                       <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
-                       <?php endif; ?>
-
-                       <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
-               </div><!-- .entry-meta -->
-       </header><!-- .entry-header -->
-
-       <div class="entry-content">
-               <?php
-                       /* translators: %s: Name of current post */
-                       the_content( sprintf(
-                               __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
-                               the_title( '<span class="screen-reader-text">', '</span>', false )
-                       ) );
-
-                       wp_link_pages( array(
-                               'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
-                               'after'       => '</div>',
-                               'link_before' => '<span>',
-                               'link_after'  => '</span>',
-                       ) );
-               ?>
-       </div><!-- .entry-content -->
-
-       <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
-</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyfourteen/content-video.php b/wp-content/themes/twentyfourteen/content-video.php
deleted file mode 100644 (file)
index 4c49aaa..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * The template for displaying posts in the Video post format
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-       <?php twentyfourteen_post_thumbnail(); ?>
-
-       <header class="entry-header">
-               <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
-               <div class="entry-meta">
-                       <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
-               </div><!-- .entry-meta -->
-               <?php
-                       endif;
-
-                       if ( is_single() ) :
-                               the_title( '<h1 class="entry-title">', '</h1>' );
-                       else :
-                               the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
-                       endif;
-               ?>
-
-               <div class="entry-meta">
-                       <span class="post-format">
-                               <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'video' ) ); ?>"><?php echo get_post_format_string( 'video' ); ?></a>
-                       </span>
-
-                       <?php twentyfourteen_posted_on(); ?>
-
-                       <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
-                       <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
-                       <?php endif; ?>
-
-                       <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
-               </div><!-- .entry-meta -->
-       </header><!-- .entry-header -->
-
-       <div class="entry-content">
-               <?php
-                       /* translators: %s: Name of current post */
-                       the_content( sprintf(
-                               __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
-                               the_title( '<span class="screen-reader-text">', '</span>', false )
-                       ) );
-
-                       wp_link_pages( array(
-                               'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
-                               'after'       => '</div>',
-                               'link_before' => '<span>',
-                               'link_after'  => '</span>',
-                       ) );
-               ?>
-       </div><!-- .entry-content -->
-
-       <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
-</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyfourteen/content.php b/wp-content/themes/twentyfourteen/content.php
deleted file mode 100644 (file)
index e571d8b..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * The default template for displaying content
- *
- * Used for both single and index/archive/search.
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-       <?php twentyfourteen_post_thumbnail(); ?>
-
-       <header class="entry-header">
-               <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
-               <div class="entry-meta">
-                       <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
-               </div>
-               <?php
-                       endif;
-
-                       if ( is_single() ) :
-                               the_title( '<h1 class="entry-title">', '</h1>' );
-                       else :
-                               the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
-                       endif;
-               ?>
-
-               <div class="entry-meta">
-                       <?php
-                               if ( 'post' == get_post_type() )
-                                       twentyfourteen_posted_on();
-
-                               if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
-                       ?>
-                       <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
-                       <?php
-                               endif;
-
-                               edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
-                       ?>
-               </div><!-- .entry-meta -->
-       </header><!-- .entry-header -->
-
-       <?php if ( is_search() ) : ?>
-       <div class="entry-summary">
-               <?php the_excerpt(); ?>
-       </div><!-- .entry-summary -->
-       <?php else : ?>
-       <div class="entry-content">
-               <?php
-                       /* translators: %s: Name of current post */
-                       the_content( sprintf(
-                               __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
-                               the_title( '<span class="screen-reader-text">', '</span>', false )
-                       ) );
-
-                       wp_link_pages( array(
-                               'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
-                               'after'       => '</div>',
-                               'link_before' => '<span>',
-                               'link_after'  => '</span>',
-                       ) );
-               ?>
-       </div><!-- .entry-content -->
-       <?php endif; ?>
-
-       <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
-</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyfourteen/css/editor-style.css b/wp-content/themes/twentyfourteen/css/editor-style.css
deleted file mode 100644 (file)
index 6bd5ac0..0000000
+++ /dev/null
@@ -1,721 +0,0 @@
-/*
-Theme Name: Twenty Fourteen
-Description: Used to style the TinyMCE editor.
-*/
-
-
-/**
- * Table of Contents:
- *
- * 1.0 - Body
- * 2.0 - Headings
- * 3.0 - Text Elements
- * 4.0 - Links
- * 5.0 - Alignment
- * 6.0 - Tables
- * 7.0 - Images
- * 8.0 - Galleries
- * 9.0 - Audio/Video
- * 10.0 - RTL
- * ----------------------------------------------------------------------------
- */
-
-
-/**
- * 1.0 Body
- * ----------------------------------------------------------------------------
- */
-
-html .mceContentBody {
-       font-size: 100%;
-       max-width: 474px;
-}
-
-body {
-       color: #2b2b2b;
-       font-family: Lato, sans-serif;
-       font-weight: 400;
-       line-height: 1.5;
-       vertical-align: baseline;
-}
-
-
-/**
- * 2.0 Headings
- * ----------------------------------------------------------------------------
- */
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-       clear: both;
-       font-weight: 700;
-       margin: 36px 0 12px;
-}
-
-h1 {
-       font-size: 26px;
-       line-height: 1.3846153846;
-}
-
-h2 {
-       font-size: 24px;
-       line-height: 1;
-}
-
-h3 {
-       font-size: 22px;
-       line-height: 1.0909090909;
-}
-
-h4 {
-       font-size: 20px;
-       line-height: 1.2;
-}
-
-h5 {
-       font-size: 18px;
-       line-height: 1.3333333333;
-}
-
-h6 {
-       font-size: 16px;
-       line-height: 1.5;
-}
-
-h1:first-child,
-h2:first-child,
-h3:first-child,
-h4:first-child,
-h5:first-child,
-h6:first-child {
-       margin-top: 0;
-}
-
-
-/**
- * 3.0 Text Elements
- * ----------------------------------------------------------------------------
- */
-
-address {
-       font-style: italic;
-       margin-bottom: 24px;
-}
-
-abbr[title] {
-       border-bottom: 1px dotted #2b2b2b;
-       cursor: help;
-}
-
-b,
-strong {
-       font-weight: 700;
-}
-
-cite {
-       border: 0;
-}
-
-cite,
-dfn,
-em,
-i {
-       font-style: italic;
-}
-
-mark,
-ins {
-       background: #fff9c0;
-       border: 0;
-       color: inherit;
-       text-decoration: none;
-}
-
-p {
-       margin: 0 0 24px;
-}
-
-code,
-kbd,
-tt,
-var,
-samp,
-pre {
-       font-family: monospace, serif;
-       font-size: 15px;
-       line-height: 1.6;
-}
-
-pre {
-       border: 1px solid rgba(0, 0, 0, 0.1);
-       margin-bottom: 24px;
-       max-width: 100%;
-       overflow: auto;
-       padding: 12px;
-       white-space: pre;
-       white-space: pre-wrap;
-       word-wrap: break-word;
-}
-
-blockquote,
-q {
-       quotes: none;
-}
-
-blockquote:before,
-blockquote:after,
-q:before,
-q:after {
-       content: "";
-       content: none;
-}
-
-blockquote {
-       color: #767676;
-       font-size: 19px;
-       font-style: italic;
-       font-weight: 300;
-       line-height: 1.2631578947;
-       margin: 0 0 24px;
-}
-
-blockquote cite,
-blockquote small {
-       color: #2b2b2b;
-       font-size: 16px;
-       font-weight: 400;
-       line-height: 1.5;
-}
-
-blockquote em,
-blockquote i,
-blockquote cite {
-       font-style: normal;
-}
-
-blockquote strong,
-blockquote b {
-       font-weight: 400;
-}
-
-small {
-       font-size: smaller;
-}
-
-big {
-       font-size: 125%;
-}
-
-sup,
-sub {
-       font-size: 75%;
-       height: 0;
-       line-height: 0;
-       position: relative;
-       vertical-align: baseline;
-}
-
-sup {
-       bottom: 1ex;
-}
-
-sub {
-       top: .5ex;
-}
-
-dl {
-       margin: 0 0 24px;
-}
-
-dt {
-       font-weight: bold;
-}
-
-dd {
-       margin: 0 0 24px;
-}
-
-ul,
-ol {
-       list-style: none;
-       margin: 0 0 24px 20px;
-       padding-left: 0;
-}
-
-ul {
-       list-style: disc;
-}
-
-ol {
-       list-style: decimal;
-}
-
-li > ul,
-li > ol {
-       margin: 0 0 0 20px;
-}
-
-del {
-       color: #767676;
-}
-
-hr {
-       background-color: rgba(0, 0, 0, 0.1);
-       border: 0;
-       height: 1px;
-       margin-bottom: 23px;
-}
-
-
-/**
- * 4.0 Links
- * ----------------------------------------------------------------------------
- */
-
-a {
-       color: #24890d;
-       text-decoration: none;
-}
-
-a:visited {
-       color: #24890d;
-}
-
-a:focus {
-       outline: thin dotted;
-}
-
-a:active,
-a:hover {
-       color: #41a62a;
-       outline: 0;
-}
-
-
-/**
- * 5.0 Alignment
- * ----------------------------------------------------------------------------
- */
-
-.alignleft {
-       float: left;
-       margin: 7px 24px 7px 0;
-}
-
-.alignright {
-       float: right;
-       margin: 7px 0 7px 24px;
-}
-
-.aligncenter {
-       clear: both;
-       display: block;
-       margin: 7px auto;
-}
-
-blockquote.alignleft,
-blockquote.alignright {
-       border-top: 1px solid rgba(0, 0, 0, 0.1);
-       border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-       padding-top: 17px;
-       width: 50%;
-}
-
-blockquote.alignleft p,
-blockquote.alignright p {
-       margin-bottom: 17px;
-}
-
-
-/**
- * 6.0 Tables
- * ----------------------------------------------------------------------------
- */
-
-.mceItemTable,
-.mce-item-table {
-       border: 1px solid rgba(0, 0, 0, 0.1);
-       border-width: 1px 0 0 1px;
-       border-collapse: separate;
-       border-spacing: 0;
-       font-size: 14px;
-       line-height: 1.2857142857;
-       margin-bottom: 24px;
-       width: 100%;
-}
-
-.mceItemTable th,
-.mceItemTable caption,
-.mce-item-table th,
-.mce-item-table caption {
-       border: 1px solid rgba(0, 0, 0, 0.1);
-       border-width: 0 1px 1px 0;
-       font-weight: 700;
-       padding: 8px;
-       text-align: left;
-       text-transform: uppercase;
-       vertical-align: baseline;
-}
-
-.mceItemTable td,
-.mce-item-table td {
-       border: 1px solid rgba(0, 0, 0, 0.1);
-       border-width: 0 1px 1px 0;
-       font-family: Lato, sans-serif;
-       font-size: 14px;
-       padding: 8px;
-       vertical-align: baseline;
-}
-
-
-/**
- * 7.0 Images
- * ----------------------------------------------------------------------------
- */
-
-img {
-       height: auto;
-       max-width: 100%;
-       vertical-align: middle;
-}
-
-.wp-caption {
-       background: transparent;
-       border: none;
-       color: #767676;
-       margin: 0 0 24px 0;
-       max-width: 100%;
-       padding: 0;
-       text-align: left;
-}
-
-.html5-captions .wp-caption {
-       padding: 0;
-}
-
-.wp-caption.alignleft {
-       margin: 7px 14px 7px 0;
-}
-
-.html5-captions .wp-caption.alignleft {
-       margin-right: 24px;
-}
-
-.wp-caption.alignright {
-       margin: 7px 0 7px 14px;
-}
-
-.wp-caption.alignright img,
-.wp-caption.alignright .wp-caption-dd {
-       padding-left: 10px;
-}
-
-.html5-captions .wp-caption.alignright {
-       margin-left: 24px;
-}
-
-.html5-captions .wp-caption.alignright img,
-.html5-captions .wp-caption.alignright .wp-caption-dd {
-       padding: 0;
-}
-
-.wp-caption.aligncenter {
-       margin: 7px auto;
-}
-
-.wp-caption-dt {
-       margin: 0;
-}
-
-.wp-caption .wp-caption-text,
-.wp-caption-dd {
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing: border-box;
-       box-sizing: border-box;
-       font-size: 12px;
-       font-style: italic;
-       line-height: 1.5;
-       margin: 9px 0;
-       padding: 0 10px 0 0; /* Avoid the caption to overflow the width of the image because wp-caption has 10px wider width */
-       text-align: left;
-}
-
-.mceTemp + ul,
-.mceTemp + ol {
-       list-style-position: inside;
-}
-
-/**
- * 8.0 Gallery
- * -----------------------------------------------------------------------------
- */
-
-.gallery .gallery-item {
-       float: left;
-       margin: 0 4px 4px 0;
-       overflow: hidden;
-       padding: 0;
-       position: relative;
-}
-
-.gallery-columns-1 .gallery-item {
-       max-width: 100%;
-       width: auto;
-}
-
-.gallery-columns-2 .gallery-item {
-       max-width: 48%;
-       max-width: -webkit-calc(50% - 14px);
-       max-width:         calc(50% - 14px);
-       width: auto;
-}
-
-.gallery-columns-3 .gallery-item {
-       max-width: 32%;
-       max-width: -webkit-calc(33.3% - 11px);
-       max-width:         calc(33.3% - 11px);
-       width: auto;
-}
-
-.gallery-columns-4 .gallery-item {
-       max-width: 23%;
-       max-width: -webkit-calc(25% - 9px);
-       max-width:         calc(25% - 9px);
-       width: auto;
-}
-
-.gallery-columns-5 .gallery-item {
-       max-width: 19%;
-       max-width: -webkit-calc(20% - 8px);
-       max-width:         calc(20% - 8px);
-       width: auto;
-}
-
-.gallery-columns-6 .gallery-item {
-       max-width: 15%;
-       max-width: -webkit-calc(16.7% - 7px);
-       max-width:         calc(16.7% - 7px);
-       width: auto;
-}
-
-.gallery-columns-7 .gallery-item {
-       max-width: 13%;
-       max-width: -webkit-calc(14.28% - 7px);
-       max-width:         calc(14.28% - 7px);
-       width: auto;
-}
-
-.gallery-columns-8 .gallery-item {
-       max-width: 11%;
-       max-width: -webkit-calc(12.5% - 6px);
-       max-width:         calc(12.5% - 6px);
-       width: auto;
-}
-
-.gallery-columns-9 .gallery-item {
-       max-width: 9%;
-       max-width: -webkit-calc(11.1% - 6px);
-       max-width:         calc(11.1% - 6px);
-       width: auto;
-}
-
-.gallery-columns-1 .gallery-item:nth-of-type(1n),
-.gallery-columns-2 .gallery-item:nth-of-type(2n),
-.gallery-columns-3 .gallery-item:nth-of-type(3n),
-.gallery-columns-4 .gallery-item:nth-of-type(4n),
-.gallery-columns-5 .gallery-item:nth-of-type(5n),
-.gallery-columns-6 .gallery-item:nth-of-type(6n),
-.gallery-columns-7 .gallery-item:nth-of-type(7n),
-.gallery-columns-8 .gallery-item:nth-of-type(8n),
-.gallery-columns-9 .gallery-item:nth-of-type(9n) {
-       margin-right: 0;
-}
-
-.gallery-columns-1 .gallery-item:nth-of-type(1n),
-.gallery-columns-2 .gallery-item:nth-of-type(2n - 1),
-.gallery-columns-3 .gallery-item:nth-of-type(3n - 2),
-.gallery-columns-4 .gallery-item:nth-of-type(4n - 3),
-.gallery-columns-5 .gallery-item:nth-of-type(5n - 4),
-.gallery-columns-6 .gallery-item:nth-of-type(6n - 5),
-.gallery-columns-7 .gallery-item:nth-of-type(7n - 6),
-.gallery-columns-8 .gallery-item:nth-of-type(8n - 7),
-.gallery-columns-9 .gallery-item:nth-of-type(9n - 8) {
-       margin-left: 12px; /* Compensate for the default negative margin on .gallery, which can't be changed. */
-}
-
-.gallery .gallery-caption {
-       background-color: rgba(0, 0, 0, 0.7);
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       color: #fff;
-       font-size: 12px;
-       line-height: 1.5;
-       margin: 0;
-       max-height: 50%;
-       opacity: 0;
-       padding: 6px 8px;
-       position: absolute;
-       bottom: 0;
-       left: 0;
-       text-align: left;
-       width: 100%;
-}
-
-.gallery .gallery-caption:before {
-       content: "";
-       height: 100%;
-       min-height: 49px;
-       position: absolute;
-       top: 0;
-       left: 0;
-       width: 100%;
-}
-
-.gallery-item:hover .gallery-caption {
-       opacity: 1;
-}
-
-.gallery-columns-7 .gallery-caption,
-.gallery-columns-8 .gallery-caption,
-.gallery-columns-9 .gallery-caption {
-       display: none;
-}
-
-
-/**
- * 9.0 Audio/Video
- * ----------------------------------------------------------------------------
- */
-
-.mejs-mediaelement,
-.mejs-container .mejs-controls {
-       background: #000;
-}
-
-.mejs-controls .mejs-time-rail .mejs-time-loaded,
-.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
-       background: #fff;
-}
-
-.mejs-controls .mejs-time-rail .mejs-time-current {
-       background: #24890d;
-}
-
-.mejs-controls .mejs-time-rail .mejs-time-total,
-.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
-       background: rgba(255, 255, 255, .33);
-}
-
-.mejs-controls .mejs-time-rail span,
-.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total,
-.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
-       border-radius: 0;
-}
-
-.mejs-overlay-loading {
-       background: transparent;
-}
-
-.mejs-overlay-button {
-       background-color: #fff;
-       background-image: none;
-       border-radius: 2px;
-       box-shadow: 1px 1px 1px rgba(0,0,0,.8);
-       color: #000;
-       height: 36px;
-       margin-left: -24px;
-       width: 48px;
-}
-
-.mejs-overlay-button:before {
-       -webkit-font-smoothing: antialiased;
-       content: '\f452';
-       display: inline-block;
-       font: normal 32px/1.125 Genericons;
-       position: absolute;
-       top: 1px;
-       left: 10px;
-}
-
-.mejs-controls .mejs-button button:focus {
-       outline: none;
-}
-
-.mejs-controls .mejs-button button {
-       -webkit-font-smoothing: antialiased;
-       background: none;
-       color: #fff;
-       display: inline-block;
-       font: normal 16px/1 Genericons;
-}
-
-.mejs-playpause-button.mejs-play button:before {
-       content: '\f452';
-}
-
-.mejs-playpause-button.mejs-pause button:before {
-       content: '\f448';
-}
-
-.mejs-volume-button.mejs-mute button:before {
-       content: '\f109';
-       font-size: 20px;
-       position: absolute;
-       top: -2px;
-       left: 0;
-}
-
-.mejs-volume-button.mejs-unmute button:before {
-       content: '\f109';
-       left: 0;
-       position: absolute;
-       top: 0;
-}
-
-.mejs-fullscreen-button button:before {
-       content: '\f474';
-}
-
-.mejs-fullscreen-button.mejs-unfullscreen button:before {
-       content: '\f406';
-}
-
-.mejs-overlay:hover .mejs-overlay-button {
-       background-color: #24890d;
-       color: #fff;
-}
-
-.mejs-controls .mejs-button button:hover {
-       color: #41a62a;
-}
-
-
-/**
- * 10.0 RTL
- * ----------------------------------------------------------------------------
- */
-
-html .mceContentBody.rtl {
-       direction: rtl;
-       unicode-bidi: embed;
-}
-
-.rtl ol,
-.rtl ul {
-       margin-left: 0;
-       margin-right: 24px;
-}
-
-.rtl .wp-caption,
-.rtl tr th {
-       text-align: right;
-}
-
-.rtl td {
-       text-align: right;
-}
diff --git a/wp-content/themes/twentyfourteen/css/ie.css b/wp-content/themes/twentyfourteen/css/ie.css
deleted file mode 100644 (file)
index 82142d2..0000000
+++ /dev/null
@@ -1,1335 +0,0 @@
-/**
- * Global Styles for older IE versions (previous to IE9).
- */
-
-pre,
-fieldset,
-table,
-th,
-td,
-input,
-textarea {
-       border: 1px solid #e5e5e5;
-}
-
-hr {
-       background-color: #e5e5e5;
-}
-
-button,
-input,
-select,
-textarea {
-       vertical-align: middle;
-}
-
-
-input:focus,
-textarea:focus {
-       border: 1px solid #b2b2b2;
-}
-
-.site-title {
-       max-width: 71%;
-}
-
-.site-content blockquote.alignleft,
-.site-content blockquote.alignright {
-       border-top: 1px solid #e5e5e5;
-       border-bottom: 1px solid #e5e5e5;
-}
-
-.post-thumbnail,
-a.post-thumbnail:hover {
-       background: transparent;
-}
-
-.list-view .site-content .hentry {
-       border-top: 1px solid #e5e5e5;
-       padding-top: 48px;
-}
-
-.gallery-caption {
-       background: #000;
-       filter: alpha(opacity=0);
-}
-
-.gallery-item:hover .gallery-caption {
-       filter: alpha(opacity=70);
-}
-
-.nav-links {
-       border-top: 1px solid #e5e5e5;
-}
-
-.post-navigation a,
-.image-navigation .previous-image,
-.image-navigation .next-image,
-.contributor {
-       border-bottom: 1px solid #e5e5e5;
-}
-
-.contributor-avatar,
-.comment-author .avatar {
-       border: 1px solid #e5e5e5;
-}
-
-.comment-list article,
-.comment-list .pingback,
-.comment-list .trackback {
-       border-top: 1px solid #e5e5e5;
-}
-
-.comment-list .reply {
-       margin-top: 0;
-}
-
-#secondary {
-       color: #b3b3b3;
-}
-
-.widget abbr[title] {
-       border-color: #b3b3b3;
-}
-
-.widget pre,
-.widget fieldset,
-.widget table,
-.widget th,
-.widget td,
-.widget input,
-.widget textarea {
-       border-color: #4d4d4d;
-}
-
-.widget blockquote,
-.widget .wp-caption,
-.widget_twentyfourteen_ephemera .entry-meta a {
-       color: #b3b3b3;
-}
-
-.widget del {
-       color: #666;
-}
-
-.widget hr {
-       background-color: #4d4d4d;
-}
-
-.widget input,
-.widget textarea {
-       background-color: #1a1a1a;
-}
-
-.widget input:focus,
-.widget textarea:focus {
-       border-color: #262626;
-}
-
-.widget_calendar thead th {
-       background-color: #1a1a1a;
-}
-
-.widget_twentyfourteen_ephemera > ol > li {
-       border-bottom: 1px solid #4d4d4d;
-}
-
-.widget_archive li,
-.widget_categories li,
-.widget_links li,
-.widget_meta li,
-.widget_nav_menu li,
-.widget_pages li,
-.widget_recent_comments li,
-.widget_recent_entries li,
-.widget_categories li ul,
-.widget_nav_menu li ul,
-.widget_pages li ul {
-       border-top: 1px solid #4d4d4d;
-}
-
-.content-sidebar .widget pre,
-.content-sidebar .widget fieldset,
-.content-sidebar .widget table,
-.content-sidebar .widget th,
-.content-sidebar .widget td,
-.content-sidebar .widget input,
-.content-sidebar .widget textarea,
-.content-sidebar .widget_archive li,
-.content-sidebar .widget_categories li,
-.content-sidebar .widget_links li,
-.content-sidebar .widget_meta li,
-.content-sidebar .widget_nav_menu li,
-.content-sidebar .widget_pages li,
-.content-sidebar .widget_recent_comments li,
-.content-sidebar .widget_recent_entries li,
-.content-sidebar .widget_categories li ul,
-.content-sidebar .widget_nav_menu li ul,
-.content-sidebar .widget_pages li ul {
-       border-color: #e5e5e5;
-}
-
-.content-sidebar .widget hr {
-       background-color: #e5e5e5;
-}
-
-.content-sidebar .widget input:focus,
-.content-sidebar .widget textarea:focus {
-       border: 1px solid #b2b2b2;
-}
-
-.content-sidebar .widget_calendar thead th {
-       background-color: #fafafa;
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera > ol > li {
-       border-bottom: 1px solid #e5e5e5;
-}
-
-.site-footer,
-.site-info,
-.site-info a {
-       color: #b3b3b3;
-}
-
-#supplementary + .site-info {
-       border-top: 1px solid #4d4d4d;
-}
-
-.featured-content {
-       background: #000;
-}
-
-
-/**
- * Internet Explorer 8
- */
-
-.ie8 img.size-full,
-.ie8 img.size-large,
-.ie8 img.header-image,
-.ie8 img.wp-post-image,
-.ie8 img[class*="align"],
-.ie8 img[class*="wp-image-"],
-.ie8 img[class*="attachment-"] {
-       height: auto;
-       width: auto; /* Prevent stretching of full-size and large-size images with height and width attributes in IE8 */
-}
-
-.ie8 .full-size-link:before,
-.ie8 .parent-post-link:before,
-.ie8 .site-content span + .byline:before,
-.ie8 .site-content span + .comments-link:before,
-.ie8 .site-content span + .edit-link:before,
-.ie8 .site-content span + .entry-date:before {
-       content: "";
-}
-
-.ie8 .attachment span.entry-date:before,
-.ie8 .entry-content .edit-link a:before,
-.ie8 .entry-meta .edit-link a:before,
-.ie8 .site-content .byline a:before,
-.ie8 .site-content .comments-link a:before,
-.ie8 .site-content .entry-date a:before,
-.ie8 .site-content .featured-post:before,
-.ie8 .site-content .full-size-link a:before,
-.ie8 .site-content .parent-post-link a:before,
-.ie8 .site-content .post-format a:before {
-       display: inline-block;
-       font: normal 16px/1 Genericons;
-       text-decoration: inherit;
-       vertical-align: text-bottom;
-}
-
-.ie8 .site-content .entry-meta > span {
-       margin-right: 10px;
-}
-
-.ie8 .site-content .format-video .post-format a:before {
-       content: "\f104";
-}
-
-.ie8 .site-content .format-audio .post-format a:before {
-       content: "\f109";
-}
-
-.ie8 .site-content .format-image .post-format a:before {
-       content: "\f473";
-       position: relative;
-       top: 1px;
-}
-
-.ie8 .site-content .format-quote .post-format a:before {
-       content: "\f106";
-       margin-right: 2px;
-}
-
-.ie8 .site-content .format-gallery .post-format a:before {
-       content: "\f103";
-       margin-right: 4px;
-}
-
-.ie8 .site-content .format-aside .post-format a:before {
-       content: "\f101";
-       margin-right: 2px;
-}
-
-.ie8 .site-content .format-link .post-format a:before {
-       content: "\f107";
-       position: relative;
-       top: 1px;
-}
-
-.ie8 .site-content .featured-post:before {
-       content: "\f308";
-       margin-right: 3px;
-       position: relative;
-       top: 1px;
-}
-
-.ie8 .site-content .entry-date a:before,
-.ie8 .attachment .site-content span.entry-date:before {
-       content: "\f303";
-       margin-right: 1px;
-       position: relative;
-       top: 1px;
-}
-
-.ie8 .site-content .byline a:before {
-       content: "\f304";
-}
-
-.ie8 .site-content .comments-link a:before {
-       content: "\f300";
-       margin-right: 2px;
-}
-
-.ie8 .entry-content .edit-link a:before,
-.ie8 .entry-meta .edit-link a:before {
-       content: "\f411";
-}
-
-.ie8 .site-content .full-size-link a:before {
-       content: "\f402";
-       margin-right: 1px;
-}
-
-.ie8 .site-content .parent-post-link a:before {
-       content: "\f301";
-}
-
-.ie8 .main-content {
-       float: left;
-}
-
-.ie8 .content-area {
-       float: left;
-       padding-top: 72px;
-       width: 100%;
-}
-
-.ie8 .site-content {
-       margin-right: 29.04761904%;
-       margin-left: 17.61904761%;
-}
-
-.ie8 .search-box-wrapper,
-.ie8 .featured-content {
-       padding-left: 17.61904761%;
-}
-
-.ie8 .header-main {
-       padding: 0 0 0 30px;
-}
-
-.ie8 .search-toggle {
-       margin-right: 0;
-}
-
-.ie8 .search-box .search-field {
-       width: 324px;
-}
-
-.ie8 .site-navigation li .current_page_item > a,
-.ie8 .site-navigation li .current_page_ancestor > a,
-.ie8 .site-navigation li .current-menu-item > a,
-.ie8 .site-navigation li .current-menu-ancestor > a {
-       background-color: #000;
-}
-
-.ie8 .primary-navigation {
-       float: right;
-       font-size: 11px;
-       margin: 0 1px 0 -10px;
-       padding: 0;
-       text-transform: uppercase;
-}
-
-.ie8 .primary-navigation .menu-toggle {
-       display: none;
-       padding: 0;
-}
-
-.ie8 .primary-navigation .nav-menu {
-       border-bottom: 0;
-       display: block;
-}
-
-.ie8 .primary-navigation.toggled-on {
-       border-bottom: 0;
-       margin: 0;
-       padding: 0;
-}
-
-.ie8 .primary-navigation li {
-       border: 0;
-       display: inline-block;
-       height: 48px;
-       line-height: 48px;
-       position: relative;
-}
-
-.ie8 .primary-navigation a {
-       display: inline-block;
-       padding: 0 10px;
-       white-space: nowrap;
-}
-
-.ie8 .primary-navigation ul ul {
-       background-color: #24890d;
-       float: left;
-       margin: 0;
-       position: absolute;
-       top: 48px;
-       left: -999em;
-       z-index: 99999;
-}
-
-.ie8 .primary-navigation li li {
-       border: 0;
-       display: block;
-       height: auto;
-       line-height: 1.0909090909;
-}
-
-.ie8 .primary-navigation ul ul ul {
-       left: -999em;
-       top: 0;
-}
-
-.ie8 .primary-navigation ul ul a {
-       padding: 18px 12px;
-       white-space: normal;
-       width: 176px;
-}
-
-.ie8 .primary-navigation li:hover > a,
-.ie8 .primary-navigation li.focus > a {
-       background-color: #24890d;
-       color: #fff;
-}
-
-.ie8 .primary-navigation ul ul a:hover,
-.ie8 .primary-navigation ul ul li.focus > a {
-       background-color: #41a62a;
-}
-
-.ie8 .primary-navigation ul li:hover > ul,
-.ie8 .primary-navigation ul li.focus > ul {
-       left: auto;
-}
-
-.ie8 .primary-navigation ul ul li:hover > ul,
-.ie8 .primary-navigation ul ul li.focus > ul {
-       left: 100%;
-}
-
-.ie8 .archive-header,
-.ie8 .page-header {
-       margin: 0 auto 60px;
-       padding: 0 10px;
-}
-
-.ie8 .site-content .has-post-thumbnail .entry-header {
-       margin-top: -48px;
-}
-
-.ie8 .archive-header,
-.ie8 .comments-area,
-.ie8 .image-navigation,
-.ie8 .page-header,
-.ie8 .page-content,
-.ie8 .post-navigation,
-.ie8 .site-content .entry-header,
-.ie8 .site-content .entry-content,
-.ie8 .site-content .entry-summary,
-.ie8 .site-content footer.entry-meta {
-       margin-right: 54px;
-       padding-right: 30px;
-       padding-left: 30px;
-}
-
-.ie8 .list-view .site-content .hentry:first-child,
-.ie8 .list-view .site-content .hentry.has-post-thumbnail {
-       border-top: 0;
-       padding-top: 0;
-}
-
-.ie8 .comment-list .trackback,
-.ie8 .comment-list .pingback,
-.ie8 .comment-list article {
-       margin-bottom: 36px;
-       padding-top: 36px;
-}
-
-.ie8 .comment-author .avatar {
-       height: 34px;
-       top: 2px;
-       width: 34px;
-}
-
-.ie8 .comment-author,
-.ie8 .comment-awaiting-moderation,
-.ie8 .comment-content,
-.ie8 .comment-list .reply,
-.ie8 .comment-metadata {
-       padding-left: 50px;
-}
-
-.ie8 .comment-list .children {
-       margin-left: 20px;
-}
-
-.ie8 .full-width .site-content {
-       margin-right: 0;
-}
-
-.ie8 .full-width .archive-header,
-.ie8 .full-width .comments-area,
-.ie8 .full-width .image-navigation,
-.ie8 .full-width .page-header,
-.ie8 .full-width .page-content,
-.ie8 .full-width .post-navigation,
-.ie8 .full-width .site-content .entry-header,
-.ie8 .full-width .site-content .entry-content,
-.ie8 .full-width .site-content .entry-summary,
-.ie8 .full-width .site-content footer.entry-meta {
-       padding-right: 30px;
-       padding-left: 30px;
-       margin-right: auto;
-}
-
-.ie8 .full-width .hentry.has-post-thumbnail:first-child {
-       margin-top: -72px;
-}
-
-
-.ie8 .singular .site-content .hentry.has-post-thumbnail {
-       margin-top: 0;
-}
-
-.ie8 .error404 .page-header {
-       margin-bottom: 24px;
-}
-
-.ie8 .contributor-avatar {
-       margin-left: -168px;
-}
-
-.ie8 .contributor-summary {
-       float: left;
-}
-
-.ie8 .site:before {
-       background-color: #000;
-       content: "";
-       display: block;
-       height: 100%;
-       min-height: 100%;
-       position: absolute;
-       top: 0;
-       left: 0;
-       width: 17.61904761%;
-       z-index: 2;
-}
-
-.ie8 #secondary {
-       border: 0;
-       clear: none;
-       color: #b3b3b3;
-       float: left;
-       margin: 0 0 0 -100%;
-       min-height: 100vh;
-       padding: 0 30px;
-       width: 12.85714285%;
-}
-
-.ie8 .site-description {
-       display: block;
-       margin: -3px 0 21px;
-}
-
-.ie8 .secondary-navigation {
-       font-size: 11px;
-       margin: 0 -30px 48px;
-       width: calc(100% + 60px);
-}
-
-.ie8 .secondary-navigation li {
-       border-top: 1px solid #4d4d4d;
-       position: relative;
-}
-
-.ie8 .secondary-navigation a {
-       padding: 10px 30px;
-}
-
-.ie8 .secondary-navigation ul ul {
-       background-color: #24890d;
-       position: absolute;
-       top: 0;
-       left: -999em;
-       width: 222px;
-       z-index: 99999;
-}
-
-.ie8 .secondary-navigation li li {
-       border-top: 0;
-}
-
-.ie8 .secondary-navigation li:hover > a,
-.ie8 .secondary-navigation li.focus > a {
-       background-color: #24890d;
-       color: #fff;
-}
-
-.ie8 .secondary-navigation ul ul a:hover,
-.ie8 .secondary-navigation ul ul li.focus > a {
-       background-color: #41a62a;
-}
-
-.ie8 .secondary-navigation ul li:hover > ul,
-.ie8 .secondary-navigation ul li.focus > ul {
-       left: 202px;
-}
-
-.ie8 .content-sidebar {
-       border: 0;
-       float: right;
-       margin-left: -29.04761904%;
-       padding: 72px 30px 24px;
-       width: 29.04761904%;
-}
-
-.ie8 #supplementary {
-       padding: 0;
-}
-
-.ie8 .footer-sidebar {
-       font-size: 12px;
-       line-height: 1.5;
-}
-
-.ie8 .footer-sidebar .widget,
-.ie8 .primary-sidebar .widget {
-       font-size: 12px;
-       line-height: 1.5;
-}
-
-.ie8 .footer-sidebar .widget {
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       float: left;
-       padding: 0 30px;
-       width: 25%;
-}
-
-.ie8 .footer-sidebar .widget h1,
-.ie8 .primary-sidebar .widget h1 {
-       font-size: 20px;
-       line-height: 1.2;
-}
-
-.ie8 .footer-sidebar .widget h2,
-.ie8 .primary-sidebar .widget h2 {
-       font-size: 18px;
-       line-height: 1.3333333333;
-}
-
-.ie8 .footer-sidebar .widget h3,
-.ie8 .primary-sidebar .widget h3 {
-       font-size: 16px;
-       line-height: 1.5;
-}
-
-.ie8 .footer-sidebar .widget h4,
-.ie8 .primary-sidebar .widget h4 {
-       font-size: 14px;
-       line-height: 1.7142857142;
-}
-
-.ie8 .footer-sidebar .widget h5,
-.ie8 .primary-sidebar .widget h5 {
-       font-size: 12px;
-       line-height: 2;
-}
-
-.ie8 .footer-sidebar .widget h6,
-.ie8 .primary-sidebar .widget h6 {
-       font-size: 11px;
-       line-height: 2.1818181818;
-}
-
-.ie8 .footer-sidebar .widget code,
-.ie8 .footer-sidebar .widget kbd,
-.ie8 .footer-sidebar .widget tt,
-.ie8 .footer-sidebar .widget var,
-.ie8 .footer-sidebar .widget samp,
-.ie8 .footer-sidebar .widget pre,
-.ie8 .primary-sidebar .widget code,
-.ie8 .primary-sidebar .widget kbd,
-.ie8 .primary-sidebar .widget tt,
-.ie8 .primary-sidebar .widget var,
-.ie8 .primary-sidebar .widget samp,
-.ie8 .primary-sidebar .widget pre {
-       font-size: 11px;
-       line-height: 1.6363636363;
-}
-
-.ie8 .footer-sidebar .widget blockquote,
-.ie8 .primary-sidebar .widget blockquote {
-       font-size: 14px;
-       line-height: 1.2857142857;
-}
-
-.ie8 .footer-sidebar .widget blockquote cite,
-.ie8 .primary-sidebar .widget blockquote cite {
-       font-size: 12px;
-       line-height: 1.5;
-}
-
-.ie8 .footer-sidebar .widget input,
-.ie8 .footer-sidebar .widget textarea,
-.ie8 .primary-sidebar .widget input,
-.ie8 .primary-sidebar .widget textarea {
-       font-size: 12px;
-       padding: 3px 2px 4px 4px;
-}
-
-.ie8 .footer-sidebar .widget input[type="button"],
-.ie8 .footer-sidebar .widget input[type="reset"],
-.ie8 .footer-sidebar .widget input[type="submit"],
-.ie8 .primary-sidebar .widget input[type="button"],
-.ie8 .primary-sidebar .widget input[type="reset"],
-.ie8 .primary-sidebar .widget input[type="submit"] {
-       padding: 5px 15px 4px;
-}
-
-.ie8 .footer-sidebar .widget .widget-title,
-.ie8 .primary-sidebar .widget .widget-title {
-       font-size: 11px;
-       font-weight: 700;
-       line-height: 1.6363636363;
-       margin-bottom: 18px;
-}
-
-.ie8 .footer-sidebar .widget_twentyfourteen_ephemera .entry-title,
-.ie8 .footer-sidebar .widget_twentyfourteen_ephemera .entry-meta,
-.ie8 .footer-sidebar .widget_twentyfourteen_ephemera .wp-caption-text,
-.ie8 .footer-sidebar .widget_twentyfourteen_ephemera .post-format-archive-link,
-.ie8 .footer-sidebar .widget_twentyfourteen_ephemera .entry-content table,
-.ie8 .primary-sidebar .widget_twentyfourteen_ephemera .entry-title,
-.ie8 .primary-sidebar .widget_twentyfourteen_ephemera .entry-meta,
-.ie8 .primary-sidebar .widget_twentyfourteen_ephemera .wp-caption-text,
-.ie8 .primary-sidebar .widget_twentyfourteen_ephemera .post-format-archive-link,
-.ie8 .primary-sidebar .widget_twentyfourteen_ephemera .entry-content table {
-       font-size: 11px;
-       line-height: 1.6363636363;
-}
-
-.ie8 .footer-sidebar .widget_archive li,
-.ie8 .footer-sidebar .widget_categories li,
-.ie8 .footer-sidebar .widget_links li,
-.ie8 .footer-sidebar .widget_meta li,
-.ie8 .footer-sidebar .widget_nav_menu li,
-.ie8 .footer-sidebar .widget_pages li,
-.ie8 .footer-sidebar .widget_recent_comments li,
-.ie8 .footer-sidebar .widget_recent_entries li,
-.ie8 .primary-sidebar .widget_archive li,
-.ie8 .primary-sidebar .widget_categories li,
-.ie8 .primary-sidebar .widget_links li,
-.ie8 .primary-sidebar .widget_meta li,
-.ie8 .primary-sidebar .widget_nav_menu li,
-.ie8 .primary-sidebar .widget_pages li,
-.ie8 .primary-sidebar .widget_recent_comments li,
-.ie8 .primary-sidebar .widget_recent_entries li {
-       border-top: 0;
-       padding: 0 0 6px;
-}
-
-.ie8 .footer-sidebar .widget_categories li ul,
-.ie8 .footer-sidebar .widget_nav_menu li ul,
-.ie8 .footer-sidebar .widget_pages li ul,
-.ie8 .primary-sidebar .widget_categories li ul,
-.ie8 .primary-sidebar .widget_nav_menu li ul,
-.ie8 .primary-sidebar .widget_pages li ul {
-       border-top: 0;
-       margin-top: 0;
-}
-
-.ie8 .grid .featured-content .entry-header {
-       border-color: #000;
-       border-style: solid;
-       border-width: 12px 10px;
-       height: 96px;
-       padding: 0;
-}
-
-.ie8 .featured-content {
-       padding-left: 17.61904761%;
-}
-
-.ie8 .grid .featured-content .hentry {
-       float: left;
-       width: 33.3333333%;
-}
-
-.ie8 .grid .featured-content .hentry:nth-child( 3n+1 ) {
-       clear: both;
-}
-
-.ie8 .grid .featured-content .entry-header {
-       height: 120px;
-}
-
-.ie8 .slider .featured-content .entry-title {
-       font-size: 33px;
-       line-height: 1.0909090909;
-}
-
-.ie8 .slider .featured-content .entry-header {
-       min-height: inherit;
-       padding: 24px 30px 48px;
-       position: absolute;
-       left: 0;
-       bottom: 0;
-       width: 50%;
-       z-index: 3;
-}
-
-.ie8 .slider-control-paging {
-       background: transparent;
-       margin-top: -48px;
-       padding-left: 24px;
-       width: 50%;
-}
-
-.ie8 .slider-control-paging li {
-       margin: 12px 12px 12px 0;
-}
-
-.ie8 .slider-control-paging a {
-       height: 24px;
-       width: 24px;
-}
-
-.ie8 .slider-control-paging a:before {
-       top: 6px;
-       left: 6px;
-}
-
-.ie8 .slider-direction-nav {
-       clear: none;
-       float: right;
-       margin-top: -48px;
-       width: 98px;
-}
-
-.ie8 .slider-direction-nav li:first-child {
-       padding: 0 1px 0 0;
-}
-
-.ie8 .slider-direction-nav li {
-       border: 0;
-       padding: 0 0 0 1px;
-}
-
-.ie8 .slider-direction-nav a {
-       height: 48px;
-}
-
-.ie8 .slider-direction-nav a:before {
-       line-height: 48px;
-}
-
-
-/**
- * Internet Explorer 7
- */
-
-.ie7 audio,
-.ie7 canvas,
-.ie7 video {
-       display: inline;
-       zoom: 1;
-}
-
-.ie7 button,
-.ie7 input,
-.ie7 select,
-.ie7 textarea {
-       vertical-align: middle;
-}
-
-.ie7 button,
-.ie7 input[type="button"],
-.ie7 input[type="reset"],
-.ie7 input[type="submit"] {
-       overflow: visible;
-}
-
-.ie7 .screen-reader-text {
-       clip: rect(1px 1px 1px 1px);
-}
-
-.ie7 .site,
-.ie7 .site-header {
-       max-width: 100%;
-}
-
-.ie7 .search-toggle {
-       line-height: 45px;
-       margin-right: 190px;
-       padding: 0 20px;
-       text-transform: uppercase;
-       width: auto;
-}
-
-.ie7 .search-toggle .screen-reader-text {
-       color: #fff;
-       position: relative; /* Override inherited `absolute` value set in style.css. */
-}
-
-.ie7 .search-box {
-       height: 24px;
-       padding: 12px 0;
-}
-
-.ie7 .search-box .search-field {
-       margin: 0 10px;
-       width: 33%;
-}
-
-.ie7 .site-navigation li {
-       border-top: 1px solid #4d4d4d;
-}
-
-.ie7 .primary-navigation .nav-menu,
-.ie7 .secondary-navigation {
-       border-bottom: 1px solid #4d4d4d;
-}
-
-.ie7 .secondary-navigation {
-       margin: 48px auto;
-       max-width: 474px
-}
-
-.ie7 .content-area {
-       padding-top: 48px;
-}
-
-.ie7 .hentry {
-       max-width: 100%;
-}
-
-.ie7 .menu-toggle {
-       color: #fff;
-       font-weight: 400;
-       font-size: 16px;
-       line-height: 45px;
-       text-transform: uppercase;
-       width: 200px;
-}
-
-.ie7 .post-thumbnail img {
-       display: block;
-       margin: 0 auto;
-}
-
-.ie7 .entry-meta .tag-links a {
-       margin-left: 0;
-}
-
-.ie7 .content-sidebar {
-       padding: 48px 10px;
-}
-
-.ie7 .singular .hentry.has-post-thumbnail {
-       margin-top: -48px;
-}
-
-.ie7 .entry-meta > span,
-.ie7 .widget_twentyfourteen_ephemera .entry-title {
-       margin-right: 20px;
-}
-
-.ie7 #secondary {
-       border-bottom: 1px solid #4d4d4d;
-}
-
-.ie7 .content-sidebar {
-       border-top: 1px solid #e5e5e5;
-       border-bottom: 1px solid #e5e5e5;
-}
-
-.ie7 .widget {
-       margin: 0 auto 48px;
-       max-width: 474px;
-}
-
-.ie7 .content-sidebar .widget_twentyfourteen_ephemera .widget-title {
-       padding-top: 7px;
-}
-
-.ie7 .slider .featured-content .hentry {
-       display: block;
-}
-
-.ie7 .featured-content .entry-header {
-       min-height: 0;
-}
-
-.ie7 .slider-control-paging a {
-       line-height: 40px;
-       text-indent: 0;
-}
-
-.ie7 .slider-control-paging .slider-active {
-       color: #41a62a;
-}
-
-.ie7 .slider-direction-nav {
-       border-top: 2px solid #fff;
-}
-
-.ie7 .slider-direction-nav li {
-       border: 0;
-       width: 49%;
-}
-
-.ie7 .slider-direction-nav a {
-       font-size: 16px;
-       line-height: 45px;
-       text-transform: uppercase;
-}
-
-.ie7 .slider-direction-nav a:hover {
-       background-color: #000;
-       color: #41a62a;
-}
-
-.ie7 .search-toggle {
-       line-height: 45px;
-       margin-right: 190px;
-}
-
-.ie7 .featured-content .post-thumbnail,
-.ie7 .slider .featured-content .post-thumbnail {
-       padding-top: 0;
-}
-
-.ie7 .featured-content .post-thumbnail img {
-       position: relative;
-}
-
-.ie7 .featured-content .entry-header {
-       width: auto;
-}
-
-.ie7 .grid .featured-content .hentry {
-       float: left;
-       margin: 0 auto;
-       max-width: 672px;
-       width: 33.333333%;
-}
-
-.ie7 .slider .featured-content .entry-header {
-       margin: 0 auto;
-       max-width: 1038px;
-}
-
-.ie7 .slider-control-paging {
-       float: none;
-       margin: -24px auto 0;
-       max-width: 1038px;
-       width: auto;
-}
-
-
-/**
- * RTL for Internet Explorer 8 & 7
- */
-
-.rtl .attachment a,
-.rtl .gallery a,
-.rtl .wp-caption a,
-.rtl .widget_twentyfourteen_ephemera .entry-content a {
-       display: inline;
-}
-
-
-/**
- * RTL overrides for Internet Explorer 8
- */
-
-.ie8 .rtl .site-content .entry-meta > span {
-       margin-right: auto;
-       margin-left: 10px;
-}
-
-.ie8 .rtl .site-content .format-quote .post-format a:before {
-       margin-right: auto;
-       margin-left: 2px;
-}
-
-.ie8 .rtl .site-content .format-gallery .post-format a:before {
-       margin-right: auto;
-       margin-left: 4px;
-}
-
-.ie8 .rtl .site-content .format-aside .post-format a:before {
-       margin-right: auto;
-       margin-left: 2px;
-}
-
-.ie8 .rtl .site-content .featured-post:before {
-       margin-right: auto;
-       margin-left: 3px;
-}
-
-.ie8 .rtl .site-content .entry-date a:before,
-.ie8 .rtl .attachment .site-content span.entry-date:before {
-       margin-right: auto;
-       margin-left: 1px;
-}
-
-.ie8 .rtl .site-content .comments-link a:before {
-       margin-right: auto;
-       margin-left: 2px;
-}
-
-.ie8 .rtl .site-content .full-size-link a:before {
-       margin-right: auto;
-       margin-left: 1px;
-}
-
-.ie8 .rtl .main-content {
-       float: right;
-}
-
-.ie8 .rtl .content-area {
-       float: right;
-}
-
-.ie8 .rtl .site-content {
-       margin-right: 17.61904761%;
-       margin-left: 29.04761904%;
-}
-
-.ie8 .rtl .search-box-wrapper,
-.ie8 .rtl .featured-content {
-       padding-right: 17.61904761%;
-       padding-left: 0;
-}
-
-.ie8 .rtl .header-main {
-       padding: 0 30px 0 0;
-}
-
-.ie8 .rtl .search-toggle {
-       margin-right: auto;
-       margin-left: 0;
-}
-
-.ie8 .rtl .primary-navigation {
-       float: left;
-       margin: 0 -10px 0 1px;
-}
-
-.ie8 .rtl .primary-navigation ul ul {
-       float: right;
-       right: -999em;
-       left: auto;
-}
-
-.ie8 .rtl .primary-navigation ul ul ul {
-       right: -999em;
-       left: auto;
-}
-
-.ie8 .rtl .primary-navigation ul li:hover > ul,
-.ie8 .rtl .primary-navigation ul li.focus > ul {
-       right: auto;
-       left: auto;
-}
-
-.ie8 .rtl .primary-navigation ul ul li:hover > ul,
-.ie8 .rtl .primary-navigation ul ul li.focus > ul {
-       right: 100%;
-       left: auto;
-}
-
-.ie8 .rtl .entry-meta .tag-links a:before {
-       right: -8px;
-}
-
-.ie8 .rtl .archive-header,
-.ie8 .rtl .comments-area,
-.ie8 .rtl .image-navigation,
-.ie8 .rtl .page-header,
-.ie8 .rtl .page-content,
-.ie8 .rtl .post-navigation,
-.ie8 .rtl .site-content .entry-header,
-.ie8 .rtl .site-content .entry-content,
-.ie8 .rtl .site-content .entry-summary,
-.ie8 .rtl .site-content footer.entry-meta {
-       margin-right: auto;
-       margin-left: 54px;
-}
-
-.ie8 .rtl .comment-author,
-.ie8 .rtl .comment-awaiting-moderation,
-.ie8 .rtl .comment-content,
-.ie8 .rtl .comment-list .reply,
-.ie8 .rtl .comment-metadata {
-       padding-right: 50px;
-       padding-left: 0;
-}
-
-.ie8 .rtl .comment-list .children {
-       margin-right: 20px;
-       margin-left: auto;
-}
-
-
-.ie8 .rtl.full-width .site-content {
-       margin-left: 0;
-}
-
-.ie8 .rtl.full-width .archive-header,
-.ie8 .rtl.full-width .comments-area,
-.ie8 .rtl.full-width .image-navigation,
-.ie8 .rtl.full-width .page-header,
-.ie8 .rtl.full-width .page-content,
-.ie8 .rtl.full-width .post-navigation,
-.ie8 .rtl.full-width .site-content .entry-header,
-.ie8 .rtl.full-width .site-content .entry-content,
-.ie8 .rtl.full-width .site-content .entry-summary,
-.ie8 .rtl.full-width .site-content footer.entry-meta {
-       margin-left: auto;
-}
-
-.ie8 .rtl .contributor-avatar {
-       margin-right: -168px;
-       margin-left: auto;
-}
-
-.ie8 .rtl .contributor-summary {
-       float: right;
-}
-
-.ie8 .rtl .site:before {
-       right: 0;
-       left: auto;
-}
-
-.ie8 .rtl #secondary {
-       float: right;
-       margin: 0 -100% 0 0;
-}
-
-.ie8 .rtl .secondary-navigation ul ul {
-       right: -999em;
-       left: auto;
-}
-
-.ie8 .rtl .secondary-navigation ul li:hover > ul,
-.ie8 .rtl .secondary-navigation ul li.focus > ul {
-       right: 202px;
-       left: auto;
-}
-
-.ie8 .rtl .content-sidebar {
-       float: left;
-       margin-right: -29.04761904%;
-       margin-left: auto;
-}
-
-.ie8 .rtl .footer-sidebar .widget {
-       float: right;
-}
-
-.ie8 .rtl .featured-content {
-       padding-right: 17.61904761%;
-       padding-left: 0;
-}
-
-.ie8 .rtl.grid .featured-content .hentry {
-       float: right;
-}
-
-.ie8 .rtl.slider .featured-content .entry-header {
-       right: 0;
-       left: auto;
-}
-
-.ie8 .rtl .slider-control-paging {
-       padding-right: 24px;
-       padding-left: 0;
-}
-
-.ie8 .rtl .slider-control-paging li {
-       margin: 12px 0 12px 12px;
-}
-
-.ie8 .rtl .slider-control-paging a:before {
-       right: 6px;
-       left: auto;
-}
-
-.ie8 .rtl .slider-direction-nav {
-       float: left;
-}
-
-.ie8 .rtl .slider-direction-nav li {
-       padding: 0 1px 0 0;
-}
-
-.ie8 .rtl .slider-direction-nav li:first-child {
-       padding: 0 0 0 1px;
-}
-
-
-/**
- * RTL overrides for Internet Explorer 7
- */
-
-.ie7 .rtl.grid .featured-content .hentry {
-       float: right;
-}
-
-.ie7 .rtl .slider-control-paging {
-       float: none;
-       margin: -24px auto 0;
-}
-
-.ie7 .rtl .entry-meta .tag-links a {
-       margin-right: 0;
-       margin-left: auto;
-}
-
-.ie7 .rtl .search-toggle {
-       margin-right: auto;
-       margin-left: 190px;
-}
\ No newline at end of file
diff --git a/wp-content/themes/twentyfourteen/featured-content.php b/wp-content/themes/twentyfourteen/featured-content.php
deleted file mode 100644 (file)
index c56edf3..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/**
- * The template for displaying featured content
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-<div id="featured-content" class="featured-content">
-       <div class="featured-content-inner">
-       <?php
-               /**
-                * Fires before the Twenty Fourteen featured content.
-                *
-                * @since Twenty Fourteen 1.0
-                */
-               do_action( 'twentyfourteen_featured_posts_before' );
-
-               $featured_posts = twentyfourteen_get_featured_posts();
-               foreach ( (array) $featured_posts as $order => $post ) :
-                       setup_postdata( $post );
-
-                       // Include the featured content template.
-                       get_template_part( 'content', 'featured-post' );
-               endforeach;
-
-               /**
-                * Fires after the Twenty Fourteen featured content.
-                *
-                * @since Twenty Fourteen 1.0
-                */
-               do_action( 'twentyfourteen_featured_posts_after' );
-
-               wp_reset_postdata();
-       ?>
-       </div><!-- .featured-content-inner -->
-</div><!-- #featured-content .featured-content -->
diff --git a/wp-content/themes/twentyfourteen/footer.php b/wp-content/themes/twentyfourteen/footer.php
deleted file mode 100644 (file)
index 519e128..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/**
- * The template for displaying the footer
- *
- * Contains footer content and the closing of the #main and #page div elements.
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-
-               </div><!-- #main -->
-
-               <footer id="colophon" class="site-footer" role="contentinfo">
-
-                       <?php get_sidebar( 'footer' ); ?>
-
-                       <div class="site-info">
-                               <?php do_action( 'twentyfourteen_credits' ); ?>
-                               <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfourteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyfourteen' ), 'WordPress' ); ?></a>
-                       </div><!-- .site-info -->
-               </footer><!-- #colophon -->
-       </div><!-- #page -->
-
-       <?php wp_footer(); ?>
-</body>
-</html>
\ No newline at end of file
diff --git a/wp-content/themes/twentyfourteen/functions.php b/wp-content/themes/twentyfourteen/functions.php
deleted file mode 100644 (file)
index f85ef1c..0000000
+++ /dev/null
@@ -1,522 +0,0 @@
-<?php
-/**
- * Twenty Fourteen functions and definitions
- *
- * Set up the theme and provides some helper functions, which are used in the
- * theme as custom template tags. Others are attached to action and filter
- * hooks in WordPress to change core functionality.
- *
- * When using a child theme you can override certain functions (those wrapped
- * in a function_exists() call) by defining them first in your child theme's
- * functions.php file. The child theme's functions.php file is included before
- * the parent theme's file, so the child theme functions would be used.
- *
- * @link https://codex.wordpress.org/Theme_Development
- * @link https://codex.wordpress.org/Child_Themes
- *
- * Functions that are not pluggable (not wrapped in function_exists()) are
- * instead attached to a filter or action hook.
- *
- * For more information on hooks, actions, and filters,
- * @link https://codex.wordpress.org/Plugin_API
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-/**
- * Set up the content width value based on the theme's design.
- *
- * @see twentyfourteen_content_width()
- *
- * @since Twenty Fourteen 1.0
- */
-if ( ! isset( $content_width ) ) {
-       $content_width = 474;
-}
-
-/**
- * Twenty Fourteen only works in WordPress 3.6 or later.
- */
-if ( version_compare( $GLOBALS['wp_version'], '3.6', '<' ) ) {
-       require get_template_directory() . '/inc/back-compat.php';
-}
-
-if ( ! function_exists( 'twentyfourteen_setup' ) ) :
-/**
- * Twenty Fourteen setup.
- *
- * Set up theme defaults and registers support for various WordPress features.
- *
- * Note that this function is hooked into the after_setup_theme hook, which
- * runs before the init hook. The init hook is too late for some features, such
- * as indicating support post thumbnails.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_setup() {
-
-       /*
-        * Make Twenty Fourteen available for translation.
-        *
-        * 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' );
-
-       // 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' ) );
-
-       // Add RSS feed links to <head> for posts and comments.
-       add_theme_support( 'automatic-feed-links' );
-
-       // Enable support for Post Thumbnails, and declare two sizes.
-       add_theme_support( 'post-thumbnails' );
-       set_post_thumbnail_size( 672, 372, true );
-       add_image_size( 'twentyfourteen-full-width', 1038, 576, true );
-
-       // This theme uses wp_nav_menu() in two locations.
-       register_nav_menus( array(
-               'primary'   => __( 'Top primary menu', 'twentyfourteen' ),
-               'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ),
-       ) );
-
-       /*
-        * Switch default core markup for search form, comment form, and comments
-        * to output valid HTML5.
-        */
-       add_theme_support( 'html5', array(
-               'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
-       ) );
-
-       /*
-        * Enable support for Post Formats.
-        * See https://codex.wordpress.org/Post_Formats
-        */
-       add_theme_support( 'post-formats', array(
-               'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery',
-       ) );
-
-       // This theme allows users to set a custom background.
-       add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array(
-               'default-color' => 'f5f5f5',
-       ) ) );
-
-       // Add support for featured content.
-       add_theme_support( 'featured-content', array(
-               'featured_content_filter' => 'twentyfourteen_get_featured_posts',
-               'max_posts' => 6,
-       ) );
-
-       // This theme uses its own gallery styles.
-       add_filter( 'use_default_gallery_style', '__return_false' );
-
-       // Indicate widget sidebars can use selective refresh in the Customizer.
-       add_theme_support( 'customize-selective-refresh-widgets' );
-}
-endif; // twentyfourteen_setup
-add_action( 'after_setup_theme', 'twentyfourteen_setup' );
-
-/**
- * Adjust content_width value for image attachment template.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_content_width() {
-       if ( is_attachment() && wp_attachment_is_image() ) {
-               $GLOBALS['content_width'] = 810;
-       }
-}
-add_action( 'template_redirect', 'twentyfourteen_content_width' );
-
-/**
- * Getter function for Featured Content Plugin.
- *
- * @since Twenty Fourteen 1.0
- *
- * @return array An array of WP_Post objects.
- */
-function twentyfourteen_get_featured_posts() {
-       /**
-        * Filter the featured posts to return in Twenty Fourteen.
-        *
-        * @since Twenty Fourteen 1.0
-        *
-        * @param array|bool $posts Array of featured posts, otherwise false.
-        */
-       return apply_filters( 'twentyfourteen_get_featured_posts', array() );
-}
-
-/**
- * A helper conditional function that returns a boolean value.
- *
- * @since Twenty Fourteen 1.0
- *
- * @return bool Whether there are featured posts.
- */
-function twentyfourteen_has_featured_posts() {
-       return ! is_paged() && (bool) twentyfourteen_get_featured_posts();
-}
-
-/**
- * Register three Twenty Fourteen widget areas.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_widgets_init() {
-       require get_template_directory() . '/inc/widgets.php';
-       register_widget( 'Twenty_Fourteen_Ephemera_Widget' );
-
-       register_sidebar( array(
-               'name'          => __( 'Primary Sidebar', 'twentyfourteen' ),
-               'id'            => 'sidebar-1',
-               'description'   => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
-               'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-               'after_widget'  => '</aside>',
-               'before_title'  => '<h1 class="widget-title">',
-               'after_title'   => '</h1>',
-       ) );
-       register_sidebar( array(
-               'name'          => __( 'Content Sidebar', 'twentyfourteen' ),
-               'id'            => 'sidebar-2',
-               'description'   => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ),
-               'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-               'after_widget'  => '</aside>',
-               'before_title'  => '<h1 class="widget-title">',
-               'after_title'   => '</h1>',
-       ) );
-       register_sidebar( array(
-               'name'          => __( 'Footer Widget Area', 'twentyfourteen' ),
-               'id'            => 'sidebar-3',
-               'description'   => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),
-               'before_widget' => '<aside id="%1$s" class="widget %2$s">',
-               'after_widget'  => '</aside>',
-               'before_title'  => '<h1 class="widget-title">',
-               'after_title'   => '</h1>',
-       ) );
-}
-add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
-
-/**
- * Register Lato Google font for Twenty Fourteen.
- *
- * @since Twenty Fourteen 1.0
- *
- * @return string
- */
-function twentyfourteen_font_url() {
-       $font_url = '';
-       /*
-        * 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.
-        */
-       if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) {
-               $query_args = array(
-                       'family' => urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ),
-                       'subset' => urlencode( 'latin,latin-ext' ),
-               );
-               $font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
-       }
-
-       return $font_url;
-}
-
-/**
- * Enqueue scripts and styles for the front end.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_scripts() {
-       // Add Lato font, used in the main stylesheet.
-       wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null );
-
-       // Add Genericons font, used in the main stylesheet.
-       wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.0.3' );
-
-       // Load our main stylesheet.
-       wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri() );
-
-       // Load the Internet Explorer specific stylesheet.
-       wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131205' );
-       wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' );
-
-       if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
-               wp_enqueue_script( 'comment-reply' );
-       }
-
-       if ( is_singular() && wp_attachment_is_image() ) {
-               wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' );
-       }
-
-       if ( is_active_sidebar( 'sidebar-3' ) ) {
-               wp_enqueue_script( 'jquery-masonry' );
-       }
-
-       if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) {
-               wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131205', true );
-               wp_localize_script( 'twentyfourteen-slider', 'featuredSliderDefaults', array(
-                       'prevText' => __( 'Previous', 'twentyfourteen' ),
-                       'nextText' => __( 'Next', 'twentyfourteen' )
-               ) );
-       }
-
-       wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150315', true );
-}
-add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
-
-/**
- * Enqueue Google fonts style to admin screen for custom header display.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_admin_fonts() {
-       wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null );
-}
-add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen_admin_fonts' );
-
-if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) :
-/**
- * Print the attached image with a link to the next attached image.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_the_attached_image() {
-       $post                = get_post();
-       /**
-        * Filter the default Twenty Fourteen attachment size.
-        *
-        * @since Twenty Fourteen 1.0
-        *
-        * @param array $dimensions {
-        *     An array of height and width dimensions.
-        *
-        *     @type int $height Height of the image in pixels. Default 810.
-        *     @type int $width  Width of the image in pixels. Default 810.
-        * }
-        */
-       $attachment_size     = apply_filters( 'twentyfourteen_attachment_size', array( 810, 810 ) );
-       $next_attachment_url = wp_get_attachment_url();
-
-       /*
-        * Grab the IDs of all the image attachments in a gallery so we can get the URL
-        * of the next adjacent image in a gallery, or the first image (if we're
-        * looking at the last image in a gallery), or, in a gallery of one, just the
-        * link to that image file.
-        */
-       $attachment_ids = get_posts( array(
-               'post_parent'    => $post->post_parent,
-               'fields'         => 'ids',
-               'numberposts'    => -1,
-               'post_status'    => 'inherit',
-               'post_type'      => 'attachment',
-               'post_mime_type' => 'image',
-               'order'          => 'ASC',
-               'orderby'        => 'menu_order ID',
-       ) );
-
-       // If there is more than 1 attachment in a gallery...
-       if ( count( $attachment_ids ) > 1 ) {
-               foreach ( $attachment_ids as $idx => $attachment_id ) {
-                       if ( $attachment_id == $post->ID ) {
-                               $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ];
-                               break;
-                       }
-               }
-
-               // get the URL of the next image attachment...
-               if ( $next_id ) {
-                       $next_attachment_url = get_attachment_link( $next_id );
-               }
-
-               // or get the URL of the first image attachment.
-               else {
-                       $next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
-               }
-       }
-
-       printf( '<a href="%1$s" rel="attachment">%2$s</a>',
-               esc_url( $next_attachment_url ),
-               wp_get_attachment_image( $post->ID, $attachment_size )
-       );
-}
-endif;
-
-if ( ! function_exists( 'twentyfourteen_list_authors' ) ) :
-/**
- * Print a list of all site contributors who published at least one post.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_list_authors() {
-       $contributor_ids = get_users( array(
-               'fields'  => 'ID',
-               'orderby' => 'post_count',
-               'order'   => 'DESC',
-               'who'     => 'authors',
-       ) );
-
-       foreach ( $contributor_ids as $contributor_id ) :
-               $post_count = count_user_posts( $contributor_id );
-
-               // Move on if user has not published a post (yet).
-               if ( ! $post_count ) {
-                       continue;
-               }
-       ?>
-
-       <div class="contributor">
-               <div class="contributor-info">
-                       <div class="contributor-avatar"><?php echo get_avatar( $contributor_id, 132 ); ?></div>
-                       <div class="contributor-summary">
-                               <h2 class="contributor-name"><?php echo get_the_author_meta( 'display_name', $contributor_id ); ?></h2>
-                               <p class="contributor-bio">
-                                       <?php echo get_the_author_meta( 'description', $contributor_id ); ?>
-                               </p>
-                               <a class="button contributor-posts-link" href="<?php echo esc_url( get_author_posts_url( $contributor_id ) ); ?>">
-                                       <?php printf( _n( '%d Article', '%d Articles', $post_count, 'twentyfourteen' ), $post_count ); ?>
-                               </a>
-                       </div><!-- .contributor-summary -->
-               </div><!-- .contributor-info -->
-       </div><!-- .contributor -->
-
-       <?php
-       endforeach;
-}
-endif;
-
-/**
- * Extend the default WordPress body classes.
- *
- * Adds body classes to denote:
- * 1. Single or multiple authors.
- * 2. Presence of header image except in Multisite signup and activate pages.
- * 3. Index views.
- * 4. Full-width content layout.
- * 5. Presence of footer widgets.
- * 6. Single views.
- * 7. Featured content layout.
- *
- * @since Twenty Fourteen 1.0
- *
- * @param array $classes A list of existing body class values.
- * @return array The filtered body class list.
- */
-function twentyfourteen_body_classes( $classes ) {
-       if ( is_multi_author() ) {
-               $classes[] = 'group-blog';
-       }
-
-       if ( get_header_image() ) {
-               $classes[] = 'header-image';
-       } elseif ( ! in_array( $GLOBALS['pagenow'], array( 'wp-activate.php', 'wp-signup.php' ) ) ) {
-               $classes[] = 'masthead-fixed';
-       }
-
-       if ( is_archive() || is_search() || is_home() ) {
-               $classes[] = 'list-view';
-       }
-
-       if ( ( ! is_active_sidebar( 'sidebar-2' ) )
-               || is_page_template( 'page-templates/full-width.php' )
-               || is_page_template( 'page-templates/contributors.php' )
-               || is_attachment() ) {
-               $classes[] = 'full-width';
-       }
-
-       if ( is_active_sidebar( 'sidebar-3' ) ) {
-               $classes[] = 'footer-widgets';
-       }
-
-       if ( is_singular() && ! is_front_page() ) {
-               $classes[] = 'singular';
-       }
-
-       if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) {
-               $classes[] = 'slider';
-       } elseif ( is_front_page() ) {
-               $classes[] = 'grid';
-       }
-
-       return $classes;
-}
-add_filter( 'body_class', 'twentyfourteen_body_classes' );
-
-/**
- * Extend the default WordPress post classes.
- *
- * Adds a post class to denote:
- * Non-password protected page with a post thumbnail.
- *
- * @since Twenty Fourteen 1.0
- *
- * @param array $classes A list of existing post class values.
- * @return array The filtered post class list.
- */
-function twentyfourteen_post_classes( $classes ) {
-       if ( ! post_password_required() && ! is_attachment() && has_post_thumbnail() ) {
-               $classes[] = 'has-post-thumbnail';
-       }
-
-       return $classes;
-}
-add_filter( 'post_class', 'twentyfourteen_post_classes' );
-
-/**
- * Create a nicely formatted and more specific title element text for output
- * in head of document, based on current view.
- *
- * @since Twenty Fourteen 1.0
- *
- * @global int $paged WordPress archive pagination page count.
- * @global int $page  WordPress paginated post page count.
- *
- * @param string $title Default title text for current view.
- * @param string $sep Optional separator.
- * @return string The filtered title.
- */
-function twentyfourteen_wp_title( $title, $sep ) {
-       global $paged, $page;
-
-       if ( is_feed() ) {
-               return $title;
-       }
-
-       // Add the site name.
-       $title .= get_bloginfo( 'name', 'display' );
-
-       // Add the site description for the home/front page.
-       $site_description = get_bloginfo( 'description', 'display' );
-       if ( $site_description && ( is_home() || is_front_page() ) ) {
-               $title = "$title $sep $site_description";
-       }
-
-       // Add a page number if necessary.
-       if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
-               $title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
-       }
-
-       return $title;
-}
-add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );
-
-// Implement Custom Header features.
-require get_template_directory() . '/inc/custom-header.php';
-
-// Custom template tags for this theme.
-require get_template_directory() . '/inc/template-tags.php';
-
-// Add Customizer functionality.
-require get_template_directory() . '/inc/customizer.php';
-
-/*
- * Add Featured Content functionality.
- *
- * To overwrite in a plugin, define your own Featured_Content class on or
- * before the 'setup_theme' hook.
- */
-if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow'] ) {
-       require get_template_directory() . '/inc/featured-content.php';
-}
diff --git a/wp-content/themes/twentyfourteen/genericons/COPYING.txt b/wp-content/themes/twentyfourteen/genericons/COPYING.txt
deleted file mode 100644 (file)
index aece214..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Genericons is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
-
-The fonts are distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
-
-This license does not convey any intellectual property rights to third party trademarks that may be included in the icon font; such marks remain subject to all rights and guidelines of use of their owner.
\ No newline at end of file
diff --git a/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf b/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf
deleted file mode 100644 (file)
index 5cd41e8..0000000
Binary files a/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf and /dev/null differ
diff --git a/wp-content/themes/twentyfourteen/genericons/LICENSE.txt b/wp-content/themes/twentyfourteen/genericons/LICENSE.txt
deleted file mode 100644 (file)
index d159169..0000000
+++ /dev/null
@@ -1,339 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                            NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/wp-content/themes/twentyfourteen/genericons/README.txt b/wp-content/themes/twentyfourteen/genericons/README.txt
deleted file mode 100644 (file)
index 7a0a92e..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-  ___  ____  __ _  ____  ____  __  ___  __   __ _  ____ 
- / __)(  __)(  ( \(  __)(  _ \(  )/ __)/  \ (  ( \/ ___)
-( (_ \ ) _) /    / ) _)  )   / )(( (__(  O )/    /\___ \
- \___/(____)\_)__)(____)(__\_)(__)\___)\__/ \_)__)(____/
-
-
-Genericons are vector icons embedded in a webfont designed to be clean and simple keeping with a generic aesthetic.
-
-Use genericons for instant HiDPI, to change icon colors on the fly, or even with CSS effects such as drop-shadows or gradients!
-
-
-_  _ ____ ____ ____ ____ 
-|  | [__  |__| | __ |___ 
-|__| ___] |  | |__] |___ 
-
-
-To use it, place the font folder in your stylesheet directory and paste this in your CSS file:
-
-/* =Genericons, thanks to FontSquirrel.com for conversion!
--------------------------------------------------------------- */
-@font-face {
-    font-family: 'Genericons';
-    src: url('font/genericons-regular-webfont.eot');
-    src: url('font/genericons-regular-webfont.eot?#iefix') format('embedded-opentype'),
-         url('font/genericons-regular-webfont.woff') format('woff'),
-         url('font/genericons-regular-webfont.ttf') format('truetype'),
-         url('font/genericons-regular-webfont.svg#genericonsregular') format('svg');
-    font-weight: normal;
-    font-style: normal;
-
-}
-
-Note: the above only works if you don't use a CDN. If you do, or don't know what that is, you should use the syntax that's embedded in genericons.css.
-
-From then on, you can create an icon like this:
-
-.my-icon:before {
-       content: '\f101';
-       display: inline-block;
-       -webkit-font-smoothing: antialiased;
-       font: normal 16px/1 'Genericons';
-       vertical-align: top;
-}
-
-This will output a comment icon before every element with the class "my-icon". The "content: '\f101';" part of this CSS is easily copied from the helper tool at http://genericons.com/
-
-You can also use the bundled example.css if you'd rather insert the icons using HTML tags.
-
-
-_  _ ____ ___ ____ ____ 
-|\ | |  |  |  |___ [__  
-| \| |__|  |  |___ ___]
-
-
-Photoshop mockups:
-
-Genericons-Regular.otf found in the root directory of this zip has not been web-font-ified. So you can drop it in your system fonts folder and use the font in Photoshop if you like.
-
-For those of you using Genericons in your Photoshop mockup, remember to delete the old version of the font from Font Book, and grab the new one from the zip file. This also affects using it in your webdesigns: if you have an old version of the font installed locally, that's the font that'll be used in your website as well, so if you're missing icons, check for old versions of the font on your system.
-
-Pixel grid:
-
-Note that Genericons has been designed for a 16x16 pixel grid. That means it'll look sharp at font-size: 16px exactly. It'll also be crisp at multiples thereof, such as 32px or 64px. It'll also look reasonably crisp at in-between font sizes such as 24px or 48px, but not quite as crisp as 16 or 32. Please don't set the font-size to 17px, though, that'll just look terrible.
-
-Also note the CSS property "-webkit-font-smoothing: antialiased". That makes the icons look great in WebKit browsers. Please see http://noscope.com/2012/font-smoothing for more info.
-
-Updates:
-
-We don't often update icons, but do very carefully when we get good feedback suggesting improvements. Please be mindful if you upgrade, and check that the updated icons behave as you intended.
-
-
-
-____ _  _ ____ _  _ ____ ____ _    ____ ____ 
-|    |__| |__| |\ | | __ |___ |    |  | | __ 
-|___ |  | |  | | \| |__] |___ |___ |__| |__] 
-
-V3.0.3:
-Bunch of updates mostly.
-- Two new icons, Dropbox and Fullscreen.
-- Updates to all icons containing an exclamation mark.
-- Updates to Image and Quote.
-- Nicer "Share" icon.
-- Bigger default Linkedin icon.
-
-V3.0.2: 
-A slew of new stuff and updates.
-- Social icons: Skype, Digg, Reddit, Stumbleupon, Pocket.
-- New generic icons: heart, lock and print.
-- New editing icons: code, bold, italic, image
-- New interaction icons: subscribe, unsubscribe, subscribed, reply all, reply, flag.
-- The hyperlink icon has been updated to be clearer, chunkier.
-- The "home" icon has been updated for style, size and clarity.
-- The email icon has been updated for style and clarity, and to fit with the new subscribe icons.
-- The document icon has been updated for style.
-- The "pin" icon has been updated for style and clarity.
-- The Twitter icon has been scaled down to fit with the other social icons.
-
-V3.0.1: 
-Mostly maintenance. 
-- Fixed an issue with the example page that showed an old "top" icon instead of the actual NEW "refresh" icon.
-- Added inverse Google+ and Path.
-- Replaced tabs with spaces in the helper CSS.
-- Changed the Genericons.com copy/paste tool to serve span's instead of div's for casual icon insertion. It's being converted to "inline-block" anyway.
-
-V3.0:
-Mainly maintenance and a few new icons.
-- Fast forward, rewind, PollDaddy, Notice, Info, Help, Portfolio
-- Updated the feed icon. It's a bit smaller now for consistency, the previous one was rather big.
-- So, the previous version numbering, 2.09, wasn't very PHP version compare friendly. So from now on it'll be 3.0, 3.1 etc. Props Ipstenu.
-- Genericons.com now has a mini release blog.
-- The CSS has prettier formatting, props Konstantin Obenland.
-
-V2.09:
-Updated Facebook icon to new version. Updated Instagram logo to use new one-color version. Updated Google+ icon to use same radius as Instagram and Facebook. Added a bunch of new icons, cog, unapprove, cart, media player buttons, tablet, send to tablet.                                            
-
-V2.06:
-Included Base64 encoded version. This is necessary for Genericons to work with CDNs in Firefox. Firefox blocks fonts linked from a different domain. A CDN (typically s.example.com) usually puts the font on a subdomain, and is hence blocked in Firefox.
-
-V2.05:
-Added a bunch of new icons, including upload to cloud, download to cloud, many more.
-
-V2:
-Initial public release
\ No newline at end of file
diff --git a/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot
deleted file mode 100644 (file)
index 4657469..0000000
Binary files a/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.eot and /dev/null differ
diff --git a/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg
deleted file mode 100644 (file)
index ef236c1..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata></metadata>
-<defs>
-<font id="genericonsregular" horiz-adv-x="2048" >
-<font-face units-per-em="2048" ascent="1638" descent="-410" />
-<missing-glyph horiz-adv-x="500" />
-<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
-<glyph unicode="&#xf100;" d="M512 512v128h768v-128h-768zM512 768v128h256v-128h-256zM512 1024v128h640v-128h-640zM512 1280v128h1024v-128h-1024zM896 768v128h640v-128h-640zM1280 1024v128h256v-128h-256z" />
-<glyph unicode="&#xf101;" d="M256 1024q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM768 1024q0 -106 75 -181t181 -75t181 75t75 181t-75 181t-181 75t-181 -75t-75 -181z" />
-<glyph unicode="&#xf102;" d="M128 384v896l512 128l128 256h512l128 -256l512 -128v-896h-1792zM256 1440v160h256v-96zM576 960q0 -185 131.5 -316.5t316.5 -131.5q186 0 317 131.5t131 316.5q0 186 -131 317t-317 131q-185 0 -316.5 -131t-131.5 -317zM704 960q0 133 93.5 226.5t226.5 93.5 t226.5 -93.5t93.5 -226.5q0 -132 -93.5 -226t-226.5 -94t-226.5 94t-93.5 226z" />
-<glyph unicode="&#xf103;" d="M128 512v384h384v-384h-384zM128 1024v384h896v-384h-896zM640 512v384h384v-384h-384zM1152 512v896h896v-896h-896z" />
-<glyph unicode="&#xf104;" d="M512 384v1280l1152 -640z" />
-<glyph unicode="&#xf105;" d="M640 1408q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5q0 -124 -71.5 -222t-184.5 -138v-536l-256 -128v664q-113 40 -184.5 138t-71.5 222z" />
-<glyph unicode="&#xf106;" d="M256 896v640h640v-640q0 -212 -150 -362t-362 -150v256q106 0 181 75t75 181h-384zM1152 896v640h640v-640q0 -212 -150 -362t-362 -150v256q106 0 181 75t75 181h-384z" />
-<glyph unicode="&#xf107;" d="M512 704v384q0 97 53 176.5t139 116.5v-151q-64 -57 -64 -142v-384q0 -80 56 -136t136 -56t136 56t56 136v384q0 85 -64 142v151q86 -37 139 -116.5t53 -176.5v-384q0 -133 -93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5zM768 1088v384q0 133 93.5 226.5 t226.5 93.5t226.5 -93.5t93.5 -226.5v-384q0 -97 -53 -176.5t-139 -116.5v151q64 57 64 142v384q0 80 -56 136t-136 56t-136 -56t-56 -136v-384q0 -85 64 -142v-151q-86 37 -139 116.5t-53 176.5z" />
-<glyph unicode="&#xf108;" d="M0 1152v384q0 96 80 176t176 80h1024q96 0 176 -80t80 -176v-384q0 -96 -80 -176t-176 -80h-448l-448 -448v448h-128q-96 0 -176 80t-80 176zM768 640l128 128h384q168 0 276 108t108 276v384q96 0 176 -80t80 -176v-384q0 -96 -80 -176t-176 -80h-128v-448l-448 448 h-320z" />
-<glyph unicode="&#xf109;" d="M256 768v512h384l384 384v-1280l-384 384h-384zM1205 843q75 75 75 181t-75 181l91 91q26 -27 46.5 -57.5t35 -65t22.5 -72.5t8 -77q0 -78 -29.5 -148t-82.5 -124zM1386 662q71 71 110.5 164.5t39.5 197.5t-39.5 197.5t-110.5 164.5l91 91q88 -89 137.5 -206t49.5 -247 q0 -87 -23 -170t-64.5 -153.5t-99.5 -129.5z" />
-<glyph unicode="&#xf200;" d="M0 1024q0 208 81 398t218.5 327t327 218t397.5 81q209 0 398.5 -81t326.5 -218t218 -326.5t81 -398.5q0 -335 -195.5 -601.5t-504.5 -369.5q-36 -7 -53 8.5t-17 40.5q0 4 0.5 102t0.5 179q0 130 -69 189q77 9 137.5 24.5t124.5 51.5t107 89t70.5 140t27.5 201 q0 161 -105 274q6 15 11 35t9 56t-3.5 83.5t-26.5 96.5q-4 1 -10.5 2t-32 -1t-55.5 -11t-79.5 -33.5t-104.5 -61.5q-118 33 -256 35q-138 -2 -256 -35q-55 37 -104 61.5t-80 33t-54.5 11.5t-33.5 1l-10 -2q-58 -146 -10 -271q-105 -115 -105 -274q0 -114 27.5 -201 t70.5 -140t107 -89t124.5 -52t136.5 -24q-53 -47 -65 -137q-28 -13 -59.5 -20t-75.5 -6.5t-87.5 28.5t-75.5 83q-2 4 -6.5 10.5t-19 24t-31.5 31t-44 25.5t-56 14h-10t-18.5 -3.5t-17 -9t4 -18.5t34.5 -31q3 -1 7.5 -4t19 -14.5t27.5 -27t30 -43.5t30 -61q1 -3 2.5 -7t8 -17 t15.5 -25.5t24.5 -28t33.5 -28t45 -23.5t57.5 -16t71.5 -3.5t87 11.5q0 -50 0.5 -110t0.5 -64q0 -24 -17 -40t-53 -10q-309 103 -504.5 370t-195.5 602z" />
-<glyph unicode="&#xf201;" d="M0 1024q0 206 82 395.5t219.5 327t327 219.5t395.5 82t395.5 -82t327 -219.5t219.5 -327t82 -395.5t-82 -395.5t-219.5 -327t-327 -219.5t-395.5 -82t-395.5 82t-327 219.5t-219.5 327t-82 395.5zM128 1024q0 -167 58 -319.5t166 -272.5q125 205 339 360t445 232 q-16 48 -80 176q-282 -86 -481.5 -111t-446.5 -1v-64zM160 1232q194 -22 444 14t388 82q-141 282 -320 528q-194 -85 -329.5 -247.5t-182.5 -376.5zM480 320q216 -192 544 -192q181 0 368 80q-33 300 -208 688q-222 -74 -410 -225.5t-294 -350.5zM832 1904 q102 -166 304 -512q6 2 86 31t118.5 45t108 47t122 64t93.5 69q-126 126 -290.5 199t-349.5 73q-32 0 -96 -8t-96 -8zM1200 1248q22 -29 36.5 -54.5t34 -67.5t25.5 -54q170 33 336 30t288 -30q-26 285 -160 464q-71 -57 -162 -104.5t-214.5 -100.5t-183.5 -83zM1344 928 q14 -27 43 -103t74.5 -231t74.5 -306q156 108 258 278t126 362q-276 46 -576 0z" />
-<glyph unicode="&#xf202;" d="M128 465q48 -5 88 -5q256 0 456 157q-119 2 -213 73.5t-130 182.5q39 -7 69 -7q47 0 97 13q-127 26 -211 127t-84 233v5q80 -43 167 -46q-76 50 -120 131t-44 175q0 101 50 185q138 -170 335 -271.5t423 -112.5q-10 39 -10 84q0 152 108 259.5t260 107.5q160 0 268 -116 q128 26 233 89q-42 -132 -161 -203q109 13 211 58q-73 -111 -183 -191q0 -7 0.5 -23t0.5 -24q0 -122 -31 -246t-89.5 -241t-149.5 -218.5t-204 -177.5t-260.5 -119.5t-311.5 -43.5q-305 0 -564 165z" />
-<glyph unicode="&#xf203;" d="M128 384v1280q0 106 75 181t181 75h1280q106 0 181 -75t75 -181v-1280q0 -106 -75 -181t-181 -75h-282v711h270l12 260h-282v192v12q0 60 21.5 87.5t87.5 27.5l166 -1l6 242q-78 10 -183 10q-94 0 -167 -27.5t-117 -74.5t-66 -105.5t-22 -126.5v-236h-254v-260h254v-711 h-724q-106 0 -181 75t-75 181z" />
-<glyph unicode="&#xf204;" d="M640 969v303h222v258q0 78 26 147t77 124t136.5 87t194.5 32q55 0 108 -3t79 -6l26 -3l-7 -282h-193q-76 0 -101.5 -32t-25.5 -101v-14v-207h329l-14 -303h-315v-841h-320v841h-222z" />
-<glyph unicode="&#xf205;" d="M128 1024q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348zM218 1024q0 -236 125 -430.5t330 -294.5l-385 1053q-70 -156 -70 -328zM351 1466h52q37 0 91 2.5t89 4.5 l34 3q21 1 30.5 -14.5t2.5 -32.5t-27 -20q-44 -5 -93 -7l294 -873l176 529l-125 344l-85 7q-20 2 -27.5 19t2.5 33t30 15q133 -10 212 -10q38 0 91.5 2.5t88.5 4.5l35 3q16 1 25.5 -8.5t10 -22t-7 -23.5t-23.5 -13q-43 -5 -92 -7l291 -866l81 268q24 79 32.5 107.5 t18.5 74.5t10 79q0 46 -11.5 90.5t-23.5 71t-32 60.5q-2 4 -11.5 19t-12 20t-10.5 18.5t-11 19t-9 17.5t-8.5 19t-6.5 18t-5.5 19.5t-3 18.5t-1.5 20q0 57 39 100t97 43l10 -1q-110 101 -249.5 156.5t-294.5 55.5q-207 0 -385 -98t-288 -266zM796 251q112 -33 228 -33 q138 0 268 46q-4 6 -6 11l-248 679zM1429 328q183 106 292 291.5t109 404.5q0 207 -99 386q5 -40 5 -82q0 -135 -61 -289z" />
-<glyph unicode="&#xf206;" d="M128 486v485q125 -127 330 -127q30 0 59 3q-32 -61 -32 -118q0 -33 13 -63t28.5 -48.5t45.5 -47.5q-18 0 -54.5 -0.5t-55.5 -0.5q-183 0 -334 -83zM128 1599v65q0 106 75 181t181 75h1280q106 0 181 -75t75 -181v-128h-256v256h-128v-256h-256v-128h256v-256h128v256h256 v-1024q0 -106 -75 -181t-181 -75h-507q5 28 5 50q0 143 -46.5 230t-189.5 194q-3 2 -20.5 15t-25 19t-25.5 20t-27.5 22.5t-24 22t-23 23.5t-17 22t-12.5 22.5t-4 20.5q0 52 23 87t99 94q180 141 180 324q0 113 -45 204.5t-128 139.5h160l135 142h-607q-127 0 -241.5 -49 t-194.5 -132zM139 309q57 85 166 137.5t237 51.5q84 -1 158 -26q19 -13 62 -42.5t61 -42t48 -37t44.5 -41.5t29 -41.5t21.5 -49.5q7 -29 7 -66q0 -16 -1 -24h-588q-85 0 -153 50.5t-92 130.5zM228 1307q-21 161 50.5 269.5t194.5 104.5q121 -4 215.5 -118.5t116.5 -277.5 q21 -160 -43 -256t-187 -92q-125 4 -225.5 108t-121.5 262z" />
-<glyph unicode="&#xf207;" d="M256 1553q0 -73 50.5 -122t131.5 -49h2q84 0 135 49t51 122q-1 75 -51 123t-133 48t-134.5 -48.5t-51.5 -122.5zM275 256h330v991h-330v-991zM787 256h329v553q0 54 11 81q20 50 63 85t106 35q58 0 96 -29t54.5 -77.5t16.5 -117.5v-530h329v568q0 112 -28.5 198 t-80 139.5t-120 81t-150.5 27.5q-36 0 -69 -5.5t-58.5 -15t-49 -23t-40 -27t-32.5 -31t-26.5 -31.5t-21.5 -31v141h-329q1 -26 1.5 -138t0.5 -252.5t-0.5 -277.5t-1.5 -230v-93z" />
-<glyph unicode="&#xf208;" d="M128 384v1280q0 106 75 181t181 75h1280q106 0 181 -75t75 -181v-1280q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM384 1422q0 -58 40.5 -97.5t105.5 -39.5h1q67 0 108.5 39.5t41.5 97.5q-2 60 -42 98.5t-106 38.5q-67 0 -108 -39t-41 -98zM400 384h263 v793h-263v-793zM809 384h264v443q0 45 8 64q16 40 50.5 68t85.5 28q133 0 133 -179v-424h264v455q0 175 -83.5 266t-220.5 91q-50 0 -90.5 -12t-68.5 -34t-45 -41t-33 -44v112h-264v-793z" />
-<glyph unicode="&#xf209;" d="M171 1260q0 109 35.5 219t110 213t179 182t254 126.5t323.5 47.5q176 0 327.5 -60.5t253.5 -161t160 -231t58 -270.5q0 -246 -85 -443t-241 -309.5t-355 -112.5q-99 0 -186.5 46.5t-121.5 110.5q-73 -290 -89 -347q-34 -123 -127 -270l-149 54q-7 167 22 290l162 688 q-40 81 -40 200q0 139 70.5 232.5t172.5 93.5q83 0 127 -53.5t44 -135.5q0 -51 -18.5 -124t-49 -170t-44.5 -154q-23 -99 37.5 -171t161.5 -72q117 0 209.5 92t142 244.5t49.5 334.5q0 214 -139 349t-387 135q-139 0 -257.5 -49.5t-197 -133t-122.5 -193t-44 -229.5 q0 -147 83 -247q18 -21 21.5 -34t-3.5 -37q-16 -61 -25 -101q-7 -24 -24.5 -32t-39.5 1q-127 51 -192.5 181.5t-65.5 300.5z" />
-<glyph unicode="&#xf210;" d="M0 1024q0 208 81 398t218.5 327t327 218t397.5 81q209 0 398.5 -81t326.5 -218t218 -326.5t81 -398.5t-81 -398.5t-218 -326.5t-326.5 -218t-398.5 -81q-147 0 -290 42q74 116 103 219l72 282q28 -53 99 -90.5t151 -37.5q162 0 288.5 91.5t195.5 251t69 359.5 q0 114 -47 220t-130 187.5t-206.5 130.5t-265.5 49q-141 0 -262 -38.5t-205.5 -103t-145.5 -147.5t-89.5 -172.5t-28.5 -178.5q0 -138 53 -243.5t156 -147.5q18 -8 32.5 -1t18.5 26q2 9 10 41t11 41q5 19 2.5 30t-16.5 28q-68 78 -68 200q0 97 35.5 186t99.5 156.5t160 108 t209 40.5q201 0 313.5 -109.5t112.5 -283.5q0 -148 -40 -271.5t-115 -198t-169 -74.5q-82 0 -131.5 58.5t-30.5 138.5q11 46 35.5 125t39.5 138t15 101q0 66 -35.5 109.5t-102.5 43.5q-82 0 -139.5 -76t-57.5 -189q0 -43 8 -83.5t16 -59.5l9 -19q-113 -475 -132 -558 q-24 -97 -18 -235q-275 120 -444 374t-169 564z" />
-<glyph unicode="&#xf211;" d="M160 1024q0 -172 122 -294t294 -122t294 122t122 294t-122 294t-294 122t-294 -122t-122 -294zM1056 1024q0 -172 122 -294t294 -122t294 122t122 294t-122 294t-294 122t-294 -122t-122 -294z" />
-<glyph unicode="&#xf212;" d="M128 1379l84 -108q121 84 141 84q92 0 173 -287l144 -525q108 -287 265 -287q253 0 619 471q353 451 365 710q16 347 -260 355q-373 12 -505 -417q69 29 133 29q136 0 120 -152q-8 -92 -120 -268q-113 -176 -169 -176q-73 0 -133 271q-20 79 -72 407q-49 303 -258 284 q-89 -8 -265 -160q-127 -113 -262 -231z" />
-<glyph unicode="&#xf213;" d="M128 768v512q0 159 112.5 271.5t271.5 112.5h1024q159 0 271.5 -112.5t112.5 -271.5v-512q0 -159 -112.5 -271.5t-271.5 -112.5h-1024q-159 0 -271.5 112.5t-112.5 271.5zM768 640l640 384l-640 384v-768z" />
-<glyph unicode="&#xf214;" d="M472 1186h198v-629q0 -121 26 -187q26 -65 92 -122t161 -89q93 -31 218 -31q110 0 201 22q88 20 208 76v282q-134 -88 -271 -88q-76 0 -136 36q-44 25 -61 70q-17 46 -17 200v460h426v281h-426v453h-255q-17 -139 -62 -228q-48 -93 -121 -154q-74 -64 -181 -99v-253z" />
-<glyph unicode="&#xf215;" d="M128 384v1280q0 106 75 181t181 75h1280q106 0 181 -75t75 -181v-1280q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM256 384q0 -53 37.5 -90.5t90.5 -37.5h1280q53 0 90.5 37.5t37.5 90.5v768h-272q16 -66 16 -128q0 -212 -150 -362t-362 -150t-362 150 t-150 362q0 62 16 128h-272v-768zM640 1024q0 -159 112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5zM1408 1536q0 -53 37.5 -90.5t90.5 -37.5h128q53 0 90.5 37.5t37.5 90.5v128q0 53 -37.5 90.5t-90.5 37.5 h-128q-53 0 -90.5 -37.5t-37.5 -90.5v-128z" />
-<glyph unicode="&#xf216;" d="M256 790v467q0 31 29 55l702 467q17 11 37 11t37 -11l702 -467q29 -24 29 -55v-467q0 -32 -29 -54l-702 -468q-17 -11 -37 -11q-18 0 -37 11l-702 468q-29 22 -29 54zM388 914l165 110l-165 110v-220zM441 790l517 -344v308l-286 191zM441 1257l231 -154l286 191v307z M791 1024l233 -156l234 156l-234 156zM1090 446l517 344l-231 155l-286 -191v-308zM1090 1294l286 -191l231 154l-517 344v-307zM1495 1024l165 -110v220z" />
-<glyph unicode="&#xf217;" d="M128 1024q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348zM208 1024q0 -221 109.5 -409t297.5 -297.5t409 -109.5q236 0 432 123.5t298 327.5q59 136 59 266 q0 117 -43.5 221.5t-118.5 182.5t-175.5 131t-215.5 73q116 -48 204 -145t127 -218q54 -151 17.5 -320t-150.5 -289q-111 -123 -276 -179t-332 -27q-168 27 -307 138t-210 270q-74 156 -67.5 338.5t93.5 335.5q88 155 238.5 260t328.5 135q2 0 35 6q-208 -16 -380.5 -128 t-272.5 -293.5t-100 -392.5zM359 998q17 -148 100 -275.5t207 -200.5q120 -71 264 -78.5t267 49.5q-76 -21 -148 -21q-149 0 -275.5 74t-200.5 201t-74 276q0 214 146 373l3 3l14 14l1 1q98 114 235 178t293 64q163 0 306 -70t241 -193q-36 57 -70 96q-104 126 -250 200.5 t-305 80.5q-157 7 -306.5 -51.5t-258.5 -169.5q-109 -107 -159 -254.5t-30 -296.5zM612 1025q8 -119 85 -217t186 -128q110 -33 221.5 8.5t170.5 134.5q61 91 50 204t-86 187q-70 77 -179.5 87t-188.5 -50q-85 -62 -105 -157q-21 -98 30 -182q50 -84 142 -108q92 -23 172 26 q38 23 64 58.5t34 76.5q17 88 -34 159q-52 72 -136 77q-83 6 -142 -54q-57 -55 -45 -138q6 -37 27.5 -68.5t52.5 -47.5q40 -21 87 -16q-46 1 -82 29t-49 71l-2 3q-14 30 -9.5 67t25.5 66q22 30 56.5 46.5t72.5 14.5t73.5 -23.5t54.5 -55.5q46 -76 8 -158 q-18 -39 -53.5 -66.5t-78.5 -35.5q-43 -9 -88.5 3.5t-78.5 43.5q-74 68 -68 169q2 65 45 118.5t109.5 77t132.5 5.5q68 -16 118.5 -70.5t65 -124.5t-9.5 -144q-37 -107 -150 -158.5t-224 -8.5q-114 43 -170 158q-55 117 -17 238q35 121 152 191t246 47q131 -19 223 -128 t95 -246q6 -142 -81 -257q-86 -115 -225 -157q-114 -35 -234 -7q83 -34 174 -34q195 0 333.5 138.5t138.5 333.5v2q-10 107 -63.5 202.5t-137.5 157.5q-102 77 -236 87t-243 -49q-116 -62 -177 -167q-61 -107 -52 -231z" />
-<glyph unicode="&#xf218;" d="M128 464q0 -66 32 -125.5t92.5 -107t159 -75.5t222.5 -28q117 0 218.5 25t174 68t124 99.5t76.5 120.5t25 131q0 40 -6.5 74.5t-22.5 65t-30.5 53t-41.5 50t-45 43t-51 44.5l-85 66q-19 15 -28.5 24.5t-21 31t-11.5 45.5t12 47.5t21.5 34.5t32.5 33q37 29 59 48t52 52 t46 64t28 75.5t12 94.5q0 43 -8 82t-23.5 70.5t-30.5 55.5t-38 47.5t-35 34.5t-32 27h146l151 85h-485q-264 0 -421 -129q-73 -64 -111.5 -147.5t-38.5 -167.5q0 -56 16 -109.5t49.5 -100.5t79.5 -82.5t109 -56.5t136 -21q19 0 75 5q0 -2 -4 -10.5t-4.5 -10.5t-3.5 -9.5 t-4 -11l-3 -10.5t-2.5 -12.5t-1 -13t-0.5 -14.5q0 -26 5 -48t18.5 -45t20.5 -32.5t26 -34.5q-61 -4 -98 -7.5t-107 -14.5t-131.5 -32.5t-112.5 -53.5q-50 -29 -86.5 -66.5t-56.5 -76.5t-29 -74.5t-9 -69.5zM335 514q0 47 17 87.5t38.5 64.5t54 45t50.5 28.5t42 16.5 q35 11 76.5 19.5t77.5 12t58.5 5t34.5 1.5q35 0 54 -3q51 -36 82 -59t63.5 -50.5t50.5 -48.5t33.5 -46t21.5 -50.5t6 -55.5q0 -113 -91 -183.5t-255 -70.5q-187 0 -300.5 80t-113.5 207zM453 1591q0 110 51 174q28 35 73.5 56t91.5 21q56 0 105.5 -28.5t83.5 -74.5 t59 -103.5t36.5 -115.5t11.5 -110q0 -113 -59 -172q-18 -19 -44 -33.5t-56.5 -23.5t-58.5 -9q-58 0 -108 28.5t-83.5 73.5t-57.5 101.5t-34.5 111.5t-10.5 104zM1408 1024v128h256v256h128v-256h256v-128h-256v-256h-128v256h-256z" />
-<glyph unicode="&#xf219;" d="M134.5 1267.5q5.5 80.5 41 179.5t102.5 191q70 78 153.5 135t167 86.5t172 45.5t169 15t156.5 -8t137.5 -21t107.5 -26.5t72 -22.5l25 -9q12 -5 32 -14.5t74.5 -45.5t101 -78.5t97 -114.5t78 -153t27.5 -194.5t-40 -238.5q-43 -89 -97 -157.5t-109.5 -110t-115.5 -69 t-115.5 -37t-107.5 -12t-95.5 4t-76 13t-49.5 13.5l-18 6v-277q-1 -3 -2 -9t-6.5 -23t-14 -34t-24.5 -39.5t-36 -42t-51.5 -39.5t-68.5 -33q-52 -19 -107 -20t-97 11.5t-76.5 27.5t-53.5 27l-18 13v280q33 -34 67 -55.5t67.5 -28.5t61.5 11t44 63v946h312v-538l65 -13 q206 -32 329 60q105 78 128 243q2 76 -15.5 141t-49 110.5t-72.5 82.5t-86.5 59.5t-91.5 39t-87.5 24t-73.5 11.5t-52 5h-19l-66 -2q-217 -16 -359 -141q-57 -50 -97 -115q-27 -45 -39.5 -93t-11 -88t10 -78.5t22 -67.5t25.5 -51t21 -33l9 -12l-225 -201q-7 9 -18.5 25 t-40.5 68.5t-49.5 107.5t-34.5 137.5t-8.5 163z" />
-<glyph unicode="&#xf220;" d="M141 1431q0 133 65.5 245.5t178 178t245.5 65.5q141 0 260 -75q69 12 144 12q171 0 327 -66.5t269 -179.5t179.5 -269t66.5 -327q0 -96 -19 -181q51 -106 50 -217q0 -133 -65.5 -245.5t-178 -178t-244.5 -65.5q-123 0 -231 58q-79 -14 -155 -14q-171 0 -327 67t-269 180 t-179.5 269t-66.5 327q0 86 17 169q-67 116 -67 247zM537 775q0 -75 54 -153q52 -76 139 -123q119 -63 302 -63q150 0 263 46q111 46 171 130q59 85 59 188q0 88 -34 149q-35 62 -96 100q-58 39 -143 66q-77 25 -187 49q-89 20 -116 28q-35 9 -68 27q-33 15 -50 38 q-17 20 -17 49q0 46 52 80q54 36 146 36q97 0 141 -32q43 -32 75 -94q30 -48 51 -67q25 -22 72 -22q53 0 87 36q34 35 34 81t-25 96q-24 47 -82 92q-57 45 -139 70q-86 26 -197 26q-139 0 -247 -40q-107 -39 -164 -113q-57 -73 -57 -170q0 -102 55 -170q52 -65 144 -105 q95 -40 221 -66q93 -20 154 -38q57 -19 90 -50q33 -30 33 -80q0 -64 -62 -105q-65 -44 -170 -44q-78 0 -123 22q-47 22 -70 54q-27 34 -49 86q-21 49 -49 72q-32 26 -75 26q-52 0 -87 -33q-36 -33 -36 -79z" />
-<glyph unicode="&#xf221;" d="M384 384v640h192q49 0 104 47t103.5 127.5t80.5 204.5t32 261q0 5 0.5 13.5t4 31t9.5 39t19 30.5t31 14q33 0 77.5 -42t79.5 -119t35 -159q0 -85 -8 -165t-16 -117l-8 -38h416q53 0 90.5 -37.5t37.5 -90.5q0 -41 -24 -74t-62 -46q22 -33 22 -72q0 -41 -24 -74t-62 -46 q22 -33 22 -72q0 -53 -37.5 -90.5t-90.5 -37.5h-64q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5h-448q-65 0 -123 20t-93.5 44t-80.5 44t-87 20h-128z" />
-<glyph unicode="&#xf222;" d="M205 1168q0 83 59 142t142 59q100 0 160 -83q183 97 412 106l92 457q5 22 23 33q18 12 39 7l313 -72q24 41 65.5 65.5t89.5 24.5q74 0 126.5 -52.5t52.5 -126.5t-52.5 -126.5t-126.5 -52.5q-71 0 -122 48.5t-56 119.5l-262 60l-77 -386q222 -12 397 -108q60 86 163 86 q83 0 141.5 -59t58.5 -142q0 -55 -28 -100.5t-74 -72.5q14 -50 14 -99q0 -135 -98.5 -250t-267.5 -181.5t-368 -66.5t-368.5 66.5t-268 181t-98.5 249.5q0 50 16 104q-44 27 -70.5 71.5t-26.5 97.5zM307 1168q0 -47 40 -75q47 75 132 137q-29 36 -73 36q-41 0 -70 -28.5 t-29 -69.5zM388 896q0 -107 85 -198t230.5 -144t317.5 -53q171 0 316.5 53t230.5 143.5t85 197.5q0 108 -85 199t-230.5 144t-316.5 53q-172 0 -317.5 -53t-230.5 -144t-85 -198zM672 982q0 46 32.5 79t78.5 33q47 0 79.5 -33t32.5 -79t-33 -79t-79 -33t-78.5 33t-32.5 79z M737 739.5q0 21.5 15 36.5t36 15t36 -15q56 -56 199 -56q145 0 201 56q15 15 36 15t36 -15t15 -36.5t-15 -36.5q-86 -86 -271 -86q-187 0 -273 86q-15 15 -15 36.5zM1153 982q0 46 32.5 79t79.5 33t79.5 -33t32.5 -79t-33 -79t-79 -33t-79 33t-33 79zM1523 1728 q0 -32 22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5t-54.5 -22.5t-22.5 -54.5zM1567 1227q83 -61 131 -138q43 31 43 79q0 40 -28.5 69t-69.5 29q-45 0 -76 -39z" />
-<glyph unicode="&#xf223;" d="M256 849v209h263v-206q0 -33 23.5 -56.5t57.5 -23.5t57.5 23.5t23.5 56.5v487q5 136 104.5 230.5t238.5 94.5t238.5 -95.5t104.5 -231.5v-107l-157 -45l-105 48v92q0 34 -23.5 57t-57.5 23t-57.5 -23t-23.5 -57l-1 -481q-1 -138 -101.5 -235t-241.5 -97q-142 0 -242.5 99 t-100.5 238zM1105 846v210l105 -48l157 46v-212q0 -33 23.5 -56.5t57.5 -23.5t57.5 23.5t23.5 56.5v216h263v-209q0 -139 -100.5 -238t-242.5 -99t-242 97.5t-102 236.5z" />
-<glyph unicode="&#xf224;" d="M256 1152v384q0 106 75 181t181 75h1024q106 0 181 -75t75 -181v-384q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM512 1281q0 -53 38 -91l362 -362l4 4q37 -64 108 -64t108 64l5 -4l362 362q37 38 37 91t-37 90t-91 37 q-53 0 -90 -37l-294 -294l-293 294q-37 37 -91 37t-90 -37q-38 -37 -38 -90z" />
-<glyph unicode="&#xf225;" d="M128 930l365 291l531 -328l-369 -308zM128 1513l527 345l369 -308l-531 -329zM497 508v115l158 -103l370 307l370 -307l158 103v-115l-528 -317zM1024 893l532 328l364 -291l-527 -345zM1024 1550l369 308l527 -345l-364 -292z" />
-<glyph unicode="&#xf300;" d="M256 896v384q0 106 75 181t181 75h1024q106 0 181 -75t75 -181v-384q0 -106 -75 -181t-181 -75h-448l-448 -448v448h-128q-106 0 -181 75t-75 181z" />
-<glyph unicode="&#xf301;" d="M384 512v1024h384l64 -128h448v-128h-640l-128 -256h128l64 128h960l-256 -640h-1024z" />
-<glyph unicode="&#xf302;" d="M256 768l768 768h512v-512l-768 -768zM1152 1280q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf303;" d="M256 1088q0 143 55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5t-55.5 -273.5t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5zM384 1088q0 -117 45.5 -223.5t123 -184t184 -123t223.5 -45.5 t223.5 45.5t184 123t123 184t45.5 223.5t-45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5zM896 1062v474h128v-421l298 -298l-90 -91z" />
-<glyph unicode="&#xf304;" d="M512 384v256q0 159 112.5 271.5t271.5 112.5h256q159 0 271.5 -112.5t112.5 -271.5v-256h-1024zM768 1408q0 106 75 181t181 75t181 -75t75 -181t-75 -181t-181 -75t-181 75t-75 181z" />
-<glyph unicode="&#xf305;" d="M256 384v1280h256v128h128v-128h640v128h128v-128h256v-1280h-1408zM384 640q0 -53 37.5 -90.5t90.5 -37.5h896q53 0 90.5 37.5t37.5 90.5v640q0 53 -37.5 90.5t-90.5 37.5h-896q-53 0 -90.5 -37.5t-37.5 -90.5v-640zM768 1216q0 26 19 45t45 19h128q26 0 45 -19t19 -45 v-512q0 -26 -19 -45t-45 -19t-45 19t-19 45v448h-64q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf306;" d="M256 384v1280h256v128h128v-128h640v128h128v-128h256v-1280h-1408zM384 640q0 -53 37.5 -90.5t90.5 -37.5h896q53 0 90.5 37.5t37.5 90.5v640q0 53 -37.5 90.5t-90.5 37.5h-896q-53 0 -90.5 -37.5t-37.5 -90.5v-640zM768 1216q0 26 19 45t45 19h256h2h1h3 q22 -2 38.5 -18t19.5 -39v-2v-2v-1v-2q0 -5 -2 -15l-128 -512q-6 -26 -28.5 -40t-48.5 -7q-26 6 -40 28.5t-7 48.5l108 433h-174q-26 0 -45 19t-19 45z" />
-<glyph unicode="&#xf307;" d="M256 384v1280h256v128h128v-128h640v128h128v-128h256v-1280h-1408zM384 640q0 -53 37.5 -90.5t90.5 -37.5h896q53 0 90.5 37.5t37.5 90.5v640q0 53 -37.5 90.5t-90.5 37.5h-896q-53 0 -90.5 -37.5t-37.5 -90.5v-640zM512 640v128h128v-128h-128zM512 896v128h128v-128 h-128zM768 640v128h128v-128h-128zM768 896v128h128v-128h-128zM768 1152v128h128v-128h-128zM1024 640v128h128v-128h-128zM1024 896v128h128v-128h-128zM1024 1152v128h128v-128h-128zM1280 896v128h128v-128h-128zM1280 1152v128h128v-128h-128z" />
-<glyph unicode="&#xf308;" d="M342 342q12 45 22 71t38 66.5t76 88.5l395 395l-227 227l181 181q37 -37 90.5 -37t91.5 37l181 181q38 38 38 91t-38 90l181 181l543 -543l-181 -181q-37 38 -90 38t-91 -38l-181 -181q-37 -37 -37 -90t37 -91l-181 -181l-227 226l-395 -395q-68 -68 -113.5 -93 t-112.5 -43z" />
-<glyph unicode="&#xf400;" d="M256 1216q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5q0 -184 -111 -337l495 -495l-128 -128l-495 495q-153 -111 -337 -111q-117 0 -223.5 45.5t-184 123t-123 184t-45.5 223.5zM384 1216q0 -185 131.5 -316.5 t316.5 -131.5q186 0 317 131.5t131 316.5t-131 316.5t-317 131.5q-185 0 -316.5 -131.5t-131.5 -316.5z" />
-<glyph unicode="&#xf401;" d="M256 1216q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5q0 -184 -111 -337l495 -495l-128 -128l-495 495q-153 -111 -337 -111q-117 0 -223.5 45.5t-184 123t-123 184t-45.5 223.5zM384 1216q0 -185 131.5 -316.5 t316.5 -131.5q186 0 317 131.5t131 316.5t-131 316.5t-317 131.5q-185 0 -316.5 -131.5t-131.5 -316.5zM512 1152v128h640v-128h-640z" />
-<glyph unicode="&#xf402;" d="M256 1216q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5q0 -184 -111 -337l495 -495l-128 -128l-495 495q-153 -111 -337 -111q-117 0 -223.5 45.5t-184 123t-123 184t-45.5 223.5zM384 1216q0 -185 131.5 -316.5 t316.5 -131.5q186 0 317 131.5t131 316.5t-131 316.5t-317 131.5q-185 0 -316.5 -131.5t-131.5 -316.5zM512 1152v128h256v256h128v-256h256v-128h-256v-256h-128v256h-256z" />
-<glyph unicode="&#xf403;" d="M0 1024l506 506q101 103 234.5 160.5t283.5 57.5t283.5 -57.5t233.5 -159.5l507 -507l-506 -507q-101 -103 -234.5 -160t-283.5 -57t-283.5 57.5t-233.5 160.5zM272 1024l370 -371q77 -78 175.5 -119.5t206.5 -41.5t206 41.5t174 118.5l373 372l-371 371 q-158 161 -382 161q-108 0 -206.5 -41t-173.5 -119zM640 1024q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5zM1024 1152q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf404;" d="M0 1024l506 506q101 103 234.5 160.5t283.5 57.5q193 0 358 -95l-143 -143q-103 46 -215 46q-108 0 -206.5 -41t-173.5 -119l-372 -372l240 -240l-136 -136zM339 429l90 -90l1280 1280l-90 90zM640 1024q0 159 112.5 271.5t271.5 112.5q44 0 98 -14l-468 -468 q-14 54 -14 98zM666 395l143 143q103 -46 215 -46q108 0 206 41.5t174 118.5l373 372l-241 241l136 135l376 -376l-506 -507q-101 -103 -234.5 -160t-283.5 -57q-193 0 -358 95zM926 654l468 468q14 -54 14 -98q0 -159 -112.5 -271.5t-271.5 -112.5q-44 0 -98 14z" />
-<glyph unicode="&#xf405;" d="M640 768l320 320l-320 320l128 128l320 -320l320 320l128 -128l-320 -320l320 -320l-128 -128l-320 320l-320 -320z" />
-<glyph unicode="&#xf406;" d="M128 256l832 832l-832 832l128 128l832 -832l832 832l128 -128l-832 -832l832 -832l-128 -128l-832 832l-832 -832z" />
-<glyph unicode="&#xf407;" d="M384 1280v128l256 128q0 53 37.5 90.5t90.5 37.5h384q53 0 90.5 -37.5t37.5 -90.5l256 -128v-128h-1152zM512 512v704h128v-704h128v704h128v-704h128v704h128v-704h128v704h128v-704q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5zM768 1472 q0 -26 19 -45t45 -19h256q26 0 45 19t19 45t-19 45t-45 19h-256q-26 0 -45 -19t-19 -45z" />
-<glyph unicode="&#xf408;" d="M256 1151l476 -330l-183 -535l475 332l475 -332l-183 535l476 330l-587 -1l-181 535l-180 -535z" />
-<glyph unicode="&#xf409;" d="M384 1152l640 512l640 -512l-128 -128v-512h-1024v512zM896 576h256v448h-256v-448z" />
-<glyph unicode="&#xf410;" d="M256 512v704l768 -384l768 384v-704h-1536zM256 1408v128h1536v-128l-768 -384z" />
-<glyph unicode="&#xf411;" d="M384 384v448l896 896l448 -448l-896 -896h-448zM512 768l256 -256l128 128l-256 256zM685 941l96 -96l595 595l-96 96zM845 781l96 -96l595 595l-96 96z" />
-<glyph unicode="&#xf412;" d="M256 640v704l384 384v-704h640v448l640 -640l-640 -640v448h-1024z" />
-<glyph unicode="&#xf413;" d="M256 448q0 -80 56 -136t136 -56t136 56t56 136t-56 136t-136 56t-136 -56t-56 -136zM256 1024v256q209 0 398.5 -81t326.5 -218t218 -326.5t81 -398.5h-256q0 209 -103 385.5t-279.5 279.5t-385.5 103zM256 1536v256q209 0 408 -55t367.5 -154t310.5 -241t241 -310.5 t154 -367.5t55 -408h-256q0 260 -101.5 497t-273 408.5t-408.5 273t-497 101.5z" />
-<glyph unicode="&#xf414;" d="M21 358q-57 102 31 244l760 1237q57 93 134.5 126.5t155 0t135.5 -126.5l759 -1237q88 -142 31 -244t-224 -102h-1557q-168 0 -225 102zM883 1536l51 -640h179l52 640h-282zM896 640q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5z" />
-<glyph unicode="&#xf415;" d="M128 1024v256h310q75 172 233.5 278t352.5 106q130 0 246.5 -50t204.5 -139q37 -37 37 -90t-37 -91t-90 -38t-91 38q-116 114 -270 114q-159 0 -271.5 -112.5t-112.5 -271.5h-512zM536 665q0 53 38 90t91 37t90 -37q113 -115 269 -115q159 0 271.5 112.5t112.5 271.5h512 v-256h-310q-75 -172 -233.5 -278t-352.5 -106q-130 0 -246 50t-205 139l1 1q-38 38 -38 91zM832 1024q0 80 56 136t136 56t136 -56t56 -136t-56 -136t-136 -56t-136 56t-56 136z" />
-<glyph unicode="&#xf416;" d="M512 832v320h128v-320q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5t93.5 226.5v640q0 80 -56 136t-136 56t-136 -56t-56 -136v-512q0 -26 19 -45t45 -19t45 19t19 45v452h128v-452q0 -80 -56 -136t-136 -56t-136 56t-56 136v512q0 133 93.5 226.5t226.5 93.5t226.5 -93.5 t93.5 -226.5v-640q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5z" />
-<glyph unicode="&#xf417;" d="M384 1216q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5t-44.5 -222.5t-124.5 -185.5l-407 -406l-407 406q-80 80 -124.5 185.5t-44.5 222.5zM640 1216q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5t93.5 226.5t-93.5 226.5 t-226.5 93.5t-226.5 -93.5t-93.5 -226.5z" />
-<glyph unicode="&#xf418;" d="M608 1056l128 128l224 -192l448 512l128 -96l-512 -768h-128z" />
-<glyph unicode="&#xf419;" d="M0 256v256h2048v-256h-2048zM0 896v256h2048v-256h-2048zM0 1536v256h2048v-256h-2048z" />
-<glyph unicode="&#xf420;" d="M256 1024q0 155 60 294.5t167 246.5l-227 227h640v-640l-232 232q-72 -71 -112 -163.5t-40 -196.5q0 -176 108.5 -313.5t275.5 -180.5v-262q-180 30 -326 137t-230 269.5t-84 349.5zM1152 256v640l19 -19l213 -213q71 71 111.5 164t40.5 196q0 176 -108.5 313.5 t-275.5 180.5v263q180 -31 326 -137.5t230 -269.5t84 -350q0 -155 -60 -294.5t-167 -246.5l227 -227h-640z" />
-<glyph unicode="&#xf421;" d="M384 896v256h1152v-256h-1152z" />
-<glyph unicode="&#xf422;" d="M384 512v1024h1152v-1024h-1152zM512 640h896v640h-896v-640z" />
-<glyph unicode="&#xf423;" d="M83 832l373 671l112 -62l-267 -481h403v-384h-128v256h-493zM768 1024q0 87 43 160.5t116.5 116.5t160.5 43t160.5 -43t116.5 -116.5t43 -160.5t-43 -160.5t-116.5 -116.5t-160.5 -43t-160.5 43t-116.5 116.5t-43 160.5zM896 1024q0 -79 56.5 -135.5t135.5 -56.5 t135.5 56.5t56.5 135.5t-56.5 135.5t-135.5 56.5t-135.5 -56.5t-56.5 -135.5zM1427 832l373 671l112 -62l-267 -481h403v-384h-128v256h-493z" />
-<glyph unicode="&#xf424;" d="M256 640v768l384 384h768l384 -384v-768l-384 -384h-768zM883 1536l51 -640h179l52 640h-282zM896 640q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf425;" d="M384 384v1280h256q0 53 37.5 90.5t90.5 37.5h384q53 0 90.5 -37.5t37.5 -90.5h256v-1280h-1152zM512 512h896v1024h-128v-128h-640v128h-128v-1024zM640 704q0 26 19 45t45 19t45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45zM640 960q0 26 19 45t45 19t45 -19t19 -45 t-19 -45t-45 -19t-45 19t-19 45zM640 1216q0 26 19 45t45 19t45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45zM768 1600q0 -26 19 -45t45 -19h256q26 0 45 19t19 45t-19 45t-45 19h-256q-26 0 -45 -19t-19 -45zM896 640v128h384v-128h-384zM896 896v128h384v-128h-384z M896 1152v128h384v-128h-384z" />
-<glyph unicode="&#xf426;" d="M128 768q0 106 75 181t181 75h7q-7 29 -7 64q0 133 93.5 226.5t226.5 93.5q134 0 228 -96q47 101 140.5 162.5t207.5 61.5q159 0 271.5 -112.5t112.5 -271.5q0 -62 -23 -128h23q106 0 181 -75t75 -181t-75 -181t-181 -75h-1280q-106 0 -181 75t-75 181z" />
-<glyph unicode="&#xf427;" d="M384 384v288l455 455l-1 1q-74 74 -74 180t74 181l233 233q75 74 181 74t180 -74l286 -286q74 -75 74 -180.5t-74 -180.5l-233 -233q-74 -73 -178.5 -74t-179.5 71l-455 -455h-288zM1088 1360l256 -256l160 160l-256 256z" />
-<glyph unicode="&#xf428;" d="M768 1024q0 106 75 181t181 75t181 -75t75 -181t-75 -181t-181 -75t-181 75t-75 181z" />
-<glyph unicode="&#xf429;" d="M384 896v128h896l-343 343l87 86l493 -493l-493 -493l-87 86l343 343h-896z" />
-<glyph unicode="&#xf430;" d="M531 960l493 -493l87 86l-343 343h896v128h-896l343 343l-87 86z" />
-<glyph unicode="&#xf431;" d="M384 1152l128 128l448 -448l448 448l128 -128l-576 -576z" />
-<glyph unicode="&#xf432;" d="M384 768l576 576l576 -576l-128 -128l-448 448l-448 -448z" />
-<glyph unicode="&#xf433;" d="M0 0v896l896 -896h-896z" />
-<glyph unicode="&#xf434;" d="M1152 0l896 896v-896h-896z" />
-<glyph unicode="&#xf435;" d="M384 512l640 640l640 -640h-1280zM384 1280v128h1280v-128h-1280z" />
-<glyph unicode="&#xf436;" d="M512 640v128h128v-128h-128zM512 896v128h128v-128h-128zM512 1152v128h128v-128h-128zM512 1408v128h128v-128h-128zM768 640v128h128v-128h-128zM768 896v128h128v-128h-128zM768 1152v128h128v-128h-128zM768 1408v128h128v-128h-128zM1024 640v128h128v-128h-128z M1024 896v128h128v-128h-128zM1024 1152v128h128v-128h-128zM1024 1408v128h128v-128h-128zM1280 640v128h128v-128h-128zM1280 896v128h128v-128h-128zM1280 1152v128h128v-128h-128zM1280 1408v128h128v-128h-128z" />
-<glyph unicode="&#xf437;" d="M512 512v1024q0 106 75 181t181 75h512q106 0 181 -75t75 -181v-1024q0 -106 -75 -181t-181 -75h-512q-106 0 -181 75t-75 181zM640 768h768v768h-768v-768zM896 512q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z " />
-<glyph unicode="&#xf438;" d="M256 1024v256h512v128l384 -256l-384 -256v128h-512zM512 512v384h128v-128h768v768h-768v-128h-128v128q0 106 75 181t181 75h512q106 0 181 -75t75 -181v-1024q0 -106 -75 -181t-181 -75h-512q-106 0 -181 75t-75 181zM896 512q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5 t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf439;" d="M384 1152h1280q0 -231 -145.5 -406.5t-366.5 -220.5v-269h-256v269q-221 45 -366.5 220.5t-145.5 406.5zM640 1280v384q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5v-384h-256zM1152 1280v384q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5v-384h-256z" />
-<glyph unicode="&#xf440;" d="M128 768q0 106 75 181t181 75h6q-6 32 -6 64q0 133 93.5 226.5t226.5 93.5q134 0 228 -96q47 101 140.5 162.5t207.5 61.5q159 0 271.5 -112.5t112.5 -271.5q0 -62 -23 -128h23q106 0 181 -75t75 -181t-75 -181t-181 -75h-384v256h-512v-256h-384q-106 0 -181 75t-75 181 zM640 384h256v256h256v-256h256l-384 -384z" />
-<glyph unicode="&#xf441;" d="M128 768q0 106 75 181t181 75h6q-6 32 -6 64q0 133 93.5 226.5t226.5 93.5q134 0 228 -96q47 101 140.5 162.5t207.5 61.5q159 0 271.5 -112.5t112.5 -271.5q0 -62 -23 -128h23q106 0 181 -75t75 -181t-75 -181t-181 -75h-512v256h256l-384 384l-384 -384h256v-256h-512 q-106 0 -181 75t-75 181z" />
-<glyph unicode="&#xf442;" d="M512 512v896h512l-128 -128h-256v-640h640v256l128 128v-512h-896zM896 987l550 549h-422v128h640v-640h-128v422l-550 -550z" />
-<glyph unicode="&#xf443;" d="M512 384v1280h640l384 -384v-896h-1024zM640 512h768v640h-384v384h-384v-1024z" />
-<glyph unicode="&#xf444;" d="M384 512v1024q0 106 75 181t181 75h1024v-1152h-64q-53 0 -90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5h64v-128h-1024q-106 0 -181 75t-75 181zM512 512q0 -53 37.5 -90.5t90.5 -37.5h818q-50 55 -50 128t50 128h-818q-53 0 -90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf445;" d="M160 747l232 201q-8 67 -8 76q0 8 8 75l-232 201l58 139l305 -21q47 60 107 107l-21 305l139 58l201 -232q67 8 75 8t75 -8l201 232l140 -58l-22 -305q56 -44 107 -107l305 22l58 -139l-232 -201q8 -67 8 -76q0 -8 -8 -75l232 -201l-58 -140l-305 22q-44 -56 -107 -107 l22 -305l-139 -58l-201 232q-67 -8 -76 -8q-8 0 -75 8l-201 -232l-139 58l21 305q-56 44 -107 107l-305 -22zM768 1024q0 -106 75 -181t181 -75t181 75t75 181t-75 181t-181 75t-181 -75t-75 -181z" />
-<glyph unicode="&#xf446;" d="M256 1024q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM512 1024q0 -212 150 -362t362 -150q135 0 259 72l-699 699q-72 -126 -72 -259zM765 1464l699 -699 q72 123 72 259q0 212 -150 362t-362 150q-136 0 -259 -72z" />
-<glyph unicode="&#xf447;" d="M256 1664v128h384v-256h1152l-256 -640h-896v-128h896v-128h-1024v1024h-256zM512 384q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5zM1280 384q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5t-37.5 -90.5 t-90.5 -37.5t-90.5 37.5t-37.5 90.5z" />
-<glyph unicode="&#xf448;" d="M512 384v1280h384v-1280h-384zM1152 384v1280h384v-1280h-384z" />
-<glyph unicode="&#xf449;" d="M512 512v1024h1024v-1024h-1024z" />
-<glyph unicode="&#xf450;" d="M256 384v1280h384v-1280h-384zM768 1024l1024 640v-1280z" />
-<glyph unicode="&#xf451;" d="M256 384v1280l1024 -640zM1408 384v1280h384v-1280h-384z" />
-<glyph unicode="&#xf452;" d="M512 384v1280l1024 -640z" />
-<glyph unicode="&#xf453;" d="M256 256v1536q0 106 75 181t181 75h1024q106 0 181 -75t75 -181v-1536q0 -106 -75 -181t-181 -75h-1024q-106 0 -181 75t-75 181zM512 512h1024v1280h-1024v-1280zM896 256q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5z" />
-<glyph unicode="&#xf454;" d="M128 1024v256h512v128l384 -256l-384 -256v128h-512zM256 256v640h256v-384h1024v1280h-1024v-384h-256v384q0 106 75 181t181 75h1024q106 0 181 -75t75 -181v-1536q0 -106 -75 -181t-181 -75h-1024q-106 0 -181 75t-75 181zM896 256q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf455;" d="M256 1024q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM896 1408q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5zM928 512h192v640h-192v-640z" />
-<glyph unicode="&#xf456;" d="M256 1024q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM883 1536l51 -640h179l52 640h-282zM896 640q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5 t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf457;" d="M256 1024q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM720 1442l92 -180q134 71 234 71q38 0 65 -16q26 -17 26 -44q0 -35 -24 -63q-24 -27 -77 -61 q-68 -42 -95 -87q-26 -44 -26 -109v-57h204v34q0 29 17 49q18 21 87 66q83 53 120 111t37 139q0 111 -84 176q-85 65 -232 65q-180 0 -344 -94zM896 640q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf458;" d="M128 384v1280l768 -480v480l1024 -640l-1024 -640v480z" />
-<glyph unicode="&#xf459;" d="M128 1024l1024 -640v480l768 -480v1280l-768 -480v480z" />
-<glyph unicode="&#xf460;" d="M256 1280h128l86 256h340l86 -256l-256 -768h-128zM533 1280h214l-43 128h-128zM768 512l256 768h128l86 256h340l86 -256h128l-256 -768h-768zM1301 1280h214l-43 128h-128z" />
-<glyph unicode="&#xf461;" d="M256 1261q8 -158 120 -264l648 -613l648 613q112 106 120 264t-93 276t-251.5 126.5t-262.5 -97.5l-161 -153l-161 153q-112 106 -262.5 97.5t-251.5 -126.5t-93 -276z" />
-<glyph unicode="&#xf462;" d="M102 1024l304 -455l213 142l-209 313l209 313l-213 142zM772 543l248 -62l256 1024l-248 62zM1430 711l213 -142l303 455l-303 455l-213 -142l208 -313z" />
-<glyph unicode="&#xf463;" d="M0 512v704l768 -384l256 128v-448h-1024zM0 1408v128h1536v-128l-768 -384zM1152 384v640q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5zM1280 640h256v-256h128v256h256v128h-256 v256h-128v-256h-256v-128z" />
-<glyph unicode="&#xf464;" d="M0 512v704l768 -384l256 128v-448h-1024zM0 1408v128h1536v-128l-768 -384zM1152 384v640q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5zM1280 640h640v128h-640v-128z" />
-<glyph unicode="&#xf465;" d="M0 512v704l768 -384l256 128v-448h-1024zM0 1408v128h1536v-128l-768 -384zM1152 384v640q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5zM1260 656l272 -272l452 453l-90 90 l-362 -362l-181 181z" />
-<glyph unicode="&#xf466;" d="M0 1024l640 640v-320l-320 -320l320 -320v-320zM512 1024l640 640v-384h256q212 0 362 -150t150 -362v-300l-150 150q-74 74 -168 112t-194 38h-256v-384z" />
-<glyph unicode="&#xf467;" d="M384 1024l640 640v-384h256q212 0 362 -150t150 -362v-300l-150 150q-74 74 -168 112t-194 38h-256v-384z" />
-<glyph unicode="&#xf468;" d="M256 256v1536h256v-1536h-256zM640 896v768q35 0 63.5 13t54 32t56.5 38t85 32t125 13q70 0 125.5 -13t93 -32l75 -38t93 -32t125.5 -13h256v-768h-256q-70 0 -125.5 13t-93 32l-75 38t-93 32t-125.5 13q-71 0 -125 -13t-85 -32t-56.5 -38t-54 -32t-63.5 -13z" />
-<glyph unicode="&#xf469;" d="M256 512v768h1536v-768h-256v384h-1024v-384h-256zM640 640v128h768v-128q0 -158 113 -271l112 -113h-768l-112 113q-113 113 -113 271zM640 1408h768v256h-768v-256z" />
-<glyph unicode="&#xf470;" d="M384 384v640q0 53 37.5 90.5t90.5 37.5v128q0 212 150 362t362 150t362 -150t150 -362v-128q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-1024q-53 0 -90.5 37.5t-37.5 90.5zM768 1152h512v128q0 106 -75 181t-181 75t-181 -75t-75 -181v-128z" />
-<glyph unicode="&#xf471;" d="M512 512v1024h512q106 0 181 -75t75 -181q0 -87 -57 -159q83 -39 134 -117t51 -172q0 -133 -93.5 -226.5t-226.5 -93.5h-576zM768 640h192q80 0 136 56t56 136t-56 136t-136 56h-192v-384zM768 1152h128q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5h-128v-256z" />
-<glyph unicode="&#xf472;" d="M640 512l40 128h128l240 768h-128l40 128h448l-40 -128h-128l-240 -768h128l-40 -128h-448z" />
-<glyph unicode="&#xf473;" d="M384 384v1280h1280v-1280h-1280zM512 512h1024v576l-128 192l-448 -672l-192 288zM640 1280q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf474;" d="M128 256v384l154 -154l230 154l-154 -230l154 -154h-384zM128 1408v384h384l-154 -154l154 -230l-230 154zM640 768v512h768v-512h-768zM1536 256l154 154l-154 230l230 -154l154 154v-384h-384zM1536 1408l154 230l-154 154h384v-384l-154 154z" />
-<glyph unicode="&#xf500;" d="M128 0l960 960l960 -960h-1920z" />
-<glyph unicode="&#xf501;" d="M0 128l960 960l-960 960v-1920z" />
-<glyph unicode="&#xf502;" d="M128 2048l960 -960l960 960h-1920z" />
-<glyph unicode="&#xf503;" d="M1088 1088l960 960v-1920z" />
-</font>
-</defs></svg> 
\ No newline at end of file
diff --git a/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf
deleted file mode 100644 (file)
index b6f125e..0000000
Binary files a/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.ttf and /dev/null differ
diff --git a/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff b/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff
deleted file mode 100644 (file)
index da8be38..0000000
Binary files a/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.woff and /dev/null differ
diff --git a/wp-content/themes/twentyfourteen/genericons/genericons.css b/wp-content/themes/twentyfourteen/genericons/genericons.css
deleted file mode 100644 (file)
index b10b86f..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/**
-
-       Genericons Helper CSS
-
-*/
-
-
-/**
- * The font was graciously generated by Font Squirrel (http://www.fontsquirrel.com). We love those guys.
- */
-
-@font-face {
-    font-family: 'Genericons';
-    src: url('font/genericons-regular-webfont.eot');
-}
-
-@font-face {
-    font-family: 'Genericons';
-    src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAENIABEAAAAAatQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABgAAAABwAAAAcaii0EkdERUYAAAGcAAAAHQAAACAArQAET1MvMgAAAbwAAABCAAAAYJdbaIVjbWFwAAACAAAAAJgAAAGyqWnWY2N2dCAAAAKYAAAADgAAAA4BYgHJZnBnbQAAAqgAAAGxAAACZVO0L6dnYXNwAAAEXAAAAAgAAAAIAAAAEGdseWYAAARkAAA5fgAAWkD4H3YjaGVhZAAAPeQAAAArAAAANgUfUT9oaGVhAAA+EAAAABwAAAAkEAMH3WhtdHgAAD4sAAAAiAAAAQpVkUB7bG9jYQAAPrQAAAECAAABAoDMauhtYXhwAAA/uAAAACAAAAAgAagCQm5hbWUAAD/YAAABYgAAAthC114IcG9zdAAAQTwAAAHUAAAFCuMEJONwcmVwAABDEAAAAC4AAAAusPIrFHdlYmYAAENAAAAABgAAAAbRQFLPAAAAAQAAAADMPaLPAAAAAM71j4QAAAAAzvWBvnjaY2BkYGDgA2IJBhBgYmAEwnogZgHzGAAJvwCyAAAAeNpjYGb/zDiBgZWBhdWY5QwDA8NMCM10hsEIzAdKYQeh3uF+DA6qf74ys6X9S2Ng4GBg0AAKMyIpUWBgBACOigvWAAB42mNgYGBmgGAZBkYGEFgD5DGC+SwME4C0AhCyMDCo/vnI+Ynzk+Qn1c8cXzi/SH7R/GL5xfNL5JfMLyVfmf//B6tg+MTwSeCTwmeGLwxfBL4ofDH44vAl4EvCl4KvDP//32LnZ+Hj4+PgY+LV4DHk0eZR5ZHnkeQR5uHlYeeugdqOFzCyMcCVMTIBCSZ0BQzDHgAA5FwqMwAAAQkARQBBAGYAfwC3AAB42l1Ru05bQRDdDQ8DgcTYIDnaFLOZkMZ7oQUJxNWNYmQ7heUIaTdykYtxAR9AgUQN2q8ZoKGkSJsGIRdIfEI+IRIza4iiNDs7s3POmTNLypGqd+lrz1PnJJDC3QbNNv1OSLWzAPek6+uNjLSDB1psZvTKdfv+Cwab0ZQ7agDlPW8pDxlNO4FatKf+0fwKhvv8H/M7GLQ00/TUOgnpIQTmm3FLg+8ZzbrLD/qC1eFiMDCkmKbiLj+mUv63NOdqy7C1kdG8gzMR+ck0QFNrbQSa/tQh1fNxFEuQy6axNpiYsv4kE8GFyXRVU7XM+NrBXbKz6GCDKs2BB9jDVnkMHg4PJhTStyTKLA0R9mKrxAgRkxwKOeXcyf6kQPlIEsa8SUo744a1BsaR18CgNk+z/zybTW1vHcL4WRzBd78ZSzr4yIbaGBFiO2IpgAlEQkZV+YYaz70sBuRS+89AlIDl8Y9/nQi07thEPJe1dQ4xVgh6ftvc8suKu1a5zotCd2+qaqjSKc37Xs6+xwOeHgvDQWPBm8/7/kqB+jwsrjRoDgRDejd6/6K16oirvBc+sifTv7FaAAAAAAEAAf//AA942q18C3xU1bnvWnvveSaZmT3PZJKZzHtCJpkJ88hkIIQhCAECCAQCCCooggTkjS9q3Vqpioo9tqJVK2hbsdpj90xA2mJrjtVaW0fLFbmt1h6xp1ptPcfe9rSKmc39vrVnQhBsz/39bmBm7732npm1vvU9/t9jLaIh8Ef/yj1DeKIlBlJLzIRMFP1i2Mbb/DXUZeNdIv2r0vPEE166+An4u/MJ7pnyBZeS0+R0+XVymi6HE+X4aaoQSsb9TSREyxEOvlQjwXfrSA18s424yJVEJgmZlmQhIVtSsqYki0lZn5DtKdlQkh1JuTYh15WoXJ+QhRNFoq9NJpOyrlTUCcbYcF7HG/C9xhCTdZaCncZkV6lgsiaTRbsL79sthlihgcZIx0Sa8TvO9+KgO2Xo7GnCSWVJIGWJk07DNUckiY57KZUj4Sjc1cE/GION9BLZmJDNJdkGHYR+2mEwJ6DHcp2lIEJ/dKWCg8YKYp1oHRYMRj7kypGCzQxXVKsjcNUxkVisIZ9gtXCCL0TszmRnOhKg5BW6mj5KV7/yirJfuUTZT5P7ju/bd5xPjG985RXuIWzdhyQWiEQlnaSVGHVdxE+uZ7SFvvkSciMQMyHzpWEj79DH5JqSrIfeBlhva0tyraVQD731lGSPpWCFM22pEIR+11LRWtAbczm5XpS5nOyBUfAOM/RbtoqyBsbS6IOxaKm1FtscYoHT5GBMNuAYv00jIoVtdpJKkkyaBAPEle70OR12rS8iAYHZ/0+ArHmq+8EPqVY59cMfKJ9IR6nx6FHlb0epxCPNTxNpVBJ8B1aV34a7Y0/uPnp09y3PPIPj5oh+PF9Nx3EX9LWpFDKWIYm8BYxVl6SyJSGTE7KQBErIvKWgp4wU2qRcY4GxxoBYOGsEB+AXaeWVghfQVoHuKHCEA0fwUn1XiHprVALRwSYtzgEHFyJcCvABDTAV3sNTCfimjqQJlU2sK9AvTWnYoCEwKcYS8pKhVDAD5Y1EtALFCxoDHPkccnCFdjpRI8bh207SnpN3bz1Ntt6tkfafPLn/C8+3lP8gcfe3PM94FH5JS4iROMhKImsTspgCZpStSeSJGkaZWiCIk/WCUUP9/aKRR8kxakGmgEI1QBRTSTZZZAdyUNFhwrsOEeTKpcoVEMdOgmKyM+M/cwryIynHjw/t46onQDSQr+PKcUr2DY07JRzSjNGlgaTIPoKiDnMSS8he4NA065++VNQT/GG9AN3SWwpu6Fa8VIy7sTE+ERrjlkIdNDpKxToHNtZBF2WHpRCFRn+pGPVjYzQE/c4Add164GtjfS5XqIsD/9a4PDHg30LUAc3e1hzwdawGJVYMTWQySsV0Z9ahdYgonxkxHc14KVwAH+MdmBY412XwTiSAT7kcMENkaDC/5cCW/OAQ42aCfD3WxI1QafX+8H25JYq0YMuWBVRakrsvvH+1IgFjcxqKh91K5RHKHlHUR0DWgbvIiA5pZiVB0kZkf0K2pXCKgMFrU0wThRJy/QmQ6EIY5qkgWICNGmAkDcBGKX+S9Tjop2IwEKFZPw5KbYsB2x5YJZBVBw6sUvJKXlp1gEfN8vivsEVS8sjR7Ca8K3k6ckBZJf3qcSqdaSGEp1U50EAPfWRmRctT7Kj+BOoks6XghKlpKhUCMB9mmI9ho9VWj1rEKRYafDgHFGTgsNZgdjibKrMAHabhznQ06+VRElw9NB2BC+qwm6gOf5TJZaa/f4V7gscyOXNR34UX9q1Ydnl8YBJPkNE+hVd///H+FY1TZsyNzr+z86K+o7882rdi+Qc3L33srslo/uCV1oNGIevIBiJfkZAvKcmtqEGofCXjxs6S3GkpNFKU2MJ66H0n9LPYP29BDvRko/i0xuLovmDJZUzVX3IFcJTlMrjRKuZrjDYPaWlL52cPXooD1VgPBULhjiQbnJi2klAqKRCrw0I02kgm3ZlJR3sEfOMi0Tg1cbpIVKuL82aqdWkddi/v0upMNE6jcSHaSk3U6fIKLq+uM2tHNRENkUepje765TG6i1ofVa5TfhEK0BnzrpMGs+u1Rr3ZJtSlui/PXr1nz9XZy3oSRuOkjvXZQem6uZnapqnLlvo4gyfQ6RFqGwyimzd43IE6ytdZm0OdUxbFaSCk/EK5TiC/pF+AL39U+U9l9zGlUP7jOl1zg/D8wpsnG5pnDT217ZGt5pZZl06knGCdGPZznD88UdRy3D03bN+/7amhWT594qI6E+3KCnXBxnpOV+O2wtiau/y83t3Q3OAEXZS8Vqj3addxTrRxOnxjc2MmjYzzJ5E+soDsIMU6QmJypITao7kkd6nztZDZNwuIhaVwIcxXbxLV6yKYsgtBHvJ1mto6wdnUHGppz0yexearPgLtRgOxtfZMzfcumIvT1Cwe0tMmz2Q877IW/YkLcmjj6ilMmA/mywJqHkw3b7e6Okk2Eq2l0awzlOWiWkKd/mSW47XE5rT1CNlIKBjQUi/n6hRcXNTE2bwUPmPNhr6FM0UfgpftW99SPlR2K2vg9WFox8Yb6Hffs+SVd5Wtf/c9R/+6567h55Q/U/FXdNbho/7v/Va57W9rf649MO+O9RO+qBz5gU+iC5yeqPYJOvd695f7nv77YtOkFZ6HXq5X/sQnz/3+b8HvcrMPKq9eW6Kd8zqkwWT9V5yz4tT9tyXK0U8fGFlA2+gtc5RjmvWPKY9xk3w9vaEv3mMpb/GkFtf6tY3UM5y7dEh5tPF+5ef3baSLR+JMfiTaBjjkN6DNYdgpXxY41JlKwmEKsGicZtJZp+BC/k4lXZ1ZrQ5fyLImXgj6pI4WSn52zTOhqDeRvPHxBUvnLkvuoXveMf7q/gMbpfWt11y1dvYm2rPz6XeUX39LeZUe03yDu3uzrs7981s0MT756CVXLH7iFzXR9vv/9w731Fv66to3L9D59Nd//MEv7l+KfSOAkXQSiZILCKpIUJYBMG9JWUzIvpTsLMlulXVaAHeeQDAKMNRgAVwpuwBLpQoTgHlcgOZkd47BhPHaVPTb/FNQv7qykWDAxHloEMFDICLtG9KQoX37hpR3qalWeTfW+5h2/vpL7lnWpijltqF9iBHw9qfwzr1IhZHa7iz9P8bsJTsv+JMyWs4hwAOLTyTNe9D3BjKf6VMHs+K2ZJFQNG7EBRYPUIVetexupv+5JHZdTBZd9fiMy2GIFesZNq4nYAsbKzY8JaZ7uFTS2Ux54FAP5+fRmHPSb9Nrn7wqO+R26/5tborONikvKCP8SzRBufl7NuW1PK+8m59helU5NnqEn01A21fpawbcsRiQx1qyl8h1CXlpSW5OFMJpwGSNpcKEOKD4RSqh142T0W6Q0QuT8ppSsXsN9rG7H4a0xlJYBe0guFcC7btRcA0ouDbnkuUXM6FtXorCTPUGYrcFsn0rL161BmW1UTzkjM3qR0UsL7IWWjpQaq0WaydIrROkVgtSG0GppVpbKtk5lXY6tTqtjtp40LadLqfa5qVqYw+XSaOuNSDjulCSBYpsHYnytNMKWho4WCft/YjOpRvp3I/27v1IOaR8TTn0UfpUSblx5u50eGMw4LCZ7G0TaUS+YYndbLfvvjCyIRi02KjZEptIgwvrATnU2zmbxqKt1eh5fv4k4ybl/QdfVR6iF27ZsedmgfuY3nrkjcs1U/g5n/kVOOO4Pym71gieh6hJw/G0OcBruNH7OJEu03EBHzVio63ByUHrw7T2wtxKf3x5JiB4jY019SanaDfmBukVm58/9XV/XKvhDpb3DtHtb7463NJ66wOqfzE2tzPIcnIFeYjISxNyS0qeXUK+AxA5HRyNlGwvFafbcfqme2H6GoAX16pzjJ4bOmpg8WV3Ug6Btk4WAyF8NNAF3LgO5lcHHscwb5q5AmctIOaNmhrvhFhv/+LB1WyuZ8NcF0lsJqjgAm+Cc128C+3udPEItfiDockrL2Pm1Cbi5KCZpK6ANhjgM6qkeqhfDIp+hwrrUWrBzIJ51cP9LDtNZf0BLd9DXWBPNS6cVZBgW6TTBd/k1AJrSDeUvB6fu9lrnW07cp8q2uCknGaqDyCtotFcfDcfNIdsHlHUx+ceumjgwK3lR278/YzcG9LiObbBULfHo9PR8qElt01z3L3ruh85HdKuG16i79Lf38hPyfm7wx4qaKehRlD9H/zqUfiVJufdT23g3LVNYqO93mFMz5x815GtRzr2Xnbqm0vWU9pQN7lhYmBigyds0V8hdD7ya0H4/TcPjAjCL4mKycCAap8Br94CunkWQ9owB3wCcEwVaasT5IEJ8pYYUtYBtinUmYDCHrEghhCWhepF6yGLua09rqIyu3MyBQAZp6A6bKA3gMLpbA9NJREjw3mcA2Wo0WX8XmrhAKVdsZBbvJauGRhYZ6NzlKcBls2usQ9OnTTXT2fn1t2+KNSbSvh9jhrlCIU/rTj7sstm969aferb/L+P+rkJnY3JmZNWzyj/J9e15bsbsjW2xsZgk3iX+23lPeU/Lz6LT5sAe2bJDUwDARL2x0DtdDBn0Oc7IcqdKdkG/pdFdsP4u9j4wQO2MCfYy/wG2a9yawwcEkuhTVVDOSCL18NMgOwXC/UuIE7AKmdyckwsdHQiiXxwu9CSUV3h8SYC0PbnkosRixkOoNWYyUCbQMnCaXT6ALegd/oiC9WBF/x1qtdbZqR2U/3B25MLuwIW5ePxRmSfcO2kCy+c1D1v/qdH+IbR9+jRdltL17CyjL74vafr2yINW4AZngRAtQCw1DTyXVJ0In4yJ+QJJaSQFgjSywiSKckZS6EJRg52MmAptDOXuTAdDp3uH/bUfDSHOGJGk9wAVBwp2OkncmRk2GqP2GJFePft8e0JakFMc+SQ1d7gjsTxj447l/NuWmjKgCC7clNQkANiUevswLN2a8E8AanZMQF9NNLco0o2mCoEyk6rw84J4L9EOVDQ0UjWpmIKJ3MGtKi+rSzqYOIcdhBeHaLlaIR7su/eYzT2lEwTL+94QvnZi5d/LzDbErj4Xp3n0Za71g4sC08xua67YucPLlc++PiOD7+xbMCq01kMuqDzxi8Jf7rqN688fOl1Lymf3vk35eqTF+eV3+Z2fbXz4C5OXnjNHUc3LErd81zu8q98n058+gQ1XX7wzWu/usbhrp/SUm8xpKgaXhvDsINkNymakO4AO2Yn5C60kcwmLmWkD5fksKWQAkrPLclzLYWZcDa5JE9W3V/wPZYBI85NAW1iiYHFqC9nikdMGltz1zTLArycbC04pyIBnSb0QhYDTWeDF2IwEps7PCE1eeqCz3geiGSDgWhnFoCpSj4mu+BrOV3OTmDSbGckClRmWAHJDNTPomEErgVVC/ABpsJ1tuOh+gZfvXuOZ1bT3gWPlvdc8tjf9971f75zfW5ondUjcBZeozFd0CeNbH3p5IJ9lyy63FYz0ds3fdF2i96w1VavBbT61Fl+hnIJvP7z0dYd66g703+ETv3ZtuPfvGzeTY8NL9/zWqveZDPkDTanOP/61cVbF7751Nf+fu/OBfGHr27tXXr/1thCm00JD6zecy0dZX70AW6VbpXmAChGM2khTBeyOIlJDRZRNUJjKRiA4nXV4JDV4vR1WiI+oXI88Fe67K9/VR7n7qycCN9VHv9r5ZwdK7iY6G4EF8ZPMgRjnPUl2ZqQTSwOh9E28D7ADZa1GFsrEo0FZcBkHa5r8vhUxncBdzdSaypJic0aDvFwCUyNxi3CowxopcXX2Vcu/MrGb5TpJrq61qL8Sbnjlhn52yz6LVu7Znfb0xOPLZdv1Fy+cbFysvwX5ST93/QnlKcr9LXKgOf+lbJMzRfSWTRh09+/lTD6VGOKZvDjrYRimJMgWsNgKzlXuYUNVDq5XyAYjxqFd45FfdD1xhYF35vRSUd60F8RSdsCejoAnpxsSMC3UjmYkJtOYLTSmSyEkCQWjH/VoZlJiXZmgsGsd2ZFGHUUeVFEoBpEiAYg7Vc/dbtvufTiGzatWHbtl2+f290mivQJZfC02N4xe84G4dHyHdf1Ttvma3bau6h7WaihPf4AfZk20BfuWH7xlHzwLNsRJDEymdzMbAdYCW9CjpbkhoQcSMkJFp4SSrJgAaGlcneFKAhhfcAoquCCp4ADabRgpExOMddzCkhs2AcjCuTkCeKw19PGvMpGjM2QQkMUZLnRF27BtoRYCE04nwEB9z7FAjZ+EEEwcOBP+UMVTgyrxgWckEiMgkieZUWk/oyGZPqVjyzKcWWZctyifERZFPGk8hzX3J+RMv3s7SxDMoSNPOntwXhd2/Ge3mbluZP4oerT/RlQZ4AtKGALhdiJCzzzZqBeFOgXB9+cyglGHowfWjAYL3sZ9GuB9zFz0gF0aXDA6J31Tcjsckg8pNUgnnOhHRgOhFvbEP6xSFyWdiZdFOmho8gGNDKVRm1UDPOusMi7snAe1YiarIG6MpR4uB+LLSL3Y4+n3CvarbZyr+eWb387w2mUd957j3oPvv/BB72c5j3lHep9r/wpvffbvJO+1lxPX6upUdrrm5V2n1Npq6mhx50PbdqkPK48TtPP0q4HnqWp8rMPPfRQOUCXPfgs1/TsA3RZ+dlNvzmLhzJkKXmGPMZ4yF6SexLy90rynETV9fnRONcHsYUaWLoHzq4pydeoxAKm+TGGmNqAaZbm5HvEQ88sX9d7AOlyjbVYJ1yNWqJBzNtqNXZvoCPZ3TNn3qVbbv/6Y/9aHGaAuccOtjUyaTIC5jnguD5N9RZv97zvY7xTswjudSRTuc/xjIRUMoSgOM5FUfJAxwjRSCgasWY7Q1lA1wLHJFLIwjSgYz+V70RD4oqwpwSdltPg/U40G3E0wFoA1U5mR1B44RJvZ+PgUEbQvOCVDo033AS74vJyzGTjBWWP4ldgMIFMwbhXJMSU3nl8rp436bVv/Ynetnby0n0vbd8hRztnb9usPH3wceWDvjl1S5fR9iLn/6Vy8Gf3iY994Vrq2zV31r3lr93Dm+hl1PrQN6n3slDgSuU3+7+hvH7VVWuoqH/gqk3/PnmKs3/mmxcusTtSyZUrF0TSejGVXjwwOVerjTW3JOKz6jiTweGcMbfPFo9Y+2KxFf45Wm5wd+8FV3jqw+9s3taVjQQ/uOlL3+e1Swfv2HbtwIqfUIdxw+K1yl+v2jHlc1y6t5Tb3vz7y7fdvPPYQ0P2jueuu0956tpdWzyNv93/EL3q6w/+L6/W8rZy74dfOz27z5xzfE2598R+GMU26c5duegX79Xqdm7eoPz6+mue9/oHLl7xzpx59u6eSy9bvLjeNdHVN2FZ3yyNtjs7EJ5qcWhoV4z3zvF4/UIsMHdRNKs3NDRfcMW0DQmr5ao752xYF4tt33nddXe6bG/cvnf79tZgU4A6fsJteLZnnn1yz/oNpOoj6gnw/nxyJbmR3EFvIrImIa8tyVJCvjUl31SSdyeL0k3o8kl7DLHiTRKe3vQlcBRvssjXIyoHxBlNyJtSciuIyJ0JOXFCXl8avnB9Qh+TSQkDHxeW5PWWQp6l+2SXRc6W5GwCTgo7oMlXGr7ct0PNcfkshT3QdHNSvr0k35Is3r4Hf+32W+GH99yOp3skcDvvUrGsYevIsIplZ1nkmSOFQe4TednID4UdIy1qc59FnjFSWMp/Ii8fKcyaqYeG4Zl9M2yxQt8MPXxouG/WTFtMHrQMLx1cBq2Dy/TyUsvwsqXLbTFyZMbMvlmDS5ctj1f+6DktDArn14NIZjSbUKxdYnHl2utRcH07QDeK7ihahsKeGtAFE0C0pbXQSgDRoTa4SSw6XUzKo9dDszuxfoeKGuxeQGs94P/GhQSNc2mQPowqxwX0dH0gYBhKBqNqN6G3zLlMvM7EZ9M9fLYHmsEHdoDdAQ+44tMBGNSZABXGeZphTrQDHWopf90LX9j5i39Zl6zzeTpD/iU2m6ve5gq3dfvqLc3eeL39nvuURuXjb8ye55u+8ouzbV16quUESo2NJtuUOXfuSiVnt1hfDcSmheqDA7Paa4O2VM+0UHPt0986+rurU00r4l2XX5B0TbampzRNWjO9w8EfZYAKnGP6y95rLu1KDm6VprfMmNKebfb0mm2xjoTT6Yn09ixPxuZPhQvLkpvyBxd3bbikr1XDiYJZZ6ox69xtcVuDoHPGfJ7++X2WxMKOVrOhRtTxfCiebU2mvFvvOiAc2pQPtuZWbt+R3jrZ5rHmLtq6qXzqjF+uYvovg87vAr6/CP3qvgTLrq5A9V5IA3cBgzYni+ksslw6AbyetSAUAJtQWAnKPU1hzi9cMohznhULgb4cWjorThTv5ZupVwMk16CWFE1qyB/OvBygIL/YAfoT9GtcGw12MBBkovgRXZy/qaZv+syDBwuP3L9rpbuhtuWqi6/ItsQ2br5285VLp4lWytWIvpap4fSmxTNsVv8F07sstGvaK7vWu7jg1EUrVg7k7bbeX+/NtTQ28GJjvcFwUueaNEH45iM/XTl/22QfZ2pqMBo0tllLvvLo725YfvtA1qapq9NplT/ytYFAe7SlzsY1eGvraH0gZgq188Xyu3W+lfO/PffmFXPa/WY95Sw3JKe1r1owb1JbTe1LBt/6TYg37wI6bgc6+sm14JUi3mopFRtakHANDiDchoR8eUlekmApwSXVlCCVr0vI3hPyCnBRS8WAl0WU1oGUewN46iXwyRWWQpyB+GK8jmUNe0D0rwfqB7wgTr5cIb4CjKPgaGjRz9uJAlUnymYQspYGuA1Sd/kGkCpzPMDuLRGH67ykE0/1iNiZV0oxnl1xTHVOHXOPoiA6oQh4SFlw/NH4MfSKmZ3I+H9wH6PhzuoTldvBAE6pw67ewH/wzRXkW71/15dO7r7rmhn9T9Kud3bbUvRLJ2/ZtfHCuU8qP3tntzid3tmZXnrNkX1bN3dPDgSnTFoyb9PyxqDfLwKoXLm6LebzOhoSmUCgoX5SbtHg5js2bsjlsumVl37x4ik5v79n2vr57QlXo9PR5IulgyHNfbtPfqm/dvc7ys+eXLVkaDNcTTJ9+R3a9eTgwI7yX/rnz01MjccXL1m3bEpPJNrYUG/XG6xml90TD4R8vp4OmzMUXJlMtLc3uFuic2avXnvBtJYWN4CyZm8yP6HN6fQF0hNdbr+f+QcgY1rMcSbJCiK3If4uRttYGrcOpzyVkHUnZLFUFHXYKLZiLYjYwN697D0IHKATWaEIBrvTWIihg9l0wLRGEVARllQE7QgThMoOE4laM0Wwbdfqxt5iNOlk2Bu8YSqNTNy0Ok91tW6rf/lMi15PD2T6OyJO+N+fySMeVvLTdvRd1ErB97nkkY9v14jt/qbFDyxaciAc6c9M6K3zR9kbPDrU39LRwsIBJbpXl9JtJxPJJDKbLCJryEayg9xAryaYe5xaki9LyMtLxeWXwWjI8kHg55Usgr4hJc8rFdPrrsG6mK6E/IUUxmEBYTsS8paSvEP1qr6YkNtPyN2l4WR3+5gVTZbkbkuhH2RiQUleYCmshbOhkjxkYcGdSEnehtbYVhq+LjJdj8Gwwo2VoM9P/rJLtYg6i6wfKbiFT+SGkR/++eC/PYLNBXeDHsNB9SOFWrhTN0Ke1ulr6+ob3FXL95lrZve620VrIZEGDdgvDvOaLiZbC6zF1oGlqBbXisNT+5azUP6QdXjCiktYAnW6mDdYHE3eq7Zs3/kFbIhYC6FrMOKxaDlMb3dOnicejrQnQpOnq8m7w+A4kZ3X4QUvFjVNffjdDmtB2wh2c8cW6ILNynyuSnLKBrLq0qBkO5kRjIZ5p0uNMamsgUAZhDdOs3Z4HMMgTrsTYTOGkjFH4GQhKbs2YE+D18KEGy6ZEIfSnexOtegHv5qFUkpXD6zpPvL7lRqr1UFz9QMdc9avn9O3VqOcmvfb73WvG9jZFTe9oDylbFP+9QVLW2ZtS2KJp23CpIVP0OB3n6TBJ55Q3nryu8pb26bFE9N6V3pbzV13/0uXudVrHvzB0UH6L9MugVba0Z5vb8/TgY5YbkK78JWBqwdWG+hLzppazawJE9d/bf3qvm7li7WrBq8eyK5oTE689d3du39/a7KzcXkm0dTfE8q9cuLpoaHDGzbC+ycre3tX9t4f85q7uszemHlw8H3Wwl+PP9Fe/vGUec0dLZMI1qVwGIOWiAd8wzuI3JiQ21KytlTUNqKYaikwdgtj3tpS1XE8U6pTX5Lr1cismKyk7QJqhUer6kLqeZj1RlasVJNjir1Q247soG0EC9sQCrPpFp82mC31zT4/skGtVTbm1PIwtbajh/qcLocummGlHDyLcYUzriy7PYX6WfUS+Lu6xAUJzYvU+aLmG+vhlNKX7tr7Er9w/TfwQveS8h8/4xcee8WfSPjpe7f96NnbNrR3rAzE4wGlec9zP73tf3XEj+O9Xx2746c/qdbr6DCvHSJTmL/oLMkeFm1ATzHMKCGWZFEtPACvMALjbRQxOF+LI/Q4mRVTS1Uq4QKsKOOI3UWzzmTWRTuRt3QGGgnoME0hgHtfLSSjJEKHhPDesIYOhed0ZsLKG8qb4Y0hLPZgeUvpGJab0dX01qGIsk/I5wU6FBmaA8/RSDiMGAhzf8+C39vL6rDU6j5iM2htGZeBZh2UN2glehVnU+4u/5kz063lD4WH6Ta67eHyR5Sz043lPyt3062cWfka/ygNKt9XXuYP0OXKy8qRcnb7OppSSuu2Kz/hfkxnKW8pB/kXaFo5qPwG7QTWwmCtk5U4yLgCGFuiEqSi4rklL5Xxw8iwxgXLk6oDHdqHNSz70P5wwKlarPMLsnyroYR1VMCOHHx7bQLrjUjBgHVaOrU4xQVYmAdQjaZLgi8pS5KU50dOA9ODZwRoUSpX6ge12F+B1JJ6ghWOWBkDU25EZi+YWKcN1C/SM+WAGEIrY+3KEFgNHi4VuBQyeNU/Vm/D+KeZhMnFjIMcjIOQfSIs0KCyDwaogiU5OBZeAPkp+ICRhusEuwf9i4agaD1c69A0hcIsguBxwDVmV/3hasHiWYECK3gNYELTcS5gophLxlKczT+iGvDnNT/avPlHyqfKO8qnPxJXPPj6B68/uEI90G9LtPUivvCZh+CMM5x5Cg7KQ/QNZYVyYgVRa8W0qD+A7MTLZkUoYe4ea0StCbkGa4sKts9MO6koWo6c3E/J/pNlwoopEWBgWPI04fepZZRn6FhDGkkbuapaQRnDqpJirBmVVCwKSqo+AVxQ0BiSrJRQl6RyOxNRtZaSA8qqcWMMAoZKxQmY5CQTPPDJkKWgZYSXDRbsKYa/4tVSukzKwV4irQb5QGb9oIeEdOdkqrJwIJIBFkYuAoABQ/iU9Gd4FogbZcG7iFtyRyLpCFhVCYQS/j6FZ/E+x566KB2JuBUCz7jH1WpVxtxJ7quOOZOQ0ykspjl3rNnzjvWcYXVV8ELDR19CYCCn4yY5NVJo03wit4+QYlt7CtHAMBzTYzhAqwFma4pEWya0MubLmEG+Erl/Sp2UfzLnpS4Pb9eBzo6CQbb9YyKBKaK8089zkrbd7W7SbXzq8+nF+VwcRzmNEcjWpIPnaYHUnkW3asQzQVIkSyaTqWQ6OVKlZFOiEOpIpVgx3kSgoi9RbEl3p6DFD6yRmYLYrS1R6MpDS3upkJsG1+cS/YJxRG8CmeV8cK+5VBACeLRguLzQ0gbn0VKhFQssohZmFNNdcJ4qFTon4ZEVWRS0eTifWiroe/E4NmEz/ikf2qCVh1f1+Hnnn0d56Tx/5yc7Kk+qas1zirDHtzP/mw7SQd31uusBVxDaw2WxAis5lWKlINVFAmaqtbt0UQrqabDW3tVB7/jd4fCGyOFI5DDXfDg8FDkcDh/+nbLzghV0sD29UL0fPhwZCh8un8Sn8JF34H6SjKv/tsGvzWcWx4VzzDStl2laNdbtVvVrM9abYmxbI5gsCDkMiE5IwYUlmaac3CQOU1JjUFVruodLejnw8iiLbcep1YLV0xaCzFxRiZvpf0mK+PXv73z9wfCZwmmhv6I1d37/64oo0f/avOJBjlf2Ysk02FlWOsef1Xc/WVvtvZdVzVXGEDh3DMHKGA7jGLy+84zCKw4TR00Dq5ezygYcVpG67Syy/I9GxWMd/j8e2a2c9M8Gp6iMcPb4JpDhceMLM10WTBa9TIt7W8A5bGaRgmY/qOXK2FvHjb0Fo4koTnIgWYyyGEQ0DJ9qieJpCxa3RMcoFEPpAwrJQk6OikVXE0vfua0FDdZO/P8j1ljE7Z8RrRoe+x+Q7qxYlgAS1KYn2uOkjtVYxpBLahKytYTJuWjFFrIFGUAvcMs9J8YlvMBLbMcclwd4pUbk670sgzNBPGQUrM0BptGjCC90JkeTH9c/YM2Ex4cDFymiCgCLCCqiPOCCZGcW0Cr4VDrO0ulzWrQ+axUQnbqC1tA2WrOGfqpor1D+Wzmu/PeaP9Jt81741fNz6U7lroff3vhCv1DJbu1nsEkg9NS67dvXKhpFs24bYMpTyl3zBwbm0R10+yOL5pc/VB8+yVVhFWDaKi0QzzYCLVIkzzxyoIBBpUA6gXUypNDcCi6GpUnMsenOG4nO7HJ7wpF2LO+VBWtRa7XlquME51LHBkZdZuqiUcr8TRqxZbFsAdUXkiEYsFEni76y8e77t2/fvW4LDEu586PbwhdpyEWj7Sf3t3UqbSY33sCB//k2ei0jyL5/u5QeN8FtddSX3h1fNB8/9yZ+rjyw/6RJaessH7k7juP/863KbUgTehk93tm2/yRR6w05ieHUGkIMHGbTDBS8B06ieWUE3mheUkbYmzLCk7Ov2TNErbdktQ416AvQsS+R+PzoCLzxeWl0hL2NjgDIPeuaPYMyLVUwXw1orHZyC8EqCUR5rmSyaGbCbDaBWIqOBjSkrNC8YAwzm8pkOg4uQbXm3AI8aivJtupqIcwa1LNEbSEBfGsBtFHkAkEMo7vsWMMzQV37YgDGbcPFMJwhx9zFcAVcahyIeMf/U7O0RDWczGwi0OzPUAQeZJRUrB5aOGxAJIJY7DRxoxlkWVWpTLiRcn78C9oFcxpxHbN3hHrB57kXcDAxgGtFeaqpwdbfHKFv0jeP0N+UDx8+JNyoPF1+n85VDnEuOodyrvL7aL9Uv0aCqTWSVpaf0QGVQMQ11fovdLaFEq6IKegxYEYxHm3gdLggBiuWJOQNaRTr7UF1CPCFoEUUcFHU8v8xPx+1iQFXwhgoWwpE0ZHhySm4AyOEMeJ6mnKeB3IoqL8FNtcj2hH4nJ7VqeFnhSzNoozgSwJHbWQUGQ01VvsqbmCVMg/f4ZMjvKTkR+EbMCmg3ivX4XvFR4Rvhm/1MVTGw4gNTNeDx2VE+eWJqEZyKVv0gz0m6kBxSRgu1ygzl64ssSGOszU6tsahF6tHCqbGFKsf0TN30YZpX7bogZ4o6G3AkipSNldX1bDCqka2BgIoPBYIEtkyAH+aC8EpAE03dfgtHAlRsuXAFvivVtacJuC+HztG99KFtOmnm06TXyjfUSKchT2CU6OW3hyjq18Bv4ls+qnyH8r3lG3HqEDfoEt/gWMgYHt1f9Q9xWhdX/FG7Uy7m6HjDQk0b5iLiGRpD3W6qBM9aFvKVu3q/G3LuI9zDz44ifv7sm0HP/kjd0NqOK38helbSl7eK7x+8fTpF38a2/uyhi2tGz1c1a38WG2JlURInFxKEHg0lIoNGLMnDU4wryDoTSU5jnHI1lJloaAZhbpo1uBD5loMBCcScssJuU0NAbW1YJi+IaBhtqapGUQ22qaWUfhR7zpd6AlGWcESVwnJsaVLWlZKlq36ihLt7KdTnrv5/WXhOUORHQ/sP3nl3KHw1of2nwQu/3m/8pPnbv7Dcko5NiGgY8l3j69ZHh6aG9l2cr+yZmhOeDs6lthI6TY2I6SyPoytdYpiVWIEC+2wUNtaKlrZUiYr5jhgCnxqBfpY9KuJrU1DBXZGbemZI88K0s1NoLY07gjaHrtYqG3G5CFYnAYW8NKLhRq2nqbWigqM5tSot2h3+s6sWGKxr1TFvawsaQKu5ghbjgfdB80jwQGvlE8QPvB5VPK4TIlTlyepLuXzSjdecQTvlCW2ZI/VEgFH3qNFeTERJ8w3Lj1D7ewaVwRhV7EUKOSC3YJDEmpzLBdWAUV2LYavquVXVKogoOULlPXK+gUHKwsHxxDPB68tUIbovgW0pPztKN5U7doqtGuat1E9oWJx0SC3SnqbjqB7IfikEY6sKiN/wqTqsb/qukLvuJWqmoqAj4WBcF3VmQWDevIxUV+0srL0zPs4/0EkIfAfqsE9ISkbS0UjW+ZmBHsma6BBNU6+khxKFut9rGy/CW5Zkyz8x9YI8rmCrx6OQXWNoDUb9YtRTOpaXWIkxFGxGSQ3k+aiolPAikmdi5JrN/yOk/4wa8GvDx5SfvM4L9le71sI5zT0ONwRyIPUteF3ZekPfT+4UlY+jCmnvCfojPJRDp/74TqZ2mJU1/y68sOjDyrvb/idmqvhgaYCrsF0VOmEQS0hUdCMLROkkoDqG4lAqnYIJwHp21KN5ejUaJhepQmWWOE3oJY2jH1RmNkgAQwQLrvE4NooOptobQa4vJ5o/h2+0cbQ680Ew0IupjyaWG6kOYlrHUHu/EkMP9eqS+W04wv9zpQqqTIXUIFtuFqkVCtaMeVeCCBaaPI2I48WeBfc0Zsd9erSg2GDyd6gJuCBwxCwd6Z7aNJL7SYaiFRxrKFyb4Du3KL8N/2qNDL41ae+OohvrVsf3rr1Yfpo9Q6f5/b3KM1gMcn6yiODgzSHD21VpLF7Z9klXKGcJEhTdYWykfEtx9Yp47pkdSlyQUMA7uiNcCZUlAPFhXb+RnpG0aMx5NlS1zL5yxkdz401KtLZGt6g4rbKOmnVk6hGRu5ns13L1mm5U3IOy/2wii6Qkqew7FU+Ibem5GklOcJW5iRY700p6Dqu5+1UNcf4gAgMZpgTm0IhVxJtiA8DIXBmwRhUoRujHZNLwwZzTy8+MFldK6oGPAqTu2DgWAOlclcF1zEuCzr8maC1Gj38zNE6DuHZxq8qPwvtAbbBSEaEQbdx/y8ah/suomxhMb4wFoIQ8FNQRYAGRx9jj9PIWYc32GF0XDBErS8FzIXx6kaSIGhVeLY4iGeGhTdgRpQ3ob1sYhoXjUgJK/3RvGN0sbIiiyW7wPtMVXKe0r4hne7o7i9fkji6bf9Jl6tSGcjtO77PE9x9dNUVu07u7+lVF6Gjjsc8hqBG/4GHopH0VLVcz26mJhoFRwKj4y/SOXPe7z8+h3rhOOdYv5KjByg5cBoRpQ/vHu9/f84c5Z3+1/rfn83NUnL8L0+TA8xBpYggNeia6VAn69g4eVVlVMp1q7qiast5Nd5bjfKqueXXNB9q/hVUtHtsbaohoSJBXHYqa9SkELosUabelO8spR8qtqV0Ka5KXzqo2BTbIF0K9sRGX9NK7LuA6bPUD5+KQuOHS5XvoH6iS5fyI+xZ/BjLK+S12H/0LtEjghbAlGB/yiMCAOE8O2PPoZ3K43OAvQ3sgxz4V3klzxMuXwYva0TJj9WU89BJsNciKcIFTDOgUYGRATxOXl2gTkFDQzc/5zmQeVTQ6lL2qp+gkdi2DVZWG43+ri6ByAP9ARa6YQj5U+gjR9RSX2RGC15oJC05a6+H80VJv4/UL1p8HSm2Wr8o+iei4AqJoj2UxjbAeo5wBtv0iWJ9Sxe2GQAkTshhW22i2NTGIql1paKnHSOpFJUHOVEU1L0i+FJRazSxM+b9Fe31TXhlKxWdbi87YzmRYkhVGcFSMYLR0yRmSABQFtNd3UkWQC12TuqBs8K0yn4SZ4Kenw2C/k+uOSL94z9OOnsDijL5f7tmLMGxXBPLC6EOnsryQiD5jVgXUN2zomlc+bJYjeGDFkX470Gbh1Ere+6cTFoggstXqgaCw3X9akoNa43VXTVUG0HUVBuuYNpHh3gyOj5vpfZPC7IcIV8i2JlACZExgqEIA0N6QDwqpGCl2MU6G1vgb0ZdFlXXkyN2kuuSiJSM6qYFLFeMdcahBAbyCj4jrivTaDm1ulgWwGQTIxN0meKlXIdYSo1+G2gGADLYAL8jmDl7yKExe6hu/wC+Jg5VGj/4SpoOvQK4f5qwPSKYaIyRYX/VDWLxDbXOBXNaDVg/ZgSPIIUOokNdx2ms5u60NZhrKWq0SAANNcSKWg3Lm2OBE4AXK9xvKFVXdfrtBD32CMFpwxH4K0c0Mspbb50mbylvsTlib4L0nvJIu/IXWtdOL6XrKAtFoE1Sj5X1AES1Mc0wW4tJMYKrV7zgtqWq1sb7WWsDM+Q/ARPBZiHkB1tbE0G85I0AePL5Q+ih8GKxkQVd/qEpwlL/gIYdKNBbq/2MVcK9OBRpiA5RhrsBFIG29/nG2yi1YBDe1PGcsZkBXA/sYwPxgngki16Gtr1sIF6E4z6LOkRco6AuTfD6YDAuwvpfoM5/2ntM6TJ7em7PWXcRvimqZf1sr1VOw/xnJXZjAI18NbNcGuaR4HYemAUt1rLitloLkt42tsXI+OScheHaosWMD1rAg0a3i+XdipzRipEvtuYC49UCNurVRtwKRhZVAdHhJGRFA9o6DEVjtyT0cDAIFFEugpPyG5yKfShj/ze5MJ4/Vn6D8dFYHlcgRtJVHYdRtcM1n+l2JRKFPZQ56JVRI46JKmXOgOhHg0PBcPEqHZHB4Uri1LUm3JiMiaAFZxIMIjhwmTRKlzY1TguCX6BlmsRWGjZqcVeWehYNMTKoVDCCp1VwNuTOKEMxGNDiogsH6IZORISRdBYjflhfwKrB8qPq0gsebMfoKxlVGX6KGkJCLZC9J8vWIZEDulW6VeAXd+K8Rlh5VqcahckCxDkhd5TkDgurJnWzzGqhg8e0vEZfO6EddVpaHLaE6tjSEbf1sOiob2oOshhIEgTtsIf4Qy24x4ncKQ5TTT1uqCGbrYe1xjqLzaX6KVmsZIpmNZ1ZPusCzJZ18U5X2IV1TjqXLqzV2XRYzhjVRW2RqKaq9w/8Qa//wyQ6MdHtuOOl6ZbpL93p7ErRiZNYs/Jq21QnNBv001+6w9GVUl7lIgyFcX+sNnYnzvcwfony6qTKd0M7Z6yAN/6s/ZfYbKo7MLnHrNnYnkYudQcmnDkXOG2HcQcm0c6o4jYj9bQ6YnWcswsT27EoS7U22skWEJ6zG1OSth2/9QvlGbPK3NFZyvHjt52zL1PyuHJ8Fnf0izRVnrHrtuO07Zx+byIon+D9mJn3Y8QobKW+pIJHm5jmr2Wrprlk0cjKHI2o6o0WNAg65vagodYn2Rh16MKZbKCQRLFgBqll7ipu08SwLC41dWDyyFLBxdUCNNQvAsjvKGK/is0+zA5azLOi/yKQU79gJqu/arjOyDBivCZS9dnVgJWgUv6Mz872E2ABY9XJQcj4qRqPIWNxAO/ZsYPq15XGBRFQflSPX40zs32OJLZfGa5P01U+VMGo+AmbGsmFIai/qwLWcZ/lznyWRw0w9lnKdoFSd9ZSt3Eqs2+o7PNExu/zRKr7PPGUbVSir2KuaZW9Sf7/oS46DnWdKWQaZeuEkTAV+IHICm+cUmGXhpzKjIu9Vvqo4q4bSLEJ+/j/iLx045DX58CuELDkIU6jFZqZ1J0XcdmqiMtf+Xd+xFXdb0tSR3n6rJFzn4VcZdx4ipkBtbDr1HjUdbYsukgH0yF2dY+PsRmqT7C949REkA7tvFkEg5T7nD3b+JQYPHfftiLrV2xk5LMqgn+PdWYU+nlWf8xj/bGx/piYZR/fH5Or2p/a8/VnfHj+3P58+0zs5rM9EpLj4zfj+4R5zytZnxIlrLv2sB2R1OwnatumUrGJ7UHSZMNUugWjkyj+uIFAE+CGw7yxtq6NmamI+LRBMLfGO1JqbVmqOpbW847Fxcriseod/3loCivlqxX0wYD1c8fJrfzymkiju74+c0Gj+2XROmMgHF685KuHas87dP74oT6L2Bhsagy0trdNywU8dkd7ZtKkhZunTTuTsmBreNWcBagrm8jyWgA5VKEDXvPRt1mC6O1znsWkEjwrsN0GcZdB+rbiUz/B8l7VfBnm5KzECTKJ1HawiJcJdD83tilbTRJj5hgXRtWQsvltNGhLRYM2dp6iPJzDbw/SxYMgBo4TMWmkcgmC8Ue41LCYdBmVAOKlsYtKXlHViaCy3Jir7bRGQmYajQgfW7Zwt3G3bbH8XHltyyOPbFFe09yhPD9UfpC7Yoh2/0kc+vrXh0Tmz5C19KTuAW0zKHgD7h9po1nepmbvMPlrW0s7Xj927HW66WNKPqb3vE4TyrHXfykQJbeX5mhu7+iyHoH0jD6+l75IX9yrvFipSQBtVcknNpAw2U5QNtwsWNhUwhC6L1XZqC6IMUJW82hEzizogkkgYBMjoAYVGior/GiTutGFP6lmhDGn35zAckhAB00YDMWwaDAMZzyXY1un0TBLYxrO4wenRBUL+3m2V4dWrdYcq2XK9Et0rNBCzXxKSiXxiVJXfaqfZir7iJw+z7g96B2q4/aoK8e9bJRw7VYLg21qvVGjG/dt1KGf5XZVh2LyIMQ38Ll/NpjM5w+CZUP/Yfel8/S7mZB/8HsYYYt+3i9upBb6/EXKvsP/8FdnKB/RF/AptjdeRe40oNu9LP6vHxfx1luBCryWVGoxUIR5MD1J4hCjcRrEXY9YGQOmawC37ZvzzJrTiDlYXQP+Q/yg4KaGyvF9c+YqUiWeWJUbN8uhYozdlMBELylwtZWlJoazfoee5yfO/tpxuSIeaJgmiIlslV1SixqhGgVgOsFXRT5+/E2NwPYnqSAgMclWt/ApdEDjPG7pwAr0grlUz8a+mZv7+zfPRI5Tz/o29qRyiB5OEQzvY5AaX+Wxs7G9ZHCvUZE4SD/zqNT6aFoqaulYUIIf22NSrSwQ1FwOAPOCoAPDoDfWmK02dT2GbMqNA4tZrMhvpv5ohDn80J3TmObhydYtZbJlK88qCFiUCcgGfw9vhT/+YUrO8vccIDPziGrRCzXOJMv56FXBEU7IzlJRcGJnBeysU/UYakrFGrZFVg0AHSZOLmdVnCpoDNwCH/HQ8ZhMXS+AzEvb6OO0jVU8Eqw15TD8TBm/SjDdMMWV4o9+PsOwCcbpOMLipXWsx0sYDjaxPVvVdQCc2mWgo4m5CyZ1m1bAXm7MjmtUsddYWTE6KThMIq5rkJ0iXMqeSjhbZAubdGyVUzCcQssZo5nKEbswtC83sPbobmVkBFO4I2oxCoLbfUNLZ0UfumT3UUwBS8waYn2Q2ucapHANm38OQ7cFXp9Sly2o2VGsAZ7i/NP7rAaYi8v6uMxZCgbtJ7iTJ6/9hB/meL2hUgGMFM6mbMGsXxfkUzpOapE+klroCDtwhEXRykSq1gVJDPtj5Kx3XDU4VavBAZnUlHBr10oG0QYkqqFqjZ5GLBhMqB9FARFIbS43lluMUp6r4grE+5iJUfIjFVTNPACJy4+UV1EfPYMNNGx/D+Q5DUNxDsD+VlLdv7gpUUm12ERXVufCGIorymQzG3VlRcqyttID7z7wAALWBx54l66FkcIRrh94AFrQMuMlrsiAw+i7WHOjEPUTgsSeY/VWGN8fOW98P4V1VyP4bzSv5gzgUs80JuBvbGW3Vewi5FndFsfqtli7nozm4S4V8pWaLg7zHaIAjfj6WCL/F8P1u2sAAHjaY2BkYGBgZjjy6Mpmh3h+m68M8hwMIHDua+N+ZJqDgQNCMYEoAHf+C1gAeNpjYGRg4GD4fwNEMjD8/w8kgSIogBUAY/wD9XjaNU+7FcJADJNNCvq87MMOvEdNxRyq0mWH1GEWegZhACz54nvnj+yTzvGDLQ8gKr8iEQDBRDKqgmqZMMq7/y5kd/UdCLFiC+ITZiivaz6fR0er6d054SksUgzmU3qFEXdFzV2Ez8Ywlc/m5Pilsr2VWitP/bGJ4wvDWi96P3Not+n2B3lgIYIAAAAmACYAJgAuAJIA3gFaAaABrgHkAjoC1AMkA4IEUAUiBXAFzgYgBw4H7ghiCPYJsgp4Cq4LCAs2C4AMHAyiDiAPnBBAEUYRvBMwE7wUHhRaFIYUshTcFVAVgBX6FpYXXBeSF/AYYBkCGYgaBhooGkoa1BryGyQbQBtsG5Yb+Bw2HLAdLh1yHYYdsh4cHjYeYB7iHyYf3iAgIFIgdCCaILIgxiDcIPAhBiEkIegiOCK6IxAjeCPQJDQkbCS8JVIlriYWJjomWCZ2JpQmoib0J3QnvCgGKJAopii8KQApIilMKcgqJCpiKpwqyCsUK2QrvCwWLFYsnizgLPYtBC0SLSAAAAABAAAAgAC9ABAAAAAAAAIAAQACABYAAAEAAYEAAAAAeNqNkr1OAkEUhc8CmmBhRSysNtFCTfiXqFBZiIkaQzRqZ7KaBYz8CStg4/PpC1j6EJZWfjMMwSCFmczOuWfOPffOzEpa0avi8hJJSZ/MCfaUIprgmFb15XBcZW+qSWjTKzu8pLF36/Ay/IfDSa173w6/aS2WcvhdudiOjlXTmXwNFaqvgR7UVYe4wOzC+AqIX1hboMiq/qpHoEhNUN0yESjUWPd8e0RT3RaaiNFTWVnGyI6MGuw+s5qKDfgWGSa3Q42QmYXtwabxD/SE0vi0YTZUdRWP/tTb5nTGw/Rq/LrW74K4QTVznr6KeOUYRVV0pVPd6By0KC89l7lI489prufu6Xe1mi5hJtGMbaKMnN+Q/bzdy2iPb4UTB3rE02jqsOae7nirjEp27uNR0MG/+j+BD21Xh+y24Qf2tjvcQYjr7CUnPVStm09eYLPycKb/Em9Zoq755u2fk2Pd/QGe+3ARAAB42m3S1XIUURRG4VmDBHd3d5k+Z5/uBIdAcHd3CRI0OBRPyCshmRWu6Kqp/6brm9qrutVujTy/frZS63/Pjz8/Wm3ajGEs4xhPDxOYyCQmM4WpTGM6M5jJLGYzh7nMYz4LWMgiFrOEpSxjOStYySpWs4a1rGM9G9jIJjazha1sYzsdKhKZoFDT0EsfO9jJLnazh73sYz8H6OcghxjgMEc4yjGOc4KTnOI0ZzjLOc5zgYtc4jJXuMo1rnODm9ziNne4yz3u84CHPOIxTxjkKc94zguGeMkrXvOGt7xjmPd84COf+MwXvvKN7z3DQ4OpDPT/3YGq03ErN7nZDbe4tdu4vW7fyCa9pJf0kl7SS3pJL+klvTTqVXqVXqVX6VV6lV6lV+lVepVe0kt6SS/pJb3U9bL3ZO/J3pO9J3tP7oy+X7uN2/3/0Amd0Amd0Amd0Amd+Od07wi7hF3CLmGXsEvYJewSdgm7hF3CLmGXsEvYJewSdomkl/SSXtLLelkv62W9rJf1sl7Wy3pZL/RCL/RCL/RCL/RCL/RCr+gVvaJX9Ipe0St6Ra/oFb1ar9ar9Wq9Wq/Wq/VqvVqv1mv0Gr1Gr9Frul7xuyp+V8XvqnTyb1UoNRm4Af+FsAGNAEuwCFBYsQEBjlmxRgYrWCGwEFlLsBRSWCGwgFkdsAYrXFhZsBQrAAAAAVLP0T8AAA==) format('woff'),
-         url('font/genericons-regular-webfont.ttf') format('truetype'),
-         url('font/genericons-regular-webfont.svg#genericonsregular') format('svg');
-    font-weight: normal;
-    font-style: normal;
-}
-
-
-/**
- * All Genericons
- */
-
-.genericon {
-       display: inline-block;
-       width: 16px;
-       height: 16px;
-       -webkit-font-smoothing: antialiased;
-       -moz-osx-font-smoothing: grayscale;
-       font-size: 16px;
-       line-height: 1;
-       font-family: 'Genericons';
-       text-decoration: inherit;
-       font-weight: normal;
-       font-style: normal;
-       vertical-align: top;
-}
-
-/**
- * IE7 and IE6 hacks
- */
-
-.genericon {
-       *overflow: auto;
-       *zoom: 1;
-       *display: inline;
-}
-
-/**
- * Individual icons
- */
-
-/* Post formats */
-.genericon-standard:before {        content: '\f100'; }
-.genericon-aside:before {           content: '\f101'; }
-.genericon-image:before {           content: '\f102'; }
-.genericon-gallery:before {         content: '\f103'; }
-.genericon-video:before {           content: '\f104'; }
-.genericon-status:before {          content: '\f105'; }
-.genericon-quote:before {           content: '\f106'; }
-.genericon-link:before {            content: '\f107'; }
-.genericon-chat:before {            content: '\f108'; }
-.genericon-audio:before {           content: '\f109'; }
-
-/* Social icons */
-.genericon-github:before {          content: '\f200'; }
-.genericon-dribbble:before {        content: '\f201'; }
-.genericon-twitter:before {         content: '\f202'; }
-.genericon-facebook:before {        content: '\f203'; }
-.genericon-facebook-alt:before {    content: '\f204'; }
-.genericon-wordpress:before {       content: '\f205'; }
-.genericon-googleplus:before {      content: '\f206'; }
-.genericon-linkedin:before {        content: '\f207'; }
-.genericon-linkedin-alt:before {    content: '\f208'; }
-.genericon-pinterest:before {       content: '\f209'; }
-.genericon-pinterest-alt:before {   content: '\f210'; }
-.genericon-flickr:before {          content: '\f211'; }
-.genericon-vimeo:before {           content: '\f212'; }
-.genericon-youtube:before {         content: '\f213'; }
-.genericon-tumblr:before {          content: '\f214'; }
-.genericon-instagram:before {       content: '\f215'; }
-.genericon-codepen:before {         content: '\f216'; }
-.genericon-polldaddy:before {       content: '\f217'; }
-.genericon-googleplus-alt:before {  content: '\f218'; }
-.genericon-path:before {            content: '\f219'; }
-.genericon-skype:before {           content: '\f220'; }
-.genericon-digg:before {            content: '\f221'; }
-.genericon-reddit:before {          content: '\f222'; }
-.genericon-stumbleupon:before {     content: '\f223'; }
-.genericon-pocket:before {          content: '\f224'; }
-.genericon-dropbox:before {         content: '\f225'; }
-
-/* Meta icons */
-.genericon-comment:before {         content: '\f300'; }
-.genericon-category:before {        content: '\f301'; }
-.genericon-tag:before {             content: '\f302'; }
-.genericon-time:before {            content: '\f303'; }
-.genericon-user:before {            content: '\f304'; }
-.genericon-day:before {             content: '\f305'; }
-.genericon-week:before {            content: '\f306'; }
-.genericon-month:before {           content: '\f307'; }
-.genericon-pinned:before {          content: '\f308'; }
-
-/* Other icons */
-.genericon-search:before {          content: '\f400'; }
-.genericon-unzoom:before {          content: '\f401'; }
-.genericon-zoom:before {            content: '\f402'; }
-.genericon-show:before {            content: '\f403'; }
-.genericon-hide:before {            content: '\f404'; }
-.genericon-close:before {           content: '\f405'; }
-.genericon-close-alt:before {       content: '\f406'; }
-.genericon-trash:before {           content: '\f407'; }
-.genericon-star:before {            content: '\f408'; }
-.genericon-home:before {            content: '\f409'; }
-.genericon-mail:before {            content: '\f410'; }
-.genericon-edit:before {            content: '\f411'; }
-.genericon-reply:before {           content: '\f412'; }
-.genericon-feed:before {            content: '\f413'; }
-.genericon-warning:before {         content: '\f414'; }
-.genericon-share:before {           content: '\f415'; }
-.genericon-attachment:before {      content: '\f416'; }
-.genericon-location:before {        content: '\f417'; }
-.genericon-checkmark:before {       content: '\f418'; }
-.genericon-menu:before {            content: '\f419'; }
-.genericon-refresh:before {         content: '\f420'; }
-.genericon-minimize:before {        content: '\f421'; }
-.genericon-maximize:before {        content: '\f422'; }
-.genericon-404:before {             content: '\f423'; }
-.genericon-spam:before {            content: '\f424'; }
-.genericon-summary:before {         content: '\f425'; }
-.genericon-cloud:before {           content: '\f426'; }
-.genericon-key:before {             content: '\f427'; }
-.genericon-dot:before {             content: '\f428'; }
-.genericon-next:before {            content: '\f429'; }
-.genericon-previous:before {        content: '\f430'; }
-.genericon-expand:before {          content: '\f431'; }
-.genericon-collapse:before {        content: '\f432'; }
-.genericon-dropdown:before {        content: '\f433'; }
-.genericon-dropdown-left:before {   content: '\f434'; }
-.genericon-top:before {             content: '\f435'; }
-.genericon-draggable:before {       content: '\f436'; }
-.genericon-phone:before {           content: '\f437'; }
-.genericon-send-to-phone:before {   content: '\f438'; }
-.genericon-plugin:before {          content: '\f439'; }
-.genericon-cloud-download:before {  content: '\f440'; }
-.genericon-cloud-upload:before {    content: '\f441'; }
-.genericon-external:before {        content: '\f442'; }
-.genericon-document:before {        content: '\f443'; }
-.genericon-book:before {            content: '\f444'; }
-.genericon-cog:before {             content: '\f445'; }
-.genericon-unapprove:before {       content: '\f446'; }
-.genericon-cart:before {            content: '\f447'; }
-.genericon-pause:before {           content: '\f448'; }
-.genericon-stop:before {            content: '\f449'; }
-.genericon-skip-back:before {       content: '\f450'; }
-.genericon-skip-ahead:before {      content: '\f451'; }
-.genericon-play:before {            content: '\f452'; }
-.genericon-tablet:before {          content: '\f453'; }
-.genericon-send-to-tablet:before {  content: '\f454'; }
-.genericon-info:before {            content: '\f455'; }
-.genericon-notice:before {          content: '\f456'; }
-.genericon-help:before {            content: '\f457'; }
-.genericon-fastforward:before {     content: '\f458'; }
-.genericon-rewind:before {          content: '\f459'; }
-.genericon-portfolio:before {       content: '\f460'; }
-.genericon-heart:before {           content: '\f461'; }
-.genericon-code:before {            content: '\f462'; }
-.genericon-subscribe:before {       content: '\f463'; }
-.genericon-unsubscribe:before {     content: '\f464'; }
-.genericon-subscribed:before {      content: '\f465'; }
-.genericon-reply-alt:before {       content: '\f466'; }
-.genericon-reply-single:before {    content: '\f467'; }
-.genericon-flag:before {            content: '\f468'; }
-.genericon-print:before {           content: '\f469'; }
-.genericon-lock:before {            content: '\f470'; }
-.genericon-bold:before {            content: '\f471'; }
-.genericon-italic:before {          content: '\f472'; }
-.genericon-picture:before {         content: '\f473'; }
-.genericon-fullscreen:before {      content: '\f474'; }
-
-/* Generic shapes */
-.genericon-uparrow:before {         content: '\f500'; }
-.genericon-rightarrow:before {      content: '\f501'; }
-.genericon-downarrow:before {       content: '\f502'; }
-.genericon-leftarrow:before {       content: '\f503'; }
-
-
-
-
-
diff --git a/wp-content/themes/twentyfourteen/header.php b/wp-content/themes/twentyfourteen/header.php
deleted file mode 100644 (file)
index 7286d88..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-/**
- * The Header for our theme
- *
- * Displays all of the <head> section and everything up till <div id="main">
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?><!DOCTYPE html>
-<!--[if IE 7]>
-<html class="ie ie7" <?php language_attributes(); ?>>
-<![endif]-->
-<!--[if IE 8]>
-<html class="ie ie8" <?php language_attributes(); ?>>
-<![endif]-->
-<!--[if !(IE 7) & !(IE 8)]><!-->
-<html <?php language_attributes(); ?>>
-<!--<![endif]-->
-<head>
-       <meta charset="<?php bloginfo( 'charset' ); ?>">
-       <meta name="viewport" content="width=device-width">
-       <title><?php wp_title( '|', true, 'right' ); ?></title>
-       <link rel="profile" href="http://gmpg.org/xfn/11">
-       <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
-       <!--[if lt IE 9]>
-       <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
-       <![endif]-->
-       <?php wp_head(); ?>
-</head>
-
-<body <?php body_class(); ?>>
-<div id="page" class="hfeed site">
-       <?php if ( get_header_image() ) : ?>
-       <div id="site-header">
-               <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
-                       <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
-               </a>
-       </div>
-       <?php endif; ?>
-
-       <header id="masthead" class="site-header" role="banner">
-               <div class="header-main">
-                       <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
-
-                       <div class="search-toggle">
-                               <a href="#search-container" class="screen-reader-text" aria-expanded="false" aria-controls="search-container"><?php _e( 'Search', 'twentyfourteen' ); ?></a>
-                       </div>
-
-                       <nav id="primary-navigation" class="site-navigation primary-navigation" role="navigation">
-                               <button class="menu-toggle"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></button>
-                               <a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a>
-                               <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu' ) ); ?>
-                       </nav>
-               </div>
-
-               <div id="search-container" class="search-box-wrapper hide">
-                       <div class="search-box">
-                               <?php get_search_form(); ?>
-                       </div>
-               </div>
-       </header><!-- #masthead -->
-
-       <div id="main" class="site-main">
diff --git a/wp-content/themes/twentyfourteen/image.php b/wp-content/themes/twentyfourteen/image.php
deleted file mode 100644 (file)
index 83ac67f..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-/**
- * The template for displaying image attachments
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-// Retrieve attachment metadata.
-$metadata = wp_get_attachment_metadata();
-
-get_header();
-?>
-
-       <section id="primary" class="content-area image-attachment">
-               <div id="content" class="site-content" role="main">
-
-       <?php
-               // Start the Loop.
-               while ( have_posts() ) : the_post();
-       ?>
-                       <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-                               <header class="entry-header">
-                                       <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
-
-                                       <div class="entry-meta">
-
-                                               <span class="entry-date"><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time></span>
-
-                                               <span class="full-size-link"><a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"><?php echo esc_html( $metadata['width'] ); ?> &times; <?php echo esc_html( $metadata['height'] ); ?></a></span>
-
-                                               <span class="parent-post-link"><a href="<?php echo esc_url( get_permalink( $post->post_parent ) ); ?>" rel="gallery"><?php echo get_the_title( $post->post_parent ); ?></a></span>
-                                               <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
-                                       </div><!-- .entry-meta -->
-                               </header><!-- .entry-header -->
-
-                               <div class="entry-content">
-                                       <div class="entry-attachment">
-                                               <div class="attachment">
-                                                       <?php twentyfourteen_the_attached_image(); ?>
-                                               </div><!-- .attachment -->
-
-                                               <?php if ( has_excerpt() ) : ?>
-                                               <div class="entry-caption">
-                                                       <?php the_excerpt(); ?>
-                                               </div><!-- .entry-caption -->
-                                               <?php endif; ?>
-                                       </div><!-- .entry-attachment -->
-
-                                       <?php
-                                               the_content();
-                                               wp_link_pages( array(
-                                                       'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
-                                                       'after'       => '</div>',
-                                                       'link_before' => '<span>',
-                                                       'link_after'  => '</span>',
-                                               ) );
-                                       ?>
-                               </div><!-- .entry-content -->
-                       </article><!-- #post-## -->
-
-                       <nav id="image-navigation" class="navigation image-navigation">
-                               <div class="nav-links">
-                               <?php previous_image_link( false, '<div class="previous-image">' . __( 'Previous Image', 'twentyfourteen' ) . '</div>' ); ?>
-                               <?php next_image_link( false, '<div class="next-image">' . __( 'Next Image', 'twentyfourteen' ) . '</div>' ); ?>
-                               </div><!-- .nav-links -->
-                       </nav><!-- #image-navigation -->
-
-                       <?php comments_template(); ?>
-
-               <?php endwhile; // end of the loop. ?>
-
-               </div><!-- #content -->
-       </section><!-- #primary -->
-
-<?php
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/images/pattern-dark.svg b/wp-content/themes/twentyfourteen/images/pattern-dark.svg
deleted file mode 100644 (file)
index ef6d5d8..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
-        width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">\r
-<rect x="0" display="none" width="30" height="30"/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="30,0 0,30 1,30 30,1 "/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="30,5 0,35 1,35 30,6 "/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="30,10 0,40 1,40 30,11 "/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="30,15 0,45 1,45 30,16 "/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="30,20 0,50 1,50 30,21 "/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="30,25 0,55 1,55 30,26 "/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="26,-1 -4,29 -3,29 26,0 "/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="21,-1 -9,29 -8,29 21,0 "/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="16,-1 -14,29 -13,29 16,0 "/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="11,-1 -19,29 -18,29 11,0 "/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="6,-1 -24,29 -23,29 6,0 "/>\r
-<polygon opacity="0.3" fill="#FFFFFF" points="1,-1 -29,29 -28,29 1,0 "/>\r
-</svg>\r
diff --git a/wp-content/themes/twentyfourteen/images/pattern-light.svg b/wp-content/themes/twentyfourteen/images/pattern-light.svg
deleted file mode 100644 (file)
index 55a48f1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
-        width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">\r
-<path fill="#FFFFFF" d="M0,15v-4L11,0h4L0,15z M10,0H6L0,6v4L10,0z M20,0h-4L0,16v4L20,0z M25,0h-4L0,21v4L25,0z M26,0L0,26v4L30,0\r
-       H26z M5,0H1L0,1v4L5,0z M5,30L30,5V1L1,30H5z M10,30l20-20V6L6,30H10z M15,30l15-15v-4L11,30H15z M20,30l10-10v-4L16,30H20z M25,30\r
-       l5-5v-4l-9,9H25z M30,30v-4l-4,4H30z"/>\r
-</svg>\r
diff --git a/wp-content/themes/twentyfourteen/inc/back-compat.php b/wp-content/themes/twentyfourteen/inc/back-compat.php
deleted file mode 100644 (file)
index c184d91..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/**
- * Twenty Fourteen back compat functionality
- *
- * Prevents Twenty Fourteen from running on WordPress versions prior to 3.6,
- * since this theme is not meant to be backward compatible beyond that
- * and relies on many newer functions and markup changes introduced in 3.6.
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-/**
- * Prevent switching to Twenty Fourteen on old versions of WordPress.
- *
- * Switches to the default theme.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_switch_theme() {
-       switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME );
-       unset( $_GET['activated'] );
-       add_action( 'admin_notices', 'twentyfourteen_upgrade_notice' );
-}
-add_action( 'after_switch_theme', 'twentyfourteen_switch_theme' );
-
-/**
- * Add message for unsuccessful theme switch.
- *
- * Prints an update nag after an unsuccessful attempt to switch to
- * Twenty Fourteen on WordPress versions prior to 3.6.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_upgrade_notice() {
-       $message = sprintf( __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), $GLOBALS['wp_version'] );
-       printf( '<div class="error"><p>%s</p></div>', $message );
-}
-
-/**
- * Prevent the Customizer from being loaded on WordPress versions prior to 3.6.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_customize() {
-       wp_die( sprintf( __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), $GLOBALS['wp_version'] ), '', array(
-               'back_link' => true,
-       ) );
-}
-add_action( 'load-customize.php', 'twentyfourteen_customize' );
-
-/**
- * Prevent the Theme Preview from being loaded on WordPress versions prior to 3.4.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_preview() {
-       if ( isset( $_GET['preview'] ) ) {
-               wp_die( sprintf( __( 'Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), $GLOBALS['wp_version'] ) );
-       }
-}
-add_action( 'template_redirect', 'twentyfourteen_preview' );
diff --git a/wp-content/themes/twentyfourteen/inc/custom-header.php b/wp-content/themes/twentyfourteen/inc/custom-header.php
deleted file mode 100644 (file)
index 287b106..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-/**
- * Implement Custom Header functionality for Twenty Fourteen
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-/**
- * Set up the WordPress core custom header settings.
- *
- * @since Twenty Fourteen 1.0
- *
- * @uses twentyfourteen_header_style()
- * @uses twentyfourteen_admin_header_style()
- * @uses twentyfourteen_admin_header_image()
- */
-function twentyfourteen_custom_header_setup() {
-       /**
-        * Filter Twenty Fourteen custom-header support arguments.
-        *
-        * @since Twenty Fourteen 1.0
-        *
-        * @param array $args {
-        *     An array of custom-header support arguments.
-        *
-        *     @type bool   $header_text            Whether to display custom header text. Default false.
-        *     @type int    $width                  Width in pixels of the custom header image. Default 1260.
-        *     @type int    $height                 Height in pixels of the custom header image. Default 240.
-        *     @type bool   $flex_height            Whether to allow flexible-height header images. Default true.
-        *     @type string $admin_head_callback    Callback function used to style the image displayed in
-        *                                          the Appearance > Header screen.
-        *     @type string $admin_preview_callback Callback function used to create the custom header markup in
-        *                                          the Appearance > Header screen.
-        * }
-        */
-       add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array(
-               'default-text-color'     => 'fff',
-               'width'                  => 1260,
-               'height'                 => 240,
-               'flex-height'            => true,
-               'wp-head-callback'       => 'twentyfourteen_header_style',
-               'admin-head-callback'    => 'twentyfourteen_admin_header_style',
-               'admin-preview-callback' => 'twentyfourteen_admin_header_image',
-       ) ) );
-}
-add_action( 'after_setup_theme', 'twentyfourteen_custom_header_setup' );
-
-if ( ! function_exists( 'twentyfourteen_header_style' ) ) :
-/**
- * Styles the header image and text displayed on the blog
- *
- * @see twentyfourteen_custom_header_setup().
- *
- */
-function twentyfourteen_header_style() {
-       $text_color = get_header_textcolor();
-
-       // If no custom color for text is set, let's bail.
-       if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) )
-               return;
-
-       // If we get this far, we have custom styles.
-       ?>
-       <style type="text/css" id="twentyfourteen-header-css">
-       <?php
-               // Has the text been hidden?
-               if ( ! display_header_text() ) :
-       ?>
-               .site-title,
-               .site-description {
-                       clip: rect(1px 1px 1px 1px); /* IE7 */
-                       clip: rect(1px, 1px, 1px, 1px);
-                       position: absolute;
-               }
-       <?php
-               // If the user has set a custom color for the text, use that.
-               elseif ( $text_color != get_theme_support( 'custom-header', 'default-text-color' ) ) :
-       ?>
-               .site-title a {
-                       color: #<?php echo esc_attr( $text_color ); ?>;
-               }
-       <?php endif; ?>
-       </style>
-       <?php
-}
-endif; // twentyfourteen_header_style
-
-
-if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) :
-/**
- * Style the header image displayed on the Appearance > Header screen.
- *
- * @see twentyfourteen_custom_header_setup()
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_admin_header_style() {
-?>
-       <style type="text/css" id="twentyfourteen-admin-header-css">
-       .appearance_page_custom-header #headimg {
-               background-color: #000;
-               border: none;
-               max-width: 1260px;
-               min-height: 48px;
-       }
-       #headimg h1 {
-               font-family: Lato, sans-serif;
-               font-size: 18px;
-               line-height: 48px;
-               margin: 0 0 0 30px;
-       }
-       .rtl #headimg h1  {
-               margin: 0 30px 0 0;
-       }
-       #headimg h1 a {
-               color: #fff;
-               text-decoration: none;
-       }
-       #headimg img {
-               vertical-align: middle;
-       }
-       </style>
-<?php
-}
-endif; // twentyfourteen_admin_header_style
-
-if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :
-/**
- * Create the custom header image markup displayed on the Appearance > Header screen.
- *
- * @see twentyfourteen_custom_header_setup()
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_admin_header_image() {
-?>
-       <div id="headimg">
-               <?php if ( get_header_image() ) : ?>
-               <img src="<?php header_image(); ?>" alt="">
-               <?php endif; ?>
-               <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( sprintf( 'color: #%s;', get_header_textcolor() ) ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
-       </div>
-<?php
-}
-endif; // twentyfourteen_admin_header_image
diff --git a/wp-content/themes/twentyfourteen/inc/customizer.php b/wp-content/themes/twentyfourteen/inc/customizer.php
deleted file mode 100644 (file)
index 4522984..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-<?php
-/**
- * Twenty Fourteen Customizer support
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-/**
- * Implement Customizer additions and adjustments.
- *
- * @since Twenty Fourteen 1.0
- *
- * @param WP_Customize_Manager $wp_customize Customizer object.
- */
-function twentyfourteen_customize_register( $wp_customize ) {
-       // Add postMessage support for site title and description.
-       $wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
-       $wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
-       $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
-
-       if ( isset( $wp_customize->selective_refresh ) ) {
-               $wp_customize->selective_refresh->add_partial( 'blogname', array(
-                       'selector' => '.site-title a',
-                       'container_inclusive' => false,
-                       'render_callback' => 'twentyfourteen_customize_partial_blogname',
-               ) );
-               $wp_customize->selective_refresh->add_partial( 'blogdescription', array(
-                       'selector' => '.site-description',
-                       'container_inclusive' => false,
-                       'render_callback' => 'twentyfourteen_customize_partial_blogdescription',
-               ) );
-       }
-
-       // Rename the label to "Site Title Color" because this only affects the site title in this theme.
-       $wp_customize->get_control( 'header_textcolor' )->label = __( 'Site Title Color', 'twentyfourteen' );
-
-       // Rename the label to "Display Site Title & Tagline" in order to make this option extra clear.
-       $wp_customize->get_control( 'display_header_text' )->label = __( 'Display Site Title &amp; Tagline', 'twentyfourteen' );
-
-       // Add custom description to Colors and Background controls or sections.
-       if ( property_exists( $wp_customize->get_control( 'background_color' ), 'description' ) ) {
-               $wp_customize->get_control( 'background_color' )->description = __( 'May only be visible on wide screens.', 'twentyfourteen' );
-               $wp_customize->get_control( 'background_image' )->description = __( 'May only be visible on wide screens.', 'twentyfourteen' );
-       } else {
-               $wp_customize->get_section( 'colors' )->description           = __( 'Background may only be visible on wide screens.', 'twentyfourteen' );
-               $wp_customize->get_section( 'background_image' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' );
-       }
-
-       // Add the featured content section in case it's not already there.
-       $wp_customize->add_section( 'featured_content', array(
-               'title'           => __( 'Featured Content', 'twentyfourteen' ),
-               'description'     => sprintf( __( '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.', 'twentyfourteen' ),
-                       esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
-                       admin_url( 'edit.php?show_sticky=1' )
-               ),
-               'priority'        => 130,
-               'active_callback' => 'is_front_page',
-       ) );
-
-       // Add the featured content layout setting and control.
-       $wp_customize->add_setting( 'featured_content_layout', array(
-               'default'           => 'grid',
-               'sanitize_callback' => 'twentyfourteen_sanitize_layout',
-       ) );
-
-       $wp_customize->add_control( 'featured_content_layout', array(
-               'label'   => __( 'Layout', 'twentyfourteen' ),
-               'section' => 'featured_content',
-               'type'    => 'select',
-               'choices' => array(
-                       'grid'   => __( 'Grid',   'twentyfourteen' ),
-                       'slider' => __( 'Slider', 'twentyfourteen' ),
-               ),
-       ) );
-}
-add_action( 'customize_register', 'twentyfourteen_customize_register' );
-
-/**
- * Render the site title for the selective refresh partial.
- *
- * @since Twenty Fourteen 1.7
- * @see twentyfourteen_customize_register()
- *
- * @return void
- */
-function twentyfourteen_customize_partial_blogname() {
-       bloginfo( 'name' );
-}
-
-/**
- * Render the site tagline for the selective refresh partial.
- *
- * @since Twenty Fourteen 1.7
- * @see twentyfourteen_customize_register()
- *
- * @return void
- */
-function twentyfourteen_customize_partial_blogdescription() {
-       bloginfo( 'description' );
-}
-
-/**
- * Sanitize the Featured Content layout value.
- *
- * @since Twenty Fourteen 1.0
- *
- * @param string $layout Layout type.
- * @return string Filtered layout type (grid|slider).
- */
-function twentyfourteen_sanitize_layout( $layout ) {
-       if ( ! in_array( $layout, array( 'grid', 'slider' ) ) ) {
-               $layout = 'grid';
-       }
-
-       return $layout;
-}
-
-/**
- * Bind JS handlers to make Customizer preview reload changes asynchronously.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_customize_preview_js() {
-       wp_enqueue_script( 'twentyfourteen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20131205', true );
-}
-add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' );
-
-/**
- * Add contextual help to the Themes and Post edit screens.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_contextual_help() {
-       if ( 'admin_head-edit.php' === current_filter() && 'post' !== $GLOBALS['typenow'] ) {
-               return;
-       }
-
-       get_current_screen()->add_help_tab( array(
-               'id'      => 'twentyfourteen',
-               'title'   => __( 'Twenty Fourteen', 'twentyfourteen' ),
-               'content' =>
-                       '<ul>' .
-                               '<li>' . sprintf( __( '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.', 'twentyfourteen' ), esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ), admin_url( 'customize.php' ), admin_url( 'edit.php?show_sticky=1' ) ) . '</li>' .
-                               '<li>' . sprintf( __( '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.', 'twentyfourteen' ), 'https://codex.wordpress.org/Post_Thumbnails#Setting_a_Post_Thumbnail' ) . '</li>' .
-                               '<li>' . sprintf( __( 'For an in-depth tutorial, and more tips and tricks, visit the <a href="%s">Twenty Fourteen documentation</a>.', 'twentyfourteen' ), 'https://codex.wordpress.org/Twenty_Fourteen' ) . '</li>' .
-                       '</ul>',
-       ) );
-}
-add_action( 'admin_head-themes.php', 'twentyfourteen_contextual_help' );
-add_action( 'admin_head-edit.php',   'twentyfourteen_contextual_help' );
diff --git a/wp-content/themes/twentyfourteen/inc/featured-content.php b/wp-content/themes/twentyfourteen/inc/featured-content.php
deleted file mode 100644 (file)
index ffeb993..0000000
+++ /dev/null
@@ -1,531 +0,0 @@
-<?php
-/**
- * Twenty Fourteen Featured Content
- *
- * This module allows you to define a subset of posts to be displayed
- * in the theme's Featured Content area.
- *
- * For maximum compatibility with different methods of posting users
- * will designate a featured post tag to associate posts with. Since
- * this tag now has special meaning beyond that of a normal tags, users
- * will have the ability to hide it from the front end of their site.
- */
-class Featured_Content {
-
-       /**
-        * The maximum number of posts a Featured Content area can contain.
-        *
-        * We define a default value here but themes can override
-        * this by defining a "max_posts" entry in the second parameter
-        * passed in the call to add_theme_support( 'featured-content' ).
-        *
-        * @see Featured_Content::init()
-        *
-        * @since Twenty Fourteen 1.0
-        *
-        * @static
-        * @access public
-        * @var int
-        */
-       public static $max_posts = 15;
-
-       /**
-        * Instantiate.
-        *
-        * All custom functionality will be hooked into the "init" action.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        */
-       public static function setup() {
-               add_action( 'init', array( __CLASS__, 'init' ), 30 );
-       }
-
-       /**
-        * Conditionally hook into WordPress.
-        *
-        * Theme must declare that they support this module by adding
-        * add_theme_support( 'featured-content' ); during after_setup_theme.
-        *
-        * If no theme support is found there is no need to hook into WordPress.
-        * We'll just return early instead.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        */
-       public static function init() {
-               $theme_support = get_theme_support( 'featured-content' );
-
-               // Return early if theme does not support Featured Content.
-               if ( ! $theme_support ) {
-                       return;
-               }
-
-               /*
-                * An array of named arguments must be passed as the second parameter
-                * of add_theme_support().
-                */
-               if ( ! isset( $theme_support[0] ) ) {
-                       return;
-               }
-
-               // Return early if "featured_content_filter" has not been defined.
-               if ( ! isset( $theme_support[0]['featured_content_filter'] ) ) {
-                       return;
-               }
-
-               $filter = $theme_support[0]['featured_content_filter'];
-
-               // Theme can override the number of max posts.
-               if ( isset( $theme_support[0]['max_posts'] ) ) {
-                       self::$max_posts = absint( $theme_support[0]['max_posts'] );
-               }
-
-               add_filter( $filter,                              array( __CLASS__, 'get_featured_posts' )    );
-               add_action( 'customize_register',                 array( __CLASS__, 'customize_register' ), 9 );
-               add_action( 'admin_init',                         array( __CLASS__, 'register_setting'   )    );
-               add_action( 'switch_theme',                       array( __CLASS__, 'delete_transient'   )    );
-               add_action( 'save_post',                          array( __CLASS__, 'delete_transient'   )    );
-               add_action( 'delete_post_tag',                    array( __CLASS__, 'delete_post_tag'    )    );
-               add_action( 'customize_controls_enqueue_scripts', array( __CLASS__, 'enqueue_scripts'    )    );
-               add_action( 'pre_get_posts',                      array( __CLASS__, 'pre_get_posts'      )    );
-               add_action( 'wp_loaded',                          array( __CLASS__, 'wp_loaded'          )    );
-       }
-
-       /**
-        * Hide "featured" tag from the front end.
-        *
-        * Has to run on wp_loaded so that the preview filters of the Customizer
-        * have a chance to alter the value.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        */
-       public static function wp_loaded() {
-               if ( self::get_setting( 'hide-tag' ) ) {
-                       add_filter( 'get_terms',     array( __CLASS__, 'hide_featured_term'     ), 10, 3 );
-                       add_filter( 'get_the_terms', array( __CLASS__, 'hide_the_featured_term' ), 10, 3 );
-               }
-       }
-
-       /**
-        * Get featured posts.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        *
-        * @return array Array of featured posts.
-        */
-       public static function get_featured_posts() {
-               $post_ids = self::get_featured_post_ids();
-
-               // No need to query if there is are no featured posts.
-               if ( empty( $post_ids ) ) {
-                       return array();
-               }
-
-               $featured_posts = get_posts( array(
-                       'include'        => $post_ids,
-                       'posts_per_page' => count( $post_ids ),
-               ) );
-
-               return $featured_posts;
-       }
-
-       /**
-        * Get featured post IDs
-        *
-        * This function will return the an array containing the
-        * post IDs of all featured posts.
-        *
-        * Sets the "featured_content_ids" transient.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        *
-        * @return array Array of post IDs.
-        */
-       public static function get_featured_post_ids() {
-               // Get array of cached results if they exist.
-               $featured_ids = get_transient( 'featured_content_ids' );
-
-               if ( false === $featured_ids ) {
-                       $settings = self::get_setting();
-                       $term     = get_term_by( 'name', $settings['tag-name'], 'post_tag' );
-
-                       if ( $term ) {
-                               // Query for featured posts.
-                               $featured_ids = get_posts( array(
-                                       'fields'           => 'ids',
-                                       'numberposts'      => self::$max_posts,
-                                       'suppress_filters' => false,
-                                       'tax_query'        => array(
-                                               array(
-                                                       'field'    => 'term_id',
-                                                       'taxonomy' => 'post_tag',
-                                                       'terms'    => $term->term_id,
-                                               ),
-                                       ),
-                               ) );
-                       }
-
-                       // Get sticky posts if no Featured Content exists.
-                       if ( ! $featured_ids ) {
-                               $featured_ids = self::get_sticky_posts();
-                       }
-
-                       set_transient( 'featured_content_ids', $featured_ids );
-               }
-
-               // Ensure correct format before return.
-               return array_map( 'absint', $featured_ids );
-       }
-
-       /**
-        * Return an array with IDs of posts maked as sticky.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        *
-        * @return array Array of sticky posts.
-        */
-       public static function get_sticky_posts() {
-               return array_slice( get_option( 'sticky_posts', array() ), 0, self::$max_posts );
-       }
-
-       /**
-        * Delete featured content ids transient.
-        *
-        * Hooks in the "save_post" action.
-        *
-        * @see Featured_Content::validate_settings().
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        */
-       public static function delete_transient() {
-               delete_transient( 'featured_content_ids' );
-       }
-
-       /**
-        * Exclude featured posts from the home page blog query.
-        *
-        * Filter the home page posts, and remove any featured post ID's from it.
-        * Hooked onto the 'pre_get_posts' action, this changes the parameters of
-        * the query before it gets any posts.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        *
-        * @param WP_Query $query WP_Query object.
-        * @return WP_Query Possibly-modified WP_Query.
-        */
-       public static function pre_get_posts( $query ) {
-
-               // Bail if not home or not main query.
-               if ( ! $query->is_home() || ! $query->is_main_query() ) {
-                       return;
-               }
-
-               // Bail if the blog page is not the front page.
-               if ( 'posts' !== get_option( 'show_on_front' ) ) {
-                       return;
-               }
-
-               $featured = self::get_featured_post_ids();
-
-               // Bail if no featured posts.
-               if ( ! $featured ) {
-                       return;
-               }
-
-               // We need to respect post ids already in the blacklist.
-               $post__not_in = $query->get( 'post__not_in' );
-
-               if ( ! empty( $post__not_in ) ) {
-                       $featured = array_merge( (array) $post__not_in, $featured );
-                       $featured = array_unique( $featured );
-               }
-
-               $query->set( 'post__not_in', $featured );
-       }
-
-       /**
-        * Reset tag option when the saved tag is deleted.
-        *
-        * It's important to mention that the transient needs to be deleted,
-        * too. While it may not be obvious by looking at the function alone,
-        * the transient is deleted by Featured_Content::validate_settings().
-        *
-        * Hooks in the "delete_post_tag" action.
-        *
-        * @see Featured_Content::validate_settings().
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        *
-        * @param int $tag_id The term_id of the tag that has been deleted.
-        */
-       public static function delete_post_tag( $tag_id ) {
-               $settings = self::get_setting();
-
-               if ( empty( $settings['tag-id'] ) || $tag_id != $settings['tag-id'] ) {
-                       return;
-               }
-
-               $settings['tag-id'] = 0;
-               $settings = self::validate_settings( $settings );
-               update_option( 'featured-content', $settings );
-       }
-
-       /**
-        * Hide featured tag from displaying when global terms are queried from the front end.
-        *
-        * Hooks into the "get_terms" filter.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        *
-        * @param array $terms      List of term objects. This is the return value of get_terms().
-        * @param array $taxonomies An array of taxonomy slugs.
-        * @return array A filtered array of terms.
-        *
-        * @uses Featured_Content::get_setting()
-        */
-       public static function hide_featured_term( $terms, $taxonomies, $args ) {
-
-               // This filter is only appropriate on the front end.
-               if ( is_admin() ) {
-                       return $terms;
-               }
-
-               // We only want to hide the featured tag.
-               if ( ! in_array( 'post_tag', $taxonomies ) ) {
-                       return $terms;
-               }
-
-               // Bail if no terms were returned.
-               if ( empty( $terms ) ) {
-                       return $terms;
-               }
-
-               // Bail if term objects are unavailable.
-               if ( 'all' != $args['fields'] ) {
-                       return $terms;
-               }
-
-               $settings = self::get_setting();
-               foreach ( $terms as $order => $term ) {
-                       if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
-                               unset( $terms[ $order ] );
-                       }
-               }
-
-               return $terms;
-       }
-
-       /**
-        * Hide featured tag from display when terms associated with a post object
-        * are queried from the front end.
-        *
-        * Hooks into the "get_the_terms" filter.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        *
-        * @param array $terms    A list of term objects. This is the return value of get_the_terms().
-        * @param int   $id       The ID field for the post object that terms are associated with.
-        * @param array $taxonomy An array of taxonomy slugs.
-        * @return array Filtered array of terms.
-        *
-        * @uses Featured_Content::get_setting()
-        */
-       public static function hide_the_featured_term( $terms, $id, $taxonomy ) {
-
-               // This filter is only appropriate on the front end.
-               if ( is_admin() ) {
-                       return $terms;
-               }
-
-               // Make sure we are in the correct taxonomy.
-               if ( 'post_tag' != $taxonomy ) {
-                       return $terms;
-               }
-
-               // No terms? Return early!
-               if ( empty( $terms ) ) {
-                       return $terms;
-               }
-
-               $settings = self::get_setting();
-               foreach ( $terms as $order => $term ) {
-                       if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
-                               unset( $terms[ $term->term_id ] );
-                       }
-               }
-
-               return $terms;
-       }
-
-       /**
-        * Register custom setting on the Settings -> Reading screen.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        */
-       public static function register_setting() {
-               register_setting( 'featured-content', 'featured-content', array( __CLASS__, 'validate_settings' ) );
-       }
-
-       /**
-        * Add settings to the Customizer.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        *
-        * @param WP_Customize_Manager $wp_customize Customizer object.
-        */
-       public static function customize_register( $wp_customize ) {
-               $wp_customize->add_section( 'featured_content', array(
-                       'title'          => __( 'Featured Content', 'twentyfourteen' ),
-                       'description'    => sprintf( __( '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.', 'twentyfourteen' ),
-                               esc_url( add_query_arg( 'tag', _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), admin_url( 'edit.php' ) ) ),
-                               admin_url( 'edit.php?show_sticky=1' )
-                       ),
-                       'priority'       => 130,
-                       'theme_supports' => 'featured-content',
-               ) );
-
-               // Add Featured Content settings.
-               $wp_customize->add_setting( 'featured-content[tag-name]', array(
-                       'default'              => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ),
-                       'type'                 => 'option',
-                       'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ),
-               ) );
-               $wp_customize->add_setting( 'featured-content[hide-tag]', array(
-                       'default'              => true,
-                       'type'                 => 'option',
-                       'sanitize_js_callback' => array( __CLASS__, 'delete_transient' ),
-               ) );
-
-               // Add Featured Content controls.
-               $wp_customize->add_control( 'featured-content[tag-name]', array(
-                       'label'    => __( 'Tag Name', 'twentyfourteen' ),
-                       'section'  => 'featured_content',
-                       'priority' => 20,
-               ) );
-               $wp_customize->add_control( 'featured-content[hide-tag]', array(
-                       'label'    => __( 'Don&rsquo;t display tag on front end.', 'twentyfourteen' ),
-                       'section'  => 'featured_content',
-                       'type'     => 'checkbox',
-                       'priority' => 30,
-               ) );
-       }
-
-       /**
-        * Enqueue the tag suggestion script.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        */
-       public static function enqueue_scripts() {
-               wp_enqueue_script( 'featured-content-suggest', get_template_directory_uri() . '/js/featured-content-admin.js', array( 'jquery', 'suggest' ), '20131022', true );
-       }
-
-       /**
-        * Get featured content settings.
-        *
-        * Get all settings recognized by this module. This function
-        * will return all settings whether or not they have been stored
-        * in the database yet. This ensures that all keys are available
-        * at all times.
-        *
-        * In the event that you only require one setting, you may pass
-        * its name as the first parameter to the function and only that
-        * value will be returned.
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        *
-        * @param string $key The key of a recognized setting.
-        * @return mixed Array of all settings by default. A single value if passed as first parameter.
-        */
-       public static function get_setting( $key = 'all' ) {
-               $saved = (array) get_option( 'featured-content' );
-
-               $defaults = array(
-                       'hide-tag' => 1,
-                       'tag-id'   => 0,
-                       'tag-name' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ),
-               );
-
-               $options = wp_parse_args( $saved, $defaults );
-               $options = array_intersect_key( $options, $defaults );
-
-               if ( 'all' != $key ) {
-                       return isset( $options[ $key ] ) ? $options[ $key ] : false;
-               }
-
-               return $options;
-       }
-
-       /**
-        * Validate featured content settings.
-        *
-        * Make sure that all user supplied content is in an expected
-        * format before saving to the database. This function will also
-        * delete the transient set in Featured_Content::get_featured_content().
-        *
-        * @static
-        * @access public
-        * @since Twenty Fourteen 1.0
-        *
-        * @param array $input Array of settings input.
-        * @return array Validated settings output.
-        */
-       public static function validate_settings( $input ) {
-               $output = array();
-
-               if ( empty( $input['tag-name'] ) ) {
-                       $output['tag-id'] = 0;
-               } else {
-                       $term = get_term_by( 'name', $input['tag-name'], 'post_tag' );
-
-                       if ( $term ) {
-                               $output['tag-id'] = $term->term_id;
-                       } else {
-                               $new_tag = wp_create_tag( $input['tag-name'] );
-
-                               if ( ! is_wp_error( $new_tag ) && isset( $new_tag['term_id'] ) ) {
-                                       $output['tag-id'] = $new_tag['term_id'];
-                               }
-                       }
-
-                       $output['tag-name'] = $input['tag-name'];
-               }
-
-               $output['hide-tag'] = isset( $input['hide-tag'] ) && $input['hide-tag'] ? 1 : 0;
-
-               // Delete the featured post ids transient.
-               self::delete_transient();
-
-               return $output;
-       }
-} // Featured_Content
-
-Featured_Content::setup();
diff --git a/wp-content/themes/twentyfourteen/inc/template-tags.php b/wp-content/themes/twentyfourteen/inc/template-tags.php
deleted file mode 100644 (file)
index f63ee82..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-<?php
-/**
- * Custom template tags for Twenty Fourteen
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-if ( ! function_exists( 'twentyfourteen_paging_nav' ) ) :
-/**
- * Display navigation to next/previous set of posts when applicable.
- *
- * @since Twenty Fourteen 1.0
- *
- * @global WP_Query   $wp_query   WordPress Query object.
- * @global WP_Rewrite $wp_rewrite WordPress Rewrite object.
- */
-function twentyfourteen_paging_nav() {
-       global $wp_query, $wp_rewrite;
-
-       // Don't print empty markup if there's only one page.
-       if ( $wp_query->max_num_pages < 2 ) {
-               return;
-       }
-
-       $paged        = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
-       $pagenum_link = html_entity_decode( get_pagenum_link() );
-       $query_args   = array();
-       $url_parts    = explode( '?', $pagenum_link );
-
-       if ( isset( $url_parts[1] ) ) {
-               wp_parse_str( $url_parts[1], $query_args );
-       }
-
-       $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
-       $pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
-
-       $format  = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
-       $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
-
-       // Set up paginated links.
-       $links = paginate_links( array(
-               'base'     => $pagenum_link,
-               'format'   => $format,
-               'total'    => $wp_query->max_num_pages,
-               'current'  => $paged,
-               'mid_size' => 1,
-               'add_args' => array_map( 'urlencode', $query_args ),
-               'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
-               'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
-       ) );
-
-       if ( $links ) :
-
-       ?>
-       <nav class="navigation paging-navigation" role="navigation">
-               <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentyfourteen' ); ?></h1>
-               <div class="pagination loop-pagination">
-                       <?php echo $links; ?>
-               </div><!-- .pagination -->
-       </nav><!-- .navigation -->
-       <?php
-       endif;
-}
-endif;
-
-if ( ! function_exists( 'twentyfourteen_post_nav' ) ) :
-/**
- * Display navigation to next/previous post when applicable.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_post_nav() {
-       // Don't print empty markup if there's nowhere to navigate.
-       $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
-       $next     = get_adjacent_post( false, '', false );
-
-       if ( ! $next && ! $previous ) {
-               return;
-       }
-
-       ?>
-       <nav class="navigation post-navigation" role="navigation">
-               <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
-               <div class="nav-links">
-                       <?php
-                       if ( is_attachment() ) :
-                               previous_post_link( '%link', __( '<span class="meta-nav">Published In</span>%title', 'twentyfourteen' ) );
-                       else :
-                               previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) );
-                               next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) );
-                       endif;
-                       ?>
-               </div><!-- .nav-links -->
-       </nav><!-- .navigation -->
-       <?php
-}
-endif;
-
-if ( ! function_exists( 'twentyfourteen_posted_on' ) ) :
-/**
- * Print HTML with meta information for the current post-date/time and author.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_posted_on() {
-       if ( is_sticky() && is_home() && ! is_paged() ) {
-               echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>';
-       }
-
-       // Set up and print post meta information.
-       printf( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>',
-               esc_url( get_permalink() ),
-               esc_attr( get_the_date( 'c' ) ),
-               esc_html( get_the_date() ),
-               esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
-               get_the_author()
-       );
-}
-endif;
-
-/**
- * Find out if blog has more than one category.
- *
- * @since Twenty Fourteen 1.0
- *
- * @return boolean true if blog has more than 1 category
- */
-function twentyfourteen_categorized_blog() {
-       if ( false === ( $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ) ) ) {
-               // Create an array of all the categories that are attached to posts
-               $all_the_cool_cats = get_categories( array(
-                       'hide_empty' => 1,
-               ) );
-
-               // Count the number of categories that are attached to the posts
-               $all_the_cool_cats = count( $all_the_cool_cats );
-
-               set_transient( 'twentyfourteen_category_count', $all_the_cool_cats );
-       }
-
-       if ( 1 !== (int) $all_the_cool_cats ) {
-               // This blog has more than 1 category so twentyfourteen_categorized_blog should return true
-               return true;
-       } else {
-               // This blog has only 1 category so twentyfourteen_categorized_blog should return false
-               return false;
-       }
-}
-
-/**
- * Flush out the transients used in twentyfourteen_categorized_blog.
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_category_transient_flusher() {
-       // Like, beat it. Dig?
-       delete_transient( 'twentyfourteen_category_count' );
-}
-add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' );
-add_action( 'save_post',     'twentyfourteen_category_transient_flusher' );
-
-if ( ! function_exists( 'twentyfourteen_post_thumbnail' ) ) :
-/**
- * Display an optional post thumbnail.
- *
- * Wraps the post thumbnail in an anchor element on index
- * views, or a div element when on single views.
- *
- * @since Twenty Fourteen 1.0
- * @since Twenty Fourteen 1.4 Was made 'pluggable', or overridable.
- */
-function twentyfourteen_post_thumbnail() {
-       if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
-               return;
-       }
-
-       if ( is_singular() ) :
-       ?>
-
-       <div class="post-thumbnail">
-       <?php
-               if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
-                       the_post_thumbnail( 'twentyfourteen-full-width' );
-               } else {
-                       the_post_thumbnail();
-               }
-       ?>
-       </div>
-
-       <?php else : ?>
-
-       <a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
-       <?php
-               if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
-                       the_post_thumbnail( 'twentyfourteen-full-width' );
-               } else {
-                       the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
-               }
-       ?>
-       </a>
-
-       <?php endif; // End is_singular()
-}
-endif;
-
-if ( ! function_exists( 'twentyfourteen_excerpt_more' ) && ! is_admin() ) :
-/**
- * Replaces "[...]" (appended to automatically generated excerpts) with ...
- * and a Continue reading link.
- *
- * @since Twenty Fourteen 1.3
- *
- * @param string $more Default Read More excerpt link.
- * @return string Filtered Read More excerpt link.
- */
-function twentyfourteen_excerpt_more( $more ) {
-       $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
-               esc_url( get_permalink( get_the_ID() ) ),
-                       /* translators: %s: Name of current post */
-                       sprintf( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
-               );
-       return ' &hellip; ' . $link;
-}
-add_filter( 'excerpt_more', 'twentyfourteen_excerpt_more' );
-endif;
diff --git a/wp-content/themes/twentyfourteen/inc/widgets.php b/wp-content/themes/twentyfourteen/inc/widgets.php
deleted file mode 100644 (file)
index ee766cb..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-<?php
-/**
- * Custom Widget for displaying specific post formats
- *
- * Displays posts from Aside, Quote, Video, Audio, Image, Gallery, and Link formats.
- *
- * @link https://codex.wordpress.org/Widgets_API#Developing_Widgets
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
-
-       /**
-        * The supported post formats.
-        *
-        * @access private
-        * @since Twenty Fourteen 1.0
-        *
-        * @var array
-        */
-       private $formats = array( 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery' );
-
-       /**
-        * Constructor.
-        *
-        * @since Twenty Fourteen 1.0
-        *
-        * @return Twenty_Fourteen_Ephemera_Widget
-        */
-       public function __construct() {
-               parent::__construct( 'widget_twentyfourteen_ephemera', __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ), array(
-                       'classname'   => 'widget_twentyfourteen_ephemera',
-                       'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen' ),
-                       'customize_selective_refresh' => true,
-               ) );
-
-               if ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) {
-                       add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
-               }
-       }
-
-       /**
-        * Enqueue scripts.
-        *
-        * @since Twenty Fourteen 1.7
-        */
-       public function enqueue_scripts() {
-               /** This filter is documented in wp-includes/media.php */
-               $audio_library = apply_filters( 'wp_audio_shortcode_library', 'mediaelement' );
-               /** This filter is documented in wp-includes/media.php */
-               $video_library = apply_filters( 'wp_video_shortcode_library', 'mediaelement' );
-               if ( in_array( 'mediaelement', array( $video_library, $audio_library ), true ) ) {
-                       wp_enqueue_style( 'wp-mediaelement' );
-                       wp_enqueue_script( 'wp-mediaelement' );
-               }
-       }
-
-       /**
-        * Output the HTML for this widget.
-        *
-        * @access public
-        * @since Twenty Fourteen 1.0
-        *
-        * @param array $args     An array of standard parameters for widgets in this theme.
-        * @param array $instance An array of settings for this widget instance.
-        */
-       public function widget( $args, $instance ) {
-               $format = isset( $instance['format'] ) && in_array( $instance['format'], $this->formats ) ? $instance['format'] : 'aside';
-
-               switch ( $format ) {
-                       case 'image':
-                               $format_string      = __( 'Images', 'twentyfourteen' );
-                               $format_string_more = __( 'More images', 'twentyfourteen' );
-                               break;
-                       case 'video':
-                               $format_string      = __( 'Videos', 'twentyfourteen' );
-                               $format_string_more = __( 'More videos', 'twentyfourteen' );
-                               break;
-                       case 'audio':
-                               $format_string      = __( 'Audio', 'twentyfourteen' );
-                               $format_string_more = __( 'More audio', 'twentyfourteen' );
-                               break;
-                       case 'quote':
-                               $format_string      = __( 'Quotes', 'twentyfourteen' );
-                               $format_string_more = __( 'More quotes', 'twentyfourteen' );
-                               break;
-                       case 'link':
-                               $format_string      = __( 'Links', 'twentyfourteen' );
-                               $format_string_more = __( 'More links', 'twentyfourteen' );
-                               break;
-                       case 'gallery':
-                               $format_string      = __( 'Galleries', 'twentyfourteen' );
-                               $format_string_more = __( 'More galleries', 'twentyfourteen' );
-                               break;
-                       case 'aside':
-                       default:
-                               $format_string      = __( 'Asides', 'twentyfourteen' );
-                               $format_string_more = __( 'More asides', 'twentyfourteen' );
-                               break;
-               }
-
-               $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
-               $title  = apply_filters( 'widget_title', empty( $instance['title'] ) ? $format_string : $instance['title'], $instance, $this->id_base );
-
-               $ephemera = new WP_Query( array(
-                       'order'          => 'DESC',
-                       'posts_per_page' => $number,
-                       'no_found_rows'  => true,
-                       'post_status'    => 'publish',
-                       'post__not_in'   => get_option( 'sticky_posts' ),
-                       'tax_query'      => array(
-                               array(
-                                       'taxonomy' => 'post_format',
-                                       'terms'    => array( "post-format-$format" ),
-                                       'field'    => 'slug',
-                                       'operator' => 'IN',
-                               ),
-                       ),
-               ) );
-
-               if ( $ephemera->have_posts() ) :
-                       $tmp_content_width = $GLOBALS['content_width'];
-                       $GLOBALS['content_width'] = 306;
-
-                       echo $args['before_widget'];
-                       ?>
-                       <h1 class="widget-title <?php echo esc_attr( $format ); ?>">
-                               <a class="entry-format" href="<?php echo esc_url( get_post_format_link( $format ) ); ?>"><?php echo esc_html( $title ); ?></a>
-                       </h1>
-                       <ol>
-
-                               <?php
-                                       while ( $ephemera->have_posts() ) :
-                                               $ephemera->the_post();
-                                               $tmp_more = $GLOBALS['more'];
-                                               $GLOBALS['more'] = 0;
-                               ?>
-                               <li>
-                               <article <?php post_class(); ?>>
-                                       <div class="entry-content">
-                                               <?php
-                                                       if ( has_post_format( 'gallery' ) ) :
-
-                                                               if ( post_password_required() ) :
-                                                                       the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
-                                                               else :
-                                                                       $images = array();
-
-                                                                       $galleries = get_post_galleries( get_the_ID(), false );
-                                                                       if ( isset( $galleries[0]['ids'] ) )
-                                                                               $images = explode( ',', $galleries[0]['ids'] );
-
-                                                                       if ( ! $images ) :
-                                                                               $images = get_posts( array(
-                                                                                       'fields'         => 'ids',
-                                                                                       'numberposts'    => -1,
-                                                                                       'order'          => 'ASC',
-                                                                                       'orderby'        => 'menu_order',
-                                                                                       'post_mime_type' => 'image',
-                                                                                       'post_parent'    => get_the_ID(),
-                                                                                       'post_type'      => 'attachment',
-                                                                               ) );
-                                                                       endif;
-
-                                                                       $total_images = count( $images );
-
-                                                                       if ( has_post_thumbnail() ) :
-                                                                               $post_thumbnail = get_the_post_thumbnail();
-                                                                       elseif ( $total_images > 0 ) :
-                                                                               $image          = reset( $images );
-                                                                               $post_thumbnail = wp_get_attachment_image( $image, 'post-thumbnail' );
-                                                                       endif;
-
-                                                                       if ( ! empty ( $post_thumbnail ) ) :
-                                               ?>
-                                               <a href="<?php the_permalink(); ?>"><?php echo $post_thumbnail; ?></a>
-                                               <?php endif; ?>
-                                               <p class="wp-caption-text">
-                                                       <?php
-                                                               printf( _n( 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photo</a>.', 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photos</a>.', $total_images, 'twentyfourteen' ),
-                                                                       esc_url( get_permalink() ),
-                                                                       number_format_i18n( $total_images )
-                                                               );
-                                                       ?>
-                                               </p>
-                                               <?php
-                                                               endif;
-
-                                                       else :
-                                                               the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
-                                                       endif;
-                                               ?>
-                                       </div><!-- .entry-content -->
-
-                                       <header class="entry-header">
-                                               <div class="entry-meta">
-                                                       <?php
-                                                               if ( ! has_post_format( 'link' ) ) :
-                                                                       the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
-                                                               endif;
-
-                                                               printf( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>',
-                                                                       esc_url( get_permalink() ),
-                                                                       esc_attr( get_the_date( 'c' ) ),
-                                                                       esc_html( get_the_date() ),
-                                                                       esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
-                                                                       get_the_author()
-                                                               );
-
-                                                               if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
-                                                       ?>
-                                                       <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
-                                                       <?php endif; ?>
-                                               </div><!-- .entry-meta -->
-                                       </header><!-- .entry-header -->
-                               </article><!-- #post-## -->
-                               </li>
-                               <?php endwhile; ?>
-
-                       </ol>
-                       <a class="post-format-archive-link" href="<?php echo esc_url( get_post_format_link( $format ) ); ?>">
-                               <?php
-                                       /* translators: used with More archives link */
-                                       printf( __( '%s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ), $format_string_more );
-                               ?>
-                       </a>
-                       <?php
-
-                       echo $args['after_widget'];
-
-                       // Reset the post globals as this query will have stomped on it.
-                       wp_reset_postdata();
-
-                       $GLOBALS['more']          = $tmp_more;
-                       $GLOBALS['content_width'] = $tmp_content_width;
-
-               endif; // End check for ephemeral posts.
-       }
-
-       /**
-        * Deal with the settings when they are saved by the admin.
-        *
-        * Here is where any validation should happen.
-        *
-        * @since Twenty Fourteen 1.0
-        *
-        * @param array $new_instance New widget instance.
-        * @param array $instance     Original widget instance.
-        * @return array Updated widget instance.
-        */
-       function update( $new_instance, $instance ) {
-               $instance['title']  = strip_tags( $new_instance['title'] );
-               $instance['number'] = empty( $new_instance['number'] ) ? 2 : absint( $new_instance['number'] );
-               if ( in_array( $new_instance['format'], $this->formats ) ) {
-                       $instance['format'] = $new_instance['format'];
-               }
-
-               return $instance;
-       }
-
-       /**
-        * Display the form for this widget on the Widgets page of the Admin area.
-        *
-        * @since Twenty Fourteen 1.0
-        *
-        * @param array $instance
-        */
-       function form( $instance ) {
-               $title  = empty( $instance['title'] ) ? '' : esc_attr( $instance['title'] );
-               $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
-               $format = isset( $instance['format'] ) && in_array( $instance['format'], $this->formats ) ? $instance['format'] : 'aside';
-               ?>
-                       <p><label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'twentyfourteen' ); ?></label>
-                       <input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>"></p>
-
-                       <p><label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php _e( 'Number of posts to show:', 'twentyfourteen' ); ?></label>
-                       <input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo esc_attr( $number ); ?>" size="3"></p>
-
-                       <p><label for="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>"><?php _e( 'Post format to show:', 'twentyfourteen' ); ?></label>
-                       <select id="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>" class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'format' ) ); ?>">
-                               <?php foreach ( $this->formats as $slug ) : ?>
-                               <option value="<?php echo esc_attr( $slug ); ?>"<?php selected( $format, $slug ); ?>><?php echo esc_html( get_post_format_string( $slug ) ); ?></option>
-                               <?php endforeach; ?>
-                       </select>
-               <?php
-       }
-}
diff --git a/wp-content/themes/twentyfourteen/index.php b/wp-content/themes/twentyfourteen/index.php
deleted file mode 100644 (file)
index 21f4842..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/**
- * The main template file
- *
- * This is the most generic template file in a WordPress theme and one
- * of the two required files for a theme (the other being style.css).
- * It is used to display a page when nothing more specific matches a query,
- * e.g., it puts together the home page when no home.php file exists.
- *
- * @link https://codex.wordpress.org/Template_Hierarchy
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-<div id="main-content" class="main-content">
-
-<?php
-       if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
-               // Include the featured content template.
-               get_template_part( 'featured-content' );
-       }
-?>
-
-       <div id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-
-               <?php
-                       if ( have_posts() ) :
-                               // Start the Loop.
-                               while ( have_posts() ) : the_post();
-
-                                       /*
-                                        * Include the post format-specific template for the content. If you want to
-                                        * use this in a child theme, then include a file called called content-___.php
-                                        * (where ___ is the post format) and that will be used instead.
-                                        */
-                                       get_template_part( 'content', get_post_format() );
-
-                               endwhile;
-                               // Previous/next post navigation.
-                               twentyfourteen_paging_nav();
-
-                       else :
-                               // If no content, include the "No posts found" template.
-                               get_template_part( 'content', 'none' );
-
-                       endif;
-               ?>
-
-               </div><!-- #content -->
-       </div><!-- #primary -->
-       <?php get_sidebar( 'content' ); ?>
-</div><!-- #main-content -->
-
-<?php
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/js/customizer.js b/wp-content/themes/twentyfourteen/js/customizer.js
deleted file mode 100644 (file)
index 10f3340..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Twenty Fourteen Customizer enhancements for a better user experience.
- *
- * Contains handlers to make Customizer preview reload changes asynchronously.
- */
-( function( $ ) {
-       // Site title and description.
-       wp.customize( 'blogname', function( value ) {
-               value.bind( function( to ) {
-                       $( '.site-title a' ).text( to );
-               } );
-       } );
-       wp.customize( 'blogdescription', function( value ) {
-               value.bind( function( to ) {
-                       $( '.site-description' ).text( to );
-               } );
-       } );
-       // Header text color.
-       wp.customize( 'header_textcolor', function( value ) {
-               value.bind( function( to ) {
-                       if ( 'blank' === to ) {
-                               $( '.site-title, .site-description' ).css( {
-                                       'clip': 'rect(1px, 1px, 1px, 1px)',
-                                       'position': 'absolute'
-                               } );
-                       } else {
-                               $( '.site-title,  .site-description' ).css( {
-                                       'clip': 'auto',
-                                       'position': 'static'
-                               } );
-
-                               $( '.site-title a' ).css( {
-                                       'color': to
-                               } );
-                       }
-               } );
-       } );
-} )( jQuery );
\ No newline at end of file
diff --git a/wp-content/themes/twentyfourteen/js/featured-content-admin.js b/wp-content/themes/twentyfourteen/js/featured-content-admin.js
deleted file mode 100644 (file)
index 66f4c07..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * Twenty Fourteen Featured Content admin behavior: add a tag suggestion
- * when changing the tag.
- */
-/* global ajaxurl:true */
-
-jQuery( document ).ready( function( $ ) {
-       $( '#customize-control-featured-content-tag-name input' ).suggest( ajaxurl + '?action=ajax-tag-search&tax=post_tag', { delay: 500, minchars: 2 } );
-});
diff --git a/wp-content/themes/twentyfourteen/js/functions.js b/wp-content/themes/twentyfourteen/js/functions.js
deleted file mode 100644 (file)
index a21849e..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-/**
- * Theme functions file
- *
- * Contains handlers for navigation, accessibility, header sizing
- * footer widgets and Featured Content slider
- *
- */
-( function( $ ) {
-       var body    = $( 'body' ),
-               _window = $( window ),
-               nav, button, menu;
-
-       nav = $( '#primary-navigation' );
-       button = nav.find( '.menu-toggle' );
-       menu = nav.find( '.nav-menu' );
-
-       // Enable menu toggle for small screens.
-       ( function() {
-               if ( ! nav.length || ! button.length ) {
-                       return;
-               }
-
-               // Hide button if menu is missing or empty.
-               if ( ! menu.length || ! menu.children().length ) {
-                       button.hide();
-                       return;
-               }
-
-               button.on( 'click.twentyfourteen', function() {
-                       nav.toggleClass( 'toggled-on' );
-                       if ( nav.hasClass( 'toggled-on' ) ) {
-                               $( this ).attr( 'aria-expanded', 'true' );
-                               menu.attr( 'aria-expanded', 'true' );
-                       } else {
-                               $( this ).attr( 'aria-expanded', 'false' );
-                               menu.attr( 'aria-expanded', 'false' );
-                       }
-               } );
-       } )();
-
-       /*
-        * Makes "skip to content" link work correctly in IE9 and Chrome for better
-        * accessibility.
-        *
-        * @link http://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/
-        */
-       _window.on( 'hashchange.twentyfourteen', function() {
-               var hash = location.hash.substring( 1 ), element;
-
-               if ( ! hash ) {
-                       return;
-               }
-
-               element = document.getElementById( hash );
-
-               if ( element ) {
-                       if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) {
-                               element.tabIndex = -1;
-                       }
-
-                       element.focus();
-
-                       // Repositions the window on jump-to-anchor to account for header height.
-                       window.scrollBy( 0, -80 );
-               }
-       } );
-
-       $( function() {
-               // Search toggle.
-               $( '.search-toggle' ).on( 'click.twentyfourteen', function( event ) {
-                       var that    = $( this ),
-                               wrapper = $( '#search-container' ),
-                               container = that.find( 'a' );
-
-                       that.toggleClass( 'active' );
-                       wrapper.toggleClass( 'hide' );
-
-                       if ( that.hasClass( 'active' ) ) {
-                               container.attr( 'aria-expanded', 'true' );
-                       } else {
-                               container.attr( 'aria-expanded', 'false' );
-                       }
-
-                       if ( that.is( '.active' ) || $( '.search-toggle .screen-reader-text' )[0] === event.target ) {
-                               wrapper.find( '.search-field' ).focus();
-                       }
-               } );
-
-               /*
-                * Fixed header for large screen.
-                * If the header becomes more than 48px tall, unfix the header.
-                *
-                * The callback on the scroll event is only added if there is a header
-                * image and we are not on mobile.
-                */
-               if ( _window.width() > 781 ) {
-                       var mastheadHeight = $( '#masthead' ).height(),
-                               toolbarOffset, mastheadOffset;
-
-                       if ( mastheadHeight > 48 ) {
-                               body.removeClass( 'masthead-fixed' );
-                       }
-
-                       if ( body.is( '.header-image' ) ) {
-                               toolbarOffset  = body.is( '.admin-bar' ) ? $( '#wpadminbar' ).height() : 0;
-                               mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset;
-
-                               _window.on( 'scroll.twentyfourteen', function() {
-                                       if ( _window.scrollTop() > mastheadOffset && mastheadHeight < 49 ) {
-                                               body.addClass( 'masthead-fixed' );
-                                       } else {
-                                               body.removeClass( 'masthead-fixed' );
-                                       }
-                               } );
-                       }
-               }
-
-               // Focus styles for menus.
-               $( '.primary-navigation, .secondary-navigation' ).find( 'a' ).on( 'focus.twentyfourteen blur.twentyfourteen', function() {
-                       $( this ).parents().toggleClass( 'focus' );
-               } );
-       } );
-
-       /**
-        * @summary Add or remove ARIA attributes.
-        * Uses jQuery's width() function to determine the size of the window and add
-        * the default ARIA attributes for the menu toggle if it's visible.
-        * @since Twenty Fourteen 1.4
-        */
-       function onResizeARIA() {
-               if ( 781 > _window.width() ) {
-                       button.attr( 'aria-expanded', 'false' );
-                       menu.attr( 'aria-expanded', 'false' );
-                       button.attr( 'aria-controls', 'primary-menu' );
-               } else {
-                       button.removeAttr( 'aria-expanded' );
-                       menu.removeAttr( 'aria-expanded' );
-                       button.removeAttr( 'aria-controls' );
-               }
-       }
-
-       _window
-               .on( 'load.twentyfourteen', onResizeARIA )
-               .on( 'resize.twentyfourteen', function() {
-                       onResizeARIA();
-       } );
-
-       _window.load( function() {
-               var footerSidebar,
-                       isCustomizeSelectiveRefresh = ( 'undefined' !== typeof wp && wp.customize && wp.customize.selectiveRefresh );
-
-               // Arrange footer widgets vertically.
-               if ( $.isFunction( $.fn.masonry ) ) {
-                       footerSidebar = $( '#footer-sidebar' );
-                       footerSidebar.masonry( {
-                               itemSelector: '.widget',
-                               columnWidth: function( containerWidth ) {
-                                       return containerWidth / 4;
-                               },
-                               gutterWidth: 0,
-                               isResizable: true,
-                               isRTL: $( 'body' ).is( '.rtl' )
-                       } );
-
-                       if ( isCustomizeSelectiveRefresh ) {
-
-                               // Retain previous masonry-brick initial position.
-                               wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) {
-                                       var copyPosition = (
-                                               placement.partial.extended( wp.customize.widgetsPreview.WidgetPartial ) &&
-                                               placement.removedNodes instanceof jQuery &&
-                                               placement.removedNodes.is( '.masonry-brick' ) &&
-                                               placement.container instanceof jQuery
-                                       );
-                                       if ( copyPosition ) {
-                                               placement.container.css( {
-                                                       position: placement.removedNodes.css( 'position' ),
-                                                       top: placement.removedNodes.css( 'top' ),
-                                                       left: placement.removedNodes.css( 'left' )
-                                               } );
-                                       }
-                               } );
-
-                               // Re-arrange footer widgets after selective refresh event.
-                               wp.customize.selectiveRefresh.bind( 'sidebar-updated', function( sidebarPartial ) {
-                                       if ( 'sidebar-3' === sidebarPartial.sidebarId ) {
-                                               footerSidebar.masonry( 'reloadItems' );
-                                               footerSidebar.masonry( 'layout' );
-                                       }
-                               } );
-                       }
-               }
-
-               // Initialize audio and video players in Twenty_Fourteen_Ephemera_Widget widget when selectively refreshed in Customizer.
-               if ( isCustomizeSelectiveRefresh && wp.mediaelement ) {
-                       wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function() {
-                               wp.mediaelement.initialize();
-                       } );
-               }
-
-               // Initialize Featured Content slider.
-               if ( body.is( '.slider' ) ) {
-                       $( '.featured-content' ).featuredslider( {
-                               selector: '.featured-content-inner > article',
-                               controlsContainer: '.featured-content'
-                       } );
-               }
-       } );
-} )( jQuery );
diff --git a/wp-content/themes/twentyfourteen/js/html5.js b/wp-content/themes/twentyfourteen/js/html5.js
deleted file mode 100644 (file)
index 6168aac..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
-*/
-(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
-a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
-c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
-"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
-if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
\ No newline at end of file
diff --git a/wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js b/wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js
deleted file mode 100644 (file)
index 7073235..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Twenty Fourteen keyboard support for image navigation.
- */
-( function( $ ) {
-       $( document ).on( 'keydown.twentyfourteen', function( e ) {
-               var url = false;
-
-               // Left arrow key code.
-               if ( e.which === 37 ) {
-                       url = $( '.previous-image a' ).attr( 'href' );
-
-               // Right arrow key code.
-               } else if ( e.which === 39 ) {
-                       url = $( '.entry-attachment a' ).attr( 'href' );
-               }
-
-               if ( url && ( ! $( 'textarea, input' ).is( ':focus' ) ) ) {
-                       window.location = url;
-               }
-       } );
-} )( jQuery );
\ No newline at end of file
diff --git a/wp-content/themes/twentyfourteen/js/slider.js b/wp-content/themes/twentyfourteen/js/slider.js
deleted file mode 100644 (file)
index 1a08c62..0000000
+++ /dev/null
@@ -1,598 +0,0 @@
-/*
- * Twenty Fourteen Featured Content Slider
- *
- * Adapted from FlexSlider v2.2.0, copyright 2012 WooThemes
- * @link http://www.woothemes.com/flexslider/
- */
-/* global DocumentTouch:true,setImmediate:true,featuredSliderDefaults:true,MSGesture:true */
-( function( $ ) {
-       // FeaturedSlider: object instance.
-       $.featuredslider = function( el, options ) {
-               var slider = $( el ),
-                       msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
-                       touch = ( ( 'ontouchstart' in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch ), // MSFT specific.
-                       eventType = 'click touchend MSPointerUp',
-                       watchedEvent = '',
-                       watchedEventClearTimer,
-                       methods = {},
-                       namespace;
-
-               // Make variables public.
-               slider.vars = $.extend( {}, $.featuredslider.defaults, options );
-
-               namespace = slider.vars.namespace,
-
-               // Store a reference to the slider object.
-               $.data( el, 'featuredslider', slider );
-
-               // Private slider methods.
-               methods = {
-                       init: function() {
-                               slider.animating = false;
-                               slider.currentSlide = 0;
-                               slider.animatingTo = slider.currentSlide;
-                               slider.atEnd = ( slider.currentSlide === 0 || slider.currentSlide === slider.last );
-                               slider.containerSelector = slider.vars.selector.substr( 0, slider.vars.selector.search( ' ' ) );
-                               slider.slides = $( slider.vars.selector, slider );
-                               slider.container = $( slider.containerSelector, slider );
-                               slider.count = slider.slides.length;
-                               slider.prop = 'marginLeft';
-                               slider.isRtl = $( 'body' ).hasClass( 'rtl' );
-                               slider.args = {};
-                               // TOUCH
-                               slider.transitions = ( function() {
-                                       var obj = document.createElement( 'div' ),
-                                               props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'],
-                                               i;
-
-                                       for ( i in props ) {
-                                               if ( obj.style[ props[i] ] !== undefined ) {
-                                                       slider.pfx = props[i].replace( 'Perspective', '' ).toLowerCase();
-                                                       slider.prop = '-' + slider.pfx + '-transform';
-                                                       return true;
-                                               }
-                                       }
-                                       return false;
-                               }() );
-                               // CONTROLSCONTAINER
-                               if ( slider.vars.controlsContainer !== '' ) {
-                                       slider.controlsContainer = $( slider.vars.controlsContainer ).length > 0 && $( slider.vars.controlsContainer );
-                               }
-
-                               slider.doMath();
-
-                               // INIT
-                               slider.setup( 'init' );
-
-                               // CONTROLNAV
-                               methods.controlNav.setup();
-
-                               // DIRECTIONNAV
-                               methods.directionNav.setup();
-
-                               // KEYBOARD
-                               if ( $( slider.containerSelector ).length === 1 ) {
-                                       $( document ).bind( 'keyup', function( event ) {
-                                               var keycode = event.keyCode,
-                                                       target = false;
-                                               if ( ! slider.animating && ( keycode === 39 || keycode === 37 ) ) {
-                                                       if ( keycode === 39 ) {
-                                                               target = slider.getTarget( 'next' );
-                                                       } else if ( keycode === 37 ) {
-                                                               target = slider.getTarget( 'prev' );
-                                                       }
-
-                                                       slider.featureAnimate( target );
-                                               }
-                                       } );
-                               }
-
-                               // TOUCH
-                               if ( touch ) {
-                                       methods.touch();
-                               }
-
-                               $( window ).bind( 'resize orientationchange focus', methods.resize );
-
-                               slider.find( 'img' ).attr( 'draggable', 'false' );
-                       },
-
-                       controlNav: {
-                               setup: function() {
-                                       methods.controlNav.setupPaging();
-                               },
-                               setupPaging: function() {
-                                       var type = 'control-paging',
-                                               j = 1,
-                                               item,
-                                               slide,
-                                               i;
-
-                                       slider.controlNavScaffold = $( '<ol class="' + namespace + 'control-nav ' + namespace + type + '"></ol>' );
-
-                                       if ( slider.pagingCount > 1 ) {
-                                               for ( i = 0; i < slider.pagingCount; i++ ) {
-                                                       slide = slider.slides.eq( i );
-                                                       item = '<a>' + j + '</a>';
-                                                       slider.controlNavScaffold.append( '<li>' + item + '</li>' );
-                                                       j++;
-                                               }
-                                       }
-
-                                       // CONTROLSCONTAINER
-                                       ( slider.controlsContainer ) ? $( slider.controlsContainer ).append( slider.controlNavScaffold ) : slider.append( slider.controlNavScaffold );
-                                       methods.controlNav.set();
-
-                                       methods.controlNav.active();
-
-                                       slider.controlNavScaffold.delegate( 'a, img', eventType, function( event ) {
-                                               event.preventDefault();
-
-                                               if ( watchedEvent === '' || watchedEvent === event.type ) {
-                                                       var $this = $( this ),
-                                                               target = slider.controlNav.index( $this );
-
-                                                       if ( ! $this.hasClass( namespace + 'active' ) ) {
-                                                               slider.direction = ( target > slider.currentSlide ) ? 'next' : 'prev';
-                                                               slider.featureAnimate( target );
-                                                       }
-                                               }
-
-                                               // Set up flags to prevent event duplication.
-                                               if ( watchedEvent === '' ) {
-                                                       watchedEvent = event.type;
-                                               }
-
-                                               methods.setToClearWatchedEvent();
-                                       } );
-                               },
-                               set: function() {
-                                       var selector = 'a';
-                                       slider.controlNav = $( '.' + namespace + 'control-nav li ' + selector, ( slider.controlsContainer ) ? slider.controlsContainer : slider );
-                               },
-                               active: function() {
-                                       slider.controlNav.removeClass( namespace + 'active' ).eq( slider.animatingTo ).addClass( namespace + 'active' );
-                               },
-                               update: function( action, pos ) {
-                                       if ( slider.pagingCount > 1 && action === 'add' ) {
-                                               slider.controlNavScaffold.append( $( '<li><a>' + slider.count + '</a></li>' ) );
-                                       } else if ( slider.pagingCount === 1 ) {
-                                               slider.controlNavScaffold.find( 'li' ).remove();
-                                       } else {
-                                               slider.controlNav.eq( pos ).closest( 'li' ).remove();
-                                       }
-                                       methods.controlNav.set();
-                                       ( slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length ) ? slider.update( pos, action ) : methods.controlNav.active();
-                               }
-                       },
-
-                       directionNav: {
-                               setup: function() {
-                                       var directionNavScaffold = $( '<ul class="' + namespace + 'direction-nav"><li><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>' );
-
-                                       // CONTROLSCONTAINER
-                                       if ( slider.controlsContainer ) {
-                                               $( slider.controlsContainer ).append( directionNavScaffold );
-                                               slider.directionNav = $( '.' + namespace + 'direction-nav li a', slider.controlsContainer );
-                                       } else {
-                                               slider.append( directionNavScaffold );
-                                               slider.directionNav = $( '.' + namespace + 'direction-nav li a', slider );
-                                       }
-
-                                       methods.directionNav.update();
-
-                                       slider.directionNav.bind( eventType, function( event ) {
-                                               event.preventDefault();
-                                               var target;
-
-                                               if ( watchedEvent === '' || watchedEvent === event.type ) {
-                                                       target = ( $( this ).hasClass( namespace + 'next' ) ) ? slider.getTarget( 'next' ) : slider.getTarget( 'prev' );
-                                                       slider.featureAnimate( target );
-                                               }
-
-                                               // Set up flags to prevent event duplication.
-                                               if ( watchedEvent === '' ) {
-                                                       watchedEvent = event.type;
-                                               }
-
-                                               methods.setToClearWatchedEvent();
-                                       } );
-                               },
-                               update: function() {
-                                       var disabledClass = namespace + 'disabled';
-                                       if ( slider.pagingCount === 1 ) {
-                                               slider.directionNav.addClass( disabledClass ).attr( 'tabindex', '-1' );
-                                       } else {
-                                               slider.directionNav.removeClass( disabledClass ).removeAttr( 'tabindex' );
-                                       }
-                               }
-                       },
-
-                       touch: function() {
-                               var startX,
-                                       startY,
-                                       offset,
-                                       cwidth,
-                                       dx,
-                                       startT,
-                                       scrolling = false,
-                                       localX = 0,
-                                       localY = 0,
-                                       accDx = 0;
-
-                               if ( ! msGesture ) {
-                                       el.addEventListener( 'touchstart', onTouchStart, false );
-                               } else {
-                                       el.style.msTouchAction = 'none';
-                                       el._gesture = new MSGesture(); // MSFT specific.
-                                       el._gesture.target = el;
-                                       el.addEventListener( 'MSPointerDown', onMSPointerDown, false );
-                                       el._slider = slider;
-                                       el.addEventListener( 'MSGestureChange', onMSGestureChange, false );
-                                       el.addEventListener( 'MSGestureEnd', onMSGestureEnd, false );
-                               }
-
-                               function onTouchStart( e ) {
-                                       if ( slider.animating ) {
-                                               e.preventDefault();
-                                       } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
-                                               cwidth = slider.w;
-                                               startT = Number( new Date() );
-
-                                               // Local vars for X and Y points.
-                                               localX = e.touches[0].pageX;
-                                               localY = e.touches[0].pageY;
-
-                                               offset = ( slider.currentSlide + slider.cloneOffset ) * cwidth;
-                                               if ( slider.animatingTo === slider.last && slider.direction !== 'next' ) {
-                                                       offset = 0;
-                                               }
-
-                                               startX = localX;
-                                               startY = localY;
-
-                                               el.addEventListener( 'touchmove', onTouchMove, false );
-                                               el.addEventListener( 'touchend', onTouchEnd, false );
-                                       }
-                               }
-
-                               function onTouchMove( e ) {
-                                       // Local vars for X and Y points.
-                                       localX = e.touches[0].pageX;
-                                       localY = e.touches[0].pageY;
-
-                                       dx = startX - localX;
-                                       scrolling = Math.abs( dx ) < Math.abs( localY - startY );
-
-                                       if ( ! scrolling ) {
-                                               e.preventDefault();
-                                               if ( slider.transitions ) {
-                                                       slider.setProps( offset + dx, 'setTouch' );
-                                               }
-                                       }
-                               }
-
-                               function onTouchEnd() {
-                                       // Finish the touch by undoing the touch session.
-                                       el.removeEventListener( 'touchmove', onTouchMove, false );
-
-                                       if ( slider.animatingTo === slider.currentSlide && ! scrolling && dx !== null ) {
-                                               var updateDx = dx,
-                                                       target = ( updateDx > 0 ) ? slider.getTarget( 'next' ) : slider.getTarget( 'prev' );
-
-                                               slider.featureAnimate( target );
-                                       }
-                                       el.removeEventListener( 'touchend', onTouchEnd, false );
-
-                                       startX = null;
-                                       startY = null;
-                                       dx = null;
-                                       offset = null;
-                               }
-
-                               function onMSPointerDown( e ) {
-                                       e.stopPropagation();
-                                       if ( slider.animating ) {
-                                               e.preventDefault();
-                                       } else {
-                                               el._gesture.addPointer( e.pointerId );
-                                               accDx = 0;
-                                               cwidth = slider.w;
-                                               startT = Number( new Date() );
-                                               offset = ( slider.currentSlide + slider.cloneOffset ) * cwidth;
-                                               if ( slider.animatingTo === slider.last && slider.direction !== 'next' ) {
-                                                       offset = 0;
-                                               }
-                                       }
-                               }
-
-                               function onMSGestureChange( e ) {
-                                       e.stopPropagation();
-                                       var slider = e.target._slider,
-                                               transX,
-                                               transY;
-                                       if ( ! slider ) {
-                                               return;
-                                       }
-
-                                       transX = -e.translationX,
-                                       transY = -e.translationY;
-
-                                       // Accumulate translations.
-                                       accDx = accDx + transX;
-                                       dx = accDx;
-                                       scrolling = Math.abs( accDx ) < Math.abs( -transY );
-
-                                       if ( e.detail === e.MSGESTURE_FLAG_INERTIA ) {
-                                               setImmediate( function () { // MSFT specific.
-                                                       el._gesture.stop();
-                                               } );
-
-                                               return;
-                                       }
-
-                                       if ( ! scrolling || Number( new Date() ) - startT > 500 ) {
-                                               e.preventDefault();
-                                               if ( slider.transitions ) {
-                                                       slider.setProps( offset + dx, 'setTouch' );
-                                               }
-                                       }
-                               }
-
-                               function onMSGestureEnd( e ) {
-                                       e.stopPropagation();
-                                       var slider = e.target._slider,
-                                               updateDx,
-                                               target;
-                                       if ( ! slider ) {
-                                               return;
-                                       }
-
-                                       if ( slider.animatingTo === slider.currentSlide && ! scrolling && dx !== null ) {
-                                               updateDx = dx,
-                                               target = ( updateDx > 0 ) ? slider.getTarget( 'next' ) : slider.getTarget( 'prev' );
-
-                                               slider.featureAnimate( target );
-                                       }
-
-                                       startX = null;
-                                       startY = null;
-                                       dx = null;
-                                       offset = null;
-                                       accDx = 0;
-                               }
-                       },
-
-                       resize: function() {
-                               if ( ! slider.animating && slider.is( ':visible' ) ) {
-                                       slider.doMath();
-
-                                       // SMOOTH HEIGHT
-                                       methods.smoothHeight();
-                                       slider.newSlides.width( slider.computedW );
-                                       slider.setProps( slider.computedW, 'setTotal' );
-                               }
-                       },
-
-                       smoothHeight: function( dur ) {
-                               var $obj = slider.viewport;
-                               ( dur ) ? $obj.animate( { 'height': slider.slides.eq( slider.animatingTo ).height() }, dur ) : $obj.height( slider.slides.eq( slider.animatingTo ).height() );
-                       },
-
-                       setToClearWatchedEvent: function() {
-                               clearTimeout( watchedEventClearTimer );
-                               watchedEventClearTimer = setTimeout( function() {
-                                       watchedEvent = '';
-                               }, 3000 );
-                       }
-               };
-
-               // Public methods.
-               slider.featureAnimate = function( target ) {
-                       if ( target !== slider.currentSlide ) {
-                               slider.direction = ( target > slider.currentSlide ) ? 'next' : 'prev';
-                       }
-
-                       if ( ! slider.animating && slider.is( ':visible' ) ) {
-                               slider.animating = true;
-                               slider.animatingTo = target;
-
-                               // CONTROLNAV
-                               methods.controlNav.active();
-
-                               slider.slides.removeClass( namespace + 'active-slide' ).eq( target ).addClass( namespace + 'active-slide' );
-
-                               slider.atEnd = target === 0 || target === slider.last;
-
-                               // DIRECTIONNAV
-                               methods.directionNav.update();
-
-                               var dimension = slider.computedW,
-                                       slideString;
-
-                               if ( slider.currentSlide === 0 && target === slider.count - 1 && slider.direction !== 'next' ) {
-                                       slideString = 0;
-                               } else if ( slider.currentSlide === slider.last && target === 0 && slider.direction !== 'prev' ) {
-                                       slideString = ( slider.count + 1 ) * dimension;
-                               } else {
-                                       slideString = ( target + slider.cloneOffset ) * dimension;
-                               }
-                               slider.setProps( slideString, '', slider.vars.animationSpeed );
-                               if ( slider.transitions ) {
-                                       if ( ! slider.atEnd ) {
-                                               slider.animating = false;
-                                               slider.currentSlide = slider.animatingTo;
-                                       }
-                                       slider.container.unbind( 'webkitTransitionEnd transitionend' );
-                                       slider.container.bind( 'webkitTransitionEnd transitionend', function() {
-                                               slider.wrapup( dimension );
-                                       } );
-                               } else {
-                                       slider.container.animate( slider.args, slider.vars.animationSpeed, 'swing', function() {
-                                               slider.wrapup( dimension );
-                                       } );
-                               }
-
-                               // SMOOTH HEIGHT
-                               methods.smoothHeight( slider.vars.animationSpeed );
-                       }
-               };
-
-               slider.wrapup = function( dimension ) {
-                       if ( slider.currentSlide === 0 && slider.animatingTo === slider.last ) {
-                               slider.setProps( dimension, 'jumpEnd' );
-                       } else if ( slider.currentSlide === slider.last && slider.animatingTo === 0 ) {
-                               slider.setProps( dimension, 'jumpStart' );
-                       }
-                       slider.animating = false;
-                       slider.currentSlide = slider.animatingTo;
-               };
-
-               slider.getTarget = function( dir ) {
-                       slider.direction = dir;
-
-                       // Swap for RTL.
-                       if ( slider.isRtl ) {
-                               dir = 'next' === dir ? 'prev' : 'next';
-                       }
-
-                       if ( dir === 'next' ) {
-                               return ( slider.currentSlide === slider.last ) ? 0 : slider.currentSlide + 1;
-                       } else {
-                               return ( slider.currentSlide === 0 ) ? slider.last : slider.currentSlide - 1;
-                       }
-               };
-
-               slider.setProps = function( pos, special, dur ) {
-                       var target = ( function() {
-                               var posCalc = ( function() {
-                                               switch ( special ) {
-                                                       case 'setTotal': return ( slider.currentSlide + slider.cloneOffset ) * pos;
-                                                       case 'setTouch': return pos;
-                                                       case 'jumpEnd': return slider.count * pos;
-                                                       case 'jumpStart': return pos;
-                                                       default: return pos;
-                                               }
-                                       }() );
-
-                                       return ( posCalc * -1 ) + 'px';
-                               }() );
-
-                       if ( slider.transitions ) {
-                               target = 'translate3d(' + target + ',0,0 )';
-                               dur = ( dur !== undefined ) ? ( dur / 1000 ) + 's' : '0s';
-                               slider.container.css( '-' + slider.pfx + '-transition-duration', dur );
-                       }
-
-                       slider.args[slider.prop] = target;
-                       if ( slider.transitions || dur === undefined ) {
-                               slider.container.css( slider.args );
-                       }
-               };
-
-               slider.setup = function( type ) {
-                       var sliderOffset;
-
-                       if ( type === 'init' ) {
-                               slider.viewport = $( '<div class="' + namespace + 'viewport"></div>' ).css( { 'overflow': 'hidden', 'position': 'relative' } ).appendTo( slider ).append( slider.container );
-                               slider.cloneCount = 0;
-                               slider.cloneOffset = 0;
-                       }
-                       slider.cloneCount = 2;
-                       slider.cloneOffset = 1;
-                       // Clear out old clones.
-                       if ( type !== 'init' ) {
-                               slider.container.find( '.clone' ).remove();
-                       }
-
-                       slider.container.append( slider.slides.first().clone().addClass( 'clone' ).attr( 'aria-hidden', 'true' ) ).prepend( slider.slides.last().clone().addClass( 'clone' ).attr( 'aria-hidden', 'true' ) );
-                       slider.newSlides = $( slider.vars.selector, slider );
-
-                       sliderOffset = slider.currentSlide + slider.cloneOffset;
-                       slider.container.width( ( slider.count + slider.cloneCount ) * 200 + '%' );
-                       slider.setProps( sliderOffset * slider.computedW, 'init' );
-                       setTimeout( function() {
-                               slider.doMath();
-                               slider.newSlides.css( { 'width': slider.computedW, 'float': 'left', 'display': 'block' } );
-                               // SMOOTH HEIGHT
-                               methods.smoothHeight();
-                       }, ( type === 'init' ) ? 100 : 0 );
-
-                       slider.slides.removeClass( namespace + 'active-slide' ).eq( slider.currentSlide ).addClass( namespace + 'active-slide' );
-               };
-
-               slider.doMath = function() {
-                       var slide = slider.slides.first();
-
-                       slider.w = ( slider.viewport === undefined ) ? slider.width() : slider.viewport.width();
-                       slider.h = slide.height();
-                       slider.boxPadding = slide.outerWidth() - slide.width();
-
-                       slider.itemW = slider.w;
-                       slider.pagingCount = slider.count;
-                       slider.last = slider.count - 1;
-                       slider.computedW = slider.itemW - slider.boxPadding;
-               };
-
-               slider.update = function( pos, action ) {
-                       slider.doMath();
-
-                       // Update currentSlide and slider.animatingTo if necessary.
-                       if ( pos < slider.currentSlide ) {
-                               slider.currentSlide += 1;
-                       } else if ( pos <= slider.currentSlide && pos !== 0 ) {
-                               slider.currentSlide -= 1;
-                       }
-                       slider.animatingTo = slider.currentSlide;
-
-                       // Update controlNav.
-                       if ( action === 'add' || slider.pagingCount > slider.controlNav.length ) {
-                               methods.controlNav.update( 'add' );
-                       } else if ( action === 'remove' || slider.pagingCount < slider.controlNav.length ) {
-                               if ( slider.currentSlide > slider.last ) {
-                                       slider.currentSlide -= 1;
-                                       slider.animatingTo -= 1;
-                               }
-                               methods.controlNav.update( 'remove', slider.last );
-                       }
-                       // Update directionNav.
-                       methods.directionNav.update();
-               };
-
-               // FeaturedSlider: initialize.
-               methods.init();
-       };
-
-       // Default settings.
-       $.featuredslider.defaults = {
-               namespace: 'slider-',     // String: prefix string attached to the class of every element generated by the plugin.
-               selector: '.slides > li', // String: selector, must match a simple pattern.
-               animationSpeed: 600,      // Integer: Set the speed of animations, in milliseconds.
-               controlsContainer: '',    // jQuery Object/Selector: container navigation to append elements.
-
-               // Text labels.
-               prevText: featuredSliderDefaults.prevText, // String: Set the text for the "previous" directionNav item.
-               nextText: featuredSliderDefaults.nextText  // String: Set the text for the "next" directionNav item.
-       };
-
-       // FeaturedSlider: plugin function.
-       $.fn.featuredslider = function( options ) {
-               if ( options === undefined ) {
-                       options = {};
-               }
-
-               if ( typeof options === 'object' ) {
-                       return this.each( function() {
-                               var $this = $( this ),
-                                       selector = ( options.selector ) ? options.selector : '.slides > li',
-                                       $slides = $this.find( selector );
-
-                       if ( $slides.length === 1 || $slides.length === 0 ) {
-                                       $slides.fadeIn( 400 );
-                               } else if ( $this.data( 'featuredslider' ) === undefined ) {
-                                       new $.featuredslider( this, options );
-                               }
-                       } );
-               }
-       };
-} )( jQuery );
diff --git a/wp-content/themes/twentyfourteen/page-templates/contributors.php b/wp-content/themes/twentyfourteen/page-templates/contributors.php
deleted file mode 100644 (file)
index 92602ab..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/**
- * Template Name: Contributor Page
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-<div id="main-content" class="main-content">
-
-<?php
-       if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
-               // Include the featured content template.
-               get_template_part( 'featured-content' );
-       }
-?>
-
-       <div id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-                       <?php
-                               // Start the Loop.
-                               while ( have_posts() ) : the_post();
-                       ?>
-
-                       <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-                               <?php
-                                       the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' );
-
-                                       // Output the authors list.
-                                       twentyfourteen_list_authors();
-
-                                       edit_post_link( __( 'Edit', 'twentyfourteen' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' );
-                               ?>
-                       </article><!-- #post-## -->
-
-                       <?php
-                                       // If comments are open or we have at least one comment, load up the comment template.
-                                       if ( comments_open() || get_comments_number() ) {
-                                               comments_template();
-                                       }
-                               endwhile;
-                       ?>
-               </div><!-- #content -->
-       </div><!-- #primary -->
-</div><!-- #main-content -->
-
-<?php
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/page-templates/full-width.php b/wp-content/themes/twentyfourteen/page-templates/full-width.php
deleted file mode 100644 (file)
index 8830c87..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-/**
- * Template Name: Full Width Page
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-<div id="main-content" class="main-content">
-
-<?php
-       if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
-               // Include the featured content template.
-               get_template_part( 'featured-content' );
-       }
-?>
-
-       <div id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-                       <?php
-                               // Start the Loop.
-                               while ( have_posts() ) : the_post();
-
-                                       // Include the page content template.
-                                       get_template_part( 'content', 'page' );
-
-                                       // If comments are open or we have at least one comment, load up the comment template.
-                                       if ( comments_open() || get_comments_number() ) {
-                                               comments_template();
-                                       }
-                               endwhile;
-                       ?>
-               </div><!-- #content -->
-       </div><!-- #primary -->
-</div><!-- #main-content -->
-
-<?php
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/page.php b/wp-content/themes/twentyfourteen/page.php
deleted file mode 100644 (file)
index 44724e9..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/**
- * The template for displaying all pages
- *
- * This is the template that displays all pages by default.
- * Please note that this is the WordPress construct of pages and that
- * other 'pages' on your WordPress site will use a different template.
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-<div id="main-content" class="main-content">
-
-<?php
-       if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
-               // Include the featured content template.
-               get_template_part( 'featured-content' );
-       }
-?>
-       <div id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-
-                       <?php
-                               // Start the Loop.
-                               while ( have_posts() ) : the_post();
-
-                                       // Include the page content template.
-                                       get_template_part( 'content', 'page' );
-
-                                       // If comments are open or we have at least one comment, load up the comment template.
-                                       if ( comments_open() || get_comments_number() ) {
-                                               comments_template();
-                                       }
-                               endwhile;
-                       ?>
-
-               </div><!-- #content -->
-       </div><!-- #primary -->
-       <?php get_sidebar( 'content' ); ?>
-</div><!-- #main-content -->
-
-<?php
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/readme.txt b/wp-content/themes/twentyfourteen/readme.txt
deleted file mode 100644 (file)
index 0080a1e..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-=== Twenty Fourteen ===
-Contributors: the WordPress team
-Requires at least: WordPress 3.6
-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: 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.
-
-For more information about Twenty Fourteen please go to https://codex.wordpress.org/Twenty_Fourteen.
-
-== Installation ==
-
-1. In your admin panel, go to Appearance -> Themes and click the 'Add New' button.
-2. Type in Twenty Fourteen in the search form and press the 'Enter' key in your keyboard.
-3. Click on the 'Activate' button to use your new theme right away.
-4. Go to https://codex.wordpress.org/Twenty_Fourteen for a guide to customize this theme.
-5. Navigate to Appearance > Customize in your admin panel.
-
-== Copyright ==
-
-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
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-Twenty Fourteen Theme is derived from the Further Theme, Copyright 2013 Takashi Irie
-Further Theme is distributed under the terms of the GNU GPL
-
-Twenty Fourteen Theme bundles the following third-party resources:
-
-HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas
-Licenses: MIT/GPL2
-Source: https://github.com/aFarkas/html5shiv
-
-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
-
-https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_1.7
-
-= 1.6 =
-* Released: December 8, 2015
-
-https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_1.6
-
-= 1.5 =
-* Released: August 18, 2015
-
-https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_1.5
-
-= 1.4 =
-* Released: April 23, 2015
-
-https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_1.4
-
-= 1.3 =
-* Released: December 18, 2014
-
-https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_1.3
-
-= 1.2 =
-* Released: September 4, 2014
-
-https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_1.2
-
-= 1.1 =
-* Released: May 8, 2014
-
-https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_1.1
-
-= 1.0 =
-* Released: December 12, 2013
-
-Initial release.
diff --git a/wp-content/themes/twentyfourteen/rtl.css b/wp-content/themes/twentyfourteen/rtl.css
deleted file mode 100644 (file)
index af7f6f4..0000000
+++ /dev/null
@@ -1,854 +0,0 @@
-/*
-Theme Name: Twenty Fourteen
-Description: Adds support for languages written in a Right To Left (RTL) direction.
-It's easy, just a matter of overwriting all the horizontal positioning attributes
-of your CSS stylesheet in a separate stylesheet file named rtl.css.
-
-See https://codex.wordpress.org/Right_to_Left_Language_Support
-*/
-
-/**
- * Table of Contents:
- *
- * 1.0 - Reset
- * 2.0 - Repeatable Patterns
- * 4.0 - Header
- * 5.0 - Navigation
- * 6.0 - Content
- *   6.3 - Entry Meta
- *   6.4 - Entry Content
- *   6.5 - Galleries
- *   6.7 - Post/Image/Paging Navigation
- *   6.10 - Contributor Page
- *   6.14 - Comments
- * 7.0 - Sidebar
- *   7.1 - Widgets
- *   7.2 - Content Sidebar Widgets
- * 9.0 - Featured Content
- * 10.0 - Media Queries
- * -----------------------------------------------------------------------------
- */
-
-
-/**
- * 1.0 Reset
- * -----------------------------------------------------------------------------
- */
-
-body {
-       direction: rtl;
-       unicode-bidi: embed;
-}
-
-a {
-       display: inline-block;
-}
-
-ul,
-ol {
-       margin: 0 20px 24px 0;
-}
-
-li > ul,
-li > ol {
-       margin: 0 20px 0 0;
-}
-
-caption,
-th,
-td {
-       text-align: right;
-}
-
-
-/**
- * 2.0 Repeatable Patterns
- * -----------------------------------------------------------------------------
- */
-
-.wp-caption-text {
-       padding-left: 10px;
-       padding-right: 0;
-}
-
-.screen-reader-text:focus {
-       right: 5px;
-       left: auto;
-}
-
-
-/**
- * 4.0 Header
- * -----------------------------------------------------------------------------
- */
-
-.site-title {
-       float: right;
-}
-
-.search-toggle {
-       float: left;
-       margin-left: 38px;
-       margin-right: auto;
-}
-
-.search-box .search-field {
-       float: left;
-       padding: 1px 6px 2px 2px;
-}
-
-.search-toggle .screen-reader-text {
-       right: 5px; /* Avoid a horizontal scrollbar when the site has a long menu */
-       left: auto;
-}
-
-
-/**
- * 5.0 Navigation
- * -----------------------------------------------------------------------------
- */
-
-.site-navigation ul ul {
-       margin-right: 20px;
-       margin-left: auto;
-}
-
-.menu-toggle {
-       right: auto;
-       left: 0;
-}
-
-
-/**
- * 6.0 Content
- * -----------------------------------------------------------------------------
- */
-
-/**
- * 6.3 Entry Meta
- * -----------------------------------------------------------------------------
- */
-
-.entry-meta .tag-links a {
-       margin: 0 10px 4px 4px;
-}
-
-.entry-meta .tag-links a:before {
-       border-right: 0;
-       border-left: 8px solid #767676;
-       right: -7px;
-       left: auto;
-}
-
-.entry-meta .tag-links a:hover:before,
-.entry-meta .tag-links a:focus:before {
-       border-left-color: #41a62a;
-}
-
-.entry-meta .tag-links a:after {
-       right: -2px;
-       left: auto;
-}
-
-
-/**
- * 6.4 Entry Content
- * -----------------------------------------------------------------------------
- */
-
-.page-links a,
-.page-links > span {
-       margin: 0 0 2px 1px;
-}
-
-.page-links > .page-links-title {
-       padding-right: 0;
-       padding-left: 7px;
-}
-
-
-/**
- * 6.5 Galleries
- * -----------------------------------------------------------------------------
- */
-
-.gallery-item {
-       float: right;
-       margin: 0 0 4px 4px;
-}
-
-.gallery-columns-1 .gallery-item:nth-of-type(1n),
-.gallery-columns-2 .gallery-item:nth-of-type(2n),
-.gallery-columns-3 .gallery-item:nth-of-type(3n),
-.gallery-columns-4 .gallery-item:nth-of-type(4n),
-.gallery-columns-5 .gallery-item:nth-of-type(5n),
-.gallery-columns-6 .gallery-item:nth-of-type(6n),
-.gallery-columns-7 .gallery-item:nth-of-type(7n),
-.gallery-columns-8 .gallery-item:nth-of-type(8n),
-.gallery-columns-9 .gallery-item:nth-of-type(9n) {
-       margin-right: auto;
-       margin-left: 0;
-}
-
-.gallery-caption {
-       padding: 6px 8px;
-       right: 0;
-       left: auto;
-       text-align: right;
-}
-
-.gallery-caption:before {
-       right: 0;
-       left: auto;
-}
-
-
-/**
- * 6.7 Post/Image/Paging Navigation
- * -----------------------------------------------------------------------------
- */
-
-.paging-navigation .page-numbers {
-       margin-right: auto;
-       margin-left: 1px;
-}
-
-
-/**
- * 6.10 Contributor Page
- * -----------------------------------------------------------------------------
- */
-
-.contributor-avatar {
-       float: right;
-       margin: 0 0 20px 30px;
-}
-
-
-/**
- * 6.14 Comments
- * -----------------------------------------------------------------------------
- */
-
-.comment-author .avatar {
-       right: 0;
-       left: auto;
-}
-
-.bypostauthor > article .fn:before {
-       margin: 0 -2px 0 2px;
-}
-
-.comment-author,
-.comment-awaiting-moderation,
-.comment-content,
-.comment-list .reply,
-.comment-metadata {
-       padding-right: 30px;
-       padding-left: 0;
-}
-
-.comment-edit-link {
-       margin-right: 10px;
-       margin-left: auto;
-}
-
-.comment-reply-link:before,
-.comment-reply-login:before {
-       margin-left: auto;
-       margin-right: 2px;
-}
-
-.comment-reply-link:before,
-.comment-reply-login:before,
-.comment-edit-link:before {
-       -webkit-transform: scaleX(-1);
-       -moz-transform:    scaleX(-1);
-       -ms-transform:     scaleX(-1);
-       -o-transform:      scaleX(-1);
-       transform:         scaleX(-1);
-}
-
-.comment-content ul,
-.comment-content ol {
-       margin: 0 22px 24px 0;
-}
-
-.comment-list .children {
-       margin-right: 15px;
-       margin-left: auto;
-}
-
-.comment-reply-title small a {
-       float: left;
-}
-
-.comment-navigation .nav-previous a {
-       margin-right: auto;
-       margin-left: 10px;
-}
-
-
-/**
- * 7.0 Sidebars
- * -----------------------------------------------------------------------------
- */
-
-/**
- * 7.1 Widgets
- * -----------------------------------------------------------------------------
- */
-
-.widget li > ol,
-.widget li > ul {
-       margin-right: 10px;
-       margin-left: auto;
-}
-
-.widget input,
-.widget textarea {
-       padding: 1px 4px 2px 2px;
-}
-
-.widget_calendar caption {
-       text-align: right;
-}
-
-.widget_calendar #prev {
-       padding-right: 5px;
-       padding-left: 0;
-}
-
-.widget_calendar #next {
-       padding-right: 0;
-       padding-left: 5px;
-       text-align: left;
-}
-
-.widget_twentyfourteen_ephemera .entry-content ul,
-.widget_twentyfourteen_ephemera .entry-content ol {
-       margin: 0 20px 18px 0;
-}
-
-.widget_twentyfourteen_ephemera .entry-content li > ul,
-.widget_twentyfourteen_ephemera .entry-content li > ol {
-       margin: 0 20px 0 0;
-}
-
-
-/**
- * 7.2 Content Sidebar Widgets
- * -----------------------------------------------------------------------------
- */
-
-.content-sidebar .widget li > ol,
-.content-sidebar .widget li > ul {
-       margin-right: 18px;
-       margin-left: auto;
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .widget-title:before {
-       margin: -1px 0 0 18px;
-}
-
-
-/**
- * 9.0 Featured Content
- * -----------------------------------------------------------------------------
- */
-
-.featured-content .post-thumbnail img {
-       right: 0;
-       left: auto;
-}
-
-.slider-viewport {
-       direction: ltr;
-}
-
-.slider .featured-content .entry-header {
-       right: 0;
-       left: auto;
-       text-align: right;
-}
-
-.slider-control-paging {
-       float: right;
-}
-
-.slider-control-paging li {
-       float: right;
-       margin: 2px 0 2px 4px;
-}
-
-.slider-control-paging li:last-child {
-       margin-right: auto;
-       margin-left: 0;
-}
-
-.slider-control-paging a:before {
-       right: 10px;
-       left: auto;
-}
-
-.slider-direction-nav li {
-       border-width: 2px 0 0 1px;
-       float: right;
-}
-
-.slider-direction-nav li:last-child {
-       border-width: 2px 1px 0 0;
-}
-
-.slider-direction-nav a:before {
-       content: "\f429";
-}
-
-.slider-direction-nav .slider-next:before {
-       content: "\f430";
-}
-
-
-/**
- * 10.0 Media Queries
- * -----------------------------------------------------------------------------
- */
-
-@media screen and (max-width: 400px) {
-       .list-view .site-content .post-thumbnail img {
-               float: right;
-               margin: 0 0 3px 10px;
-       }
-}
-
-@media screen and (min-width: 401px) {
-       .site-content .entry-meta > span {
-               margin-right: auto;
-               margin-left: 10px;
-       }
-
-       .site-content .format-quote .post-format a:before {
-               margin-right: auto;
-               margin-left: 2px;
-       }
-
-       .site-content .format-gallery .post-format a:before {
-               margin-right: auto;
-               margin-left: 4px;
-       }
-
-       .site-content .format-aside .post-format a:before {
-               margin-right: auto;
-               margin-left: 2px;
-       }
-
-       .site-content .featured-post:before {
-               margin-right: auto;
-               margin-left: 3px;
-       }
-
-       .site-content .entry-date a:before,
-       .attachment .site-content span.entry-date:before {
-               margin-right: auto;
-               margin-left: 1px;
-       }
-
-       .site-content .comments-link a:before {
-               margin-right: auto;
-               margin-left: 2px;
-       }
-
-       .site-content .full-size-link a:before {
-               margin-right: auto;
-               margin-left: 1px;
-       }
-
-       .entry-content .edit-link a:before,
-       .entry-meta .edit-link a:before {
-               -webkit-transform: scaleX(-1);
-               -moz-transform:    scaleX(-1);
-               -ms-transform:     scaleX(-1);
-               -o-transform:      scaleX(-1);
-               transform:         scaleX(-1);
-       }
-}
-
-@media screen and (min-width: 594px) {
-       .site-content .entry-header {
-               padding-right: 30px;
-               padding-left: 30px;
-       }
-}
-
-@media screen and (min-width: 673px) {
-       .search-toggle {
-               margin-right: auto;
-               margin-left: 18px;
-       }
-
-       .content-area {
-               float: right;
-       }
-
-       .site-content {
-               margin-right: auto;
-               margin-left: 33.33333333%;
-       }
-
-       .archive-header,
-       .comments-area,
-       .image-navigation,
-       .page-header,
-       .page-content,
-       .post-navigation,
-       .site-content .entry-content,
-       .site-content .entry-summary,
-       .site-content footer.entry-meta {
-               padding-right: 30px;
-               padding-left: 30px;
-       }
-
-       .full-width .site-content {
-               margin-left: 0;
-       }
-
-       .content-sidebar {
-               float: left;
-               margin-right: -33.33333333%;
-               margin-left: auto;
-       }
-
-       .grid .featured-content .hentry {
-               float: right;
-       }
-
-       .slider-control-paging {
-               padding-right: 20px;
-               padding-left: 0;
-       }
-
-       .slider-direction-nav {
-               float: left;
-       }
-
-       .slider-direction-nav li {
-               padding: 0 0 0 1px;
-       }
-
-       .slider-direction-nav li:last-child {
-               padding: 0 1px 0 0;
-       }
-}
-
-@media screen and (min-width: 783px) {
-       .header-main {
-               padding-right: 30px;
-               padding-left: 0;
-       }
-
-       .search-toggle {
-               margin-right: auto;
-               margin-left: 0;
-       }
-
-       .primary-navigation {
-               float: left;
-               margin: 0 -12px 0 1px;
-       }
-
-       .primary-navigation ul ul {
-               float: right;
-               margin: 0;
-               right: -999em;
-               left: auto;
-       }
-
-       .primary-navigation ul ul ul {
-               right: -999em;
-               left: auto;
-       }
-
-       .primary-navigation ul li:hover > ul,
-       .primary-navigation ul li.focus > ul {
-               right: auto;
-       }
-
-       .primary-navigation ul ul li:hover > ul,
-       .primary-navigation ul ul li.focus > ul {
-               right: 100%;
-               left: auto;
-       }
-
-       .primary-navigation .menu-item-has-children > a,
-       .primary-navigation .page_item_has_children > a {
-               padding-right: 12px;
-               padding-left: 26px;
-       }
-
-       .primary-navigation .menu-item-has-children > a:after,
-       .primary-navigation .page_item_has_children > a:after {
-               right: auto;
-               left: 12px;
-       }
-
-       .primary-navigation li .menu-item-has-children > a,
-       .primary-navigation li .page_item_has_children > a {
-               padding-right: 12px;
-               padding-left: 20px;
-       }
-
-       .primary-navigation .menu-item-has-children li.menu-item-has-children > a:after,
-       .primary-navigation .menu-item-has-children li.page_item_has_children > a:after,
-       .primary-navigation .page_item_has_children li.menu-item-has-children > a:after,
-       .primary-navigation .page_item_has_children li.page_item_has_children > a:after {
-               content: "\f503";
-               right: auto;
-               left: 8px;
-       }
-}
-
-@media screen and (min-width: 810px) {
-       .attachment .entry-attachment .attachment {
-               margin-right: -168px;
-               margin-left: -168px;
-       }
-
-       .attachment .entry-attachment .attachment a {
-               display: block;
-       }
-
-       .contributor-avatar {
-               margin-right: -168px;
-               margin-left: auto;
-       }
-
-       .contributor-summary {
-               float: right;
-       }
-
-       .full-width .site-content blockquote.alignright,
-       .full-width .site-content img.size-full.alignright,
-       .full-width .site-content img.size-large.alignright,
-       .full-width .site-content img.size-medium.alignright,
-       .full-width .site-content .wp-caption.alignright {
-               margin-right: -168px;
-               margin-left: auto;
-       }
-
-       .full-width .site-content blockquote.alignleft,
-       .full-width .site-content img.size-full.alignleft,
-       .full-width .site-content img.size-large.alignleft,
-       .full-width .site-content img.size-medium.alignleft,
-       .full-width .site-content .wp-caption.alignleft {
-               margin-right: auto;
-               margin-left: -168px;
-       }
-}
-
-@media screen and (min-width: 846px) {
-       .comment-author,
-       .comment-awaiting-moderation,
-       .comment-content,
-       .comment-list .reply,
-       .comment-metadata {
-               padding-right: 50px;
-               padding-left: 0;
-       }
-
-       .comment-list .children {
-               margin-right: 20px;
-               margin-left: auto;
-       }
-}
-
-@media screen and (min-width: 1008px) {
-       .search-box-wrapper {
-               padding-right: 182px;
-               padding-left: 0;
-       }
-
-       .main-content {
-               float: right;
-       }
-
-       .site-content {
-               margin-right: 182px;
-               margin-left: 29.04761904%;
-       }
-
-       .full-width .site-content {
-               margin-right: 182px;
-       }
-
-       .content-sidebar {
-               margin-right: -29.04761904%;
-               margin-left: auto;
-       }
-
-       .site:before {
-               right: 0;
-               left: auto;
-       }
-
-       #secondary {
-               float: right;
-               margin: 0 -100% 0 0;
-       }
-
-       .secondary-navigation ul ul {
-               right: -999em;
-               left: auto;
-       }
-
-       .secondary-navigation ul li:hover > ul,
-       .secondary-navigation ul li.focus > ul {
-               right: 162px;
-               left: auto;
-       }
-
-       .secondary-navigation .menu-item-has-children > a {
-               padding-right: 30px;
-               padding-left: 38px;
-       }
-
-       .secondary-navigation .menu-item-has-children > a:after {
-               border-right-color: #fff;
-               border-left-color: transparent;
-               right: auto;
-               left: 26px;
-               content: "\f503";
-       }
-
-       .footer-sidebar .widget {
-               float: right;
-       }
-
-       .featured-content {
-               padding-right: 182px;
-               padding-left: 0;
-       }
-}
-
-@media screen and (min-width: 1040px) {
-       .archive-header,
-       .comments-area,
-       .image-navigation,
-       .page-header,
-       .page-content,
-       .post-navigation,
-       .site-content .entry-header,
-       .site-content .entry-content,
-       .site-content .entry-summary,
-       .site-content footer.entry-meta {
-               padding-right: 15px;
-               padding-left: 15px;
-       }
-
-       .full-width .archive-header,
-       .full-width .comments-area,
-       .full-width .image-navigation,
-       .full-width .page-header,
-       .full-width .page-content,
-       .full-width .post-navigation,
-       .full-width .site-content .entry-header,
-       .full-width .site-content .entry-content,
-       .full-width .site-content .entry-summary,
-       .full-width .site-content footer.entry-meta {
-               padding-right: 30px;
-               padding-left: 30px;
-       }
-}
-
-@media screen and (min-width: 1080px) {
-       .site-content {
-               margin-right: 222px;
-               margin-left: 29.04761904%;
-       }
-
-       .full-width .site-content {
-               margin-right: 222px;
-       }
-
-       .search-box-wrapper,
-       .featured-content {
-               padding-right: 222px;
-               padding-left: 0;
-       }
-
-       .secondary-navigation ul li:hover > ul,
-       .secondary-navigation ul li.focus > ul {
-               right: 202px;
-               left: auto;
-       }
-
-       .slider-control-paging {
-               padding-right: 24px;
-               padding-left: 0;
-       }
-
-       .slider-control-paging li {
-               margin: 12px 0 12px 12px;
-       }
-
-       .slider-control-paging a:before {
-               right: 6px;
-               left: auto;
-       }
-}
-
-@media screen and (min-width: 1110px) {
-       .archive-header,
-       .comments-area,
-       .image-navigation,
-       .page-header,
-       .page-content,
-       .post-navigation,
-       .site-content .entry-header,
-       .site-content .entry-content,
-       .site-content .entry-summary,
-       .site-content footer.entry-meta {
-               padding-right: 30px;
-               padding-left: 30px;
-       }
-}
-
-@media screen and (min-width: 1218px) {
-       .archive-header,
-       .comments-area,
-       .image-navigation,
-       .page-header,
-       .page-content,
-       .post-navigation,
-       .site-content .entry-header,
-       .site-content .entry-content,
-       .site-content .entry-summary,
-       .site-content footer.entry-meta {
-               margin-left: 54px;
-       }
-
-       .full-width .archive-header,
-       .full-width .comments-area,
-       .full-width .image-navigation,
-       .full-width .page-header,
-       .full-width .page-content,
-       .full-width .post-navigation,
-       .full-width .site-content .entry-header,
-       .full-width .site-content .entry-content,
-       .full-width .site-content .entry-summary,
-       .full-width .site-content footer.entry-meta {
-               margin-right: auto;
-               margin-left: auto;
-       }
-}
-
-@media screen and (min-width: 1260px) {
-       .site-content blockquote.alignright {
-               margin-right: -18%;
-               margin-left: auto;
-       }
-
-       .site-content blockquote.alignleft {
-               margin-left: -18%;
-               margin-right: auto;
-       }
-}
\ No newline at end of file
diff --git a/wp-content/themes/twentyfourteen/screenshot.png b/wp-content/themes/twentyfourteen/screenshot.png
deleted file mode 100644 (file)
index d9f60df..0000000
Binary files a/wp-content/themes/twentyfourteen/screenshot.png and /dev/null differ
diff --git a/wp-content/themes/twentyfourteen/search.php b/wp-content/themes/twentyfourteen/search.php
deleted file mode 100644 (file)
index 3fe9bdb..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/**
- * The template for displaying Search Results pages
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-       <section id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-
-                       <?php if ( have_posts() ) : ?>
-
-                       <header class="page-header">
-                               <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1>
-                       </header><!-- .page-header -->
-
-                               <?php
-                                       // Start the Loop.
-                                       while ( have_posts() ) : the_post();
-
-                                               /*
-                                                * Include the post format-specific template for the content. If you want to
-                                                * use this in a child theme, then include a file called called content-___.php
-                                                * (where ___ is the post format) and that will be used instead.
-                                                */
-                                               get_template_part( 'content', get_post_format() );
-
-                                       endwhile;
-                                       // Previous/next post navigation.
-                                       twentyfourteen_paging_nav();
-
-                               else :
-                                       // If no content, include the "No posts found" template.
-                                       get_template_part( 'content', 'none' );
-
-                               endif;
-                       ?>
-
-               </div><!-- #content -->
-       </section><!-- #primary -->
-
-<?php
-get_sidebar( 'content' );
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/sidebar-content.php b/wp-content/themes/twentyfourteen/sidebar-content.php
deleted file mode 100644 (file)
index 890baf4..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-/**
- * The Content Sidebar
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-if ( ! is_active_sidebar( 'sidebar-2' ) ) {
-       return;
-}
-?>
-<div id="content-sidebar" class="content-sidebar widget-area" role="complementary">
-       <?php dynamic_sidebar( 'sidebar-2' ); ?>
-</div><!-- #content-sidebar -->
diff --git a/wp-content/themes/twentyfourteen/sidebar-footer.php b/wp-content/themes/twentyfourteen/sidebar-footer.php
deleted file mode 100644 (file)
index 20f3798..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * The Footer Sidebar
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-if ( ! is_active_sidebar( 'sidebar-3' ) ) {
-       return;
-}
-?>
-
-<div id="supplementary">
-       <div id="footer-sidebar" class="footer-sidebar widget-area" role="complementary">
-               <?php dynamic_sidebar( 'sidebar-3' ); ?>
-       </div><!-- #footer-sidebar -->
-</div><!-- #supplementary -->
diff --git a/wp-content/themes/twentyfourteen/sidebar.php b/wp-content/themes/twentyfourteen/sidebar.php
deleted file mode 100644 (file)
index be3c8e0..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/**
- * The Sidebar containing the main widget area
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-?>
-<div id="secondary">
-       <?php
-               $description = get_bloginfo( 'description', 'display' );
-               if ( ! empty ( $description ) ) :
-       ?>
-       <h2 class="site-description"><?php echo esc_html( $description ); ?></h2>
-       <?php endif; ?>
-
-       <?php if ( has_nav_menu( 'secondary' ) ) : ?>
-       <nav role="navigation" class="navigation site-navigation secondary-navigation">
-               <?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?>
-       </nav>
-       <?php endif; ?>
-
-       <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
-       <div id="primary-sidebar" class="primary-sidebar widget-area" role="complementary">
-               <?php dynamic_sidebar( 'sidebar-1' ); ?>
-       </div><!-- #primary-sidebar -->
-       <?php endif; ?>
-</div><!-- #secondary -->
diff --git a/wp-content/themes/twentyfourteen/single.php b/wp-content/themes/twentyfourteen/single.php
deleted file mode 100644 (file)
index e2db3b0..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
- * The Template for displaying all single posts
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-       <div id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-                       <?php
-                               // Start the Loop.
-                               while ( have_posts() ) : the_post();
-
-                                       /*
-                                        * Include the post format-specific template for the content. If you want to
-                                        * use this in a child theme, then include a file called called content-___.php
-                                        * (where ___ is the post format) and that will be used instead.
-                                        */
-                                       get_template_part( 'content', get_post_format() );
-
-                                       // Previous/next post navigation.
-                                       twentyfourteen_post_nav();
-
-                                       // If comments are open or we have at least one comment, load up the comment template.
-                                       if ( comments_open() || get_comments_number() ) {
-                                               comments_template();
-                                       }
-                               endwhile;
-                       ?>
-               </div><!-- #content -->
-       </div><!-- #primary -->
-
-<?php
-get_sidebar( 'content' );
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/style.css b/wp-content/themes/twentyfourteen/style.css
deleted file mode 100644 (file)
index 4221371..0000000
+++ /dev/null
@@ -1,4322 +0,0 @@
-/*
-Theme Name: Twenty Fourteen
-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.8
-License: GNU General Public License v2 or later
-License URI: http://www.gnu.org/licenses/gpl-2.0.html
-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.
-Use it to make something cool, have fun, and share what you've learned with others.
-*/
-
-/**
- * Table of Contents:
- *
- * 1.0 - Reset
- * 2.0 - Repeatable Patterns
- * 3.0 - Basic Structure
- * 4.0 - Header
- * 5.0 - Navigation
- * 6.0 - Content
- *   6.1 - Post Thumbnail
- *   6.2 - Entry Header
- *   6.3 - Entry Meta
- *   6.4 - Entry Content
- *   6.5 - Galleries
- *   6.6 - Post Formats
- *   6.7 - Post/Image/Paging Navigation
- *   6.8 - Attachments
- *   6.9 - Archives
- *   6.10 - Contributor Page
- *   6.11 - 404 Page
- *   6.12 - Full-width
- *   6.13 - Singular
- *   6.14 - Comments
- * 7.0 - Sidebar
- *   7.1 - Widgets
- *   7.2 - Content Sidebar Widgets
- * 8.0 - Footer
- * 9.0 - Featured Content
- * 10.0 - Multisite
- * 11.0 - Media Queries
- * 12.0 - Print
- * -----------------------------------------------------------------------------
- */
-
-
-/**
- * 1.0 Reset
- *
- * Resetting and rebuilding styles have been helped along thanks to the fine
- * work of Eric Meyer, Nicolas Gallagher, Jonathan Neal, and Blueprint.
- *
- * -----------------------------------------------------------------------------
- */
-
-html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
-       border: 0;
-       font-family: inherit;
-       font-size: 100%;
-       font-style: inherit;
-       font-weight: inherit;
-       margin: 0;
-       outline: 0;
-       padding: 0;
-       vertical-align: baseline;
-}
-
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-nav,
-section {
-       display: block;
-}
-
-audio,
-canvas,
-video {
-       display: inline-block;
-       max-width: 100%;
-}
-
-html {
-       overflow-y: scroll;
-       -webkit-text-size-adjust: 100%;
-       -ms-text-size-adjust:     100%;
-}
-
-body,
-button,
-input,
-select,
-textarea {
-       color: #2b2b2b;
-       font-family: Lato, sans-serif;
-       font-size: 16px;
-       font-weight: 400;
-       line-height: 1.5;
-}
-
-body {
-       background: #f5f5f5;
-}
-
-a {
-       color: #24890d;
-       text-decoration: none;
-}
-
-a:focus {
-       outline: thin dotted;
-}
-
-a:hover,
-a:active {
-       outline: 0;
-}
-
-a:active,
-a:hover {
-       color: #41a62a;
-}
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-       clear: both;
-       font-weight: 700;
-       margin: 36px 0 12px;
-}
-
-h1 {
-       font-size: 26px;
-       line-height: 1.3846153846;
-}
-
-h2 {
-       font-size: 24px;
-       line-height: 1;
-}
-
-h3 {
-       font-size: 22px;
-       line-height: 1.0909090909;
-}
-
-h4 {
-       font-size: 20px;
-       line-height: 1.2;
-}
-
-h5 {
-       font-size: 18px;
-       line-height: 1.3333333333;
-}
-
-h6 {
-       font-size: 16px;
-       line-height: 1.5;
-}
-
-address {
-       font-style: italic;
-       margin-bottom: 24px;
-}
-
-abbr[title] {
-       border-bottom: 1px dotted #2b2b2b;
-       cursor: help;
-}
-
-b,
-strong {
-       font-weight: 700;
-}
-
-cite,
-dfn,
-em,
-i {
-       font-style: italic;
-}
-
-mark,
-ins {
-       background: #fff9c0;
-       text-decoration: none;
-}
-
-p {
-       margin-bottom: 24px;
-}
-
-code,
-kbd,
-tt,
-var,
-samp,
-pre {
-       font-family: monospace, serif;
-       font-size: 15px;
-       -webkit-hyphens: none;
-       -moz-hyphens:    none;
-       -ms-hyphens:     none;
-       hyphens:         none;
-       line-height: 1.6;
-}
-
-pre {
-       border: 1px solid rgba(0, 0, 0, 0.1);
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       margin-bottom: 24px;
-       max-width: 100%;
-       overflow: auto;
-       padding: 12px;
-       white-space: pre;
-       white-space: pre-wrap;
-       word-wrap: break-word;
-}
-
-blockquote,
-q {
-       -webkit-hyphens: none;
-       -moz-hyphens:    none;
-       -ms-hyphens:     none;
-       hyphens:         none;
-       quotes: none;
-}
-
-blockquote:before,
-blockquote:after,
-q:before,
-q:after {
-       content: "";
-       content: none;
-}
-
-blockquote {
-       color: #767676;
-       font-size: 19px;
-       font-style: italic;
-       font-weight: 300;
-       line-height: 1.2631578947;
-       margin-bottom: 24px;
-}
-
-blockquote cite,
-blockquote small {
-       color: #2b2b2b;
-       font-size: 16px;
-       font-weight: 400;
-       line-height: 1.5;
-}
-
-blockquote em,
-blockquote i,
-blockquote cite {
-       font-style: normal;
-}
-
-blockquote strong,
-blockquote b {
-       font-weight: 400;
-}
-
-small {
-       font-size: smaller;
-}
-
-big {
-       font-size: 125%;
-}
-
-sup,
-sub {
-       font-size: 75%;
-       height: 0;
-       line-height: 0;
-       position: relative;
-       vertical-align: baseline;
-}
-
-sup {
-       bottom: 1ex;
-}
-
-sub {
-       top: .5ex;
-}
-
-dl {
-       margin-bottom: 24px;
-}
-
-dt {
-       font-weight: bold;
-}
-
-dd {
-       margin-bottom: 24px;
-}
-
-ul,
-ol {
-       list-style: none;
-       margin: 0 0 24px 20px;
-}
-
-ul {
-       list-style: disc;
-}
-
-ol {
-       list-style: decimal;
-}
-
-li > ul,
-li > ol {
-       margin: 0 0 0 20px;
-}
-
-img {
-       -ms-interpolation-mode: bicubic;
-       border: 0;
-       vertical-align: middle;
-}
-
-figure {
-       margin: 0;
-}
-
-fieldset {
-       border: 1px solid rgba(0, 0, 0, 0.1);
-       margin: 0 0 24px;
-       min-width: inherit;
-       padding: 11px 12px 0;
-}
-
-legend {
-       white-space: normal;
-}
-
-button,
-input,
-select,
-textarea {
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       font-size: 100%;
-       margin: 0;
-       max-width: 100%;
-       vertical-align: baseline;
-}
-
-button,
-input {
-       line-height: normal;
-}
-
-input,
-textarea {
-       background-image: -webkit-linear-gradient(hsla(0,0%,100%,0), hsla(0,0%,100%,0)); /* Removing the inner shadow, rounded corners on iOS inputs */
-}
-
-button,
-html input[type="button"],
-input[type="reset"],
-input[type="submit"] {
-       -webkit-appearance: button;
-       cursor: pointer;
-}
-
-button[disabled],
-input[disabled] {
-       cursor: default;
-}
-
-input[type="checkbox"],
-input[type="radio"] {
-       padding: 0;
-}
-
-input[type="search"] {
-       -webkit-appearance: textfield;
-}
-
-input[type="search"]::-webkit-search-decoration {
-       -webkit-appearance: none;
-}
-
-button::-moz-focus-inner,
-input::-moz-focus-inner {
-       border: 0;
-       padding: 0;
-}
-
-textarea {
-       overflow: auto;
-       vertical-align: top;
-}
-
-table,
-th,
-td {
-       border: 1px solid rgba(0, 0, 0, 0.1);
-}
-
-table {
-       border-collapse: separate;
-       border-spacing: 0;
-       border-width: 1px 0 0 1px;
-       margin-bottom: 24px;
-       width: 100%;
-}
-
-caption,
-th,
-td {
-       font-weight: normal;
-       text-align: left;
-}
-
-th {
-       border-width: 0 1px 1px 0;
-       font-weight: bold;
-}
-
-td {
-       border-width: 0 1px 1px 0;
-}
-
-del {
-       color: #767676;
-}
-
-hr {
-       background-color: rgba(0, 0, 0, 0.1);
-       border: 0;
-       height: 1px;
-       margin-bottom: 23px;
-}
-
-/* Support a widely-adopted but non-standard selector for text selection styles
- * to achieve a better experience. See https://core.trac.wordpress.org/ticket/25898.
- */
-::selection {
-       background: #24890d;
-       color: #fff;
-       text-shadow: none;
-}
-
-::-moz-selection {
-       background: #24890d;
-       color: #fff;
-       text-shadow: none;
-}
-
-
-/**
- * 2.0 Repeatable Patterns
- * -----------------------------------------------------------------------------
- */
-
-/* Input fields */
-
-input,
-textarea {
-       border: 1px solid rgba(0, 0, 0, 0.1);
-       border-radius: 2px;
-       color: #2b2b2b;
-       padding: 8px 10px 7px;
-}
-
-textarea {
-       width: 100%;
-}
-
-input:focus,
-textarea:focus {
-       border: 1px solid rgba(0, 0, 0, 0.3);
-       outline: 0;
-}
-
-/* Buttons */
-
-button,
-.button,
-input[type="button"],
-input[type="reset"],
-input[type="submit"] {
-       background-color: #24890d;
-       border: 0;
-       border-radius: 2px;
-       color: #fff;
-       font-size: 12px;
-       font-weight: 700;
-       padding: 10px 30px 11px;
-       text-transform: uppercase;
-       vertical-align: bottom;
-}
-
-button:hover,
-button:focus,
-.button:hover,
-.button:focus,
-input[type="button"]:hover,
-input[type="button"]:focus,
-input[type="reset"]:hover,
-input[type="reset"]:focus,
-input[type="submit"]:hover,
-input[type="submit"]:focus {
-       background-color: #41a62a;
-       color: #fff;
-}
-
-button:active,
-.button:active,
-input[type="button"]:active,
-input[type="reset"]:active,
-input[type="submit"]:active {
-       background-color: #55d737;
-}
-
-.search-field {
-       width: 100%;
-}
-
-.search-submit {
-       display: none;
-}
-
-/* Placeholder text color -- selectors need to be separate to work. */
-
-::-webkit-input-placeholder {
-       color: #939393;
-}
-
-:-moz-placeholder {
-       color: #939393;
-}
-
-::-moz-placeholder {
-       color: #939393;
-       opacity: 1; /* Since FF19 lowers the opacity of the placeholder by default */
-}
-
-:-ms-input-placeholder {
-       color: #939393;
-}
-
-/* Responsive images. Fluid images for posts, comments, and widgets */
-
-.comment-content img,
-.entry-content img,
-.entry-summary img,
-#site-header img,
-.widget img,
-.wp-caption {
-       max-width: 100%;
-}
-
-/**
- * Make sure images with WordPress-added height and width attributes are
- * scaled correctly.
- */
-
-.comment-content img[height],
-.entry-content img,
-.entry-summary img,
-img[class*="align"],
-img[class*="wp-image-"],
-img[class*="attachment-"],
-#site-header img {
-       height: auto;
-}
-
-img.size-full,
-img.size-large,
-.wp-post-image,
-.post-thumbnail img {
-       height: auto;
-       max-width: 100%;
-}
-
-/* Make sure embeds and iframes fit their containers */
-
-embed,
-iframe,
-object,
-video {
-       margin-bottom: 24px;
-       max-width: 100%;
-}
-
-p > embed,
-p > iframe,
-p > object,
-span > embed,
-span > iframe,
-span > object {
-       margin-bottom: 0;
-}
-
-/* Alignment */
-
-.alignleft {
-       float: left;
-}
-
-.alignright {
-       float: right;
-}
-
-.aligncenter {
-       display: block;
-       margin-left: auto;
-       margin-right: auto;
-}
-
-blockquote.alignleft,
-figure.wp-caption.alignleft,
-img.alignleft {
-       margin: 7px 24px 7px 0;
-}
-
-.wp-caption.alignleft {
-       margin: 7px 14px 7px 0;
-}
-
-blockquote.alignright,
-figure.wp-caption.alignright,
-img.alignright {
-       margin: 7px 0 7px 24px;
-}
-
-.wp-caption.alignright {
-       margin: 7px 0 7px 14px;
-}
-
-blockquote.aligncenter,
-img.aligncenter,
-.wp-caption.aligncenter {
-       margin-top: 7px;
-       margin-bottom: 7px;
-}
-
-.site-content blockquote.alignleft,
-.site-content blockquote.alignright {
-       border-top: 1px solid rgba(0, 0, 0, 0.1);
-       border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-       padding-top: 17px;
-       width: 50%;
-}
-
-.site-content blockquote.alignleft p,
-.site-content blockquote.alignright p {
-       margin-bottom: 17px;
-}
-
-.wp-caption {
-       margin-bottom: 24px;
-}
-
-.wp-caption img[class*="wp-image-"] {
-       display: block;
-       margin: 0;
-}
-
-.wp-caption {
-       color: #767676;
-}
-
-.wp-caption-text {
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       font-size: 12px;
-       font-style: italic;
-       line-height: 1.5;
-       margin: 9px 0;
-}
-
-div.wp-caption .wp-caption-text {
-       padding-right: 10px;
-}
-
-div.wp-caption.alignright img[class*="wp-image-"],
-div.wp-caption.alignright .wp-caption-text {
-       padding-left: 10px;
-       padding-right: 0;
-}
-
-.wp-smiley {
-       border: 0;
-       margin-bottom: 0;
-       margin-top: 0;
-       padding: 0;
-}
-
-/* Assistive text */
-
-.screen-reader-text {
-       clip: rect(1px, 1px, 1px, 1px);
-       overflow: hidden;
-       position: absolute !important;
-       height: 1px;
-       width: 1px;
-}
-
-.screen-reader-text:focus {
-       background-color: #f1f1f1;
-       border-radius: 3px;
-       box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
-       clip: auto;
-       color: #21759b;
-       display: block;
-       font-size: 14px;
-       font-weight: bold;
-       height: auto;
-       line-height: normal;
-       padding: 15px 23px 14px;
-       position: absolute;
-       left: 5px;
-       top: 5px;
-       text-decoration: none;
-       text-transform: none;
-       width: auto;
-       z-index: 100000; /* Above WP toolbar */
-}
-
-.hide {
-       display: none;
-}
-
-/* Clearing floats */
-
-.footer-sidebar:before,
-.footer-sidebar:after,
-.hentry:before,
-.hentry:after,
-.gallery:before,
-.gallery:after,
-.slider-direction-nav:before,
-.slider-direction-nav:after,
-.contributor-info:before,
-.contributor-info:after,
-.search-box:before,
-.search-box:after,
-[class*="content"]:before,
-[class*="content"]:after,
-[class*="site"]:before,
-[class*="site"]:after {
-       content: "";
-       display: table;
-}
-
-.footer-sidebar:after,
-.hentry:after,
-.gallery:after,
-.slider-direction-nav:after,
-.contributor-info:after,
-.search-box:after,
-[class*="content"]:after,
-[class*="site"]:after {
-       clear: both;
-}
-
-/* Genericons */
-
-.bypostauthor > article .fn:before,
-.comment-edit-link:before,
-.comment-reply-link:before,
-.comment-reply-login:before,
-.comment-reply-title small a:before,
-.contributor-posts-link:before,
-.menu-toggle:before,
-.search-toggle:before,
-.slider-direction-nav a:before,
-.widget_twentyfourteen_ephemera .widget-title:before {
-       -webkit-font-smoothing: antialiased;
-       display: inline-block;
-       font: normal 16px/1 Genericons;
-       text-decoration: inherit;
-       vertical-align: text-bottom;
-}
-
-/* Separators */
-
-.site-content span + .entry-date:before,
-.full-size-link:before,
-.parent-post-link:before,
-span + .byline:before,
-span + .comments-link:before,
-span + .edit-link:before,
-.widget_twentyfourteen_ephemera .entry-title:after {
-       content: "\0020\007c\0020";
-}
-
-
-/**
- * 3.0 Basic Structure
- * -----------------------------------------------------------------------------
- */
-
-.site {
-       background-color: #fff;
-       max-width: 1260px;
-       position: relative;
-}
-
-.main-content {
-       width: 100%;
-}
-
-
-/**
- * 4.0 Header
- * -----------------------------------------------------------------------------
- */
-
-/* Ensure that there is no gap between the header and
-        the admin bar for WordPress versions before 3.8. */
-#wpadminbar {
-       min-height: 32px;
-}
-
-#site-header {
-       position: relative;
-       z-index: 3;
-}
-
-.site-header {
-       background-color: #000;
-       max-width: 1260px;
-       position: relative;
-       width: 100%;
-       z-index: 4;
-}
-
-.header-main {
-       min-height: 48px;
-       padding: 0 10px;
-}
-
-.site-title {
-       float: left;
-       font-size: 18px;
-       font-weight: 700;
-       line-height: 48px;
-       margin: 0;
-
-       /* Nav-toggle width + search-toggle width - gutter = 86px */
-       max-width: -webkit-calc(100% - 86px);
-       max-width:         calc(100% - 86px);
-}
-
-.site-title a,
-.site-title a:hover {
-       color: #fff;
-       display: block;
-       overflow: hidden;
-       text-overflow: ellipsis;
-       white-space: nowrap;
-}
-
-/* Search in the header */
-
-.search-toggle {
-       background-color: #24890d;
-       cursor: pointer;
-       float: right;
-       height: 48px;
-       margin-right: 38px;
-       text-align: center;
-       width: 48px;
-}
-
-.search-toggle:hover,
-.search-toggle.active {
-       background-color: #41a62a;
-}
-
-.search-toggle:before {
-       color: #fff;
-       content: "\f400";
-       font-size: 20px;
-       margin-top: 14px;
-}
-
-.search-toggle .screen-reader-text {
-       left: 5px; /* Avoid a horizontal scrollbar when the site has a long menu */
-}
-
-.search-box-wrapper {
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       position: absolute;
-       top: 48px;
-       right: 0;
-       width: 100%;
-       z-index: 2;
-}
-
-.search-box {
-       background-color: #41a62a;
-       padding: 12px;
-}
-
-.search-box .search-field {
-       background-color: #fff;
-       border: 0;
-       float: right;
-       font-size: 16px;
-       padding: 2px 2px 3px 6px;
-       width: 100%;
-}
-
-
-/**
- * 5.0 Navigation
- * -----------------------------------------------------------------------------
- */
-
-.site-navigation ul {
-       list-style: none;
-       margin: 0;
-}
-
-.site-navigation li {
-       border-top: 1px solid rgba(255, 255, 255, 0.2);
-}
-
-.site-navigation ul ul {
-       margin-left: 20px;
-}
-
-.site-navigation a {
-       color: #fff;
-       display: block;
-       text-transform: uppercase;
-}
-
-.site-navigation a:hover {
-       color: #41a62a;
-}
-
-.site-navigation .current_page_item > a,
-.site-navigation .current_page_ancestor > a,
-.site-navigation .current-menu-item > a,
-.site-navigation .current-menu-ancestor > a {
-       color: #55d737;
-       font-weight: 900;
-}
-
-/* Primary Navigation */
-
-.primary-navigation {
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       font-size: 14px;
-       padding-top: 24px;
-}
-
-.primary-navigation.toggled-on {
-       padding: 72px 0 36px;
-}
-
-.primary-navigation .nav-menu {
-       border-bottom: 1px solid rgba(255, 255, 255, 0.2);
-       display: none;
-}
-
-.primary-navigation.toggled-on .nav-menu {
-       display: block;
-}
-
-.primary-navigation a {
-       padding: 7px 0;
-}
-
-/* Secondary Navigation */
-
-.secondary-navigation {
-       border-bottom: 1px solid rgba(255, 255, 255, 0.2);
-       font-size: 12px;
-       margin: 48px 0;
-}
-
-.secondary-navigation a {
-       padding: 9px 0;
-}
-
-.menu-toggle {
-       background-color: #000;
-       border-radius: 0;
-       cursor: pointer;
-       height: 48px;
-       margin: 0;
-       overflow: hidden;
-       padding: 0;
-       position: absolute;
-       top: 0;
-       right: 0;
-       text-align: center;
-       width: 48px;
-}
-
-.menu-toggle:before {
-       color: #fff;
-       content: "\f419";
-       padding: 16px;
-}
-
-.menu-toggle:active,
-.menu-toggle:focus,
-.menu-toggle:hover {
-       background-color: #444;
-}
-
-.menu-toggle:focus {
-       outline: 1px dotted;
-}
-
-
-/**
- * 6.0 Content
- * -----------------------------------------------------------------------------
- */
-
-.content-area {
-       padding-top: 48px;
-}
-
-.hentry {
-       margin: 0 auto 48px;
-       max-width: 672px;
-}
-
-.site-content .entry-header,
-.site-content .entry-content,
-.site-content .entry-summary,
-.site-content .entry-meta,
-.page-content {
-       margin: 0 auto;
-       max-width: 474px;
-}
-
-.page-content {
-       margin-bottom: 48px;
-}
-
-
-/**
- * 6.1 Post Thumbnail
- * -----------------------------------------------------------------------------
- */
-
-.post-thumbnail {
-       background: #b2b2b2 url(images/pattern-light.svg) repeat fixed;
-       display: block;
-       position: relative;
-       width: 100%;
-       z-index: 0;
-}
-
-a.post-thumbnail:hover {
-       background-color: #999;
-}
-
-.full-width .post-thumbnail img {
-       display: block;
-       margin: 0 auto;
-}
-
-
-/**
- * 6.2 Entry Header
- * -----------------------------------------------------------------------------
- */
-
-.entry-header {
-       position: relative;
-       z-index: 1;
-}
-
-.entry-title {
-       font-size: 33px;
-       font-weight: 300;
-       line-height: 1.0909090909;
-       margin-bottom: 12px;
-       margin: 0 0 12px 0;
-       text-transform: uppercase;
-}
-
-.entry-title a {
-       color: #2b2b2b;
-}
-
-.entry-title a:hover {
-       color: #41a62a;
-}
-
-.site-content .entry-header {
-       background-color: #fff;
-       padding: 0 10px 12px;
-}
-
-.site-content .has-post-thumbnail .entry-header {
-       padding-top: 24px;
-}
-
-
-/**
- * 6.3 Entry Meta
- * -----------------------------------------------------------------------------
- */
-
-.entry-meta {
-       clear: both;
-       color: #767676;
-       font-size: 12px;
-       font-weight: 400;
-       line-height: 1.3333333333;
-       text-transform: uppercase;
-}
-
-.entry-meta a {
-       color: #767676;
-}
-
-.entry-meta a:hover {
-       color: #41a62a;
-}
-
-.sticky .entry-date {
-       display: none;
-}
-
-.cat-links {
-       font-weight: 900;
-       text-transform: uppercase;
-}
-
-.cat-links a {
-       color: #2b2b2b;
-}
-
-.cat-links a:hover {
-       color: #41a62a;
-}
-
-.byline {
-       display: none;
-}
-
-.single .byline,
-.group-blog .byline {
-       display: inline;
-}
-
-.site-content .entry-meta {
-       background-color: #fff;
-       margin-bottom: 8px;
-}
-
-.site-content footer.entry-meta {
-       margin: 24px auto 0;
-       padding: 0 10px;
-}
-
-/* Tag links style */
-
-.entry-meta .tag-links a {
-       background-color: #767676;
-       border-radius: 0 2px 2px 0;
-       color: #fff;
-       display: inline-block;
-       font-size: 11px;
-       font-weight: 700;
-       line-height: 1.2727272727;
-       margin: 2px 4px 2px 10px;
-       padding: 3px 7px;
-       position: relative;
-       text-transform: uppercase;
-}
-
-.entry-meta .tag-links a:hover {
-       background-color: #41a62a;
-       color: #fff;
-}
-
-.entry-meta .tag-links a:before {
-       border-top: 10px solid transparent;
-       border-right: 8px solid #767676;
-       border-bottom: 10px solid transparent;
-       content: "";
-       height: 0;
-       position: absolute;
-       top: 0;
-       left: -8px;
-       width: 0;
-}
-
-.entry-meta .tag-links a:hover:before {
-       border-right-color: #41a62a;
-}
-
-.entry-meta .tag-links a:after {
-       background-color: #fff;
-       border-radius: 50%;
-       content: "";
-       height: 4px;
-       position: absolute;
-       top: 8px;
-       left: -2px;
-       width: 4px;
-}
-
-
-/**
- * 6.4 Entry Content
- * -----------------------------------------------------------------------------
- */
-
-.entry-content,
-.entry-summary,
-.page-content {
-       -webkit-hyphens: auto;
-       -moz-hyphens:    auto;
-       -ms-hyphens:     auto;
-       hyphens:         auto;
-       word-wrap: break-word;
-}
-
-.site-content .entry-content,
-.site-content .entry-summary,
-.page-content {
-       background-color: #fff;
-       padding: 12px 10px 0;
-}
-
-.page .entry-content {
-       padding-top: 0;
-}
-
-.entry-content h1:first-child,
-.entry-content h2:first-child,
-.entry-content h3:first-child,
-.entry-content h4:first-child,
-.entry-content h5:first-child,
-.entry-content h6:first-child,
-.entry-summary h1:first-child,
-.entry-summary h2:first-child,
-.entry-summary h3:first-child,
-.entry-summary h4:first-child,
-.entry-summary h5:first-child,
-.entry-summary h6:first-child,
-.page-content h1:first-child,
-.page-content h2:first-child,
-.page-content h3:first-child,
-.page-content h4:first-child,
-.page-content h5:first-child,
-.page-content h6:first-child {
-       margin-top: 0;
-}
-
-.entry-content a,
-.entry-summary a,
-.page-content a,
-.comment-content a {
-       text-decoration: underline;
-}
-
-.entry-content a:hover,
-.entry-summary a:hover,
-.page-content a:hover,
-.comment-content a:hover,
-.entry-content a.button,
-.entry-summary a.button,
-.page-content a.button,
-.comment-content a.button {
-       text-decoration: none;
-}
-
-.entry-content table,
-.comment-content table {
-       font-size: 14px;
-       line-height: 1.2857142857;
-       margin-bottom: 24px;
-}
-
-.entry-content th,
-.comment-content th {
-       font-weight: 700;
-       padding: 8px;
-       text-transform: uppercase;
-}
-
-.entry-content td,
-.comment-content td {
-       padding: 8px;
-}
-
-.entry-content .edit-link {
-       clear: both;
-       display: block;
-       font-size: 12px;
-       font-weight: 400;
-       line-height: 1.3333333333;
-       text-transform: uppercase;
-}
-
-.entry-content .edit-link a {
-       color: #767676;
-       text-decoration: none;
-}
-
-.entry-content .edit-link a:hover {
-       color: #41a62a;
-}
-
-.entry-content .more-link {
-       white-space: nowrap;
-}
-
-/* Mediaelements */
-
-.hentry .mejs-container {
-       margin: 12px 0 18px;
-}
-
-.hentry .mejs-mediaelement,
-.hentry .mejs-container .mejs-controls {
-       background: #000;
-}
-
-.hentry .mejs-controls .mejs-time-rail .mejs-time-loaded,
-.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
-       background: #fff;
-}
-
-.hentry .mejs-controls .mejs-time-rail .mejs-time-current {
-       background: #24890d;
-}
-
-.hentry .mejs-controls .mejs-time-rail .mejs-time-total,
-.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
-       background: rgba(255, 255, 255, .33);
-}
-
-.hentry .mejs-container .mejs-controls .mejs-time {
-       padding-top: 9px;
-}
-
-.hentry .mejs-controls .mejs-time-rail span,
-.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total,
-.hentry .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
-       border-radius: 0;
-}
-
-.hentry .mejs-overlay-loading {
-       background: transparent;
-}
-
-.hentry .mejs-overlay-button {
-       background-color: #fff;
-       background-image: none;
-       border-radius: 2px;
-       box-shadow: 1px 1px 1px rgba(0,0,0,.8);
-       color: #000;
-       height: 36px;
-       margin-left: -24px;
-       width: 48px;
-}
-
-.hentry .mejs-overlay-button:before {
-       -webkit-font-smoothing: antialiased;
-       content: '\f452';
-       display: inline-block;
-       font: normal 32px/1.125 Genericons;
-       position: absolute;
-       top: 1px;
-       left: 10px;
-}
-
-.hentry .mejs-controls .mejs-button button:focus {
-       outline: none;
-}
-
-.hentry .mejs-controls .mejs-button button {
-       -webkit-font-smoothing: antialiased;
-       background: none;
-       color: #fff;
-       display: inline-block;
-       font: normal 16px/1 Genericons;
-}
-
-.hentry .mejs-playpause-button.mejs-play button:before {
-       content: '\f452';
-}
-
-.hentry .mejs-playpause-button.mejs-pause button:before {
-       content: '\f448';
-}
-
-.hentry .mejs-volume-button.mejs-mute button:before {
-       content: '\f109';
-       font-size: 20px;
-       position: absolute;
-       top: -2px;
-       left: 0;
-}
-
-.hentry .mejs-volume-button.mejs-unmute button:before {
-       content: '\f109';
-       left: 0;
-       position: absolute;
-       top: 0;
-}
-
-.hentry .mejs-fullscreen-button button:before {
-       content: '\f474';
-}
-
-.hentry .mejs-fullscreen-button.mejs-unfullscreen button:before {
-       content: '\f406';
-}
-
-.hentry .mejs-overlay:hover .mejs-overlay-button {
-       background-color: #24890d;
-       color: #fff;
-}
-
-.hentry .mejs-controls .mejs-button button:hover {
-       color: #41a62a;
-}
-
-.content-sidebar .wp-playlist-item .wp-playlist-caption {
-       color: #000;
-}
-
-/* Page links */
-
-.page-links {
-       clear: both;
-       font-size: 12px;
-       font-weight: 900;
-       line-height: 2;
-       margin: 24px 0;
-       text-transform: uppercase;
-}
-
-.page-links a,
-.page-links > span {
-       background: #fff;
-       border: 1px solid #fff;
-       display: inline-block;
-       height: 22px;
-       margin: 0 1px 2px 0;
-       text-align: center;
-       width: 22px;
-}
-
-.page-links a {
-       background: #000;
-       border: 1px solid #000;
-       color: #fff;
-       text-decoration: none;
-}
-
-.page-links a:hover {
-       background: #41a62a;
-       border: 1px solid #41a62a;
-       color: #fff;
-}
-
-.page-links > .page-links-title {
-       height: auto;
-       margin: 0;
-       padding-right: 7px;
-       width: auto;
-}
-
-
-/**
- * 6.5 Gallery
- * -----------------------------------------------------------------------------
- */
-
-.gallery {
-       margin-bottom: 20px;
-}
-
-.gallery-item {
-       float: left;
-       margin: 0 4px 4px 0;
-       overflow: hidden;
-       position: relative;
-}
-
-.gallery-columns-1 .gallery-item {
-       max-width: 100%;
-}
-
-.gallery-columns-2 .gallery-item {
-       max-width: 48%;
-       max-width: -webkit-calc(50% - 4px);
-       max-width:         calc(50% - 4px);
-}
-
-.gallery-columns-3 .gallery-item {
-       max-width: 32%;
-       max-width: -webkit-calc(33.3% - 4px);
-       max-width:         calc(33.3% - 4px);
-}
-
-.gallery-columns-4 .gallery-item {
-       max-width: 23%;
-       max-width: -webkit-calc(25% - 4px);
-       max-width:         calc(25% - 4px);
-}
-
-.gallery-columns-5 .gallery-item {
-       max-width: 19%;
-       max-width: -webkit-calc(20% - 4px);
-       max-width:         calc(20% - 4px);
-}
-
-.gallery-columns-6 .gallery-item {
-       max-width: 15%;
-       max-width: -webkit-calc(16.7% - 4px);
-       max-width:         calc(16.7% - 4px);
-}
-
-.gallery-columns-7 .gallery-item {
-       max-width: 13%;
-       max-width: -webkit-calc(14.28% - 4px);
-       max-width:         calc(14.28% - 4px);
-}
-
-.gallery-columns-8 .gallery-item {
-       max-width: 11%;
-       max-width: -webkit-calc(12.5% - 4px);
-       max-width:         calc(12.5% - 4px);
-}
-
-.gallery-columns-9 .gallery-item {
-       max-width: 9%;
-       max-width: -webkit-calc(11.1% - 4px);
-       max-width:         calc(11.1% - 4px);
-}
-
-.gallery-columns-1 .gallery-item:nth-of-type(1n),
-.gallery-columns-2 .gallery-item:nth-of-type(2n),
-.gallery-columns-3 .gallery-item:nth-of-type(3n),
-.gallery-columns-4 .gallery-item:nth-of-type(4n),
-.gallery-columns-5 .gallery-item:nth-of-type(5n),
-.gallery-columns-6 .gallery-item:nth-of-type(6n),
-.gallery-columns-7 .gallery-item:nth-of-type(7n),
-.gallery-columns-8 .gallery-item:nth-of-type(8n),
-.gallery-columns-9 .gallery-item:nth-of-type(9n) {
-       margin-right: 0;
-}
-
-.gallery-columns-1.gallery-size-medium figure.gallery-item:nth-of-type(1n+1),
-.gallery-columns-1.gallery-size-thumbnail figure.gallery-item:nth-of-type(1n+1),
-.gallery-columns-2.gallery-size-thumbnail figure.gallery-item:nth-of-type(2n+1),
-.gallery-columns-3.gallery-size-thumbnail figure.gallery-item:nth-of-type(3n+1) {
-       clear: left;
-}
-
-.gallery-caption {
-       background-color: rgba(0, 0, 0, 0.7);
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       color: #fff;
-       font-size: 12px;
-       line-height: 1.5;
-       margin: 0;
-       max-height: 50%;
-       opacity: 0;
-       padding: 6px 8px;
-       position: absolute;
-       bottom: 0;
-       left: 0;
-       text-align: left;
-       width: 100%;
-}
-
-.gallery-caption:before {
-       content: "";
-       height: 100%;
-       min-height: 49px;
-       position: absolute;
-       top: 0;
-       left: 0;
-       width: 100%;
-}
-
-.gallery-item:hover .gallery-caption {
-       opacity: 1;
-}
-
-.gallery-columns-7 .gallery-caption,
-.gallery-columns-8 .gallery-caption,
-.gallery-columns-9 .gallery-caption {
-       display: none;
-}
-
-
-/**
- * 6.6 Post Formats
- * -----------------------------------------------------------------------------
- */
-
-.format-aside .entry-content,
-.format-aside .entry-summary,
-.format-quote .entry-content,
-.format-quote .entry-summary,
-.format-link .entry-content,
-.format-link .entry-summary {
-       padding-top: 0;
-}
-
-.site-content .format-link .entry-title,
-.site-content .format-aside .entry-title,
-.site-content .format-quote .entry-title {
-       display: none;
-}
-
-
-/**
- * 6.7 Post/Image/Paging Navigation
- * -----------------------------------------------------------------------------
- */
-
-.nav-links {
-       -webkit-hyphens: auto;
-       -moz-hyphens:    auto;
-       -ms-hyphens:     auto;
-       border-top: 1px solid rgba(0, 0, 0, 0.1);
-       hyphens:         auto;
-       word-wrap: break-word;
-}
-
-.post-navigation,
-.image-navigation {
-       margin: 24px auto 48px;
-       max-width: 474px;
-       padding: 0 10px;
-}
-
-.post-navigation a,
-.image-navigation .previous-image,
-.image-navigation .next-image {
-       border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-       padding: 11px 0 12px;
-       width: 100%;
-}
-
-.post-navigation .meta-nav {
-       color: #767676;
-       display: block;
-       font-size: 12px;
-       font-weight: 900;
-       line-height: 2;
-       text-transform: uppercase;
-}
-
-.post-navigation a,
-.image-navigation a {
-       color: #2b2b2b;
-       display: block;
-       font-size: 14px;
-       font-weight: 700;
-       line-height: 1.7142857142;
-       text-transform: none;
-}
-
-.post-navigation a:hover,
-.image-navigation a:hover {
-       color: #41a62a;
-}
-
-/* Paging Navigation */
-
-.paging-navigation {
-       border-top: 5px solid #000;
-       margin: 48px 0;
-}
-
-.paging-navigation .loop-pagination {
-       margin-top: -5px;
-       text-align: center;
-}
-
-.paging-navigation .page-numbers {
-       border-top: 5px solid transparent;
-       display: inline-block;
-       font-size: 14px;
-       font-weight: 900;
-       margin-right: 1px;
-       padding: 7px 16px;
-       text-transform: uppercase;
-}
-
-.paging-navigation a {
-       color: #2b2b2b;
-}
-
-.paging-navigation .page-numbers.current {
-       border-top: 5px solid #24890d;
-}
-
-.paging-navigation a:hover {
-       border-top: 5px solid #41a62a;
-       color: #2b2b2b;
-}
-
-
-/**
- * 6.8 Attachments
- * -----------------------------------------------------------------------------
- */
-
-.attachment .content-sidebar,
-.attachment .post-thumbnail {
-       display: none;
-}
-
-.attachment .entry-content {
-       padding-top: 0;
-}
-
-.attachment footer.entry-meta {
-       text-transform: none;
-}
-
-.entry-attachment .attachment {
-       margin-bottom: 24px;
-}
-
-
-/**
- * 6.9 Archives
- * -----------------------------------------------------------------------------
- */
-
-.archive-header,
-.page-header {
-       margin: 24px auto;
-       max-width: 474px;
-}
-
-.archive-title,
-.page-title {
-       font-size: 16px;
-       font-weight: 900;
-       line-height: 1.5;
-       margin: 0;
-}
-
-.taxonomy-description,
-.author-description {
-       color: #767676;
-       font-size: 14px;
-       line-height: 1.2857142857;
-       padding-top: 18px;
-}
-
-.taxonomy-description p,
-.author-description p {
-       margin-bottom: 18px;
-}
-
-.taxonomy-description p:last-child,
-.author-description p:last-child {
-       margin-bottom: 0;
-}
-
-.taxonomy-description a,
-.author-description a {
-       text-decoration: underline;
-}
-
-.taxonomy-description a:hover,
-.author-description a:hover {
-       text-decoration: none;
-}
-
-
-/**
- * 6.10 Contributor Page
- * -----------------------------------------------------------------------------
- */
-
-.contributor {
-       border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing: border-box;
-       box-sizing:      border-box;
-       padding: 48px 10px;
-}
-
-.contributor:first-of-type {
-       padding-top: 24px;
-}
-
-.contributor-info {
-       margin: 0 auto;
-       max-width: 474px;
-}
-
-.contributor-avatar {
-       border: 1px solid rgba(0, 0, 0, 0.1);
-       float: left;
-       margin: 0 30px 20px 0;
-       padding: 2px;
-}
-
-.contributor-name {
-       font-size: 16px;
-       font-weight: 900;
-       line-height: 1.5;
-       margin: 0;
-}
-
-.contributor-bio a {
-       text-decoration: underline;
-}
-
-.contributor-bio a:hover {
-       text-decoration: none;
-}
-
-.contributor-posts-link {
-       display: inline-block;
-       line-height: normal;
-       padding: 10px 30px;
-}
-
-.contributor-posts-link:before {
-       content: "\f443";
-}
-
-
-/**
- * 6.11 404 Page
- * -----------------------------------------------------------------------------
- */
-
-.error404 .page-content {
-       padding-top: 0;
-}
-
-.error404 .page-content .search-form {
-       margin-bottom: 24px;
-}
-
-
-/**
- * 6.12 Full-width
- * -----------------------------------------------------------------------------
- */
-
-.full-width .hentry {
-       max-width: 100%;
-}
-
-
-/**
- * 6.13 Singular
- * -----------------------------------------------------------------------------
- */
-
-.singular .site-content .hentry.has-post-thumbnail {
-       margin-top: -48px;
-}
-
-
-/**
- * 6.14 Comments
- * -----------------------------------------------------------------------------
- */
-
-.comments-area {
-       margin: 48px auto;
-       max-width: 474px;
-       padding: 0 10px;
-}
-
-.comment-reply-title,
-.comments-title {
-       font: 900 16px/1.5 Lato, sans-serif;
-       margin: 0;
-       text-transform: uppercase;
-}
-
-.comment-list {
-       list-style: none;
-       margin: 0 0 48px 0;
-}
-
-.comment-author {
-       font-size: 14px;
-       line-height: 1.7142857142;
-}
-
-.comment-list .reply,
-.comment-metadata {
-       font-size: 12px;
-       line-height: 2;
-       text-transform: uppercase;
-}
-
-.comment-list .reply {
-       margin-top: 24px;
-}
-
-.comment-author .fn {
-       font-weight: 900;
-}
-
-.comment-author a {
-       color: #2b2b2b;
-}
-
-.comment-list .trackback a,
-.comment-list .pingback a,
-.comment-metadata a {
-       color: #767676;
-}
-
-.comment-author a:hover,
-.comment-list .pingback a:hover,
-.comment-list .trackback a:hover,
-.comment-metadata a:hover {
-       color: #41a62a;
-}
-
-.comment-list article,
-.comment-list .pingback,
-.comment-list .trackback {
-       border-top: 1px solid rgba(0, 0, 0, 0.1);
-       margin-bottom: 24px;
-       padding-top: 24px;
-}
-
-.comment-list > li:first-child > article,
-.comment-list > .pingback:first-child,
-.comment-list > .trackback:first-child {
-       border-top: 0;
-}
-
-.comment-author {
-       position: relative;
-}
-
-.comment-author .avatar {
-       border: 1px solid rgba(0, 0, 0, 0.1);
-       height: 18px;
-       padding: 2px;
-       position: absolute;
-       top: 0;
-       left: 0;
-       width: 18px;
-}
-
-.bypostauthor > article .fn:before {
-       content: "\f408";
-       margin: 0 2px 0 -2px;
-       position: relative;
-       top: -1px;
-}
-
-.says {
-       display: none;
-}
-
-.comment-author,
-.comment-awaiting-moderation,
-.comment-content,
-.comment-list .reply,
-.comment-metadata {
-       padding-left: 30px;
-}
-
-.comment-edit-link {
-       margin-left: 10px;
-}
-
-.comment-edit-link:before {
-       content: "\f411";
-}
-
-.comment-reply-link:before,
-.comment-reply-login:before {
-       content: "\f412";
-       margin-right: 2px;
-}
-
-.comment-content {
-       -webkit-hyphens: auto;
-       -moz-hyphens:    auto;
-       -ms-hyphens:     auto;
-       hyphens:         auto;
-       word-wrap: break-word;
-}
-
-.comment-content ul,
-.comment-content ol {
-       margin: 0 0 24px 22px;
-}
-
-.comment-content li > ul,
-.comment-content li > ol {
-       margin-bottom: 0;
-}
-
-.comment-content > :last-child {
-       margin-bottom: 0;
-}
-
-.comment-list .children {
-       list-style: none;
-       margin-left: 15px;
-}
-
-.comment-respond {
-       margin-bottom: 24px;
-       padding: 0;
-}
-
-.comment .comment-respond {
-       margin-top: 24px;
-}
-
-.comment-respond h3 {
-       margin-top: 0;
-       margin-bottom: 24px;
-}
-
-.comment-notes,
-.comment-awaiting-moderation,
-.logged-in-as,
-.no-comments,
-.form-allowed-tags,
-.form-allowed-tags code {
-       color: #767676;
-}
-
-.comment-notes,
-.comment-awaiting-moderation,
-.logged-in-as {
-       font-size: 14px;
-       line-height: 1.7142857142;
-}
-
-.no-comments {
-       font-size: 16px;
-       font-weight: 900;
-       line-height: 1.5;
-       margin-top: 24px;
-       text-transform: uppercase;
-}
-
-.comment-form label {
-       display: block;
-}
-
-.comment-form input[type="text"],
-.comment-form input[type="email"],
-.comment-form input[type="url"] {
-       width: 100%;
-}
-
-.form-allowed-tags,
-.form-allowed-tags code {
-       font-size: 12px;
-       line-height: 1.5;
-}
-
-.required {
-       color: #c0392b;
-}
-
-.comment-reply-title small a {
-       color: #2b2b2b;
-       float: right;
-       height: 24px;
-       overflow: hidden;
-       width: 24px;
-}
-
-.comment-reply-title small a:hover {
-       color: #41a62a;
-}
-
-.comment-reply-title small a:before {
-       content: "\f405";
-       font-size: 32px;
-}
-
-.comment-navigation {
-       font-size: 12px;
-       line-height: 2;
-       margin-bottom: 48px;
-       text-transform: uppercase;
-}
-
-.comment-navigation .nav-next,
-.comment-navigation .nav-previous {
-       display: inline-block;
-}
-
-.comment-navigation .nav-previous a {
-       margin-right: 10px;
-}
-
-#comment-nav-above {
-       margin-top: 36px;
-       margin-bottom: 0;
-}
-
-
-/**
- * 7.0 Sidebars
- * -----------------------------------------------------------------------------
- */
-
-/* Secondary */
-
-#secondary {
-       background-color: #000;
-       border-top: 1px solid #000;
-       border-bottom: 1px solid rgba(255, 255, 255, 0.2);
-       clear: both;
-       color: rgba(255, 255, 255, 0.7);
-       margin-top: -1px;
-       padding: 0 10px;
-       position: relative;
-       z-index: 2;
-}
-
-.site-description {
-       display: none;
-       font-size: 12px;
-       font-weight: 400;
-       line-height: 1.5;
-}
-
-/* Primary Sidebar */
-
-.primary-sidebar {
-       padding-top: 48px;
-}
-
-.secondary-navigation + .primary-sidebar {
-       padding-top: 0;
-}
-
-/* Content Sidebar */
-
-.content-sidebar {
-       border-top: 1px solid rgba(0, 0, 0, 0.1);
-       border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       color: #767676;
-       padding: 48px 10px 0;
-}
-
-
-/**
- * 7.1 Widgets
- * -----------------------------------------------------------------------------
- */
-
-/* Primary Sidebar, Footer Sidebar */
-
-.widget {
-       font-size: 14px;
-       -webkit-hyphens: auto;
-       -moz-hyphens:    auto;
-       -ms-hyphens:     auto;
-       hyphens:         auto;
-       line-height: 1.2857142857;
-       margin-bottom: 48px;
-       width: 100%;
-       word-wrap: break-word;
-}
-
-.widget a {
-       color: #fff;
-}
-
-.widget a:hover {
-       color: #41a62a;
-}
-
-.widget h1,
-.widget h2,
-.widget h3,
-.widget h4,
-.widget h5,
-.widget h6 {
-       margin: 24px 0 12px;
-}
-
-.widget h1 {
-       font-size: 22px;
-       line-height: 1.0909090909;
-}
-
-.widget h2 {
-       font-size: 20px;
-       line-height: 1.2;
-}
-
-.widget h3 {
-       font-size: 18px;
-       line-height: 1.3333333333;
-}
-
-.widget h4 {
-       font-size: 16px;
-       line-height: 1.5;
-}
-
-.widget h5 {
-       font-size: 14px;
-       line-height: 1.7142857142;
-}
-
-.widget h6 {
-       font-size: 12px;
-       line-height: 2;
-}
-
-.widget address {
-       margin-bottom: 18px;
-}
-
-.widget abbr[title] {
-       border-color: rgba(255, 255, 255, 0.7);
-}
-
-.widget mark,
-.widget ins {
-       color: #000;
-}
-
-.widget pre,
-.widget fieldset {
-       border-color: rgba(255, 255, 255, 0.2);
-}
-
-.widget code,
-.widget kbd,
-.widget tt,
-.widget var,
-.widget samp,
-.widget pre {
-       font-size: 12px;
-       line-height: 1.5;
-}
-
-.widget blockquote {
-       color: rgba(255, 255, 255, 0.7);
-       font-size: 18px;
-       line-height: 1.5;
-       margin-bottom: 18px;
-}
-
-.widget blockquote cite {
-       color: #fff;
-       font-size: 14px;
-       line-height: 1.2857142857;
-}
-
-.widget dl,
-.widget dd {
-       margin-bottom: 18px;
-}
-
-.widget ul,
-.widget ol {
-       list-style: none;
-       margin: 0;
-}
-
-.widget li > ol,
-.widget li > ul {
-       margin-left: 10px;
-}
-
-.widget table,
-.widget th,
-.widget td {
-       border-color: rgba(255, 255, 255, 0.2);
-}
-
-.widget table {
-       margin-bottom: 18px;
-}
-
-.widget del {
-       color: rgba(255, 255, 255, 0.4);
-}
-
-.widget hr {
-       background-color: rgba(255, 255, 255, 0.2);
-}
-
-.widget p {
-       margin-bottom: 18px;
-}
-
-.widget-area .widget input,
-.widget-area .widget textarea {
-       background-color: rgba(255, 255, 255, 0.1);
-       border-color: rgba(255, 255, 255, 0.2);
-       color: #fff;
-       font-size: 16px;
-       padding: 1px 2px 2px 4px;
-}
-
-.widget-area .widget input:focus,
-.widget-area .widget textarea:focus {
-       border-color: rgba(255, 255, 255, 0.3);
-}
-
-.widget button,
-.widget .button,
-.widget input[type="button"],
-.widget input[type="reset"],
-.widget input[type="submit"] {
-       background-color: #24890d;
-       border: 0;
-       font-size: 12px;
-       padding: 5px 15px 4px;
-}
-
-.widget input[type="button"]:hover,
-.widget input[type="button"]:focus,
-.widget input[type="reset"]:hover,
-.widget input[type="reset"]:focus,
-.widget input[type="submit"]:hover,
-.widget input[type="submit"]:focus {
-       background-color: #41a62a;
-}
-
-.widget input[type="button"]:active,
-.widget input[type="reset"]:active,
-.widget input[type="submit"]:active {
-       background-color: #55d737;
-}
-
-.widget .wp-caption {
-       color: rgba(255, 255, 255, 0.7);
-       margin-bottom: 18px;
-}
-
-.widget .widget-title {
-       font-size: 14px;
-       font-weight: 700;
-       line-height: 1.7142857142;
-       margin: 0 0 24px 0;
-       text-transform: uppercase;
-}
-
-.widget-title,
-.widget-title a {
-       color: #fff;
-}
-
-.widget-title a:hover {
-       color: #41a62a;
-}
-
-/* Calendar Widget*/
-
-.widget_calendar table {
-       line-height: 2;
-       margin: 0;
-}
-
-.widget_calendar caption {
-       color: #fff;
-       font-weight: 700;
-       line-height: 1.7142857142;
-       margin-bottom: 18px;
-       text-align: left;
-       text-transform: uppercase;
-}
-
-.widget_calendar thead th {
-       background-color: rgba(255, 255, 255, 0.1);
-}
-
-.widget_calendar tbody td,
-.widget_calendar thead th {
-       text-align: center;
-}
-
-.widget_calendar tbody a {
-       background-color: #24890d;
-       color: #fff;
-       display: block;
-}
-
-.widget_calendar tbody a:hover {
-       background-color: #41a62a;
-}
-
-.widget_calendar tbody a:hover {
-       color: #fff;
-}
-
-.widget_calendar #prev {
-       padding-left: 5px;
-}
-
-.widget_calendar #next {
-       padding-right: 5px;
-       text-align: right;
-}
-
-/* Ephemera Widget*/
-
-.widget_twentyfourteen_ephemera > ol > li {
-       border-bottom: 1px solid rgba(255, 255, 255, 0.2);
-       margin-bottom: 18px;
-       padding: 0;
-}
-
-.widget_twentyfourteen_ephemera .hentry {
-       margin: 0;
-       max-width: 100%;
-}
-
-.widget_twentyfourteen_ephemera .entry-title,
-.widget_twentyfourteen_ephemera .entry-meta,
-.widget_twentyfourteen_ephemera .wp-caption-text,
-.widget_twentyfourteen_ephemera .post-format-archive-link,
-.widget_twentyfourteen_ephemera .entry-content table {
-       font-size: 12px;
-       line-height: 1.5;
-}
-
-.widget_twentyfourteen_ephemera .entry-title {
-       display: inline;
-       font-weight: 400;
-}
-
-.widget_twentyfourteen_ephemera .entry-meta {
-       margin-bottom: 18px;
-}
-
-.widget_twentyfourteen_ephemera .entry-meta a {
-       color: rgba(255, 255, 255, 0.7);
-}
-
-.widget_twentyfourteen_ephemera .entry-meta a:hover {
-       color: #41a62a;
-}
-
-.widget_twentyfourteen_ephemera .entry-content ul,
-.widget_twentyfourteen_ephemera .entry-content ol {
-       margin: 0 0 18px 20px;
-}
-
-.widget_twentyfourteen_ephemera .entry-content ul {
-       list-style: disc;
-}
-
-.widget_twentyfourteen_ephemera .entry-content ol {
-       list-style: decimal;
-}
-
-.widget_twentyfourteen_ephemera .entry-content li > ul,
-.widget_twentyfourteen_ephemera .entry-content li > ol {
-       margin: 0 0 0 20px;
-}
-
-.widget_twentyfourteen_ephemera .entry-content th,
-.widget_twentyfourteen_ephemera .entry-content td {
-       padding: 6px;
-}
-
-.widget_twentyfourteen_ephemera .post-format-archive-link {
-       font-weight: 700;
-       text-transform: uppercase;
-}
-
-/* List Style Widgets*/
-
-.widget_archive li,
-.widget_categories li,
-.widget_links li,
-.widget_meta li,
-.widget_nav_menu li,
-.widget_pages li,
-.widget_recent_comments li,
-.widget_recent_entries li {
-       border-top: 1px solid rgba(255, 255, 255, 0.2);
-       padding: 8px 0 9px;
-}
-
-.widget_archive li:first-child,
-.widget_categories li:first-child,
-.widget_links li:first-child,
-.widget_meta li:first-child,
-.widget_nav_menu li:first-child,
-.widget_pages li:first-child,
-.widget_recent_comments li:first-child,
-.widget_recent_entries li:first-child {
-       border-top: 0;
-}
-
-.widget_categories li ul,
-.widget_nav_menu li ul,
-.widget_pages li ul {
-       border-top: 1px solid rgba(255, 255, 255, 0.2);
-       margin-top: 9px;
-}
-
-.widget_categories li li:last-child,
-.widget_nav_menu li li:last-child,
-.widget_pages li li:last-child {
-       padding-bottom: 0;
-}
-
-/* Recent Posts Widget */
-
-.widget_recent_entries .post-date {
-       display: block;
-}
-
-/* RSS Widget */
-
-.rsswidget img {
-       margin-top: -4px;
-}
-
-.rssSummary {
-       margin: 9px 0;
-}
-
-.rss-date {
-       display: block;
-}
-
-.widget_rss li {
-       margin-bottom: 18px;
-}
-
-.widget_rss li:last-child {
-       margin-bottom: 0;
-}
-
-/* Text Widget */
-
-.widget_text > div > :last-child {
-       margin-bottom: 0;
-}
-
-
-/**
- * 7.2 Content Sidebar Widgets
- * -----------------------------------------------------------------------------
- */
-
-.content-sidebar .widget a {
-       color: #24890d;
-}
-
-.content-sidebar .widget a:hover {
-       color: #41a62a;
-}
-
-.content-sidebar .widget pre {
-       border-color: rgba(0, 0, 0, 0.1);
-}
-
-.content-sidebar .widget mark,
-.content-sidebar .widget ins {
-       color: #2b2b2b;
-}
-
-.content-sidebar .widget abbr[title] {
-       border-color: #2b2b2b;
-}
-
-.content-sidebar .widget fieldset {
-       border-color: rgba(0, 0, 0, 0.1);
-}
-
-.content-sidebar .widget blockquote {
-       color: #767676;
-}
-
-.content-sidebar .widget blockquote cite {
-       color: #2b2b2b;
-}
-
-.content-sidebar .widget li > ol,
-.content-sidebar .widget li > ul {
-       margin-left: 18px;
-}
-
-.content-sidebar .widget table,
-.content-sidebar .widget th,
-.content-sidebar .widget td {
-       border-color: rgba(0, 0, 0, 0.1);
-}
-
-.content-sidebar .widget del {
-       color: #767676;
-}
-
-.content-sidebar .widget hr {
-       background-color: rgba(0, 0, 0, 0.1);
-}
-
-.content-sidebar .widget input,
-.content-sidebar .widget textarea {
-       background-color: #fff;
-       border-color: rgba(0, 0, 0, 0.1);
-       color: #2b2b2b;
-}
-
-.content-sidebar .widget input:focus,
-.content-sidebar .widget textarea:focus {
-       border-color: rgba(0, 0, 0, 0.3);
-}
-
-.content-sidebar .widget input[type="button"],
-.content-sidebar .widget input[type="reset"],
-.content-sidebar .widget input[type="submit"] {
-       background-color: #24890d;
-       border: 0;
-       color: #fff;
-}
-
-.content-sidebar .widget input[type="button"]:hover,
-.content-sidebar .widget input[type="button"]:focus,
-.content-sidebar .widget input[type="reset"]:hover,
-.content-sidebar .widget input[type="reset"]:focus,
-.content-sidebar .widget input[type="submit"]:hover,
-.content-sidebar .widget input[type="submit"]:focus {
-       background-color: #41a62a;
-}
-
-.content-sidebar .widget input[type="button"]:active,
-.content-sidebar .widget input[type="reset"]:active,
-.content-sidebar .widget input[type="submit"]:active {
-       background-color: #55d737;
-}
-
-.content-sidebar .widget .wp-caption {
-       color: #767676;
-}
-
-.content-sidebar .widget .widget-title {
-       border-top: 5px solid #000;
-       color: #2b2b2b;
-       font-size: 14px;
-       font-weight: 900;
-       margin: 0 0 18px;
-       padding-top: 7px;
-       text-transform: uppercase;
-}
-
-.content-sidebar .widget .widget-title a {
-       color: #2b2b2b;
-}
-
-.content-sidebar .widget .widget-title a:hover {
-       color: #41a62a;
-}
-
-/* List Style Widgets*/
-
-.content-sidebar .widget_archive li,
-.content-sidebar .widget_categories li,
-.content-sidebar .widget_links li,
-.content-sidebar .widget_meta li,
-.content-sidebar .widget_nav_menu li,
-.content-sidebar .widget_pages li,
-.content-sidebar .widget_recent_comments li,
-.content-sidebar .widget_recent_entries li,
-.content-sidebar .widget_categories li ul,
-.content-sidebar .widget_nav_menu li ul,
-.content-sidebar .widget_pages li ul {
-       border-color: rgba(0, 0, 0, 0.1);
-}
-
-/* Calendar Widget */
-
-.content-sidebar .widget_calendar caption {
-       color: #2b2b2b;
-       font-weight: 900;
-}
-
-.content-sidebar .widget_calendar thead th {
-       background-color: rgba(0, 0, 0, 0.02);
-}
-
-.content-sidebar .widget_calendar tbody a,
-.content-sidebar .widget_calendar tbody a:hover {
-       color: #fff;
-}
-
-/* Ephemera widget*/
-
-.content-sidebar .widget_twentyfourteen_ephemera .widget-title {
-       line-height: 1.2857142857;
-       padding-top: 1px;
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .widget-title:before {
-       background-color: #000;
-       color: #fff;
-       margin: -1px 9px 0 0;
-       padding: 6px 0 9px;
-       text-align: center;
-       vertical-align: middle;
-       width: 36px;
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .video.widget-title:before {
-       content: "\f104";
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .audio.widget-title:before {
-       content: "\f109";
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .image.widget-title:before {
-       content: "\f473";
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .gallery.widget-title:before {
-       content: "\f103";
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .aside.widget-title:before {
-       content: "\f101";
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .quote.widget-title:before {
-       content: "\f106";
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .link.widget-title:before {
-       content: "\f107";
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera > ol > li {
-       border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .entry-meta {
-       color: #ccc;
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .entry-meta a {
-       color: #767676;
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .entry-meta a:hover {
-       color: #41a62a;
-}
-
-.content-sidebar.widget_twentyfourteen_ephemera blockquote cite {
-       font-size: 13px;
-       line-height: 1.3846153846;
-}
-
-.content-sidebar .widget_twentyfourteen_ephemera .post-format-archive-link {
-       font-weight: 900;
-}
-
-
-/**
- * 8.0 Footer
- * -----------------------------------------------------------------------------
- */
-
-#supplementary {
-       padding: 0 10px;
-}
-
-.site-footer,
-.site-info,
-.site-info a {
-       color: rgba(255, 255, 255, 0.7);
-}
-
-.site-footer {
-       background-color: #000;
-       font-size: 12px;
-       position: relative;
-       z-index: 3;
-}
-
-.footer-sidebar {
-       padding-top: 48px;
-}
-
-.site-info {
-       padding: 15px 10px;
-}
-
-#supplementary + .site-info {
-       border-top: 1px solid rgba(255, 255, 255, 0.2);
-}
-
-.site-info a:hover {
-       color: #41a62a;
-}
-
-
-/**
- * 9.0 Featured Content
- * -----------------------------------------------------------------------------
- */
-
-.featured-content {
-       background: #000 url(images/pattern-dark.svg) repeat fixed;
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       position: relative;
-       width: 100%;
-}
-
-.featured-content-inner {
-       overflow: hidden;
-}
-
-.featured-content .hentry {
-       color: #fff;
-       margin: 0;
-       max-width: 100%;
-       width: 100%;
-}
-
-.featured-content .post-thumbnail,
-.featured-content .post-thumbnail:hover {
-       background: transparent;
-}
-
-.featured-content .post-thumbnail {
-       display: block;
-       position: relative;
-       padding-top: 55.357142857%;
-       overflow: hidden;
-}
-
-.featured-content .post-thumbnail img {
-       left: 0;
-       position: absolute;
-       top: 0;
-}
-
-.featured-content .entry-header {
-       background-color: #000;
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       min-height: 96px;
-       overflow: hidden;
-       padding: 24px 10px;
-}
-
-.featured-content a {
-       color: #fff;
-}
-
-.featured-content a:hover {
-       color: #41a62a;
-}
-
-.featured-content .entry-meta {
-       color: #fff;
-       font-size: 11px;
-       font-weight: 700;
-       line-height: 1.0909090909;
-       margin-bottom: 12px;
-}
-
-.featured-content .cat-links {
-       font-weight: 700;
-}
-
-.featured-content .entry-title {
-       font-size: 18px;
-       font-weight: 300;
-       line-height: 1.3333333333;
-       margin: 0;
-       text-transform: uppercase;
-}
-
-
-/* Slider */
-
-.slider .featured-content .hentry {
-       -webkit-backface-visibility: hidden;
-       display: none;
-       position: relative;
-}
-
-.slider .featured-content .post-thumbnail {
-       padding-top: 55.49132947%;
-}
-
-.slider-control-paging {
-       background-color: #000;
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       float: left;
-       list-style: none;
-       margin: -24px 0 0 0;
-       position: relative;
-       width: 100%;
-       z-index: 3;
-}
-
-.slider-control-paging li {
-       float: left;
-       margin: 2px 4px 2px 0;
-}
-
-.slider-control-paging li:last-child {
-       margin-right: 0;
-}
-
-.slider-control-paging a {
-       cursor: pointer;
-       display: block;
-       height: 44px;
-       position: relative;
-       text-indent: -999em;
-       width: 44px;
-}
-
-.slider-control-paging a:before {
-       background-color: #4d4d4d;
-       content: "";
-       height: 12px;
-       left: 10px;
-       position: absolute;
-       top: 16px;
-       width: 12px;
-}
-
-.slider-control-paging a:hover:before {
-       background-color: #41a62a;
-}
-
-.slider-control-paging .slider-active:before,
-.slider-control-paging .slider-active:hover:before {
-       background-color: #24890d;
-}
-
-.slider-direction-nav {
-       clear: both;
-       list-style: none;
-       margin: 0;
-       position: relative;
-       width: 100%;
-       z-index: 3;
-}
-
-.slider-direction-nav li {
-       border-color: #fff;
-       border-style: solid;
-       border-width: 2px 1px 0 0;
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing:    border-box;
-       box-sizing:         border-box;
-       float: left;
-       text-align: center;
-       width: 50%;
-}
-
-.slider-direction-nav li:last-child {
-       border-width: 2px 0 0 1px;
-}
-
-.slider-direction-nav a {
-       background-color: #000;
-       display: block;
-       font-size: 0;
-       height: 46px;
-}
-
-.slider-direction-nav a:hover {
-       background-color: #24890d;
-}
-
-.slider-direction-nav a:before {
-       color: #fff;
-       content: "\f430";
-       font-size: 32px;
-       line-height: 46px;
-}
-
-.slider-direction-nav .slider-next:before {
-       content: "\f429";
-}
-
-.slider-direction-nav .slider-disabled {
-       display: none;
-}
-
-
-/**
- * 10.0 Multisite
- * -----------------------------------------------------------------------------
- */
-
-.site-main .widecolumn {
-       padding-top: 72px;
-       width: auto;
-}
-.site-main .mu_register,
-.widecolumn > h2,
-.widecolumn > form {
-       margin: 0 auto 48px;
-       max-width: 474px;
-       padding: 0 30px;
-}
-
-.site-main .mu_register #blog_title,
-.site-main .mu_register #user_email,
-.site-main .mu_register #blogname,
-.site-main .mu_register #user_name {
-       font-size: inherit;
-       width: 90%;
-}
-
-.site-main .mu_register input[type="submit"],
-.widecolumn #submit {
-       font-size: inherit;
-       width: auto;
-}
-
-
-/**
- * 11.0 Media Queries
- * -----------------------------------------------------------------------------
- */
-
-/* Does the same thing as <meta name="viewport" content="width=device-width">,
- * but in the future W3C standard way. -ms- prefix is required for IE10+ to
- * render responsive styling in Windows 8 "snapped" views; IE10+ does not honor
- * the meta tag. See https://core.trac.wordpress.org/ticket/25888.
- */
-@-ms-viewport {
-       width: device-width;
-}
-
-@viewport {
-       width: device-width;
-}
-
-@media screen and (max-width: 400px) {
-       .list-view .site-content .post-thumbnail {
-               background: none;
-               width: auto;
-               z-index: 2;
-       }
-
-       .list-view .site-content .post-thumbnail img {
-               float: left;
-               margin: 0 10px 3px 0;
-               width: 84px;
-       }
-
-       .list-view .site-content .entry-header {
-               background-color: transparent;
-               padding: 0;
-       }
-
-       .list-view .content-area {
-               padding: 0 10px;
-       }
-
-       .list-view .site-content .hentry {
-               border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-               margin: 0;
-               min-height: 60px;
-               padding: 12px 0 9px;
-       }
-
-       .list-view .site-content .cat-links,
-       .list-view .site-content .type-post .entry-content,
-       .list-view .site-content .type-page .entry-content,
-       .list-view .site-content .type-post .entry-summary,
-       .list-view .site-content .type-page .entry-summary,
-       .list-view .site-content footer.entry-meta {
-               display: none;
-       }
-
-       .list-view .site-content .entry-title {
-               clear: none;
-               font-size: 15px;
-               font-weight: 900;
-               line-height: 1.2;
-               margin-bottom: 6px;
-               text-transform: none;
-       }
-
-       .list-view .site-content .format-aside .entry-title,
-       .list-view .site-content .format-link .entry-title,
-       .list-view .site-content .format-quote .entry-title {
-               display: block;
-       }
-
-       .list-view .site-content .entry-meta {
-               background-color: transparent;
-               clear: none;
-               margin: 0;
-               text-transform: none;
-       }
-
-       .archive-header,
-       .page-header {
-               border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-               margin: 24px auto 0;
-               padding-bottom: 24px;
-       }
-
-       .error404 .page-header {
-               border-bottom: 0;
-               margin: 0 auto 24px;
-               padding: 0 10px;
-       }
-}
-
-@media screen and (min-width: 401px) {
-       a.post-thumbnail:hover img {
-               opacity: 0.85;
-       }
-
-       .full-size-link:before,
-       .parent-post-link:before,
-       .site-content span + .byline:before,
-       .site-content span + .comments-link:before,
-       .site-content span + .edit-link:before,
-       .site-content span + .entry-date:before {
-               content: "";
-       }
-
-       .attachment span.entry-date:before,
-       .entry-content .edit-link a:before,
-       .entry-meta .edit-link a:before,
-       .site-content .byline a:before,
-       .site-content .comments-link a:before,
-       .site-content .entry-date a:before,
-       .site-content .featured-post:before,
-       .site-content .full-size-link a:before,
-       .site-content .parent-post-link a:before,
-       .site-content .post-format a:before {
-               -webkit-font-smoothing: antialiased;
-               display: inline-block;
-               font: normal 16px/1 Genericons;
-               text-decoration: inherit;
-               vertical-align: text-bottom;
-       }
-
-       .site-content .entry-meta > span {
-               margin-right: 10px;
-       }
-
-       .site-content .format-video .post-format a:before {
-               content: "\f104";
-       }
-
-       .site-content .format-audio .post-format a:before {
-               content: "\f109";
-       }
-
-       .site-content .format-image .post-format a:before {
-               content: "\f473";
-       }
-
-       .site-content .format-quote .post-format a:before {
-               content: "\f106";
-               margin-right: 2px;
-       }
-
-       .site-content .format-gallery .post-format a:before {
-               content: "\f103";
-               margin-right: 4px;
-       }
-
-       .site-content .format-aside .post-format a:before {
-               content: "\f101";
-               margin-right: 2px;
-       }
-
-       .site-content .format-link .post-format a:before {
-               content: "\f107";
-               position: relative;
-               top: 1px;
-       }
-
-       .site-content .featured-post:before {
-               content: "\f308";
-               margin-right: 3px;
-               position: relative;
-               top: 1px;
-       }
-
-       .site-content .entry-date a:before,
-       .attachment .site-content span.entry-date:before {
-               content: "\f303";
-               margin-right: 1px;
-               position: relative;
-               top: 1px;
-       }
-
-       .site-content .byline a:before {
-               content: "\f304";
-       }
-
-       .site-content .comments-link a:before {
-               content: "\f300";
-               margin-right: 2px;
-       }
-
-       .entry-content .edit-link a:before,
-       .entry-meta .edit-link a:before {
-               content: "\f411";
-       }
-
-       .site-content .full-size-link a:before {
-               content: "\f402";
-               margin-right: 1px;
-       }
-
-       .site-content .parent-post-link a:before {
-               content: "\f301";
-       }
-
-       .list-view .site-content .hentry {
-               border-top: 1px solid rgba(0, 0, 0, 0.1);
-               padding-top: 48px;
-       }
-
-       .list-view .site-content .hentry:first-of-type,
-       .list-view .site-content .hentry.has-post-thumbnail {
-               border-top: 0;
-               padding-top: 0;
-       }
-
-       .archive-header,
-       .page-header {
-               margin: 0 auto 60px;
-               padding: 0 10px;
-       }
-
-       .error404 .page-header {
-               margin-bottom: 24px;
-       }
-}
-
-@media screen and (min-width: 594px) {
-       .site-content .entry-header {
-               padding-right: 30px;
-               padding-left: 30px;
-       }
-
-       .site-content .has-post-thumbnail .entry-header {
-               margin-top: -48px;
-       }
-}
-
-@media screen and (min-width: 673px) {
-       .header-main {
-               padding: 0 30px;
-       }
-
-       .search-toggle {
-               margin-right: 18px;
-       }
-
-       .search-box .search-field {
-               width: 50%;
-       }
-
-       .content-area {
-               float: left;
-               width: 100%;
-       }
-
-       .site-content {
-               margin-right: 33.33333333%;
-       }
-
-       .site-content .has-post-thumbnail .entry-header {
-               margin-top: 0;
-       }
-
-       .archive-header,
-       .comments-area,
-       .image-navigation,
-       .page-header,
-       .page-content,
-       .post-navigation,
-       .site-content .entry-content,
-       .site-content .entry-summary,
-       .site-content footer.entry-meta {
-               padding-right: 30px;
-               padding-left: 30px;
-       }
-
-       .singular .site-content .hentry.has-post-thumbnail {
-               margin-top: 0;
-       }
-
-       .full-width .site-content {
-               margin-right: 0;
-       }
-
-       .full-width .site-content .has-post-thumbnail .entry-header,
-       .full-width .site-content .hentry.has-post-thumbnail:first-child {
-               margin-top: -48px;
-       }
-
-       #secondary,
-       #supplementary {
-               padding: 0 30px;
-       }
-
-       .content-sidebar {
-               border: 0;
-               float: right;
-               margin-left: -33.33333333%;
-               padding: 48px 30px 24px;
-               position: relative;
-               width: 33.33333333%;
-       }
-
-       .grid .featured-content .hentry {
-               float: left;
-               width: 50%;
-       }
-
-       .grid .featured-content .hentry:nth-child( 2n+1 ) {
-               clear: both;
-       }
-
-       .grid .featured-content .entry-header {
-               border-color: #000;
-               border-style: solid;
-               border-width: 12px 10px;
-               height: 96px;
-               padding: 0;
-       }
-
-       .slider .featured-content .entry-title {
-               font-size: 22px;
-               line-height: 1.0909090909;
-       }
-
-       .slider .featured-content .entry-header {
-               min-height: inherit;
-               padding: 24px 30px 48px;
-               position: absolute;
-               left: 0;
-               bottom: 0;
-               width: 50%;
-               z-index: 3;
-       }
-
-       .slider-control-paging {
-               background: transparent;
-               margin-top: -48px;
-               padding-left: 20px;
-               width: 50%;
-       }
-
-       .slider-direction-nav {
-               clear: none;
-               float: right;
-               margin-top: -48px;
-               width: 98px;
-       }
-
-       .slider-direction-nav li {
-               border: 0;
-               padding: 0 1px 0 0;
-       }
-
-       .slider-direction-nav li:last-child {
-               padding: 0 0 0 1px;
-       }
-
-       .slider-direction-nav a {
-               height: 48px;
-       }
-
-       .slider-direction-nav a:before {
-               line-height: 48px;
-       }
-
-       .site-info {
-               padding: 15px 30px;
-       }
-}
-
-@media screen and (min-width: 783px) {
-       .site-title {
-               /* Search-toggle width = 48px */
-               max-width: -webkit-calc(100% - 48px);
-               max-width:         calc(100% - 48px);
-       }
-
-       .header-main {
-               padding-right: 0;
-       }
-
-       .search-toggle {
-               margin-right: 0;
-       }
-
-       /* Fixed Header */
-
-       .masthead-fixed .site-header {
-               position: fixed;
-               top: 0;
-       }
-
-       .admin-bar.masthead-fixed .site-header {
-               top: 32px;
-       }
-
-       .masthead-fixed .site-main {
-               margin-top: 48px;
-       }
-
-       /* Navigation */
-
-       .site-navigation li .current_page_item > a,
-       .site-navigation li .current_page_ancestor > a,
-       .site-navigation li .current-menu-item > a,
-       .site-navigation li .current-menu-ancestor > a {
-               color: #fff;
-       }
-
-       /* Primary Navigation */
-
-       .primary-navigation {
-               float: right;
-               font-size: 11px;
-               margin: 0 1px 0 -12px;
-               padding: 0;
-               text-transform: uppercase;
-       }
-
-       .primary-navigation .menu-toggle {
-               display: none;
-               padding: 0;
-       }
-
-       .primary-navigation .nav-menu {
-               border-bottom: 0;
-               display: block;
-       }
-
-       .primary-navigation.toggled-on {
-               border-bottom: 0;
-               margin: 0;
-               padding: 0;
-       }
-
-       .primary-navigation li {
-               border: 0;
-               display: inline-block;
-               height: 48px;
-               line-height: 48px;
-               position: relative;
-       }
-
-       .primary-navigation a {
-               display: inline-block;
-               padding: 0 12px;
-               white-space: nowrap;
-       }
-
-       .primary-navigation ul ul {
-               background-color: #24890d;
-               float: left;
-               margin: 0;
-               position: absolute;
-               top: 48px;
-               left: -999em;
-               z-index: 99999;
-       }
-
-       .primary-navigation li li {
-               border: 0;
-               display: block;
-               height: auto;
-               line-height: 1.0909090909;
-       }
-
-       .primary-navigation ul ul ul {
-               left: -999em;
-               top: 0;
-       }
-
-       .primary-navigation ul ul a {
-               padding: 18px 12px;
-               white-space: normal;
-               width: 176px;
-       }
-
-       .primary-navigation li:hover > a,
-       .primary-navigation li.focus > a {
-               background-color: #24890d;
-               color: #fff;
-       }
-
-       .primary-navigation ul ul a:hover,
-       .primary-navigation ul ul li.focus > a {
-               background-color: #41a62a;
-       }
-
-       .primary-navigation ul li:hover > ul,
-       .primary-navigation ul li.focus > ul {
-               left: auto;
-       }
-
-       .primary-navigation ul ul li:hover > ul,
-       .primary-navigation ul ul li.focus > ul {
-               left: 100%;
-       }
-
-       .primary-navigation .menu-item-has-children > a,
-       .primary-navigation .page_item_has_children > a {
-               padding-right: 26px;
-       }
-
-       .primary-navigation .menu-item-has-children > a:after,
-       .primary-navigation .page_item_has_children > a:after {
-               -webkit-font-smoothing: antialiased;
-               content: "\f502";
-               display: inline-block;
-               font: normal 8px/1 Genericons;
-               position: absolute;
-               right: 12px;
-               top: 22px;
-               vertical-align: text-bottom;
-       }
-
-       .primary-navigation li .menu-item-has-children > a,
-       .primary-navigation li .page_item_has_children > a {
-               padding-right: 20px;
-               width: 168px;
-       }
-
-       .primary-navigation .menu-item-has-children li.menu-item-has-children > a:after,
-       .primary-navigation .menu-item-has-children li.page_item_has_children > a:after,
-       .primary-navigation .page_item_has_children li.menu-item-has-children > a:after,
-       .primary-navigation .page_item_has_children li.page_item_has_children > a:after {
-               content: "\f501";
-               right: 8px;
-               top: 20px;
-       }
-}
-
-@media screen and (min-width: 810px) {
-       .attachment .entry-attachment .attachment {
-               margin-right: -168px;
-               margin-left: -168px;
-               max-width: 810px;
-       }
-
-       .attachment .site-content .attachment img {
-               display: block;
-               margin: 0 auto;
-       }
-
-       .contributor-avatar {
-               margin-left: -168px;
-       }
-
-       .contributor-summary {
-               float: left;
-       }
-
-       .full-width .site-content blockquote.alignleft,
-       .full-width .site-content blockquote.alignright {
-               width: -webkit-calc(50% + 130px);
-               width:         calc(50% + 130px);
-       }
-
-       .full-width .site-content blockquote.alignleft,
-       .full-width .site-content img.size-full.alignleft,
-       .full-width .site-content img.size-large.alignleft,
-       .full-width .site-content img.size-medium.alignleft,
-       .full-width .site-content .wp-caption.alignleft {
-               margin-left: -168px;
-       }
-
-       .full-width .site-content .alignleft {
-               clear: left;
-       }
-
-       .full-width .site-content blockquote.alignright,
-       .full-width .site-content img.size-full.alignright,
-       .full-width .site-content img.size-large.alignright,
-       .full-width .site-content img.size-medium.alignright,
-       .full-width .site-content .wp-caption.alignright {
-               margin-right: -168px;
-       }
-
-       .full-width .site-content .alignright {
-               clear: right;
-       }
-}
-
-@media screen and (min-width: 846px) {
-       .content-area,
-       .content-sidebar {
-               padding-top: 72px;
-       }
-
-       .site-content .has-post-thumbnail .entry-header {
-               margin-top: -48px;
-       }
-
-       .comment-list .trackback,
-       .comment-list .pingback,
-       .comment-list article {
-               margin-bottom: 36px;
-               padding-top: 36px;
-       }
-
-       .comment-author .avatar {
-               height: 34px;
-               top: 2px;
-               width: 34px;
-       }
-
-       .comment-author,
-       .comment-awaiting-moderation,
-       .comment-content,
-       .comment-list .reply,
-       .comment-metadata {
-               padding-left: 50px;
-       }
-
-       .comment-list .children {
-               margin-left: 20px;
-       }
-
-       .full-width .site-content .hentry.has-post-thumbnail:first-child {
-               margin-top: -72px;
-       }
-
-       .featured-content {
-               margin-bottom: 0;
-       }
-}
-
-@media screen and (min-width: 1008px) {
-       .search-box-wrapper {
-               padding-left: 182px;
-       }
-
-       .main-content {
-               float: left;
-       }
-
-       .site-content {
-               margin-right: 29.04761904%;
-               margin-left: 182px;
-       }
-
-       .site-content .entry-header {
-               margin-top: 0;
-       }
-
-       .site-content .has-post-thumbnail .entry-header {
-               margin-top: 0;
-       }
-
-       .content-sidebar {
-               margin-left: -29.04761904%;
-               width: 29.04761904%;
-       }
-
-       .site:before {
-               background-color: #000;
-               content: "";
-               display: block;
-               height: 100%;
-               min-height: 100%;
-               position: absolute;
-               top: 0;
-               left: 0;
-               width: 182px;
-               z-index: 2;
-       }
-
-       #secondary {
-               background-color: transparent;
-               border: 0;
-               clear: none;
-               float: left;
-               margin: 0 0 0 -100%;
-               min-height: 100vh;
-               width: 122px;
-       }
-
-       .primary-sidebar {
-               padding-top: 0;
-       }
-
-       .site-description {
-               display: block;
-               margin: 0 0 18px;
-       }
-
-       .site-description:empty {
-               margin: 0;
-       }
-
-       .secondary-navigation {
-               font-size: 11px;
-               margin: 0 -30px 48px;
-               width: 182px;
-       }
-
-       .secondary-navigation li {
-               border-top: 1px solid rgba(255, 255, 255, 0.2);
-               position: relative;
-       }
-
-       .secondary-navigation a {
-               padding: 10px 30px;
-       }
-
-       .secondary-navigation ul ul {
-               background-color: #24890d;
-               position: absolute;
-               top: 0;
-               left: -999em;
-               width: 182px;
-               z-index: 99999;
-       }
-
-       .secondary-navigation li li {
-               border-top: 0;
-       }
-
-       .secondary-navigation li:hover > a,
-       .secondary-navigation li.focus > a {
-               background-color: #24890d;
-               color: #fff;
-       }
-
-       .secondary-navigation ul ul a:hover,
-       .secondary-navigation ul ul li.focus > a {
-               background-color: #41a62a;
-       }
-
-       .secondary-navigation ul li:hover > ul,
-       .secondary-navigation ul li.focus > ul {
-               left: 162px;
-       }
-
-       .secondary-navigation .menu-item-has-children > a {
-               padding-right: 38px;
-       }
-
-       .secondary-navigation .menu-item-has-children > a:after {
-               -webkit-font-smoothing: antialiased;
-               content: "\f501";
-               display: inline-block;
-               font: normal 8px/1 Genericons;
-               position: absolute;
-               right: 26px;
-               top: 14px;
-               vertical-align: text-bottom;
-       }
-
-       .footer-sidebar .widget,
-       .primary-sidebar .widget {
-               font-size: 12px;
-               line-height: 1.5;
-       }
-
-       .footer-sidebar .widget {
-               -webkit-box-sizing: border-box;
-               -moz-box-sizing:    border-box;
-               box-sizing:         border-box;
-               float: left;
-               padding: 0 30px;
-               width: 25%;
-       }
-
-       .footer-sidebar .widget h1,
-       .primary-sidebar .widget h1 {
-               font-size: 20px;
-               line-height: 1.2;
-       }
-
-       .footer-sidebar .widget h2,
-       .primary-sidebar .widget h2 {
-               font-size: 18px;
-               line-height: 1.3333333333;
-       }
-
-       .footer-sidebar .widget h3,
-       .primary-sidebar .widget h3 {
-               font-size: 16px;
-               line-height: 1.5;
-       }
-
-       .footer-sidebar .widget h4,
-       .primary-sidebar .widget h4 {
-               font-size: 14px;
-               line-height: 1.7142857142;
-       }
-
-       .footer-sidebar .widget h5,
-       .primary-sidebar .widget h5 {
-               font-size: 12px;
-               line-height: 2;
-       }
-
-       .footer-sidebar .widget h6,
-       .primary-sidebar .widget h6 {
-               font-size: 11px;
-               line-height: 2.1818181818;
-       }
-
-       .footer-sidebar .widget code,
-       .footer-sidebar .widget kbd,
-       .footer-sidebar .widget tt,
-       .footer-sidebar .widget var,
-       .footer-sidebar .widget samp,
-       .footer-sidebar .widget pre,
-       .primary-sidebar .widget code,
-       .primary-sidebar .widget kbd,
-       .primary-sidebar .widget tt,
-       .primary-sidebar .widget var,
-       .primary-sidebar .widget samp,
-       .primary-sidebar .widget pre {
-               font-size: 11px;
-               line-height: 1.6363636363;
-       }
-
-       .footer-sidebar .widget blockquote,
-       .primary-sidebar .widget blockquote {
-               font-size: 14px;
-               line-height: 1.2857142857;
-       }
-
-       .footer-sidebar .widget blockquote cite,
-       .primary-sidebar .widget blockquote cite {
-               font-size: 12px;
-               line-height: 1.5;
-       }
-
-       .footer-sidebar .widget input,
-       .footer-sidebar .widget textarea,
-       .primary-sidebar .widget input,
-       .primary-sidebar .widget textarea {
-               font-size: 12px;
-               padding: 3px 2px 4px 4px;
-       }
-
-       .footer-sidebar .widget input[type="button"],
-       .footer-sidebar .widget input[type="reset"],
-       .footer-sidebar .widget input[type="submit"],
-       .primary-sidebar .widget input[type="button"],
-       .primary-sidebar .widget input[type="reset"],
-       .primary-sidebar .widget input[type="submit"] {
-               padding: 5px 15px 4px;
-       }
-
-       .footer-sidebar .widget .widget-title,
-       .primary-sidebar .widget .widget-title {
-               font-size: 11px;
-               font-weight: 900;
-               line-height: 1.6363636363;
-               margin-bottom: 18px;
-       }
-
-       .footer-sidebar .widget_twentyfourteen_ephemera .entry-title,
-       .footer-sidebar .widget_twentyfourteen_ephemera .entry-meta,
-       .footer-sidebar .widget_twentyfourteen_ephemera .wp-caption-text,
-       .footer-sidebar .widget_twentyfourteen_ephemera .post-format-archive-link,
-       .footer-sidebar .widget_twentyfourteen_ephemera .entry-content table,
-       .primary-sidebar .widget_twentyfourteen_ephemera .entry-title,
-       .primary-sidebar .widget_twentyfourteen_ephemera .entry-meta,
-       .primary-sidebar .widget_twentyfourteen_ephemera .wp-caption-text,
-       .primary-sidebar .widget_twentyfourteen_ephemera .post-format-archive-link,
-       .primary-sidebar .widget_twentyfourteen_ephemera .entry-content table {
-               font-size: 11px;
-               line-height: 1.6363636363;
-       }
-
-       .footer-sidebar .widget_archive li,
-       .footer-sidebar .widget_categories li,
-       .footer-sidebar .widget_links li,
-       .footer-sidebar .widget_meta li,
-       .footer-sidebar .widget_nav_menu li,
-       .footer-sidebar .widget_pages li,
-       .footer-sidebar .widget_recent_comments li,
-       .footer-sidebar .widget_recent_entries li,
-       .primary-sidebar .widget_archive li,
-       .primary-sidebar .widget_categories li,
-       .primary-sidebar .widget_links li,
-       .primary-sidebar .widget_meta li,
-       .primary-sidebar .widget_nav_menu li,
-       .primary-sidebar .widget_pages li,
-       .primary-sidebar .widget_recent_comments li,
-       .primary-sidebar .widget_recent_entries li {
-               border-top: 0;
-               padding: 0 0 6px;
-       }
-
-       .footer-sidebar .widget_archive li:last-child,
-       .footer-sidebar .widget_categories li:last-child,
-       .footer-sidebar .widget_links li:last-child,
-       .footer-sidebar .widget_meta li:last-child,
-       .footer-sidebar .widget_nav_menu li:last-child,
-       .footer-sidebar .widget_pages li:last-child,
-       .footer-sidebar .widget_recent_comments li:last-child,
-       .footer-sidebar .widget_recent_entries li:last-child,
-       .primary-sidebar .widget_archive li:last-child,
-       .primary-sidebar .widget_categories li:last-child,
-       .primary-sidebar .widget_links li:last-child,
-       .primary-sidebar .widget_meta li:last-child,
-       .primary-sidebar .widget_nav_menu li:last-child,
-       .primary-sidebar .widget_pages li:last-child,
-       .primary-sidebar .widget_recent_comments li:last-child,
-       .primary-sidebar .widget_recent_entries li:last-child {
-               padding: 0;
-       }
-
-       .footer-sidebar .widget_categories li ul,
-       .footer-sidebar .widget_nav_menu li ul,
-       .footer-sidebar .widget_pages li ul,
-       .primary-sidebar .widget_categories li ul,
-       .primary-sidebar .widget_nav_menu li ul,
-       .primary-sidebar .widget_pages li ul {
-               border-top: 0;
-               margin-top: 6px;
-       }
-
-       #supplementary {
-               padding: 0;
-       }
-
-       .footer-sidebar {
-               font-size: 12px;
-               line-height: 1.5;
-       }
-
-       .featured-content {
-               padding-left: 182px;
-       }
-
-       .grid .featured-content .hentry {
-               width: 33.3333333%;
-       }
-
-       .grid .featured-content .hentry:nth-child( 2n+1 ) {
-               clear: none;
-       }
-
-       .grid .featured-content .hentry:nth-child( 3n+1 ) {
-               clear: both;
-       }
-
-       .grid .featured-content .entry-header {
-               height: 120px;
-       }
-}
-
-@media screen and (min-width: 1040px) {
-       .site-content .has-post-thumbnail .entry-header {
-               margin-top: -48px;
-       }
-
-       .archive-header,
-       .comments-area,
-       .image-navigation,
-       .page-header,
-       .page-content,
-       .post-navigation,
-       .site-content .entry-header,
-       .site-content .entry-content,
-       .site-content .entry-summary,
-       .site-content footer.entry-meta {
-               padding-right: 15px;
-               padding-left: 15px;
-       }
-
-       .full-width .archive-header,
-       .full-width .comments-area,
-       .full-width .image-navigation,
-       .full-width .page-header,
-       .full-width .page-content,
-       .full-width .post-navigation,
-       .full-width .site-content .entry-header,
-       .full-width .site-content .entry-content,
-       .full-width .site-content .entry-summary,
-       .full-width .site-content footer.entry-meta {
-               padding-right: 30px;
-               padding-left: 30px;
-       }
-}
-
-@media screen and (min-width: 1080px) {
-       .search-box .search-field {
-               width: 324px;
-       }
-
-       .site-content,
-       .site-main .widecolumn {
-               margin-left: 222px;
-       }
-
-       .site:before {
-               width: 222px;
-       }
-
-       .search-box-wrapper,
-       .featured-content {
-               padding-left: 222px;
-       }
-
-       #secondary {
-               width: 162px;
-       }
-
-       .secondary-navigation,
-       .secondary-navigation ul ul {
-               width: 222px;
-       }
-
-       .secondary-navigation ul li:hover > ul,
-       .secondary-navigation ul li.focus > ul {
-               left: 202px;
-       }
-
-       .slider .featured-content .entry-title {
-               font-size: 33px;
-       }
-
-       .slider .featured-content .entry-header,
-       .slider-control-paging {
-               width: 534px;
-       }
-
-       .slider-control-paging {
-               padding-left: 24px;
-       }
-
-       .slider-control-paging li {
-               margin: 12px 12px 12px 0;
-       }
-
-       .slider-control-paging a {
-               height: 24px;
-               width: 24px;
-       }
-
-       .slider-control-paging a:before {
-               top: 6px;
-               left: 6px;
-       }
-}
-
-@media screen and (min-width: 1110px) {
-       .archive-header,
-       .comments-area,
-       .image-navigation,
-       .page-header,
-       .page-content,
-       .post-navigation,
-       .site-content .entry-header,
-       .site-content .entry-content,
-       .site-content .entry-summary,
-       .site-content footer.entry-meta {
-               padding-right: 30px;
-               padding-left: 30px;
-       }
-}
-
-@media screen and (min-width: 1218px) {
-       .archive-header,
-       .comments-area,
-       .image-navigation,
-       .page-header,
-       .page-content,
-       .post-navigation,
-       .site-content .entry-header,
-       .site-content .entry-content,
-       .site-content .entry-summary,
-       .site-content footer.entry-meta {
-               margin-right: 54px;
-       }
-
-       .full-width .archive-header,
-       .full-width .comments-area,
-       .full-width .image-navigation,
-       .full-width .page-header,
-       .full-width .page-content,
-       .full-width .post-navigation,
-       .full-width .site-content .entry-header,
-       .full-width .site-content .entry-content,
-       .full-width .site-content .entry-summary,
-       .full-width .site-content footer.entry-meta {
-               margin-right: auto;
-       }
-}
-
-@media screen and (min-width: 1260px) {
-       .site-content blockquote.alignleft,
-       .site-content blockquote.alignright {
-               width: -webkit-calc(50% + 18px);
-               width:         calc(50% + 18px);
-       }
-
-       .site-content blockquote.alignleft {
-               margin-left: -18%;
-       }
-
-       .site-content blockquote.alignright {
-               margin-right: -18%;
-       }
-}
-
-
-/**
- * 12.0 Print
- * -----------------------------------------------------------------------------
- */
-
-@media print {
-       body {
-               background: none !important; /* Brute force since user agents all print differently. */
-               color: #2b2b2b;
-               font-size: 12pt;
-       }
-
-       .site,
-       .site-header,
-       .hentry,
-       .site-content .entry-header,
-       .site-content .entry-content,
-       .site-content .entry-summary,
-       .site-content .entry-meta,
-       .page-content,
-       .archive-header,
-       .page-header,
-       .contributor-info,
-       .comments-area,
-       .attachment .entry-attachment .attachment {
-               max-width: 100%;
-       }
-
-       #site-header img,
-       .search-toggle,
-       .site-navigation,
-       .site-content nav,
-       .edit-link,
-       .page-links,
-       .widget-area,
-       .more-link,
-       .post-format-archive-link,
-       .comment-respond,
-       .comment-list .reply,
-       .comment-reply-login,
-       #secondary,
-       .site-footer,
-       .slider-control-paging,
-       .slider-direction-nav {
-               display: none;
-       }
-
-       .site-title a,
-       .entry-meta,
-       .entry-meta a,
-       .featured-content .hentry,
-       .featured-content a {
-               color: #2b2b2b;
-       }
-
-       .entry-content a,
-       .entry-summary a,
-       .page-content a,
-       .comment-content a {
-               text-decoration: none;
-       }
-
-       .site-header,
-       .post-thumbnail,
-       a.post-thumbnail:hover,
-       .site-content .entry-header,
-       .site-footer,
-       .featured-content,
-       .featured-content .entry-header {
-               background: transparent;
-       }
-
-       .header-main {
-               padding: 48px 10px;
-       }
-
-       .site-title {
-               float: none;
-               font-size: 19pt;
-       }
-
-       .content-area {
-               padding-top: 0;
-       }
-
-       .list-view .site-content .hentry {
-               border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-               margin-bottom: 48px;
-               padding-bottom: 24px;
-       }
-
-       .post-thumbnail img {
-               margin: 0 10px 24px;
-       }
-
-       .site-content .has-post-thumbnail .entry-header {
-               padding-top: 0;
-       }
-
-       .site-content footer.entry-meta {
-               margin: 24px auto;
-       }
-
-       .entry-meta .tag-links a {
-               color: #fff;
-       }
-
-       .singular .site-content .hentry.has-post-thumbnail {
-               margin-top: 0;
-       }
-
-       .gallery-columns-1.gallery-size-medium,
-       .gallery-columns-1.gallery-size-thumbnail,
-       .gallery-columns-2.gallery-size-thumbnail,
-       .gallery-columns-3.gallery-size-thumbnail {
-               display: block;
-       }
-
-       .archive-title,
-       .page-title {
-               margin: 0 10px 48px;
-       }
-
-       .featured-content .hentry {
-               margin-bottom: 48px;
-       }
-
-       .featured-content .post-thumbnail,
-       .slider .featured-content .post-thumbnail {
-               padding-top: 0;
-       }
-
-       .featured-content .post-thumbnail img {
-               position: relative;
-       }
-
-       .featured-content .entry-header {
-               padding: 0 10px 24px;
-       }
-
-       .featured-content .entry-meta {
-               font-size: 9pt;
-               margin-bottom: 11px;
-       }
-
-       .featured-content .cat-links {
-               font-weight: 900;
-       }
-
-       .featured-content .entry-title {
-               font-size: 25pt;
-               line-height: 36px;
-       }
-}
diff --git a/wp-content/themes/twentyfourteen/tag.php b/wp-content/themes/twentyfourteen/tag.php
deleted file mode 100644 (file)
index 208455d..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/**
- * The template for displaying Tag pages
- *
- * Used to display archive-type pages for posts in a tag.
- *
- * @link https://codex.wordpress.org/Template_Hierarchy
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-       <section id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-
-                       <?php if ( have_posts() ) : ?>
-
-                       <header class="archive-header">
-                               <h1 class="archive-title"><?php printf( __( 'Tag Archives: %s', 'twentyfourteen' ), single_tag_title( '', false ) ); ?></h1>
-
-                               <?php
-                                       // Show an optional term description.
-                                       $term_description = term_description();
-                                       if ( ! empty( $term_description ) ) :
-                                               printf( '<div class="taxonomy-description">%s</div>', $term_description );
-                                       endif;
-                               ?>
-                       </header><!-- .archive-header -->
-
-                       <?php
-                                       // Start the Loop.
-                                       while ( have_posts() ) : the_post();
-
-                                               /*
-                                                * Include the post format-specific template for the content. If you want to
-                                                * use this in a child theme, then include a file called called content-___.php
-                                                * (where ___ is the post format) and that will be used instead.
-                                                */
-                                               get_template_part( 'content', get_post_format() );
-
-                                       endwhile;
-                                       // Previous/next page navigation.
-                                       twentyfourteen_paging_nav();
-
-                               else :
-                                       // If no content, include the "No posts found" template.
-                                       get_template_part( 'content', 'none' );
-
-                               endif;
-                       ?>
-               </div><!-- #content -->
-       </section><!-- #primary -->
-
-<?php
-get_sidebar( 'content' );
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyfourteen/taxonomy-post_format.php b/wp-content/themes/twentyfourteen/taxonomy-post_format.php
deleted file mode 100644 (file)
index 2ef44a4..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-/**
- * The template for displaying Post Format pages
- *
- * Used to display archive-type pages for posts with a post format.
- * If you'd like to further customize these Post Format views, you may create a
- * new template file for each specific one.
- *
- * @todo https://core.trac.wordpress.org/ticket/23257: Add plural versions of Post Format strings
- * and remove plurals below.
- *
- * @link https://codex.wordpress.org/Template_Hierarchy
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- * @since Twenty Fourteen 1.0
- */
-
-get_header(); ?>
-
-       <section id="primary" class="content-area">
-               <div id="content" class="site-content" role="main">
-
-                       <?php if ( have_posts() ) : ?>
-
-                       <header class="archive-header">
-                               <h1 class="archive-title">
-                                       <?php
-                                               if ( is_tax( 'post_format', 'post-format-aside' ) ) :
-                                                       _e( 'Asides', 'twentyfourteen' );
-
-                                               elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
-                                                       _e( 'Images', 'twentyfourteen' );
-
-                                               elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
-                                                       _e( 'Videos', 'twentyfourteen' );
-
-                                               elseif ( is_tax( 'post_format', 'post-format-audio' ) ) :
-                                                       _e( 'Audio', 'twentyfourteen' );
-
-                                               elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
-                                                       _e( 'Quotes', 'twentyfourteen' );
-
-                                               elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
-                                                       _e( 'Links', 'twentyfourteen' );
-
-                                               elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
-                                                       _e( 'Galleries', 'twentyfourteen' );
-
-                                               else :
-                                                       _e( 'Archives', 'twentyfourteen' );
-
-                                               endif;
-                                       ?>
-                               </h1>
-                       </header><!-- .archive-header -->
-
-                       <?php
-                                       // Start the Loop.
-                                       while ( have_posts() ) : the_post();
-
-                                               /*
-                                                * Include the post format-specific template for the content. If you want to
-                                                * use this in a child theme, then include a file called called content-___.php
-                                                * (where ___ is the post format) and that will be used instead.
-                                                */
-                                               get_template_part( 'content', get_post_format() );
-
-                                       endwhile;
-                                       // Previous/next page navigation.
-                                       twentyfourteen_paging_nav();
-
-                               else :
-                                       // If no content, include the "No posts found" template.
-                                       get_template_part( 'content', 'none' );
-
-                               endif;
-                       ?>
-               </div><!-- #content -->
-       </section><!-- #primary -->
-
-<?php
-get_sidebar( 'content' );
-get_sidebar();
-get_footer();
diff --git a/wp-content/themes/twentyseventeen/404.php b/wp-content/themes/twentyseventeen/404.php
new file mode 100644 (file)
index 0000000..4a6d113
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+/**
+ * The template for displaying 404 pages (not found)
+ *
+ * @link https://codex.wordpress.org/Creating_an_Error_404_Page
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+get_header(); ?>
+
+<div class="wrap">
+       <div id="primary" class="content-area">
+               <main id="main" class="site-main" role="main">
+
+                       <section class="error-404 not-found">
+                               <header class="page-header">
+                                       <h1 class="page-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'twentyseventeen' ); ?></h1>
+                               </header><!-- .page-header -->
+                               <div class="page-content">
+                                       <p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentyseventeen' ); ?></p>
+
+                                       <?php get_search_form(); ?>
+
+                               </div><!-- .page-content -->
+                       </section><!-- .error-404 -->
+               </main><!-- #main -->
+       </div><!-- #primary -->
+</div><!-- .wrap -->
+
+<?php get_footer();
diff --git a/wp-content/themes/twentyseventeen/README.txt b/wp-content/themes/twentyseventeen/README.txt
new file mode 100644 (file)
index 0000000..a41e0e5
--- /dev/null
@@ -0,0 +1,66 @@
+=== Twenty Seventeen ===
+Contributors: the WordPress team
+Requires at least: WordPress 4.8-trunk
+Tested up to: WordPress 4.7
+Version: 1.0
+License: GPLv2 or later
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
+Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
+
+== Description ==
+
+Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.
+
+For more information about Twenty Seventeen please go to https://codex.wordpress.org/Twenty_Seventeen.
+
+== Installation ==
+
+1. In your admin panel, go to Appearance -> Themes and click the 'Add New' button.
+2. Type in Twenty Seventeen in the search form and press the 'Enter' key on your keyboard.
+3. Click on the 'Activate' button to use your new theme right away.
+4. Go to https://codex.wordpress.org/Twenty_Seventeen for a guide on how to customize this theme.
+5. Navigate to Appearance > Customize in your admin panel and customize to taste.
+
+== Copyright ==
+
+Twenty Seventeen WordPress Theme, Copyright 2016 WordPress.org
+Twenty Seventeen is distributed under the terms of the GNU GPL
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+Twenty Seventeen bundles the following third-party resources:
+
+HTML5 Shiv, Copyright 2014 Alexander Farkas
+Licenses: MIT/GPL2
+Source: https://github.com/aFarkas/html5shiv
+
+jQuery scrollTo, Copyright 2007-2015 Ariel Flesler
+License: MIT
+Source: https://github.com/flesler/jquery.scrollTo
+
+normalize.css, Copyright 2012-2016 Nicolas Gallagher and Jonathan Neal
+License: MIT
+Source: https://necolas.github.io/normalize.css/
+
+Font Awesome icons, Copyright Dave Gandy
+License: SIL Open Font License, version 1.1.
+Source: http://fontawesome.io/
+
+Bundled header image, Copyright Alvin Engler
+License: CC0 1.0 Universal (CC0 1.0)
+Source: https://unsplash.com/@englr?photo=bIhpiQA009k
+
+== Changelog ==
+
+= 1.0 =
+* Released: December 6, 2016
+
+Initial release
diff --git a/wp-content/themes/twentyseventeen/archive.php b/wp-content/themes/twentyseventeen/archive.php
new file mode 100644 (file)
index 0000000..6f9e03c
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+/**
+ * The template for displaying archive pages
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+get_header(); ?>
+
+<div class="wrap">
+
+       <?php if ( have_posts() ) : ?>
+               <header class="page-header">
+                       <?php
+                               the_archive_title( '<h1 class="page-title">', '</h1>' );
+                               the_archive_description( '<div class="taxonomy-description">', '</div>' );
+                       ?>
+               </header><!-- .page-header -->
+       <?php endif; ?>
+
+       <div id="primary" class="content-area">
+               <main id="main" class="site-main" role="main">
+
+               <?php
+               if ( have_posts() ) : ?>
+                       <?php
+                       /* Start the Loop */
+                       while ( have_posts() ) : the_post();
+
+                               /*
+                                * Include the Post-Format-specific template for the content.
+                                * If you want to override this in a child theme, then include a file
+                                * called content-___.php (where ___ is the Post Format name) and that will be used instead.
+                                */
+                               get_template_part( 'template-parts/post/content', get_post_format() );
+
+                       endwhile;
+
+                       the_posts_pagination( array(
+                               'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
+                               'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
+                               'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
+                       ) );
+
+               else :
+
+                       get_template_part( 'template-parts/post/content', 'none' );
+
+               endif; ?>
+
+               </main><!-- #main -->
+       </div><!-- #primary -->
+       <?php get_sidebar(); ?>
+</div><!-- .wrap -->
+
+<?php get_footer();
diff --git a/wp-content/themes/twentyseventeen/assets/css/colors-dark.css b/wp-content/themes/twentyseventeen/assets/css/colors-dark.css
new file mode 100644 (file)
index 0000000..d6fda60
--- /dev/null
@@ -0,0 +1,560 @@
+/**
+ * Twenty Seventeen: Dark Color Scheme
+ *
+ * See inc/color-patterns.php for dynamic color overrides for the theme.
+ *
+ * Colors are ordered from light to dark.
+ */
+
+.colors-dark button,
+.colors-dark input[type="button"],
+.colors-dark input[type="submit"],
+.colors-dark .entry-footer .edit-link a.post-edit-link {
+       background-color: #fff;
+}
+
+.colors-dark a:hover,
+.colors-dark a:active,
+.colors-dark .entry-content a:focus,
+.colors-dark .entry-content a:hover,
+.colors-dark .entry-summary a:focus,
+.colors-dark .entry-summary a:hover,
+.colors-dark .widget a:focus,
+.colors-dark .widget a:hover,
+.colors-dark .site-footer .widget-area a:focus,
+.colors-dark .site-footer .widget-area a:hover,
+.colors-dark .posts-navigation a:focus,
+.colors-dark .posts-navigation a:hover,
+.colors-dark .comment-metadata a:focus,
+.colors-dark .comment-metadata a:hover,
+.colors-dark .comment-metadata a.comment-edit-link:focus,
+.colors-dark .comment-metadata a.comment-edit-link:hover,
+.colors-dark .comment-reply-link:focus,
+.colors-dark .comment-reply-link:hover,
+.colors-dark .widget_authors a:focus strong,
+.colors-dark .widget_authors a:hover strong,
+.colors-dark .entry-title a:focus,
+.colors-dark .entry-title a:hover,
+.colors-dark .entry-meta a:focus,
+.colors-dark .entry-meta a:hover,
+.colors-dark.blog .entry-meta a.post-edit-link:focus,
+.colors-dark.blog .entry-meta a.post-edit-link:hover,
+.colors-dark.archive .entry-meta a.post-edit-link:focus,
+.colors-dark.archive .entry-meta a.post-edit-link:hover,
+.colors-dark.search .entry-meta a.post-edit-link:focus,
+.colors-dark.search .entry-meta a.post-edit-link:hover,
+.colors-dark .page-links a:focus .page-number,
+.colors-dark .page-links a:hover .page-number,
+.colors-dark .entry-footer .cat-links a:focus,
+.colors-dark .entry-footer .cat-links a:hover,
+.colors-dark .entry-footer .tags-links a:focus,
+.colors-dark .entry-footer .tags-links a:hover,
+.colors-dark .post-navigation a:focus,
+.colors-dark .post-navigation a:hover,
+.colors-dark .pagination a:not(.prev):not(.next):focus,
+.colors-dark .pagination a:not(.prev):not(.next):hover,
+.colors-dark .comments-pagination a:not(.prev):not(.next):focus,
+.colors-dark .comments-pagination a:not(.prev):not(.next):hover,
+.colors-dark .logged-in-as a:focus,
+.colors-dark .logged-in-as a:hover,
+.colors-dark a:focus .nav-title,
+.colors-dark a:hover .nav-title,
+.colors-dark .edit-link a:focus,
+.colors-dark .edit-link a:hover,
+.colors-dark .site-info a:focus,
+.colors-dark .site-info a:hover,
+.colors-dark .widget .widget-title a:focus,
+.colors-dark .widget .widget-title a:hover,
+.colors-dark .widget ul li a:focus,
+.colors-dark .widget ul li a:hover {
+       color: #fff;
+}
+
+.colors-dark .entry-content a:focus,
+.colors-dark .entry-content a:hover,
+.colors-dark .entry-summary a:focus,
+.colors-dark .entry-summary a:hover,
+.colors-dark .widget a:focus,
+.colors-dark .widget a:hover,
+.colors-dark .site-footer .widget-area a:focus,
+.colors-dark .site-footer .widget-area a:hover,
+.colors-dark .posts-navigation a:focus,
+.colors-dark .posts-navigation a:hover,
+.colors-dark .comment-metadata a:focus,
+.colors-dark .comment-metadata a:hover,
+.colors-dark .comment-metadata a.comment-edit-link:focus,
+.colors-dark .comment-metadata a.comment-edit-link:hover,
+.colors-dark .comment-reply-link:focus,
+.colors-dark .comment-reply-link:hover,
+.colors-dark .widget_authors a:focus strong,
+.colors-dark .widget_authors a:hover strong,
+.colors-dark .entry-title a:focus,
+.colors-dark .entry-title a:hover,
+.colors-dark .entry-meta a:focus,
+.colors-dark .entry-meta a:hover,
+.colors-dark.blog .entry-meta a.post-edit-link:focus,
+.colors-dark.blog .entry-meta a.post-edit-link:hover,
+.colors-dark.archive .entry-meta a.post-edit-link:focus,
+.colors-dark.archive .entry-meta a.post-edit-link:hover,
+.colors-dark.search .entry-meta a.post-edit-link:focus,
+.colors-dark.search .entry-meta a.post-edit-link:hover,
+.colors-dark .page-links a:focus .page-number,
+.colors-dark .page-links a:hover .page-number,
+.colors-dark .entry-footer .cat-links a:focus,
+.colors-dark .entry-footer .cat-links a:hover,
+.colors-dark .entry-footer .tags-links a:focus,
+.colors-dark .entry-footer .tags-links a:hover,
+.colors-dark .post-navigation a:focus,
+.colors-dark .post-navigation a:hover,
+.colors-dark .pagination a:not(.prev):not(.next):focus,
+.colors-dark .pagination a:not(.prev):not(.next):hover,
+.colors-dark .comments-pagination a:not(.prev):not(.next):focus,
+.colors-dark .comments-pagination a:not(.prev):not(.next):hover,
+.colors-dark .logged-in-as a:focus,
+.colors-dark .logged-in-as a:hover,
+.colors-dark a:focus .nav-title,
+.colors-dark a:hover .nav-title,
+.colors-dark .edit-link a:focus,
+.colors-dark .edit-link a:hover,
+.colors-dark .site-info a:focus,
+.colors-dark .site-info a:hover,
+.colors-dark .widget .widget-title a:focus,
+.colors-dark .widget .widget-title a:hover,
+.colors-dark .widget ul li a:focus,
+.colors-dark .widget ul li a:hover {
+       -webkit-box-shadow: inset 0 0 0 rgba(255, 255, 255, 0), 0 3px 0 rgba(255, 255, 255, 1); /* Equivalant to #fff */
+       box-shadow: inset 0 0 0 rgba(255, 255, 255, 0), 0 3px 0 rgba(255, 255, 255, 1); /* Equivalant to #fff */
+}
+
+.colors-dark .entry-content a,
+.colors-dark .entry-summary a,
+.colors-dark .widget a,
+.colors-dark .site-footer .widget-area a,
+.colors-dark .posts-navigation a,
+.colors-dark .widget_authors a strong {
+       -webkit-box-shadow: inset 0 -1px 0 rgba(240, 240, 240, 1); /* Equivalant to #f0f0f0 */
+       box-shadow: inset 0 -1px 0 rgba(240, 240, 240, 1); /* Equivalant to #f0f0f0 */
+}
+
+body.colors-dark,
+.colors-dark button,
+.colors-dark input,
+.colors-dark select,
+.colors-dark textarea,
+.colors-dark h3,
+.colors-dark h4,
+.colors-dark h6,
+.colors-dark label,
+.colors-dark .entry-title a,
+.colors-dark.twentyseventeen-front-page .panel-content .recent-posts article,
+.colors-dark .entry-footer .cat-links a,
+.colors-dark .entry-footer .tags-links a,
+.colors-dark .format-quote blockquote,
+.colors-dark .nav-title,
+.colors-dark .comment-body {
+       color: #eee;
+}
+
+/* Placeholder text color -- selectors need to be separate to work. */
+.colors-dark ::-webkit-input-placeholder {
+       color: #ddd;
+}
+
+.colors-dark :-moz-placeholder {
+       color: #ddd;
+}
+
+.colors-dark ::-moz-placeholder {
+       color: #ddd;
+}
+
+.colors-dark :-ms-input-placeholder {
+       color: #ddd;
+}
+
+.colors-dark input[type="text"]:focus,
+.colors-dark input[type="email"]:focus,
+.colors-dark input[type="url"]:focus,
+.colors-dark input[type="password"]:focus,
+.colors-dark input[type="search"]:focus,
+.colors-dark input[type="number"]:focus,
+.colors-dark input[type="tel"]:focus,
+.colors-dark input[type="range"]:focus,
+.colors-dark input[type="date"]:focus,
+.colors-dark input[type="month"]:focus,
+.colors-dark input[type="week"]:focus,
+.colors-dark input[type="time"]:focus,
+.colors-dark input[type="datetime"]:focus,
+.colors-dark input[type="datetime-local"]:focus,
+.colors-dark input[type="color"]:focus,
+.colors-dark textarea:focus,
+.bypostauthor > .comment-body > .comment-meta > .comment-author .avatar {
+       border-color: #eee;
+}
+
+.colors-dark input[type="text"]:focus,
+.colors-dark input[type="email"]:focus,
+.colors-dark input[type="url"]:focus,
+.colors-dark input[type="password"]:focus,
+.colors-dark input[type="search"]:focus,
+.colors-dark input[type="number"]:focus,
+.colors-dark input[type="tel"]:focus,
+.colors-dark input[type="range"]:focus,
+.colors-dark input[type="date"]:focus,
+.colors-dark input[type="month"]:focus,
+.colors-dark input[type="week"]:focus,
+.colors-dark input[type="time"]:focus,
+.colors-dark input[type="datetime"]:focus,
+.colors-dark input[type="datetime-local"]:focus,
+.colors-dark input[type="color"]:focus,
+.colors-dark textarea:focus,
+.colors-dark button.secondary,
+.colors-dark input[type="reset"],
+.colors-dark input[type="button"].secondary,
+.colors-dark input[type="reset"].secondary,
+.colors-dark input[type="submit"].secondary,
+.colors-dark a,
+.colors-dark .site-title,
+.colors-dark .site-title a,
+.colors-dark .navigation-top a,
+.colors-dark .dropdown-toggle,
+.colors-dark .menu-toggle,
+.colors-dark .page .panel-content .entry-title,
+.colors-dark .page-title,
+.colors-dark.page:not(.twentyseventeen-front-page) .entry-title,
+.colors-dark .page-links a .page-number,
+.colors-dark .comment-metadata a.comment-edit-link,
+.colors-dark .comment-reply-link .icon,
+.colors-dark h2.widget-title,
+.colors-dark mark,
+.colors-dark .post-navigation a:focus .icon,
+.colors-dark .post-navigation a:hover .icon,
+.colors-dark.blog .entry-meta a.post-edit-link,
+.colors-dark.archive .entry-meta a.post-edit-link,
+.colors-dark.search .entry-meta a.post-edit-link,
+.colors-custom .twentyseventeen-panel .recent-posts .entry-header .edit-link {
+       color: #ddd;
+}
+
+.colors-dark h2,
+.colors-dark blockquote,
+.colors-dark input[type="text"],
+.colors-dark input[type="email"],
+.colors-dark input[type="url"],
+.colors-dark input[type="password"],
+.colors-dark input[type="search"],
+.colors-dark input[type="number"],
+.colors-dark input[type="tel"],
+.colors-dark input[type="range"],
+.colors-dark input[type="date"],
+.colors-dark input[type="month"],
+.colors-dark input[type="week"],
+.colors-dark input[type="time"],
+.colors-dark input[type="datetime"],
+.colors-dark input[type="datetime-local"],
+.colors-dark input[type="color"],
+.colors-dark textarea,
+.colors-dark .navigation-top .current-menu-item > a,
+.colors-dark .navigation-top .current_page_item > a,
+.colors-dark .entry-content blockquote.alignleft,
+.colors-dark .entry-content blockquote.alignright,
+.colors-dark .taxonomy-description,
+.colors-dark .site-info a,
+.colors-dark .wp-caption {
+       color: #ccc;
+}
+
+.colors-dark abbr,
+.colors-dark acronym {
+       border-bottom-color: #ccc;
+}
+
+.colors-dark h5,
+.main-navigation a:hover,
+.colors-dark .entry-meta,
+.colors-dark .entry-meta a,
+.colors-dark .nav-subtitle,
+.colors-dark .comment-metadata,
+.colors-dark .comment-metadata a,
+.colors-dark .no-comments,
+.colors-dark .comment-awaiting-moderation,
+.colors-dark .page-numbers.current,
+.colors-dark .page-links .page-number,
+.colors-dark .site-description {
+       color: #bbb;
+}
+
+.colors-dark button:hover,
+.colors-dark button:focus,
+.colors-dark input[type="button"]:hover,
+.colors-dark input[type="button"]:focus,
+.colors-dark input[type="submit"]:hover,
+.colors-dark input[type="submit"]:focus,
+.colors-dark .prev.page-numbers:focus,
+.colors-dark .prev.page-numbers:hover,
+.colors-dark .next.page-numbers:focus,
+.colors-dark .next.page-numbers:hover,
+.colors-dark .entry-footer .edit-link a.post-edit-link:focus,
+.colors-dark .entry-footer .edit-link a.post-edit-link:hover {
+       background: #bbb;
+}
+
+.colors-dark .social-navigation a:hover,
+.colors-dark .social-navigation a:focus {
+       background: #999;
+       color: #222;
+}
+
+.colors-dark .entry-footer .cat-links .icon,
+.colors-dark .entry-footer .tags-links .icon {
+       color: #666;
+}
+
+.colors-dark button.secondary:hover,
+.colors-dark button.secondary:focus,
+.colors-dark input[type="reset"]:hover,
+.colors-dark input[type="reset"]:focus,
+.colors-dark input[type="button"].secondary:hover,
+.colors-dark input[type="button"].secondary:focus,
+.colors-dark input[type="reset"].secondary:hover,
+.colors-dark input[type="reset"].secondary:focus,
+.colors-dark input[type="submit"].secondary:hover,
+.colors-dark input[type="submit"].secondary:focus,
+.colors-dark .social-navigation a,
+.colors-dark hr {
+       background: #555;
+}
+
+.colors-dark input[type="text"],
+.colors-dark input[type="email"],
+.colors-dark input[type="url"],
+.colors-dark input[type="password"],
+.colors-dark input[type="search"],
+.colors-dark input[type="number"],
+.colors-dark input[type="tel"],
+.colors-dark input[type="range"],
+.colors-dark input[type="date"],
+.colors-dark input[type="month"],
+.colors-dark input[type="week"],
+.colors-dark input[type="time"],
+.colors-dark input[type="datetime"],
+.colors-dark input[type="datetime-local"],
+.colors-dark input[type="color"],
+.colors-dark textarea,
+.colors-dark select,
+.colors-dark fieldset,
+.colors-dark .widget .tagcloud a:hover,
+.colors-dark .widget .tagcloud a:focus,
+.colors-dark .widget.widget_tag_cloud a:hover,
+.colors-dark .widget.widget_tag_cloud a:focus,
+.colors-dark .wp_widget_tag_cloud a:hover,
+.colors-dark .wp_widget_tag_cloud a:focus {
+       border-color: #555;
+}
+
+.colors-dark button.secondary,
+.colors-dark input[type="reset"],
+.colors-dark input[type="button"].secondary,
+.colors-dark input[type="reset"].secondary,
+.colors-dark input[type="submit"].secondary,
+.colors-dark .prev.page-numbers,
+.colors-dark .next.page-numbers {
+       background-color: #444;
+}
+
+.colors-dark .widget .tagcloud a,
+.colors-dark .widget.widget_tag_cloud a,
+.colors-dark .wp_widget_tag_cloud a {
+       border-color: #444;
+}
+
+.colors-dark.twentyseventeen-front-page article:not(.has-post-thumbnail):not(:first-child),
+.colors-dark .widget ul li {
+       border-top-color: #444;
+}
+
+.colors-dark .widget ul li {
+       border-bottom-color: #444;
+}
+
+.colors-dark pre,
+.colors-dark mark,
+.colors-dark ins,
+.colors-dark input[type="text"],
+.colors-dark input[type="email"],
+.colors-dark input[type="url"],
+.colors-dark input[type="password"],
+.colors-dark input[type="search"],
+.colors-dark input[type="number"],
+.colors-dark input[type="tel"],
+.colors-dark input[type="range"],
+.colors-dark input[type="date"],
+.colors-dark input[type="month"],
+.colors-dark input[type="week"],
+.colors-dark input[type="time"],
+.colors-dark input[type="datetime"],
+.colors-dark input[type="datetime-local"],
+.colors-dark input[type="color"],
+.colors-dark textarea,
+.colors-dark select,
+.colors-dark fieldset {
+       background: #333;
+}
+
+.colors-dark tr,
+.colors-dark thead th {
+       border-color: #333;
+}
+
+.colors-dark .navigation-top,
+.colors-dark .main-navigation > div > ul,
+.colors-dark .pagination,
+.colors-dark .comment-navigation,
+.colors-dark .entry-footer,
+.colors-dark .site-footer {
+       border-top-color: #333;
+}
+
+.colors-dark .single-featured-image-header,
+.colors-dark .navigation-top,
+.colors-dark .main-navigation li,
+.colors-dark .entry-footer,
+.colors-dark #comments {
+       border-bottom-color: #333;
+}
+
+.colors-dark .site-header,
+.colors-dark .single-featured-image-header {
+       background-color: #262626;
+}
+
+.colors-dark button,
+.colors-dark input[type="button"],
+.colors-dark input[type="submit"],
+.colors-dark .prev.page-numbers:focus,
+.colors-dark .prev.page-numbers:hover,
+.colors-dark .next.page-numbers:focus,
+.colors-dark .next.page-numbers:hover {
+       color: #222;
+}
+
+body.colors-dark,
+.colors-dark .site-content-contain,
+.colors-dark .navigation-top,
+.colors-dark .main-navigation ul {
+       background: #222;
+}
+
+.colors-dark .entry-title a,
+.colors-dark .entry-meta a,
+.colors-dark.blog .entry-meta a.post-edit-link,
+.colors-dark.archive .entry-meta a.post-edit-link,
+.colors-dark.search .entry-meta a.post-edit-link,
+.colors-dark .page-links a,
+.colors-dark .page-links a .page-number,
+.colors-dark .entry-footer a,
+.colors-dark .entry-footer .cat-links a,
+.colors-dark .entry-footer .tags-links a,
+.colors-dark .edit-link a,
+.colors-dark .post-navigation a,
+.colors-dark .logged-in-as a,
+.colors-dark .comment-navigation a,
+.colors-dark .comment-metadata a,
+.colors-dark .comment-metadata a.comment-edit-link,
+.colors-dark .comment-reply-link,
+.colors-dark a .nav-title,
+.colors-dark .pagination a,
+.colors-dark .comments-pagination a,
+.colors-dark .widget .widget-title a,
+.colors-dark .widget ul li a,
+.colors-dark .site-footer .widget-area ul li a,
+.colors-dark .site-info a {
+       -webkit-box-shadow: inset 0 -1px 0 rgba(34, 34, 34, 1); /* Equivalant to #222 */
+       box-shadow: inset 0 -1px 0 rgba(34, 34, 34, 1); /* Equivalant to #222 */
+}
+
+/* Fixes linked images */
+.colors-dark .entry-content a img,
+.colors-dark .widget a img {
+       -webkit-box-shadow: 0 0 0 8px #222;
+       box-shadow: 0 0 0 8px #222;
+}
+
+.colors-dark .entry-footer .edit-link a.post-edit-link {
+       color: #000;
+}
+
+.colors-dark .menu-toggle,
+.colors-dark .menu-toggle:hover,
+.colors-dark .menu-toggle:focus,
+.colors-dark .dropdown-toggle,
+.colors-dark .dropdown-toggle:hover,
+.colors-dark .dropdown-toggle:focus,
+.colors-dark .menu-scroll-down,
+.colors-dark .menu-scroll-down:hover,
+.colors-dark .menu-scroll-down:focus {
+       background-color: transparent;
+}
+
+.colors-dark .gallery-item a,
+.colors-dark .gallery-item a:hover,
+.colors-dark .gallery-item a:focus,
+.colors-dark .widget .tagcloud a,
+.colors-dark .widget .tagcloud a:focus,
+.colors-dark .widget .tagcloud a:hover,
+.colors-dark .widget.widget_tag_cloud a,
+.colors-dark .widget.widget_tag_cloud a:focus,
+.colors-dark .widget.widget_tag_cloud a:hover,
+.colors-dark .wp_widget_tag_cloud a,
+.colors-dark .wp_widget_tag_cloud a:focus,
+.colors-dark .wp_widget_tag_cloud a:hover,
+.colors-dark .entry-footer .edit-link a.post-edit-link:focus,
+.colors-dark .entry-footer .edit-link a.post-edit-link:hover {
+       -webkit-box-shadow: none;
+       box-shadow: none;
+}
+
+@media screen and (min-width: 48em) {
+
+       .colors-dark .nav-links .nav-previous .nav-title .icon,
+       .colors-dark .nav-links .nav-next .nav-title .icon {
+               color: #eee;
+       }
+
+       .colors-dark .main-navigation li li:hover,
+       .colors-dark .main-navigation li li.focus {
+               background: #999;
+       }
+
+       .colors-dark .menu-scroll-down {
+               color: #999;
+       }
+
+       .colors-dark .main-navigation ul ul {
+               border-color: #333;
+               background: #222;
+       }
+
+       .colors-dark .main-navigation ul li.menu-item-has-children:before,
+       .colors-dark .main-navigation ul li.page_item_has_children:before {
+               border-bottom-color: #333;
+       }
+
+       .main-navigation ul li.menu-item-has-children:after,
+       .main-navigation ul li.page_item_has_children:after {
+               border-bottom-color: #222;
+       }
+
+       .colors-dark .main-navigation li li.focus > a,
+       .colors-dark .main-navigation li li:focus > a,
+       .colors-dark .main-navigation li li:hover > a,
+       .colors-dark .main-navigation li li a:hover,
+       .colors-dark .main-navigation li li a:focus,
+       .colors-dark .main-navigation li li.current_page_item a:hover,
+       .colors-dark .main-navigation li li.current-menu-item a:hover,
+       .colors-dark .main-navigation li li.current_page_item a:focus,
+       .colors-dark .main-navigation li li.current-menu-item a:focus {
+               color: #222;
+       }
+
+}
diff --git a/wp-content/themes/twentyseventeen/assets/css/editor-style.css b/wp-content/themes/twentyseventeen/assets/css/editor-style.css
new file mode 100644 (file)
index 0000000..5c11373
--- /dev/null
@@ -0,0 +1,600 @@
+/*
+Theme Name: Twenty Seventeen
+Description: Used to style the TinyMCE editor.
+*/
+
+
+/**
+ * Table of Contents:
+ *
+ * 1.0 - Body
+ * 2.0 - Typography
+ * 3.0 - Elements
+ * 4.0 - Alignment
+ * 5.0 - Caption
+ * 6.0 - Galleries
+ * 7.0 - Media Elements
+ * 8.0 - RTL
+ */
+
+/**
+ * 1.0 - Body
+ */
+
+body {
+       background-color: #fff;
+       color: #333;
+       margin: 20px 40px;
+       max-width: 580px;
+}
+
+/**
+ * 2.0 - Typography
+ */
+
+body,
+button,
+input,
+select,
+textarea {
+       font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
+       font-size: 16px;
+       font-size: 1rem;
+       font-weight: 400;
+       line-height: 1.66;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+       clear: both;
+       line-height: 1.4;
+       margin: 0 0 0.75em;
+       padding: 1.5em 0 0;
+}
+
+h1:first-child,
+h2:first-child,
+h3:first-child,
+h4:first-child,
+h5:first-child,
+h6:first-child {
+       padding-top: 0;
+}
+
+h1 {
+       font-size: 24px;
+       font-size: 1.5rem;
+       font-weight: 300;
+}
+
+h2 {
+       color: #666;
+       font-size: 20px;
+       font-size: 1.25rem;
+       font-weight: 300;
+}
+
+h3 {
+       color: #333;
+       font-size: 18px;
+       font-size: 1.125rem;
+       font-weight: 300;
+}
+
+h4 {
+       color: #333;
+       font-size: 16px;
+       font-size: 1rem;
+       font-weight: 800;
+}
+
+h5 {
+       color: #767676;
+       font-size: 13px;
+       font-size: 0.8125rem;
+       font-weight: 800;
+       letter-spacing: 0.15em;
+       text-transform: uppercase;
+}
+
+h6 {
+       color: #333;
+       font-size: 15px;
+       font-size: 0.9375rem;
+       font-weight: 800;
+}
+
+p {
+       margin: 0 0 1.5em;
+       padding: 0;
+}
+
+dfn,
+cite,
+em,
+i {
+       font-style: italic;
+}
+
+blockquote {
+       color: #666;
+       font-size: 18px;
+       font-size: 1.125rem;
+       font-style: italic;
+       line-height: 1.7;
+       margin: 0;
+       overflow: hidden;
+       padding: 0;
+}
+
+blockquote.alignleft,
+blockquote.alignright {
+       font-size: 14px;
+       font-size: 0.875rem;
+       width: 34%;
+}
+
+address {
+       margin: 0 0 1.5em;
+}
+
+pre {
+       background: #eee;
+       font-family: "Courier 10 Pitch", Courier, monospace;
+       font-size: 15px;
+       font-size: 0.9375rem;
+       line-height: 1.6;
+       margin-bottom: 1.6em;
+       max-width: 100%;
+       overflow: auto;
+       padding: 1.6em;
+}
+
+code,
+kbd,
+tt,
+var {
+       font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
+       font-size: 15px;
+       font-size: 0.9375rem;
+}
+
+abbr,
+acronym {
+       border-bottom: 1px dotted #666;
+       cursor: help;
+}
+
+mark,
+ins {
+       background: #eee;
+       text-decoration: none;
+}
+
+big {
+       font-size: 125%;
+}
+
+blockquote,
+q {
+       quotes: "" "";
+}
+
+blockquote:before,
+blockquote:after,
+q:before,
+q:after {
+       content: "";
+}
+
+/* Typography for Thai Font */
+
+html[lang="th"] h1,
+html[lang="th"] h2,
+html[lang="th"] h3,
+html[lang="th"] h4,
+html[lang="th"] h5,
+html[lang="th"] h6 {
+       letter-spacing: 0;
+       line-height: 1.65;
+}
+
+html[lang="th"] body,
+html[lang="th"] button,
+html[lang="th"] input,
+html[lang="th"] select,
+html[lang="th"] textarea {
+       line-height: 1.8;
+}
+
+/**
+ * 3.0 - Elements
+ */
+
+hr {
+       background-color: #bbb;
+       border: 0;
+       height: 1px;
+       margin-bottom: 1.5em;
+}
+
+ul,
+ol {
+       margin: 0 0 1.5em;
+       padding: 0;
+}
+
+ul {
+       list-style: disc;
+}
+
+ol {
+       counter-reset: item;
+}
+
+ol li {
+       display: block;
+       position: relative;
+}
+
+ol li:before {
+       content: counter(item);
+       counter-increment: item;
+       font-weight: 800;
+       left: -1.5em;
+       position: absolute;
+}
+
+li > ul,
+li > ol {
+       margin-bottom: 0;
+       margin-left: 1.5em;
+}
+
+dt {
+       font-weight: 700;
+}
+
+dd {
+       margin: 0 1.5em 1.5em;
+}
+
+table {
+       border-collapse: collapse;
+       margin: 0 0 1.5em;
+       width: 100%;
+}
+
+thead th {
+       border-bottom: 2px solid #bbb;
+       padding-bottom: 0.5em;
+}
+
+th {
+       padding: 0.4em;
+       text-align: left;
+}
+
+tr {
+       border-bottom: 1px solid #eee;
+}
+
+td {
+       padding: 0.4em;
+}
+
+th:first-child,
+td:first-child {
+       padding-left: 0;
+}
+
+th:last-child,
+td:last-child {
+       padding-right: 0;
+}
+
+a {
+       -webkit-box-shadow: inset 0 -1px 0 rgba(15, 15, 15, 1);
+       box-shadow: inset 0 -1px 0 rgba(15, 15, 15, 1);
+       color: #222;
+       text-decoration: none;
+       -webkit-transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
+       transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
+       transition: color 80ms ease-in, box-shadow 130ms ease-in-out;
+       transition: color 80ms ease-in, box-shadow 130ms ease-in-out, -webkit-box-shadow 130ms ease-in-out;
+}
+
+a:focus {
+       outline: thin dotted;
+}
+
+a:hover,
+a:focus {
+       color: #000;
+       -webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 3px 0 rgba(0, 0, 0, 1);
+       box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 3px 0 rgba(0, 0, 0, 1);
+}
+
+/* Fixes linked images */
+
+a img {
+       background: #fff;
+       -webkit-box-shadow: 0 0 0 6px #fff;
+       box-shadow: 0 0 0 6px #fff;
+}
+
+/**
+ * 4.0 - Alignment
+ */
+
+img {
+       height: auto; /* Make sure images are scaled correctly. */
+       width: inherit;  /* Make images fill their parent's space. Solves IE8. */
+       max-width: 100%; /* Adhere to container width. */
+}
+
+embed,
+iframe,
+object {
+       margin-bottom: 1.5em;
+       max-width: 100%;
+}
+
+/**
+ * 5.0 - Caption
+ */
+
+.wp-caption {
+       color: #666;
+       font-size: 13px;
+       font-size: 0.8125rem;
+       font-style: italic;
+       margin-bottom: 1.5em;
+       max-width: 100%;
+}
+
+.wp-caption img[class*="wp-image-"] {
+       display: block;
+       margin-left: auto;
+       margin-right: auto;
+}
+
+.wp-caption .wp-caption-text {
+       margin: 0.8075em 0;
+}
+
+/**
+ * 6.0 - Galleries
+ */
+
+.gallery {
+       margin-bottom: 1.5em;
+}
+
+.gallery-item {
+       display: inline-block;
+       text-align: center;
+       vertical-align: top;
+       width: 100%;
+}
+
+.gallery-item a,
+.gallery-item a:hover,
+.gallery-item a:focus {
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       background: none;
+       display: inline-block;
+}
+
+.gallery-columns-2 .gallery-item {
+       max-width: 50%;
+}
+
+.gallery-columns-3 .gallery-item {
+       max-width: 33.33%;
+}
+
+.gallery-columns-4 .gallery-item {
+       max-width: 25%;
+}
+
+.gallery-columns-5 .gallery-item {
+       max-width: 20%;
+}
+
+.gallery-columns-6 .gallery-item {
+       max-width: 16.66%;
+}
+
+.gallery-columns-7 .gallery-item {
+       max-width: 14.28%;
+}
+
+.gallery-columns-8 .gallery-item {
+       max-width: 12.5%;
+}
+
+.gallery-columns-9 .gallery-item {
+       max-width: 11.11%;
+}
+
+.gallery-caption {
+       display: block;
+}
+
+/**
+ * 7.0 - Media Elements
+ */
+
+.mejs-container {
+       margin-bottom: 1.5em;
+}
+
+/* Audio Player */
+
+.mejs-controls a.mejs-horizontal-volume-slider,
+.mejs-controls a.mejs-horizontal-volume-slider:focus,
+.mejs-controls a.mejs-horizontal-volume-slider:hover {
+       background: transparent;
+       border: 0;
+}
+
+/* Playlist Color Overrides: Light */
+
+.wp-playlist-light {
+       border-color: #eee;
+       color: #222;
+}
+
+.wp-playlist-light .wp-playlist-current-item .wp-playlist-item-album {
+       color: #333;
+}
+
+.wp-playlist-light .wp-playlist-current-item .wp-playlist-item-artist {
+       color: #767676;
+}
+
+.wp-playlist-light .wp-playlist-item {
+       border-bottom: 1px dotted #eee;
+       -webkit-transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+       transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+}
+
+.wp-playlist-light .wp-playlist-item:hover,
+.wp-playlist-light .wp-playlist-item:focus {
+       border-bottom-color: rgba(0, 0, 0, 0);
+       background-color: #767676;
+       color: #fff;
+}
+
+.wp-playlist-light a.wp-playlist-caption:hover,
+.wp-playlist-light .wp-playlist-item:hover a,
+.wp-playlist-light .wp-playlist-item:focus a {
+       color: #fff;
+}
+
+/* Playlist Color Overrides: Dark */
+
+.wp-playlist-dark {
+       background: #222;
+       border-color: #333;
+}
+
+.wp-playlist-dark .mejs-container .mejs-controls {
+       background-color: #333;
+}
+
+.wp-playlist-dark .wp-playlist-caption {
+       color: #fff;
+}
+
+.wp-playlist-dark .wp-playlist-current-item .wp-playlist-item-album {
+       color: #eee;
+}
+
+.wp-playlist-dark .wp-playlist-current-item .wp-playlist-item-artist {
+       color: #aaa;
+}
+
+.wp-playlist-dark .wp-playlist-playing {
+       background-color: #333;
+}
+
+.wp-playlist-dark .wp-playlist-item {
+       border-bottom: 1px dotted #555;
+       -webkit-transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+       transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+}
+
+.wp-playlist-dark .wp-playlist-item:hover,
+.wp-playlist-dark .wp-playlist-item:focus {
+       border-bottom-color: rgba(0, 0, 0, 0);
+       background-color: #aaa;
+       color: #222;
+}
+
+.wp-playlist-dark a.wp-playlist-caption:hover,
+.wp-playlist-dark .wp-playlist-item:hover a,
+.wp-playlist-dark .wp-playlist-item:focus a {
+       color: #222;
+}
+
+/* Playlist Style Overrides */
+
+.wp-playlist {
+       padding: 0.625em 0.625em 0.3125em;
+}
+
+.wp-playlist-current-item .wp-playlist-item-title {
+       font-weight: 700;
+}
+
+.wp-playlist-current-item .wp-playlist-item-album {
+       font-style: normal;
+}
+
+.wp-playlist-current-item .wp-playlist-item-artist {
+       font-size: 10px;
+       font-size: 0.625rem;
+       font-weight: 800;
+       letter-spacing: 0.1818em;
+       text-transform: uppercase;
+}
+
+.wp-playlist-item {
+       padding: 0 0.3125em;
+       cursor: pointer;
+}
+
+.wp-playlist-item:last-of-type {
+       border-bottom: none;
+}
+
+.wp-playlist-item a {
+       padding: 0.3125em 0;
+       border-bottom: none;
+}
+
+.wp-playlist-item a,
+.wp-playlist-item a:focus,
+.wp-playlist-item a:hover {
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       background: transparent;
+}
+
+.wp-playlist-item-length {
+       top: 5px;
+}
+
+/**
+ * 8.0 - RTL
+ */
+
+.rtl th {
+       text-align: right;
+}
+
+.rtl ol {
+       counter-reset: item;
+}
+
+.rtl ol li:before {
+       left: auto;
+       right: -1.5em;
+}
+
+.rtl li > ul,
+.rtl li > ol {
+       margin-left: 0;
+       margin-right: 1.5em;
+}
+
+.rtl .mejs-offscreen {
+       right: -10000px;
+}
diff --git a/wp-content/themes/twentyseventeen/assets/css/ie8.css b/wp-content/themes/twentyseventeen/assets/css/ie8.css
new file mode 100644 (file)
index 0000000..bf45c26
--- /dev/null
@@ -0,0 +1,225 @@
+/*
+Theme Name: Twenty Seventeen
+Description: IE8 specific style.
+*/
+
+body {
+       font-size: 16px;
+}
+
+h1 {
+       font-size: 30px;
+       font-size: 1.875rem;
+}
+
+h2,
+.page .panel-content .recent-posts .entry-title {
+       font-size: 26px;
+       font-size: 1.625rem;
+}
+
+h3 {
+       font-size: 22px;
+       font-size: 1.375rem;
+}
+
+h4 {
+       font-size: 18px;
+       font-size: 1.125rem;
+}
+
+h5 {
+       font-size: 13px;
+       font-size: 0.8125rem;
+}
+
+h6 {
+       font-size: 16px;
+       font-size: 1rem;
+}
+
+img {
+       width: inherit;  /* Make images fill their parent's space. */
+}
+
+/* Fixes linked images */
+.entry-content a img,
+.widget a img {
+       filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=0, OffY=5, Color=#ffffff);
+}
+
+/* Layout */
+
+.site-content {
+       padding: 6.5em 0 0;
+}
+
+/* Site Branding */
+
+.custom-header {
+       overflow: hidden;
+}
+
+.has-header-image.twentyseventeen-front-page .custom-header,
+.has-header-image.home.blog .custom-header {
+       display: block;
+}
+
+.custom-header-media {
+       background-position: bottom center;
+}
+
+.site-branding {
+       padding: 45px 0;
+}
+
+.has-header-image.twentyseventeen-front-page .site-branding,
+.has-header-image.home.blog .site-branding {
+       bottom: 0;
+       display: block;
+       left: 0;
+       height: auto;
+       padding-top: 0;
+       position: absolute;
+       width: 100%;
+}
+
+.has-header-image .custom-header-media img {
+       left: 0;
+       top: 0;
+}
+
+.site-title {
+       font-size: 36px;
+       font-weight: 700;
+}
+
+.site-description {
+       font-size: 16px;
+}
+
+/* Main Navigation */
+
+.navigation-top {
+       background: #fff;
+       position: relative;
+       z-index: 10;
+}
+
+.menu-toggle {
+       width: 150px;
+}
+
+.main-navigation ul#top-menu {
+       margin-bottom: -1px;
+       padding: 0;
+}
+
+.no-svg .dropdown-toggle {
+       padding: 0.25em 0 0;
+}
+
+.no-svg .dropdown-toggle.toggled-on {
+       padding: 0.75em 0 0;
+}
+
+.dropdown-toggle .svg-fallback.icon-angle-down {
+       -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=-1, M12=1.2246467991473532e-16, M21=-1.2246467991473532e-16, M22=-1, SizingMethod='auto expand')";
+}
+
+.dropdown-toggle.toggled-on .svg-fallback.icon-angle-down {
+       -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=0, M21=0, M22=1, SizingMethod='auto expand')";
+}
+
+/* Front Page */
+
+.twentyseventeen-front-page.has-header-image .custom-header,
+.blog.home.has-header-image .custom-header,
+.panel-image {
+       height: 800px;
+       max-height: 800px;
+       padding-top: 0;
+}
+
+.twentyseventeen-front-page .custom-header-media,
+.blog.home .custom-header-media {
+       background-position: center center;
+}
+
+.twentyseventeen-front-page.has-header-image .site-branding,
+.home.blog.has-header-image .site-branding {
+       bottom: 20px;
+       position: absolute;
+       width: 100%;
+}
+
+.page .panel-content .entry-title,
+.page-title,
+.page .entry-title {
+       font-size: 14px;
+       font-size: 0.875rem;
+       font-weight: 700;
+       letter-spacing: 0.14em;
+       text-transform: uppercase;
+}
+
+/* Posts */
+
+.blog .site-main > article,
+.archive .site-main > article,
+.search .site-main > article {
+       padding-bottom: 4em;
+}
+
+time.updated {
+       display: none;
+}
+
+time.published {
+       display: inline-block;
+}
+
+.blog .entry-title {
+       padding-top: 0;
+}
+
+.single-post .entry-title,
+.page .entry-title,
+.entry-meta + .entry-title {
+       font-size: 26px;
+       font-weight: 400;
+       letter-spacing: normal;
+       padding-top: 0;
+       text-transform: none;
+}
+
+.entry-footer .cat-links,
+.entry-footer .tags-links {
+       padding-left: 0;
+}
+
+.comment-author .avatar {
+       z-index: -1;
+}
+
+ol.children .children {
+       padding-left: 2em;
+}
+
+/* RTL Styles */
+
+.rtl .has-header-image.twentyseventeen-front-page .site-branding,
+.rtl .has-header-image.home.blog .site-branding {
+       left: auto;
+       right: 0;
+}
+
+.rtl .entry-footer .cat-links,
+.rtl .entry-footer .tags-links {
+       padding-right: 0;
+}
+
+.rtl ol.children .children {
+       padding-left: 0;
+       padding-right: 2em;
+}
diff --git a/wp-content/themes/twentyseventeen/assets/css/ie9.css b/wp-content/themes/twentyseventeen/assets/css/ie9.css
new file mode 100644 (file)
index 0000000..9f8f766
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+Theme Name: Twenty Seventeen
+Description: IE9 specific styles.
+*/
+
+.has-header-image.twentyseventeen-front-page .custom-header,
+.has-header-video.twentyseventeen-front-page .custom-header,
+.has-header-image.home.blog .custom-header,
+.has-header-video.home.blog .custom-header {
+       height: 300px;
+}
+
+.has-header-image .custom-header-media img,
+.has-header-video .custom-header-media video,
+.has-header-video .custom-header-media iframe {
+       min-width: 100%;
+}
+
+@media screen and (min-width: 30em) {
+
+       .has-header-image.twentyseventeen-front-page .custom-header,
+       .has-header-video.twentyseventeen-front-page .custom-header,
+       .has-header-image.home.blog .custom-header,
+       .has-header-video.home.blog .custom-header,
+       .twentyseventeen-front-page.has-header-image .custom-header-media,
+       .home.blog.has-header-image .custom-header-media,
+       .panel-image {
+               height: 700px;
+       }
+}
+
+@media screen and (min-width: 48em) {
+
+       .has-header-image.twentyseventeen-front-page .custom-header,
+       .has-header-video.twentyseventeen-front-page .custom-header,
+       .has-header-image.home.blog .custom-header,
+       .has-header-video.home.blog .custom-header,
+       .twentyseventeen-front-page.has-header-image .custom-header-media,
+       .home.blog.has-header-image .custom-header-media,
+       .panel-image {
+               height: 1000px;
+       }
+}
diff --git a/wp-content/themes/twentyseventeen/assets/images/coffee.jpg b/wp-content/themes/twentyseventeen/assets/images/coffee.jpg
new file mode 100644 (file)
index 0000000..13847cd
Binary files /dev/null and b/wp-content/themes/twentyseventeen/assets/images/coffee.jpg differ
diff --git a/wp-content/themes/twentyseventeen/assets/images/espresso.jpg b/wp-content/themes/twentyseventeen/assets/images/espresso.jpg
new file mode 100644 (file)
index 0000000..7514c96
Binary files /dev/null and b/wp-content/themes/twentyseventeen/assets/images/espresso.jpg differ
diff --git a/wp-content/themes/twentyseventeen/assets/images/header.jpg b/wp-content/themes/twentyseventeen/assets/images/header.jpg
new file mode 100644 (file)
index 0000000..a3fd3e7
Binary files /dev/null and b/wp-content/themes/twentyseventeen/assets/images/header.jpg differ
diff --git a/wp-content/themes/twentyseventeen/assets/images/sandwich.jpg b/wp-content/themes/twentyseventeen/assets/images/sandwich.jpg
new file mode 100644 (file)
index 0000000..6baddbf
Binary files /dev/null and b/wp-content/themes/twentyseventeen/assets/images/sandwich.jpg differ
diff --git a/wp-content/themes/twentyseventeen/assets/images/svg-icons.svg b/wp-content/themes/twentyseventeen/assets/images/svg-icons.svg
new file mode 100644 (file)
index 0000000..eb579db
--- /dev/null
@@ -0,0 +1,148 @@
+<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<symbol id="icon-behance" viewBox="0 0 37 32">
+<path class="path1" d="M33 6.054h-9.125v2.214h9.125v-2.214zM28.5 13.661q-1.607 0-2.607 0.938t-1.107 2.545h7.286q-0.321-3.482-3.571-3.482zM28.786 24.107q1.125 0 2.179-0.571t1.357-1.554h3.946q-1.786 5.482-7.625 5.482-3.821 0-6.080-2.357t-2.259-6.196q0-3.714 2.33-6.17t6.009-2.455q2.464 0 4.295 1.214t2.732 3.196 0.902 4.429q0 0.304-0.036 0.839h-11.75q0 1.982 1.027 3.063t2.973 1.080zM4.946 23.214h5.286q3.661 0 3.661-2.982 0-3.214-3.554-3.214h-5.393v6.196zM4.946 13.625h5.018q1.393 0 2.205-0.652t0.813-2.027q0-2.571-3.393-2.571h-4.643v5.25zM0 4.536h10.607q1.554 0 2.768 0.25t2.259 0.848 1.607 1.723 0.563 2.75q0 3.232-3.071 4.696 2.036 0.571 3.071 2.054t1.036 3.643q0 1.339-0.438 2.438t-1.179 1.848-1.759 1.268-2.161 0.75-2.393 0.232h-10.911v-22.5z"></path>
+</symbol>
+<symbol id="icon-deviantart" viewBox="0 0 18 32">
+<path class="path1" d="M18.286 5.411l-5.411 10.393 0.429 0.554h4.982v7.411h-9.054l-0.786 0.536-2.536 4.875-0.536 0.536h-5.375v-5.411l5.411-10.411-0.429-0.536h-4.982v-7.411h9.054l0.786-0.536 2.536-4.875 0.536-0.536h5.375v5.411z"></path>
+</symbol>
+<symbol id="icon-medium" viewBox="0 0 32 32">
+<path class="path1" d="M10.661 7.518v20.946q0 0.446-0.223 0.759t-0.652 0.313q-0.304 0-0.589-0.143l-8.304-4.161q-0.375-0.179-0.634-0.598t-0.259-0.83v-20.357q0-0.357 0.179-0.607t0.518-0.25q0.25 0 0.786 0.268l9.125 4.571q0.054 0.054 0.054 0.089zM11.804 9.321l9.536 15.464-9.536-4.75v-10.714zM32 9.643v18.821q0 0.446-0.25 0.723t-0.679 0.277-0.839-0.232l-7.875-3.929zM31.946 7.5q0 0.054-4.58 7.491t-5.366 8.705l-6.964-11.321 5.786-9.411q0.304-0.5 0.929-0.5 0.25 0 0.464 0.107l9.661 4.821q0.071 0.036 0.071 0.107z"></path>
+</symbol>
+<symbol id="icon-slideshare" viewBox="0 0 32 32">
+<path class="path1" d="M15.589 13.214q0 1.482-1.134 2.545t-2.723 1.063-2.723-1.063-1.134-2.545q0-1.5 1.134-2.554t2.723-1.054 2.723 1.054 1.134 2.554zM24.554 13.214q0 1.482-1.125 2.545t-2.732 1.063q-1.589 0-2.723-1.063t-1.134-2.545q0-1.5 1.134-2.554t2.723-1.054q1.607 0 2.732 1.054t1.125 2.554zM28.571 16.429v-11.911q0-1.554-0.571-2.205t-1.982-0.652h-19.857q-1.482 0-2.009 0.607t-0.527 2.25v12.018q0.768 0.411 1.58 0.714t1.446 0.5 1.446 0.33 1.268 0.196 1.25 0.071 1.045 0.009 1.009-0.036 0.795-0.036q1.214-0.018 1.696 0.482 0.107 0.107 0.179 0.161 0.464 0.446 1.089 0.911 0.125-1.625 2.107-1.554 0.089 0 0.652 0.027t0.768 0.036 0.813 0.018 0.946-0.018 0.973-0.080 1.089-0.152 1.107-0.241 1.196-0.348 1.205-0.482 1.286-0.616zM31.482 16.339q-2.161 2.661-6.643 4.5 1.5 5.089-0.411 8.304-1.179 2.018-3.268 2.643-1.857 0.571-3.25-0.268-1.536-0.911-1.464-2.929l-0.018-5.821v-0.018q-0.143-0.036-0.438-0.107t-0.42-0.089l-0.018 6.036q0.071 2.036-1.482 2.929-1.411 0.839-3.268 0.268-2.089-0.643-3.25-2.679-1.875-3.214-0.393-8.268-4.482-1.839-6.643-4.5-0.446-0.661-0.071-1.125t1.071 0.018q0.054 0.036 0.196 0.125t0.196 0.143v-12.393q0-1.286 0.839-2.196t2.036-0.911h22.446q1.196 0 2.036 0.911t0.839 2.196v12.393l0.375-0.268q0.696-0.482 1.071-0.018t-0.071 1.125z"></path>
+</symbol>
+<symbol id="icon-snapchat-ghost" viewBox="0 0 30 32">
+<path class="path1" d="M15.143 2.286q2.393-0.018 4.295 1.223t2.92 3.438q0.482 1.036 0.482 3.196 0 0.839-0.161 3.411 0.25 0.125 0.5 0.125 0.321 0 0.911-0.241t0.911-0.241q0.518 0 1 0.321t0.482 0.821q0 0.571-0.563 0.964t-1.232 0.563-1.232 0.518-0.563 0.848q0 0.268 0.214 0.768 0.661 1.464 1.83 2.679t2.58 1.804q0.5 0.214 1.429 0.411 0.5 0.107 0.5 0.625 0 1.25-3.911 1.839-0.125 0.196-0.196 0.696t-0.25 0.83-0.589 0.33q-0.357 0-1.107-0.116t-1.143-0.116q-0.661 0-1.107 0.089-0.571 0.089-1.125 0.402t-1.036 0.679-1.036 0.723-1.357 0.598-1.768 0.241q-0.929 0-1.723-0.241t-1.339-0.598-1.027-0.723-1.036-0.679-1.107-0.402q-0.464-0.089-1.125-0.089-0.429 0-1.17 0.134t-1.045 0.134q-0.446 0-0.625-0.33t-0.25-0.848-0.196-0.714q-3.911-0.589-3.911-1.839 0-0.518 0.5-0.625 0.929-0.196 1.429-0.411 1.393-0.571 2.58-1.804t1.83-2.679q0.214-0.5 0.214-0.768 0-0.5-0.563-0.848t-1.241-0.527-1.241-0.563-0.563-0.938q0-0.482 0.464-0.813t0.982-0.33q0.268 0 0.857 0.232t0.946 0.232q0.321 0 0.571-0.125-0.161-2.536-0.161-3.393 0-2.179 0.482-3.214 1.143-2.446 3.071-3.536t4.714-1.125z"></path>
+</symbol>
+<symbol id="icon-yelp" viewBox="0 0 27 32">
+<path class="path1" d="M13.804 23.554v2.268q-0.018 5.214-0.107 5.446-0.214 0.571-0.911 0.714-0.964 0.161-3.241-0.679t-2.902-1.589q-0.232-0.268-0.304-0.643-0.018-0.214 0.071-0.464 0.071-0.179 0.607-0.839t3.232-3.857q0.018 0 1.071-1.25 0.268-0.339 0.705-0.438t0.884 0.063q0.429 0.179 0.67 0.518t0.223 0.75zM11.143 19.071q-0.054 0.982-0.929 1.25l-2.143 0.696q-4.911 1.571-5.214 1.571-0.625-0.036-0.964-0.643-0.214-0.446-0.304-1.339-0.143-1.357 0.018-2.973t0.536-2.223 1-0.571q0.232 0 3.607 1.375 1.25 0.518 2.054 0.839l1.5 0.607q0.411 0.161 0.634 0.545t0.205 0.866zM25.893 24.375q-0.125 0.964-1.634 2.875t-2.42 2.268q-0.661 0.25-1.125-0.125-0.25-0.179-3.286-5.125l-0.839-1.375q-0.25-0.375-0.205-0.821t0.348-0.821q0.625-0.768 1.482-0.464 0.018 0.018 2.125 0.714 3.625 1.179 4.321 1.42t0.839 0.366q0.5 0.393 0.393 1.089zM13.893 13.089q0.089 1.821-0.964 2.179-1.036 0.304-2.036-1.268l-6.75-10.679q-0.143-0.625 0.339-1.107 0.732-0.768 3.705-1.598t4.009-0.563q0.714 0.179 0.875 0.804 0.054 0.321 0.393 5.455t0.429 6.777zM25.714 15.018q0.054 0.696-0.464 1.054-0.268 0.179-5.875 1.536-1.196 0.268-1.625 0.411l0.018-0.036q-0.411 0.107-0.821-0.071t-0.661-0.571q-0.536-0.839 0-1.554 0.018-0.018 1.339-1.821 2.232-3.054 2.679-3.643t0.607-0.696q0.5-0.339 1.161-0.036 0.857 0.411 2.196 2.384t1.446 2.991v0.054z"></path>
+</symbol>
+<symbol id="icon-vine" viewBox="0 0 27 32">
+<path class="path1" d="M26.732 14.768v3.536q-1.804 0.411-3.536 0.411-1.161 2.429-2.955 4.839t-3.241 3.848-2.286 1.902q-1.429 0.804-2.893-0.054-0.5-0.304-1.080-0.777t-1.518-1.491-1.83-2.295-1.92-3.286-1.884-4.357-1.634-5.616-1.259-6.964h5.054q0.464 3.893 1.25 7.116t1.866 5.661 2.17 4.205 2.5 3.482q3.018-3.018 5.125-7.25-2.536-1.286-3.982-3.929t-1.446-5.946q0-3.429 1.857-5.616t5.071-2.188q3.179 0 4.875 1.884t1.696 5.313q0 2.839-1.036 5.107-0.125 0.018-0.348 0.054t-0.821 0.036-1.125-0.107-1.107-0.455-0.902-0.92q0.554-1.839 0.554-3.286 0-1.554-0.518-2.357t-1.411-0.804q-0.946 0-1.518 0.884t-0.571 2.509q0 3.321 1.875 5.241t4.768 1.92q1.107 0 2.161-0.25z"></path>
+</symbol>
+<symbol id="icon-vk" viewBox="0 0 35 32">
+<path class="path1" d="M34.232 9.286q0.411 1.143-2.679 5.25-0.429 0.571-1.161 1.518-1.393 1.786-1.607 2.339-0.304 0.732 0.25 1.446 0.304 0.375 1.446 1.464h0.018l0.071 0.071q2.518 2.339 3.411 3.946 0.054 0.089 0.116 0.223t0.125 0.473-0.009 0.607-0.446 0.491-1.054 0.223l-4.571 0.071q-0.429 0.089-1-0.089t-0.929-0.393l-0.357-0.214q-0.536-0.375-1.25-1.143t-1.223-1.384-1.089-1.036-1.009-0.277q-0.054 0.018-0.143 0.063t-0.304 0.259-0.384 0.527-0.304 0.929-0.116 1.384q0 0.268-0.063 0.491t-0.134 0.33l-0.071 0.089q-0.321 0.339-0.946 0.393h-2.054q-1.268 0.071-2.607-0.295t-2.348-0.946-1.839-1.179-1.259-1.027l-0.446-0.429q-0.179-0.179-0.491-0.536t-1.277-1.625-1.893-2.696-2.188-3.768-2.33-4.857q-0.107-0.286-0.107-0.482t0.054-0.286l0.071-0.107q0.268-0.339 1.018-0.339l4.893-0.036q0.214 0.036 0.411 0.116t0.286 0.152l0.089 0.054q0.286 0.196 0.429 0.571 0.357 0.893 0.821 1.848t0.732 1.455l0.286 0.518q0.518 1.071 1 1.857t0.866 1.223 0.741 0.688 0.607 0.25 0.482-0.089q0.036-0.018 0.089-0.089t0.214-0.393 0.241-0.839 0.17-1.446 0-2.232q-0.036-0.714-0.161-1.304t-0.25-0.821l-0.107-0.214q-0.446-0.607-1.518-0.768-0.232-0.036 0.089-0.429 0.304-0.339 0.679-0.536 0.946-0.464 4.268-0.429 1.464 0.018 2.411 0.232 0.357 0.089 0.598 0.241t0.366 0.429 0.188 0.571 0.063 0.813-0.018 0.982-0.045 1.259-0.027 1.473q0 0.196-0.018 0.75t-0.009 0.857 0.063 0.723 0.205 0.696 0.402 0.438q0.143 0.036 0.304 0.071t0.464-0.196 0.679-0.616 0.929-1.196 1.214-1.92q1.071-1.857 1.911-4.018 0.071-0.179 0.179-0.313t0.196-0.188l0.071-0.054 0.089-0.045t0.232-0.054 0.357-0.009l5.143-0.036q0.696-0.089 1.143 0.045t0.554 0.295z"></path>
+</symbol>
+<symbol id="icon-search" viewBox="0 0 30 32">
+<path class="path1" d="M20.571 14.857q0-3.304-2.348-5.652t-5.652-2.348-5.652 2.348-2.348 5.652 2.348 5.652 5.652 2.348 5.652-2.348 2.348-5.652zM29.714 29.714q0 0.929-0.679 1.607t-1.607 0.679q-0.964 0-1.607-0.679l-6.125-6.107q-3.196 2.214-7.125 2.214-2.554 0-4.884-0.991t-4.018-2.679-2.679-4.018-0.991-4.884 0.991-4.884 2.679-4.018 4.018-2.679 4.884-0.991 4.884 0.991 4.018 2.679 2.679 4.018 0.991 4.884q0 3.929-2.214 7.125l6.125 6.125q0.661 0.661 0.661 1.607z"></path>
+</symbol>
+<symbol id="icon-envelope-o" viewBox="0 0 32 32">
+<path class="path1" d="M29.714 26.857v-13.714q-0.571 0.643-1.232 1.179-4.786 3.679-7.607 6.036-0.911 0.768-1.482 1.196t-1.545 0.866-1.83 0.438h-0.036q-0.857 0-1.83-0.438t-1.545-0.866-1.482-1.196q-2.821-2.357-7.607-6.036-0.661-0.536-1.232-1.179v13.714q0 0.232 0.17 0.402t0.402 0.17h26.286q0.232 0 0.402-0.17t0.17-0.402zM29.714 8.089v-0.438t-0.009-0.232-0.054-0.223-0.098-0.161-0.161-0.134-0.25-0.045h-26.286q-0.232 0-0.402 0.17t-0.17 0.402q0 3 2.625 5.071 3.446 2.714 7.161 5.661 0.107 0.089 0.625 0.527t0.821 0.67 0.795 0.563 0.902 0.491 0.768 0.161h0.036q0.357 0 0.768-0.161t0.902-0.491 0.795-0.563 0.821-0.67 0.625-0.527q3.714-2.946 7.161-5.661 0.964-0.768 1.795-2.063t0.83-2.348zM32 7.429v19.429q0 1.179-0.839 2.018t-2.018 0.839h-26.286q-1.179 0-2.018-0.839t-0.839-2.018v-19.429q0-1.179 0.839-2.018t2.018-0.839h26.286q1.179 0 2.018 0.839t0.839 2.018z"></path>
+</symbol>
+<symbol id="icon-close" viewBox="0 0 25 32">
+<path class="path1" d="M23.179 23.607q0 0.714-0.5 1.214l-2.429 2.429q-0.5 0.5-1.214 0.5t-1.214-0.5l-5.25-5.25-5.25 5.25q-0.5 0.5-1.214 0.5t-1.214-0.5l-2.429-2.429q-0.5-0.5-0.5-1.214t0.5-1.214l5.25-5.25-5.25-5.25q-0.5-0.5-0.5-1.214t0.5-1.214l2.429-2.429q0.5-0.5 1.214-0.5t1.214 0.5l5.25 5.25 5.25-5.25q0.5-0.5 1.214-0.5t1.214 0.5l2.429 2.429q0.5 0.5 0.5 1.214t-0.5 1.214l-5.25 5.25 5.25 5.25q0.5 0.5 0.5 1.214z"></path>
+</symbol>
+<symbol id="icon-angle-down" viewBox="0 0 21 32">
+<path class="path1" d="M19.196 13.143q0 0.232-0.179 0.411l-8.321 8.321q-0.179 0.179-0.411 0.179t-0.411-0.179l-8.321-8.321q-0.179-0.179-0.179-0.411t0.179-0.411l0.893-0.893q0.179-0.179 0.411-0.179t0.411 0.179l7.018 7.018 7.018-7.018q0.179-0.179 0.411-0.179t0.411 0.179l0.893 0.893q0.179 0.179 0.179 0.411z"></path>
+</symbol>
+<symbol id="icon-folder-open" viewBox="0 0 34 32">
+<path class="path1" d="M33.554 17q0 0.554-0.554 1.179l-6 7.071q-0.768 0.911-2.152 1.545t-2.563 0.634h-19.429q-0.607 0-1.080-0.232t-0.473-0.768q0-0.554 0.554-1.179l6-7.071q0.768-0.911 2.152-1.545t2.563-0.634h19.429q0.607 0 1.080 0.232t0.473 0.768zM27.429 10.857v2.857h-14.857q-1.679 0-3.518 0.848t-2.929 2.134l-6.107 7.179q0-0.071-0.009-0.223t-0.009-0.223v-17.143q0-1.643 1.179-2.821t2.821-1.179h5.714q1.643 0 2.821 1.179t1.179 2.821v0.571h9.714q1.643 0 2.821 1.179t1.179 2.821z"></path>
+</symbol>
+<symbol id="icon-twitter" viewBox="0 0 30 32">
+<path class="path1" d="M28.929 7.286q-1.196 1.75-2.893 2.982 0.018 0.25 0.018 0.75 0 2.321-0.679 4.634t-2.063 4.437-3.295 3.759-4.607 2.607-5.768 0.973q-4.839 0-8.857-2.589 0.625 0.071 1.393 0.071 4.018 0 7.161-2.464-1.875-0.036-3.357-1.152t-2.036-2.848q0.589 0.089 1.089 0.089 0.768 0 1.518-0.196-2-0.411-3.313-1.991t-1.313-3.67v-0.071q1.214 0.679 2.607 0.732-1.179-0.786-1.875-2.054t-0.696-2.75q0-1.571 0.786-2.911 2.161 2.661 5.259 4.259t6.634 1.777q-0.143-0.679-0.143-1.321 0-2.393 1.688-4.080t4.080-1.688q2.5 0 4.214 1.821 1.946-0.375 3.661-1.393-0.661 2.054-2.536 3.179 1.661-0.179 3.321-0.893z"></path>
+</symbol>
+<symbol id="icon-facebook" viewBox="0 0 19 32">
+<path class="path1" d="M17.125 0.214v4.714h-2.804q-1.536 0-2.071 0.643t-0.536 1.929v3.375h5.232l-0.696 5.286h-4.536v13.554h-5.464v-13.554h-4.554v-5.286h4.554v-3.893q0-3.321 1.857-5.152t4.946-1.83q2.625 0 4.071 0.214z"></path>
+</symbol>
+<symbol id="icon-github" viewBox="0 0 27 32">
+<path class="path1" d="M13.714 2.286q3.732 0 6.884 1.839t4.991 4.991 1.839 6.884q0 4.482-2.616 8.063t-6.759 4.955q-0.482 0.089-0.714-0.125t-0.232-0.536q0-0.054 0.009-1.366t0.009-2.402q0-1.732-0.929-2.536 1.018-0.107 1.83-0.321t1.679-0.696 1.446-1.188 0.946-1.875 0.366-2.688q0-2.125-1.411-3.679 0.661-1.625-0.143-3.643-0.5-0.161-1.446 0.196t-1.643 0.786l-0.679 0.429q-1.661-0.464-3.429-0.464t-3.429 0.464q-0.286-0.196-0.759-0.482t-1.491-0.688-1.518-0.241q-0.804 2.018-0.143 3.643-1.411 1.554-1.411 3.679 0 1.518 0.366 2.679t0.938 1.875 1.438 1.196 1.679 0.696 1.83 0.321q-0.696 0.643-0.875 1.839-0.375 0.179-0.804 0.268t-1.018 0.089-1.17-0.384-0.991-1.116q-0.339-0.571-0.866-0.929t-0.884-0.429l-0.357-0.054q-0.375 0-0.518 0.080t-0.089 0.205 0.161 0.25 0.232 0.214l0.125 0.089q0.393 0.179 0.777 0.679t0.563 0.911l0.179 0.411q0.232 0.679 0.786 1.098t1.196 0.536 1.241 0.125 0.991-0.063l0.411-0.071q0 0.679 0.009 1.58t0.009 0.973q0 0.321-0.232 0.536t-0.714 0.125q-4.143-1.375-6.759-4.955t-2.616-8.063q0-3.732 1.839-6.884t4.991-4.991 6.884-1.839zM5.196 21.982q0.054-0.125-0.125-0.214-0.179-0.054-0.232 0.036-0.054 0.125 0.125 0.214 0.161 0.107 0.232-0.036zM5.75 22.589q0.125-0.089-0.036-0.286-0.179-0.161-0.286-0.054-0.125 0.089 0.036 0.286 0.179 0.179 0.286 0.054zM6.286 23.393q0.161-0.125 0-0.339-0.143-0.232-0.304-0.107-0.161 0.089 0 0.321t0.304 0.125zM7.036 24.143q0.143-0.143-0.071-0.339-0.214-0.214-0.357-0.054-0.161 0.143 0.071 0.339 0.214 0.214 0.357 0.054zM8.054 24.589q0.054-0.196-0.232-0.286-0.268-0.071-0.339 0.125t0.232 0.268q0.268 0.107 0.339-0.107zM9.179 24.679q0-0.232-0.304-0.196-0.286 0-0.286 0.196 0 0.232 0.304 0.196 0.286 0 0.286-0.196zM10.214 24.5q-0.036-0.196-0.321-0.161-0.286 0.054-0.25 0.268t0.321 0.143 0.25-0.25z"></path>
+</symbol>
+<symbol id="icon-bars" viewBox="0 0 27 32">
+<path class="path1" d="M27.429 24v2.286q0 0.464-0.339 0.804t-0.804 0.339h-25.143q-0.464 0-0.804-0.339t-0.339-0.804v-2.286q0-0.464 0.339-0.804t0.804-0.339h25.143q0.464 0 0.804 0.339t0.339 0.804zM27.429 14.857v2.286q0 0.464-0.339 0.804t-0.804 0.339h-25.143q-0.464 0-0.804-0.339t-0.339-0.804v-2.286q0-0.464 0.339-0.804t0.804-0.339h25.143q0.464 0 0.804 0.339t0.339 0.804zM27.429 5.714v2.286q0 0.464-0.339 0.804t-0.804 0.339h-25.143q-0.464 0-0.804-0.339t-0.339-0.804v-2.286q0-0.464 0.339-0.804t0.804-0.339h25.143q0.464 0 0.804 0.339t0.339 0.804z"></path>
+</symbol>
+<symbol id="icon-google-plus" viewBox="0 0 41 32">
+<path class="path1" d="M25.661 16.304q0 3.714-1.554 6.616t-4.429 4.536-6.589 1.634q-2.661 0-5.089-1.036t-4.179-2.786-2.786-4.179-1.036-5.089 1.036-5.089 2.786-4.179 4.179-2.786 5.089-1.036q5.107 0 8.768 3.429l-3.554 3.411q-2.089-2.018-5.214-2.018-2.196 0-4.063 1.107t-2.955 3.009-1.089 4.152 1.089 4.152 2.955 3.009 4.063 1.107q1.482 0 2.723-0.411t2.045-1.027 1.402-1.402 0.875-1.482 0.384-1.321h-7.429v-4.5h12.357q0.214 1.125 0.214 2.179zM41.143 14.125v3.75h-3.732v3.732h-3.75v-3.732h-3.732v-3.75h3.732v-3.732h3.75v3.732h3.732z"></path>
+</symbol>
+<symbol id="icon-linkedin" viewBox="0 0 27 32">
+<path class="path1" d="M6.232 11.161v17.696h-5.893v-17.696h5.893zM6.607 5.696q0.018 1.304-0.902 2.179t-2.42 0.875h-0.036q-1.464 0-2.357-0.875t-0.893-2.179q0-1.321 0.92-2.188t2.402-0.866 2.375 0.866 0.911 2.188zM27.429 18.714v10.143h-5.875v-9.464q0-1.875-0.723-2.938t-2.259-1.063q-1.125 0-1.884 0.616t-1.134 1.527q-0.196 0.536-0.196 1.446v9.875h-5.875q0.036-7.125 0.036-11.554t-0.018-5.286l-0.018-0.857h5.875v2.571h-0.036q0.357-0.571 0.732-1t1.009-0.929 1.554-0.777 2.045-0.277q3.054 0 4.911 2.027t1.857 5.938z"></path>
+</symbol>
+<symbol id="icon-quote-right" viewBox="0 0 30 32">
+<path class="path1" d="M13.714 5.714v12.571q0 1.857-0.723 3.545t-1.955 2.92-2.92 1.955-3.545 0.723h-1.143q-0.464 0-0.804-0.339t-0.339-0.804v-2.286q0-0.464 0.339-0.804t0.804-0.339h1.143q1.893 0 3.232-1.339t1.339-3.232v-0.571q0-0.714-0.5-1.214t-1.214-0.5h-4q-1.429 0-2.429-1t-1-2.429v-6.857q0-1.429 1-2.429t2.429-1h6.857q1.429 0 2.429 1t1 2.429zM29.714 5.714v12.571q0 1.857-0.723 3.545t-1.955 2.92-2.92 1.955-3.545 0.723h-1.143q-0.464 0-0.804-0.339t-0.339-0.804v-2.286q0-0.464 0.339-0.804t0.804-0.339h1.143q1.893 0 3.232-1.339t1.339-3.232v-0.571q0-0.714-0.5-1.214t-1.214-0.5h-4q-1.429 0-2.429-1t-1-2.429v-6.857q0-1.429 1-2.429t2.429-1h6.857q1.429 0 2.429 1t1 2.429z"></path>
+</symbol>
+<symbol id="icon-mail-reply" viewBox="0 0 32 32">
+<path class="path1" d="M32 20q0 2.964-2.268 8.054-0.054 0.125-0.188 0.429t-0.241 0.536-0.232 0.393q-0.214 0.304-0.5 0.304-0.268 0-0.42-0.179t-0.152-0.446q0-0.161 0.045-0.473t0.045-0.42q0.089-1.214 0.089-2.196 0-1.804-0.313-3.232t-0.866-2.473-1.429-1.804-1.884-1.241-2.375-0.759-2.75-0.384-3.134-0.107h-4v4.571q0 0.464-0.339 0.804t-0.804 0.339-0.804-0.339l-9.143-9.143q-0.339-0.339-0.339-0.804t0.339-0.804l9.143-9.143q0.339-0.339 0.804-0.339t0.804 0.339 0.339 0.804v4.571h4q12.732 0 15.625 7.196 0.946 2.393 0.946 5.946z"></path>
+</symbol>
+<symbol id="icon-youtube" viewBox="0 0 27 32">
+<path class="path1" d="M17.339 22.214v3.768q0 1.196-0.696 1.196-0.411 0-0.804-0.393v-5.375q0.393-0.393 0.804-0.393 0.696 0 0.696 1.196zM23.375 22.232v0.821h-1.607v-0.821q0-1.214 0.804-1.214t0.804 1.214zM6.125 18.339h1.911v-1.679h-5.571v1.679h1.875v10.161h1.786v-10.161zM11.268 28.5h1.589v-8.821h-1.589v6.75q-0.536 0.75-1.018 0.75-0.321 0-0.375-0.375-0.018-0.054-0.018-0.625v-6.5h-1.589v6.982q0 0.875 0.143 1.304 0.214 0.661 1.036 0.661 0.857 0 1.821-1.089v0.964zM18.929 25.857v-3.518q0-1.304-0.161-1.768-0.304-1-1.268-1-0.893 0-1.661 0.964v-3.875h-1.589v11.839h1.589v-0.857q0.804 0.982 1.661 0.982 0.964 0 1.268-0.982 0.161-0.482 0.161-1.786zM24.964 25.679v-0.232h-1.625q0 0.911-0.036 1.089-0.125 0.643-0.714 0.643-0.821 0-0.821-1.232v-1.554h3.196v-1.839q0-1.411-0.482-2.071-0.696-0.911-1.893-0.911-1.214 0-1.911 0.911-0.5 0.661-0.5 2.071v3.089q0 1.411 0.518 2.071 0.696 0.911 1.929 0.911 1.286 0 1.929-0.946 0.321-0.482 0.375-0.964 0.036-0.161 0.036-1.036zM14.107 9.375v-3.75q0-1.232-0.768-1.232t-0.768 1.232v3.75q0 1.25 0.768 1.25t0.768-1.25zM26.946 22.786q0 4.179-0.464 6.25-0.25 1.054-1.036 1.768t-1.821 0.821q-3.286 0.375-9.911 0.375t-9.911-0.375q-1.036-0.107-1.83-0.821t-1.027-1.768q-0.464-2-0.464-6.25 0-4.179 0.464-6.25 0.25-1.054 1.036-1.768t1.839-0.839q3.268-0.357 9.893-0.357t9.911 0.357q1.036 0.125 1.83 0.839t1.027 1.768q0.464 2 0.464 6.25zM9.125 0h1.821l-2.161 7.125v4.839h-1.786v-4.839q-0.25-1.321-1.089-3.786-0.661-1.839-1.161-3.339h1.893l1.268 4.696zM15.732 5.946v3.125q0 1.446-0.5 2.107-0.661 0.911-1.893 0.911-1.196 0-1.875-0.911-0.5-0.679-0.5-2.107v-3.125q0-1.429 0.5-2.089 0.679-0.911 1.875-0.911 1.232 0 1.893 0.911 0.5 0.661 0.5 2.089zM21.714 3.054v8.911h-1.625v-0.982q-0.946 1.107-1.839 1.107-0.821 0-1.054-0.661-0.143-0.429-0.143-1.339v-7.036h1.625v6.554q0 0.589 0.018 0.625 0.054 0.393 0.375 0.393 0.482 0 1.018-0.768v-6.804h1.625z"></path>
+</symbol>
+<symbol id="icon-dropbox" viewBox="0 0 32 32">
+<path class="path1" d="M7.179 12.625l8.821 5.446-6.107 5.089-8.75-5.696zM24.786 22.536v1.929l-8.75 5.232v0.018l-0.018-0.018-0.018 0.018v-0.018l-8.732-5.232v-1.929l2.625 1.714 6.107-5.071v-0.036l0.018 0.018 0.018-0.018v0.036l6.125 5.071zM9.893 2.107l6.107 5.089-8.821 5.429-6.036-4.821zM24.821 12.625l6.036 4.839-8.732 5.696-6.125-5.089zM22.125 2.107l8.732 5.696-6.036 4.821-8.821-5.429z"></path>
+</symbol>
+<symbol id="icon-instagram" viewBox="0 0 27 32">
+<path class="path1" d="M18.286 16q0-1.893-1.339-3.232t-3.232-1.339-3.232 1.339-1.339 3.232 1.339 3.232 3.232 1.339 3.232-1.339 1.339-3.232zM20.75 16q0 2.929-2.054 4.982t-4.982 2.054-4.982-2.054-2.054-4.982 2.054-4.982 4.982-2.054 4.982 2.054 2.054 4.982zM22.679 8.679q0 0.679-0.482 1.161t-1.161 0.482-1.161-0.482-0.482-1.161 0.482-1.161 1.161-0.482 1.161 0.482 0.482 1.161zM13.714 4.75q-0.125 0-1.366-0.009t-1.884 0-1.723 0.054-1.839 0.179-1.277 0.33q-0.893 0.357-1.571 1.036t-1.036 1.571q-0.196 0.518-0.33 1.277t-0.179 1.839-0.054 1.723 0 1.884 0.009 1.366-0.009 1.366 0 1.884 0.054 1.723 0.179 1.839 0.33 1.277q0.357 0.893 1.036 1.571t1.571 1.036q0.518 0.196 1.277 0.33t1.839 0.179 1.723 0.054 1.884 0 1.366-0.009 1.366 0.009 1.884 0 1.723-0.054 1.839-0.179 1.277-0.33q0.893-0.357 1.571-1.036t1.036-1.571q0.196-0.518 0.33-1.277t0.179-1.839 0.054-1.723 0-1.884-0.009-1.366 0.009-1.366 0-1.884-0.054-1.723-0.179-1.839-0.33-1.277q-0.357-0.893-1.036-1.571t-1.571-1.036q-0.518-0.196-1.277-0.33t-1.839-0.179-1.723-0.054-1.884 0-1.366 0.009zM27.429 16q0 4.089-0.089 5.661-0.179 3.714-2.214 5.75t-5.75 2.214q-1.571 0.089-5.661 0.089t-5.661-0.089q-3.714-0.179-5.75-2.214t-2.214-5.75q-0.089-1.571-0.089-5.661t0.089-5.661q0.179-3.714 2.214-5.75t5.75-2.214q1.571-0.089 5.661-0.089t5.661 0.089q3.714 0.179 5.75 2.214t2.214 5.75q0.089 1.571 0.089 5.661z"></path>
+</symbol>
+<symbol id="icon-flickr" viewBox="0 0 27 32">
+<path class="path1" d="M22.286 2.286q2.125 0 3.634 1.509t1.509 3.634v17.143q0 2.125-1.509 3.634t-3.634 1.509h-17.143q-2.125 0-3.634-1.509t-1.509-3.634v-17.143q0-2.125 1.509-3.634t3.634-1.509h17.143zM12.464 16q0-1.571-1.107-2.679t-2.679-1.107-2.679 1.107-1.107 2.679 1.107 2.679 2.679 1.107 2.679-1.107 1.107-2.679zM22.536 16q0-1.571-1.107-2.679t-2.679-1.107-2.679 1.107-1.107 2.679 1.107 2.679 2.679 1.107 2.679-1.107 1.107-2.679z"></path>
+</symbol>
+<symbol id="icon-tumblr" viewBox="0 0 19 32">
+<path class="path1" d="M16.857 23.732l1.429 4.232q-0.411 0.625-1.982 1.179t-3.161 0.571q-1.857 0.036-3.402-0.464t-2.545-1.321-1.696-1.893-0.991-2.143-0.295-2.107v-9.714h-3v-3.839q1.286-0.464 2.304-1.241t1.625-1.607 1.036-1.821 0.607-1.768 0.268-1.58q0.018-0.089 0.080-0.152t0.134-0.063h4.357v7.571h5.946v4.5h-5.964v9.25q0 0.536 0.116 1t0.402 0.938 0.884 0.741 1.455 0.25q1.393-0.036 2.393-0.518z"></path>
+</symbol>
+<symbol id="icon-dribbble" viewBox="0 0 27 32">
+<path class="path1" d="M18.286 26.786q-0.75-4.304-2.5-8.893h-0.036l-0.036 0.018q-0.286 0.107-0.768 0.295t-1.804 0.875-2.446 1.464-2.339 2.045-1.839 2.643l-0.268-0.196q3.286 2.679 7.464 2.679 2.357 0 4.571-0.929zM14.982 15.946q-0.375-0.875-0.946-1.982-5.554 1.661-12.018 1.661-0.018 0.125-0.018 0.375 0 2.214 0.786 4.223t2.214 3.598q0.893-1.589 2.205-2.973t2.545-2.223 2.33-1.446 1.777-0.857l0.661-0.232q0.071-0.018 0.232-0.063t0.232-0.080zM13.071 12.161q-2.143-3.804-4.357-6.75-2.464 1.161-4.179 3.321t-2.286 4.857q5.393 0 10.821-1.429zM25.286 17.857q-3.75-1.071-7.304-0.518 1.554 4.268 2.286 8.375 1.982-1.339 3.304-3.384t1.714-4.473zM10.911 4.625q-0.018 0-0.036 0.018 0.018-0.018 0.036-0.018zM21.446 7.214q-3.304-2.929-7.732-2.929-1.357 0-2.768 0.339 2.339 3.036 4.393 6.821 1.232-0.464 2.321-1.080t1.723-1.098 1.17-1.018 0.67-0.723zM25.429 15.875q-0.054-4.143-2.661-7.321l-0.018 0.018q-0.161 0.214-0.339 0.438t-0.777 0.795-1.268 1.080-1.786 1.161-2.348 1.152q0.446 0.946 0.786 1.696 0.036 0.107 0.116 0.313t0.134 0.295q0.643-0.089 1.33-0.125t1.313-0.036 1.232 0.027 1.143 0.071 1.009 0.098 0.857 0.116 0.652 0.107 0.446 0.080zM27.429 16q0 3.732-1.839 6.884t-4.991 4.991-6.884 1.839-6.884-1.839-4.991-4.991-1.839-6.884 1.839-6.884 4.991-4.991 6.884-1.839 6.884 1.839 4.991 4.991 1.839 6.884z"></path>
+</symbol>
+<symbol id="icon-skype" viewBox="0 0 27 32">
+<path class="path1" d="M20.946 18.982q0-0.893-0.348-1.634t-0.866-1.223-1.304-0.875-1.473-0.607-1.563-0.411l-1.857-0.429q-0.536-0.125-0.786-0.188t-0.625-0.205-0.536-0.286-0.295-0.375-0.134-0.536q0-1.375 2.571-1.375 0.768 0 1.375 0.214t0.964 0.509 0.679 0.598 0.714 0.518 0.857 0.214q0.839 0 1.348-0.571t0.509-1.375q0-0.982-1-1.777t-2.536-1.205-3.25-0.411q-1.214 0-2.357 0.277t-2.134 0.839-1.589 1.554-0.598 2.295q0 1.089 0.339 1.902t1 1.348 1.429 0.866 1.839 0.58l2.607 0.643q1.607 0.393 2 0.643 0.571 0.357 0.571 1.071 0 0.696-0.714 1.152t-1.875 0.455q-0.911 0-1.634-0.286t-1.161-0.688-0.813-0.804-0.821-0.688-0.964-0.286q-0.893 0-1.348 0.536t-0.455 1.339q0 1.643 2.179 2.813t5.196 1.17q1.304 0 2.5-0.33t2.188-0.955 1.58-1.67 0.589-2.348zM27.429 22.857q0 2.839-2.009 4.848t-4.848 2.009q-2.321 0-4.179-1.429-1.375 0.286-2.679 0.286-2.554 0-4.884-0.991t-4.018-2.679-2.679-4.018-0.991-4.884q0-1.304 0.286-2.679-1.429-1.857-1.429-4.179 0-2.839 2.009-4.848t4.848-2.009q2.321 0 4.179 1.429 1.375-0.286 2.679-0.286 2.554 0 4.884 0.991t4.018 2.679 2.679 4.018 0.991 4.884q0 1.304-0.286 2.679 1.429 1.857 1.429 4.179z"></path>
+</symbol>
+<symbol id="icon-foursquare" viewBox="0 0 23 32">
+<path class="path1" d="M17.857 7.75l0.661-3.464q0.089-0.411-0.161-0.714t-0.625-0.304h-12.714q-0.411 0-0.688 0.304t-0.277 0.661v19.661q0 0.125 0.107 0.018l5.196-6.286q0.411-0.464 0.679-0.598t0.857-0.134h4.268q0.393 0 0.661-0.259t0.321-0.527q0.429-2.321 0.661-3.411 0.071-0.375-0.205-0.714t-0.652-0.339h-5.25q-0.518 0-0.857-0.339t-0.339-0.857v-0.75q0-0.518 0.339-0.848t0.857-0.33h6.179q0.321 0 0.625-0.241t0.357-0.527zM21.911 3.786q-0.268 1.304-0.955 4.759t-1.241 6.25-0.625 3.098q-0.107 0.393-0.161 0.58t-0.25 0.58-0.438 0.589-0.688 0.375-1.036 0.179h-4.839q-0.232 0-0.393 0.179-0.143 0.161-7.607 8.821-0.393 0.446-1.045 0.509t-0.866-0.098q-0.982-0.393-0.982-1.75v-25.179q0-0.982 0.679-1.83t2.143-0.848h15.857q1.696 0 2.268 0.946t0.179 2.839zM21.911 3.786l-2.821 14.107q0.071-0.304 0.625-3.098t1.241-6.25 0.955-4.759z"></path>
+</symbol>
+<symbol id="icon-wordpress" viewBox="0 0 32 32">
+<path class="path1" d="M2.268 16q0-2.911 1.196-5.589l6.554 17.946q-3.5-1.696-5.625-5.018t-2.125-7.339zM25.268 15.304q0 0.339-0.045 0.688t-0.179 0.884-0.205 0.786-0.313 1.054-0.313 1.036l-1.357 4.571-4.964-14.75q0.821-0.054 1.571-0.143 0.339-0.036 0.464-0.33t-0.045-0.554-0.509-0.241l-3.661 0.179q-1.339-0.018-3.607-0.179-0.214-0.018-0.366 0.089t-0.205 0.268-0.027 0.33 0.161 0.295 0.348 0.143l1.429 0.143 2.143 5.857-3 9-5-14.857q0.821-0.054 1.571-0.143 0.339-0.036 0.464-0.33t-0.045-0.554-0.509-0.241l-3.661 0.179q-0.125 0-0.411-0.009t-0.464-0.009q1.875-2.857 4.902-4.527t6.563-1.67q2.625 0 5.009 0.946t4.259 2.661h-0.179q-0.982 0-1.643 0.723t-0.661 1.705q0 0.214 0.036 0.429t0.071 0.384 0.143 0.411 0.161 0.375 0.214 0.402 0.223 0.375 0.259 0.429 0.25 0.411q1.125 1.911 1.125 3.786zM16.232 17.196l4.232 11.554q0.018 0.107 0.089 0.196-2.25 0.786-4.554 0.786-2 0-3.875-0.571zM28.036 9.411q1.696 3.107 1.696 6.589 0 3.732-1.857 6.884t-4.982 4.973l4.196-12.107q1.054-3.018 1.054-4.929 0-0.75-0.107-1.411zM16 0q3.25 0 6.214 1.268t5.107 3.411 3.411 5.107 1.268 6.214-1.268 6.214-3.411 5.107-5.107 3.411-6.214 1.268-6.214-1.268-5.107-3.411-3.411-5.107-1.268-6.214 1.268-6.214 3.411-5.107 5.107-3.411 6.214-1.268zM16 31.268q3.089 0 5.92-1.214t4.875-3.259 3.259-4.875 1.214-5.92-1.214-5.92-3.259-4.875-4.875-3.259-5.92-1.214-5.92 1.214-4.875 3.259-3.259 4.875-1.214 5.92 1.214 5.92 3.259 4.875 4.875 3.259 5.92 1.214z"></path>
+</symbol>
+<symbol id="icon-stumbleupon" viewBox="0 0 34 32">
+<path class="path1" d="M18.964 12.714v-2.107q0-0.75-0.536-1.286t-1.286-0.536-1.286 0.536-0.536 1.286v10.929q0 3.125-2.25 5.339t-5.411 2.214q-3.179 0-5.42-2.241t-2.241-5.42v-4.75h5.857v4.679q0 0.768 0.536 1.295t1.286 0.527 1.286-0.527 0.536-1.295v-11.071q0-3.054 2.259-5.214t5.384-2.161q3.143 0 5.393 2.179t2.25 5.25v2.429l-3.482 1.036zM28.429 16.679h5.857v4.75q0 3.179-2.241 5.42t-5.42 2.241q-3.161 0-5.411-2.223t-2.25-5.366v-4.786l2.339 1.089 3.482-1.036v4.821q0 0.75 0.536 1.277t1.286 0.527 1.286-0.527 0.536-1.277v-4.911z"></path>
+</symbol>
+<symbol id="icon-digg" viewBox="0 0 37 32">
+<path class="path1" d="M5.857 5.036h3.643v17.554h-9.5v-12.446h5.857v-5.107zM5.857 19.661v-6.589h-2.196v6.589h2.196zM10.964 10.143v12.446h3.661v-12.446h-3.661zM10.964 5.036v3.643h3.661v-3.643h-3.661zM16.089 10.143h9.518v16.821h-9.518v-2.911h5.857v-1.464h-5.857v-12.446zM21.946 19.661v-6.589h-2.196v6.589h2.196zM27.071 10.143h9.5v16.821h-9.5v-2.911h5.839v-1.464h-5.839v-12.446zM32.911 19.661v-6.589h-2.196v6.589h2.196z"></path>
+</symbol>
+<symbol id="icon-spotify" viewBox="0 0 27 32">
+<path class="path1" d="M20.125 21.607q0-0.571-0.536-0.911-3.446-2.054-7.982-2.054-2.375 0-5.125 0.607-0.75 0.161-0.75 0.929 0 0.357 0.241 0.616t0.634 0.259q0.089 0 0.661-0.143 2.357-0.482 4.339-0.482 4.036 0 7.089 1.839 0.339 0.196 0.589 0.196 0.339 0 0.589-0.241t0.25-0.616zM21.839 17.768q0-0.714-0.625-1.089-4.232-2.518-9.786-2.518-2.732 0-5.411 0.75-0.857 0.232-0.857 1.143 0 0.446 0.313 0.759t0.759 0.313q0.125 0 0.661-0.143 2.179-0.589 4.482-0.589 4.982 0 8.714 2.214 0.429 0.232 0.679 0.232 0.446 0 0.759-0.313t0.313-0.759zM23.768 13.339q0-0.839-0.714-1.25-2.25-1.304-5.232-1.973t-6.125-0.67q-3.643 0-6.5 0.839-0.411 0.125-0.688 0.455t-0.277 0.866q0 0.554 0.366 0.929t0.92 0.375q0.196 0 0.714-0.143 2.375-0.661 5.482-0.661 2.839 0 5.527 0.607t4.527 1.696q0.375 0.214 0.714 0.214 0.518 0 0.902-0.366t0.384-0.92zM27.429 16q0 3.732-1.839 6.884t-4.991 4.991-6.884 1.839-6.884-1.839-4.991-4.991-1.839-6.884 1.839-6.884 4.991-4.991 6.884-1.839 6.884 1.839 4.991 4.991 1.839 6.884z"></path>
+</symbol>
+<symbol id="icon-soundcloud" viewBox="0 0 41 32">
+<path class="path1" d="M14 24.5l0.286-4.304-0.286-9.339q-0.018-0.179-0.134-0.304t-0.295-0.125q-0.161 0-0.286 0.125t-0.125 0.304l-0.25 9.339 0.25 4.304q0.018 0.179 0.134 0.295t0.277 0.116q0.393 0 0.429-0.411zM19.286 23.982l0.196-3.768-0.214-10.464q0-0.286-0.232-0.429-0.143-0.089-0.286-0.089t-0.286 0.089q-0.232 0.143-0.232 0.429l-0.018 0.107-0.179 10.339q0 0.018 0.196 4.214v0.018q0 0.179 0.107 0.304 0.161 0.196 0.411 0.196 0.196 0 0.357-0.161 0.161-0.125 0.161-0.357zM0.625 17.911l0.357 2.286-0.357 2.25q-0.036 0.161-0.161 0.161t-0.161-0.161l-0.304-2.25 0.304-2.286q0.036-0.161 0.161-0.161t0.161 0.161zM2.161 16.5l0.464 3.696-0.464 3.625q-0.036 0.161-0.179 0.161-0.161 0-0.161-0.179l-0.411-3.607 0.411-3.696q0-0.161 0.161-0.161 0.143 0 0.179 0.161zM3.804 15.821l0.446 4.375-0.446 4.232q0 0.196-0.196 0.196-0.179 0-0.214-0.196l-0.375-4.232 0.375-4.375q0.036-0.214 0.214-0.214 0.196 0 0.196 0.214zM5.482 15.696l0.411 4.5-0.411 4.357q-0.036 0.232-0.25 0.232-0.232 0-0.232-0.232l-0.375-4.357 0.375-4.5q0-0.232 0.232-0.232 0.214 0 0.25 0.232zM7.161 16.018l0.375 4.179-0.375 4.393q-0.036 0.286-0.286 0.286-0.107 0-0.188-0.080t-0.080-0.205l-0.357-4.393 0.357-4.179q0-0.107 0.080-0.188t0.188-0.080q0.25 0 0.286 0.268zM8.839 13.411l0.375 6.786-0.375 4.393q0 0.125-0.089 0.223t-0.214 0.098q-0.286 0-0.321-0.321l-0.321-4.393 0.321-6.786q0.036-0.321 0.321-0.321 0.125 0 0.214 0.098t0.089 0.223zM10.518 11.875l0.339 8.357-0.339 4.357q0 0.143-0.098 0.241t-0.241 0.098q-0.321 0-0.357-0.339l-0.286-4.357 0.286-8.357q0.036-0.339 0.357-0.339 0.143 0 0.241 0.098t0.098 0.241zM12.268 11.161l0.321 9.036-0.321 4.321q-0.036 0.375-0.393 0.375-0.339 0-0.375-0.375l-0.286-4.321 0.286-9.036q0-0.161 0.116-0.277t0.259-0.116q0.161 0 0.268 0.116t0.125 0.277zM19.268 24.411v0 0zM15.732 11.089l0.268 9.107-0.268 4.268q0 0.179-0.134 0.313t-0.313 0.134-0.304-0.125-0.143-0.321l-0.25-4.268 0.25-9.107q0-0.196 0.134-0.321t0.313-0.125 0.313 0.125 0.134 0.321zM17.5 11.429l0.25 8.786-0.25 4.214q0 0.196-0.143 0.339t-0.339 0.143-0.339-0.143-0.161-0.339l-0.214-4.214 0.214-8.786q0.018-0.214 0.161-0.357t0.339-0.143 0.33 0.143 0.152 0.357zM21.286 20.214l-0.25 4.125q0 0.232-0.161 0.393t-0.393 0.161-0.393-0.161-0.179-0.393l-0.107-2.036-0.107-2.089 0.214-11.357v-0.054q0.036-0.268 0.214-0.429 0.161-0.125 0.357-0.125 0.143 0 0.268 0.089 0.25 0.143 0.286 0.464zM41.143 19.875q0 2.089-1.482 3.563t-3.571 1.473h-14.036q-0.232-0.036-0.393-0.196t-0.161-0.393v-16.054q0-0.411 0.5-0.589 1.518-0.607 3.232-0.607 3.482 0 6.036 2.348t2.857 5.777q0.946-0.393 1.964-0.393 2.089 0 3.571 1.482t1.482 3.589z"></path>
+</symbol>
+<symbol id="icon-codepen" viewBox="0 0 32 32">
+<path class="path1" d="M3.857 20.875l10.768 7.179v-6.411l-5.964-3.982zM2.75 18.304l3.446-2.304-3.446-2.304v4.607zM17.375 28.054l10.768-7.179-4.804-3.214-5.964 3.982v6.411zM16 19.25l4.857-3.25-4.857-3.25-4.857 3.25zM8.661 14.339l5.964-3.982v-6.411l-10.768 7.179zM25.804 16l3.446 2.304v-4.607zM23.339 14.339l4.804-3.214-10.768-7.179v6.411zM32 11.125v9.75q0 0.732-0.607 1.143l-14.625 9.75q-0.375 0.232-0.768 0.232t-0.768-0.232l-14.625-9.75q-0.607-0.411-0.607-1.143v-9.75q0-0.732 0.607-1.143l14.625-9.75q0.375-0.232 0.768-0.232t0.768 0.232l14.625 9.75q0.607 0.411 0.607 1.143z"></path>
+</symbol>
+<symbol id="icon-twitch" viewBox="0 0 32 32">
+<path class="path1" d="M16 7.75v7.75h-2.589v-7.75h2.589zM23.107 7.75v7.75h-2.589v-7.75h2.589zM23.107 21.321l4.518-4.536v-14.196h-21.321v18.732h5.821v3.875l3.875-3.875h7.107zM30.214 0v18.089l-7.75 7.75h-5.821l-3.875 3.875h-3.875v-3.875h-7.107v-20.679l1.946-5.161h26.482z"></path>
+</symbol>
+<symbol id="icon-meanpath" viewBox="0 0 27 32">
+<path class="path1" d="M23.411 15.036v2.036q0 0.429-0.241 0.679t-0.67 0.25h-3.607q-0.429 0-0.679-0.25t-0.25-0.679v-2.036q0-0.429 0.25-0.679t0.679-0.25h3.607q0.429 0 0.67 0.25t0.241 0.679zM14.661 19.143v-4.464q0-0.946-0.58-1.527t-1.527-0.58h-2.375q-1.214 0-1.714 0.929-0.5-0.929-1.714-0.929h-2.321q-0.946 0-1.527 0.58t-0.58 1.527v4.464q0 0.393 0.375 0.393h0.982q0.393 0 0.393-0.393v-4.107q0-0.429 0.241-0.679t0.688-0.25h1.679q0.429 0 0.679 0.25t0.25 0.679v4.107q0 0.393 0.375 0.393h0.964q0.393 0 0.393-0.393v-4.107q0-0.429 0.25-0.679t0.679-0.25h1.732q0.429 0 0.67 0.25t0.241 0.679v4.107q0 0.393 0.393 0.393h0.982q0.375 0 0.375-0.393zM25.179 17.429v-2.75q0-0.946-0.589-1.527t-1.536-0.58h-4.714q-0.946 0-1.536 0.58t-0.589 1.527v7.321q0 0.375 0.393 0.375h0.982q0.375 0 0.375-0.375v-3.214q0.554 0.75 1.679 0.75h3.411q0.946 0 1.536-0.58t0.589-1.527zM27.429 6.429v19.143q0 1.714-1.214 2.929t-2.929 1.214h-19.143q-1.714 0-2.929-1.214t-1.214-2.929v-19.143q0-1.714 1.214-2.929t2.929-1.214h19.143q1.714 0 2.929 1.214t1.214 2.929z"></path>
+</symbol>
+<symbol id="icon-pinterest-p" viewBox="0 0 23 32">
+<path class="path1" d="M0 10.661q0-1.929 0.67-3.634t1.848-2.973 2.714-2.196 3.304-1.393 3.607-0.464q2.821 0 5.25 1.188t3.946 3.455 1.518 5.125q0 1.714-0.339 3.357t-1.071 3.161-1.786 2.67-2.589 1.839-3.375 0.688q-1.214 0-2.411-0.571t-1.714-1.571q-0.179 0.696-0.5 2.009t-0.42 1.696-0.366 1.268-0.464 1.268-0.571 1.116-0.821 1.384-1.107 1.545l-0.25 0.089-0.161-0.179q-0.268-2.804-0.268-3.357 0-1.643 0.384-3.688t1.188-5.134 0.929-3.625q-0.571-1.161-0.571-3.018 0-1.482 0.929-2.786t2.357-1.304q1.089 0 1.696 0.723t0.607 1.83q0 1.179-0.786 3.411t-0.786 3.339q0 1.125 0.804 1.866t1.946 0.741q0.982 0 1.821-0.446t1.402-1.214 1-1.696 0.679-1.973 0.357-1.982 0.116-1.777q0-3.089-1.955-4.813t-5.098-1.723q-3.571 0-5.964 2.313t-2.393 5.866q0 0.786 0.223 1.518t0.482 1.161 0.482 0.813 0.223 0.545q0 0.5-0.268 1.304t-0.661 0.804q-0.036 0-0.304-0.054-0.911-0.268-1.616-1t-1.089-1.688-0.58-1.929-0.196-1.902z"></path>
+</symbol>
+<symbol id="icon-get-pocket" viewBox="0 0 31 32">
+<path class="path1" d="M27.946 2.286q1.161 0 1.964 0.813t0.804 1.973v9.268q0 3.143-1.214 6t-3.259 4.911-4.893 3.259-5.973 1.205q-3.143 0-5.991-1.205t-4.902-3.259-3.268-4.911-1.214-6v-9.268q0-1.143 0.821-1.964t1.964-0.821h25.161zM15.375 21.286q0.839 0 1.464-0.589l7.214-6.929q0.661-0.625 0.661-1.518 0-0.875-0.616-1.491t-1.491-0.616q-0.839 0-1.464 0.589l-5.768 5.536-5.768-5.536q-0.625-0.589-1.446-0.589-0.875 0-1.491 0.616t-0.616 1.491q0 0.911 0.643 1.518l7.232 6.929q0.589 0.589 1.446 0.589z"></path>
+</symbol>
+<symbol id="icon-vimeo" viewBox="0 0 32 32">
+<path class="path1" d="M30.518 9.25q-0.179 4.214-5.929 11.625-5.946 7.696-10.036 7.696-2.536 0-4.286-4.696-0.786-2.857-2.357-8.607-1.286-4.679-2.804-4.679-0.321 0-2.268 1.357l-1.375-1.75q0.429-0.375 1.929-1.723t2.321-2.063q2.786-2.464 4.304-2.607 1.696-0.161 2.732 0.991t1.446 3.634q0.786 5.125 1.179 6.661 0.982 4.446 2.143 4.446 0.911 0 2.75-2.875 1.804-2.875 1.946-4.393 0.232-2.482-1.946-2.482-1.018 0-2.161 0.464 2.143-7.018 8.196-6.821 4.482 0.143 4.214 5.821z"></path>
+</symbol>
+<symbol id="icon-reddit-alien" viewBox="0 0 32 32">
+<path class="path1" d="M32 15.107q0 1.036-0.527 1.884t-1.42 1.295q0.214 0.821 0.214 1.714 0 2.768-1.902 5.125t-5.188 3.723-7.143 1.366-7.134-1.366-5.179-3.723-1.902-5.125q0-0.839 0.196-1.679-0.911-0.446-1.464-1.313t-0.554-1.902q0-1.464 1.036-2.509t2.518-1.045q1.518 0 2.589 1.125 3.893-2.714 9.196-2.893l2.071-9.304q0.054-0.232 0.268-0.375t0.464-0.089l6.589 1.446q0.321-0.661 0.964-1.063t1.411-0.402q1.107 0 1.893 0.777t0.786 1.884-0.786 1.893-1.893 0.786-1.884-0.777-0.777-1.884l-5.964-1.321-1.857 8.429q5.357 0.161 9.268 2.857 1.036-1.089 2.554-1.089 1.482 0 2.518 1.045t1.036 2.509zM7.464 18.661q0 1.107 0.777 1.893t1.884 0.786 1.893-0.786 0.786-1.893-0.786-1.884-1.893-0.777q-1.089 0-1.875 0.786t-0.786 1.875zM21.929 25q0.196-0.196 0.196-0.464t-0.196-0.464q-0.179-0.179-0.446-0.179t-0.464 0.179q-0.732 0.75-2.161 1.107t-2.857 0.357-2.857-0.357-2.161-1.107q-0.196-0.179-0.464-0.179t-0.446 0.179q-0.196 0.179-0.196 0.455t0.196 0.473q0.768 0.768 2.116 1.214t2.188 0.527 1.625 0.080 1.625-0.080 2.188-0.527 2.116-1.214zM21.875 21.339q1.107 0 1.884-0.786t0.777-1.893q0-1.089-0.786-1.875t-1.875-0.786q-1.107 0-1.893 0.777t-0.786 1.884 0.786 1.893 1.893 0.786z"></path>
+</symbol>
+<symbol id="icon-hashtag" viewBox="0 0 32 32">
+<path class="path1" d="M17.696 18.286l1.143-4.571h-4.536l-1.143 4.571h4.536zM31.411 9.286l-1 4q-0.125 0.429-0.554 0.429h-5.839l-1.143 4.571h5.554q0.268 0 0.446 0.214 0.179 0.25 0.107 0.5l-1 4q-0.089 0.429-0.554 0.429h-5.839l-1.446 5.857q-0.125 0.429-0.554 0.429h-4q-0.286 0-0.464-0.214-0.161-0.214-0.107-0.5l1.393-5.571h-4.536l-1.446 5.857q-0.125 0.429-0.554 0.429h-4.018q-0.268 0-0.446-0.214-0.161-0.214-0.107-0.5l1.393-5.571h-5.554q-0.268 0-0.446-0.214-0.161-0.214-0.107-0.5l1-4q0.125-0.429 0.554-0.429h5.839l1.143-4.571h-5.554q-0.268 0-0.446-0.214-0.179-0.25-0.107-0.5l1-4q0.089-0.429 0.554-0.429h5.839l1.446-5.857q0.125-0.429 0.571-0.429h4q0.268 0 0.446 0.214 0.161 0.214 0.107 0.5l-1.393 5.571h4.536l1.446-5.857q0.125-0.429 0.571-0.429h4q0.268 0 0.446 0.214 0.161 0.214 0.107 0.5l-1.393 5.571h5.554q0.268 0 0.446 0.214 0.161 0.214 0.107 0.5z"></path>
+</symbol>
+<symbol id="icon-chain" viewBox="0 0 30 32">
+<path class="path1" d="M26 21.714q0-0.714-0.5-1.214l-3.714-3.714q-0.5-0.5-1.214-0.5-0.75 0-1.286 0.571 0.054 0.054 0.339 0.33t0.384 0.384 0.268 0.339 0.232 0.455 0.063 0.491q0 0.714-0.5 1.214t-1.214 0.5q-0.268 0-0.491-0.063t-0.455-0.232-0.339-0.268-0.384-0.384-0.33-0.339q-0.589 0.554-0.589 1.304 0 0.714 0.5 1.214l3.679 3.696q0.482 0.482 1.214 0.482 0.714 0 1.214-0.464l2.625-2.607q0.5-0.5 0.5-1.196zM13.446 9.125q0-0.714-0.5-1.214l-3.679-3.696q-0.5-0.5-1.214-0.5-0.696 0-1.214 0.482l-2.625 2.607q-0.5 0.5-0.5 1.196 0 0.714 0.5 1.214l3.714 3.714q0.482 0.482 1.214 0.482 0.75 0 1.286-0.554-0.054-0.054-0.339-0.33t-0.384-0.384-0.268-0.339-0.232-0.455-0.063-0.491q0-0.714 0.5-1.214t1.214-0.5q0.268 0 0.491 0.063t0.455 0.232 0.339 0.268 0.384 0.384 0.33 0.339q0.589-0.554 0.589-1.304zM29.429 21.714q0 2.143-1.518 3.625l-2.625 2.607q-1.482 1.482-3.625 1.482-2.161 0-3.643-1.518l-3.679-3.696q-1.482-1.482-1.482-3.625 0-2.196 1.571-3.732l-1.571-1.571q-1.536 1.571-3.714 1.571-2.143 0-3.643-1.5l-3.714-3.714q-1.5-1.5-1.5-3.643t1.518-3.625l2.625-2.607q1.482-1.482 3.625-1.482 2.161 0 3.643 1.518l3.679 3.696q1.482 1.482 1.482 3.625 0 2.196-1.571 3.732l1.571 1.571q1.536-1.571 3.714-1.571 2.143 0 3.643 1.5l3.714 3.714q1.5 1.5 1.5 3.643z"></path>
+</symbol>
+<symbol id="icon-thumb-tack" viewBox="0 0 21 32">
+<path class="path1" d="M8.571 15.429v-8q0-0.25-0.161-0.411t-0.411-0.161-0.411 0.161-0.161 0.411v8q0 0.25 0.161 0.411t0.411 0.161 0.411-0.161 0.161-0.411zM20.571 21.714q0 0.464-0.339 0.804t-0.804 0.339h-7.661l-0.911 8.625q-0.036 0.214-0.188 0.366t-0.366 0.152h-0.018q-0.482 0-0.571-0.482l-1.357-8.661h-7.214q-0.464 0-0.804-0.339t-0.339-0.804q0-2.196 1.402-3.955t3.17-1.759v-9.143q-0.929 0-1.607-0.679t-0.679-1.607 0.679-1.607 1.607-0.679h11.429q0.929 0 1.607 0.679t0.679 1.607-0.679 1.607-1.607 0.679v9.143q1.768 0 3.17 1.759t1.402 3.955z"></path>
+</symbol>
+<symbol id="icon-arrow-left" viewBox="0 0 43 32">
+<path class="path1" d="M42.311 14.044c-0.178-0.178-0.533-0.356-0.711-0.356h-33.778l10.311-10.489c0.178-0.178 0.356-0.533 0.356-0.711 0-0.356-0.178-0.533-0.356-0.711l-1.6-1.422c-0.356-0.178-0.533-0.356-0.889-0.356s-0.533 0.178-0.711 0.356l-14.578 14.933c-0.178 0.178-0.356 0.533-0.356 0.711s0.178 0.533 0.356 0.711l14.756 14.933c0 0.178 0.356 0.356 0.533 0.356s0.533-0.178 0.711-0.356l1.6-1.6c0.178-0.178 0.356-0.533 0.356-0.711s-0.178-0.533-0.356-0.711l-10.311-10.489h33.778c0.178 0 0.533-0.178 0.711-0.356 0.356-0.178 0.533-0.356 0.533-0.711v-2.133c0-0.356-0.178-0.711-0.356-0.889z"></path>
+</symbol>
+<symbol id="icon-arrow-right" viewBox="0 0 43 32">
+<path class="path1" d="M0.356 17.956c0.178 0.178 0.533 0.356 0.711 0.356h33.778l-10.311 10.489c-0.178 0.178-0.356 0.533-0.356 0.711 0 0.356 0.178 0.533 0.356 0.711l1.6 1.6c0.178 0.178 0.533 0.356 0.711 0.356s0.533-0.178 0.711-0.356l14.756-14.933c0.178-0.356 0.356-0.711 0.356-0.889s-0.178-0.533-0.356-0.711l-14.756-14.933c0-0.178-0.356-0.356-0.533-0.356s-0.533 0.178-0.711 0.356l-1.6 1.6c-0.178 0.178-0.356 0.533-0.356 0.711s0.178 0.533 0.356 0.711l10.311 10.489h-33.778c-0.178 0-0.533 0.178-0.711 0.356-0.356 0.178-0.533 0.356-0.533 0.711v2.311c0 0.178 0.178 0.533 0.356 0.711z"></path>
+</symbol>
+<symbol id="icon-play" viewBox="0 0 22 28">
+<path d="M21.625 14.484l-20.75 11.531c-0.484 0.266-0.875 0.031-0.875-0.516v-23c0-0.547 0.391-0.781 0.875-0.516l20.75 11.531c0.484 0.266 0.484 0.703 0 0.969z"></path>
+</symbol>
+<symbol id="icon-pause" viewBox="0 0 24 28">
+<path d="M24 3v22c0 0.547-0.453 1-1 1h-8c-0.547 0-1-0.453-1-1v-22c0-0.547 0.453-1 1-1h8c0.547 0 1 0.453 1 1zM10 3v22c0 0.547-0.453 1-1 1h-8c-0.547 0-1-0.453-1-1v-22c0-0.547 0.453-1 1-1h8c0.547 0 1 0.453 1 1z"></path>
+</symbol>
+</defs>
+</svg>
diff --git a/wp-content/themes/twentyseventeen/assets/js/customize-controls.js b/wp-content/themes/twentyseventeen/assets/js/customize-controls.js
new file mode 100644 (file)
index 0000000..b8e7e81
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * Scripts within the customizer controls window.
+ *
+ * Contextually shows the color hue control and informs the preview
+ * when users open or close the front page sections section.
+ */
+
+(function() {
+       wp.customize.bind( 'ready', function() {
+
+               // Only show the color hue control when there's a custom color scheme.
+               wp.customize( 'colorscheme', function( setting ) {
+                       wp.customize.control( 'colorscheme_hue', function( control ) {
+                               var visibility = function() {
+                                       if ( 'custom' === setting.get() ) {
+                                               control.container.slideDown( 180 );
+                                       } else {
+                                               control.container.slideUp( 180 );
+                                       }
+                               };
+
+                               visibility();
+                               setting.bind( visibility );
+                       });
+               });
+
+               // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly.
+               wp.customize.section( 'theme_options' ).expanded.bind( function( isExpanding ) {
+
+                       // Value of isExpanding will = true if you're entering the section, false if you're leaving it.
+                       wp.customize.previewer.send( 'section-highlight', { expanded: isExpanding });
+               });
+       });
+})( jQuery );
diff --git a/wp-content/themes/twentyseventeen/assets/js/customize-preview.js b/wp-content/themes/twentyseventeen/assets/js/customize-preview.js
new file mode 100644 (file)
index 0000000..dba7b79
--- /dev/null
@@ -0,0 +1,150 @@
+/**
+ * File customize-preview.js.
+ *
+ * Instantly live-update customizer settings in the preview for improved user experience.
+ */
+
+(function( $ ) {
+
+       // Collect information from customize-controls.js about which panels are opening.
+       wp.customize.bind( 'preview-ready', function() {
+
+               // Initially hide the theme option placeholders on load
+               $( '.panel-placeholder' ).hide();
+
+               wp.customize.preview.bind( 'section-highlight', function( data ) {
+
+                       // Only on the front page.
+                       if ( ! $( 'body' ).hasClass( 'twentyseventeen-front-page' ) ) {
+                               return;
+                       }
+
+                       // When the section is expanded, show and scroll to the content placeholders, exposing the edit links.
+                       if ( true === data.expanded ) {
+                               $( 'body' ).addClass( 'highlight-front-sections' );
+                               $( '.panel-placeholder' ).slideDown( 200, function() {
+                                       $.scrollTo( $( '#panel1' ), {
+                                               duration: 600,
+                                               offset: { 'top': -70 } // Account for sticky menu.
+                                       });
+                               });
+
+                       // If we've left the panel, hide the placeholders and scroll back to the top.
+                       } else {
+                               $( 'body' ).removeClass( 'highlight-front-sections' );
+                               // Don't change scroll when leaving - it's likely to have unintended consequences.
+                               $( '.panel-placeholder' ).slideUp( 200 );
+                       }
+               });
+       });
+
+       // Site title and description.
+       wp.customize( 'blogname', function( value ) {
+               value.bind( function( to ) {
+                       $( '.site-title a' ).text( to );
+               });
+       });
+       wp.customize( 'blogdescription', function( value ) {
+               value.bind( function( to ) {
+                       $( '.site-description' ).text( to );
+               });
+       });
+
+       // Header text color.
+       wp.customize( 'header_textcolor', function( value ) {
+               value.bind( function( to ) {
+                       if ( 'blank' === to ) {
+                               $( '.site-title, .site-description' ).css({
+                                       clip: 'rect(1px, 1px, 1px, 1px)',
+                                       position: 'absolute'
+                               });
+                               // Add class for different logo styles if title and description are hidden.
+                               $( 'body' ).addClass( 'title-tagline-hidden' );
+                       } else {
+
+                               // Check if the text color has been removed and use default colors in theme stylesheet.
+                               if ( ! to.length ) {
+                                       $( '#twentyseventeen-custom-header-styles' ).remove();
+                               }
+                               $( '.site-title, .site-description' ).css({
+                                       clip: 'auto',
+                                       position: 'relative'
+                               });
+                               $( '.site-branding, .site-branding a, .site-description, .site-description a' ).css({
+                                       color: to
+                               });
+                               // Add class for different logo styles if title and description are visible.
+                               $( 'body' ).removeClass( 'title-tagline-hidden' );
+                       }
+               });
+       });
+
+       // Color scheme.
+       wp.customize( 'colorscheme', function( value ) {
+               value.bind( function( to ) {
+
+                       // Update color body class.
+                       $( 'body' )
+                               .removeClass( 'colors-light colors-dark colors-custom' )
+                               .addClass( 'colors-' + to );
+               });
+       });
+
+       // Custom color hue.
+       wp.customize( 'colorscheme_hue', function( value ) {
+               value.bind( function( to ) {
+
+                       // Update custom color CSS.
+                       var style = $( '#custom-theme-colors' ),
+                               hue = style.data( 'hue' ),
+                               css = style.html();
+
+                       // Equivalent to css.replaceAll, with hue followed by comma to prevent values with units from being changed.
+                       css = css.split( hue + ',' ).join( to + ',' );
+                       style.html( css ).data( 'hue', to );
+               });
+       });
+
+       // Page layouts.
+       wp.customize( 'page_layout', function( value ) {
+               value.bind( function( to ) {
+                       if ( 'one-column' === to ) {
+                               $( 'body' ).addClass( 'page-one-column' ).removeClass( 'page-two-column' );
+                       } else {
+                               $( 'body' ).removeClass( 'page-one-column' ).addClass( 'page-two-column' );
+                       }
+               } );
+       } );
+
+       // Whether a header image is available.
+       function hasHeaderImage() {
+               var image = wp.customize( 'header_image' )();
+               return '' !== image && 'remove-header' !== image;
+       }
+
+       // Whether a header video is available.
+       function hasHeaderVideo() {
+               var externalVideo = wp.customize( 'external_header_video' )(),
+                       video = wp.customize( 'header_video' )();
+
+               return '' !== externalVideo || ( 0 !== video && '' !== video );
+       }
+
+       // Toggle a body class if a custom header exists.
+       $.each( [ 'external_header_video', 'header_image', 'header_video' ], function( index, settingId ) {
+               wp.customize( settingId, function( setting ) {
+                       setting.bind(function() {
+                               if ( hasHeaderImage() ) {
+                                       $( document.body ).addClass( 'has-header-image' );
+                               } else {
+                                       $( document.body ).removeClass( 'has-header-image' );
+                               }
+
+                               if ( ! hasHeaderVideo() ) {
+                                       $( document.body ).removeClass( 'has-header-video' );
+                               }
+                       } );
+               } );
+       } );
+
+} )( jQuery );
diff --git a/wp-content/themes/twentyseventeen/assets/js/global.js b/wp-content/themes/twentyseventeen/assets/js/global.js
new file mode 100644 (file)
index 0000000..6e2f429
--- /dev/null
@@ -0,0 +1,249 @@
+/* global twentyseventeenScreenReaderText */
+(function( $ ) {
+
+       // Variables and DOM Caching.
+       var $body = $( 'body' ),
+               $customHeader = $body.find( '.custom-header' ),
+               $branding = $customHeader.find( '.site-branding' ),
+               $navigation = $body.find( '.navigation-top' ),
+               $navWrap = $navigation.find( '.wrap' ),
+               $navMenuItem = $navigation.find( '.menu-item' ),
+               $menuToggle = $navigation.find( '.menu-toggle' ),
+               $menuScrollDown = $body.find( '.menu-scroll-down' ),
+               $sidebar = $body.find( '#secondary' ),
+               $entryContent = $body.find( '.entry-content' ),
+               $formatQuote = $body.find( '.format-quote blockquote' ),
+               isFrontPage = $body.hasClass( 'twentyseventeen-front-page' ) || $body.hasClass( 'home blog' ),
+               navigationFixedClass = 'site-navigation-fixed',
+               navigationHeight,
+               navigationOuterHeight,
+               navPadding,
+               navMenuItemHeight,
+               idealNavHeight,
+               navIsNotTooTall,
+               headerOffset,
+               menuTop = 0,
+               resizeTimer;
+
+       // Ensure the sticky navigation doesn't cover current focused links.
+       $( 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]', '.site-content-contain' ).filter( ':visible' ).focus( function() {
+               if ( $navigation.hasClass( 'site-navigation-fixed' ) ) {
+                       var windowScrollTop = $( window ).scrollTop(),
+                               fixedNavHeight = $navigation.height(),
+                               itemScrollTop = $( this ).offset().top,
+                               offsetDiff = itemScrollTop - windowScrollTop;
+
+                       // Account for Admin bar.
+                       if ( $( '#wpadminbar' ).length ) {
+                               offsetDiff -= $( '#wpadminbar' ).height();
+                       }
+
+                       if ( offsetDiff < fixedNavHeight ) {
+                               $( window ).scrollTo( itemScrollTop - ( fixedNavHeight + 50 ), 0 );
+                       }
+               }
+       });
+
+       // Set properties of navigation.
+       function setNavProps() {
+               navigationHeight      = $navigation.height();
+               navigationOuterHeight = $navigation.outerHeight();
+               navPadding            = parseFloat( $navWrap.css( 'padding-top' ) ) * 2;
+               navMenuItemHeight     = $navMenuItem.outerHeight() * 2;
+               idealNavHeight        = navPadding + navMenuItemHeight;
+               navIsNotTooTall       = navigationHeight <= idealNavHeight;
+       }
+
+       // Make navigation 'stick'.
+       function adjustScrollClass() {
+
+               // Make sure we're not on a mobile screen.
+               if ( 'none' === $menuToggle.css( 'display' ) ) {
+
+                       // Make sure the nav isn't taller than two rows.
+                       if ( navIsNotTooTall ) {
+
+                               // When there's a custom header image or video, the header offset includes the height of the navigation.
+                               if ( isFrontPage && ( $body.hasClass( 'has-header-image' ) || $body.hasClass( 'has-header-video' ) ) ) {
+                                       headerOffset = $customHeader.innerHeight() - navigationOuterHeight;
+                               } else {
+                                       headerOffset = $customHeader.innerHeight();
+                               }
+
+                               // If the scroll is more than the custom header, set the fixed class.
+                               if ( $( window ).scrollTop() >= headerOffset ) {
+                                       $navigation.addClass( navigationFixedClass );
+                               } else {
+                                       $navigation.removeClass( navigationFixedClass );
+                               }
+
+                       } else {
+
+                               // Remove 'fixed' class if nav is taller than two rows.
+                               $navigation.removeClass( navigationFixedClass );
+                       }
+               }
+       }
+
+       // Set margins of branding in header.
+       function adjustHeaderHeight() {
+               if ( 'none' === $menuToggle.css( 'display' ) ) {
+
+                       // The margin should be applied to different elements on front-page or home vs interior pages.
+                       if ( isFrontPage ) {
+                               $branding.css( 'margin-bottom', navigationOuterHeight );
+                       } else {
+                               $customHeader.css( 'margin-bottom', navigationOuterHeight );
+                       }
+
+               } else {
+                       $customHeader.css( 'margin-bottom', '0' );
+                       $branding.css( 'margin-bottom', '0' );
+               }
+       }
+
+       // Set icon for quotes.
+       function setQuotesIcon() {
+               $( twentyseventeenScreenReaderText.quote ).prependTo( $formatQuote );
+       }
+
+       // Add 'below-entry-meta' class to elements.
+       function belowEntryMetaClass( param ) {
+               var sidebarPos, sidebarPosBottom;
+
+               if ( ! $body.hasClass( 'has-sidebar' ) || (
+                       $body.hasClass( 'search' ) ||
+                       $body.hasClass( 'single-attachment' ) ||
+                       $body.hasClass( 'error404' ) ||
+                       $body.hasClass( 'twentyseventeen-front-page' )
+               ) ) {
+                       return;
+               }
+
+               sidebarPos       = $sidebar.offset();
+               sidebarPosBottom = sidebarPos.top + ( $sidebar.height() + 28 );
+
+               $entryContent.find( param ).each( function() {
+                       var $element = $( this ),
+                               elementPos = $element.offset(),
+                               elementPosTop = elementPos.top;
+
+                       // Add 'below-entry-meta' to elements below the entry meta.
+                       if ( elementPosTop > sidebarPosBottom ) {
+                               $element.addClass( 'below-entry-meta' );
+                       } else {
+                               $element.removeClass( 'below-entry-meta' );
+                       }
+               });
+       }
+
+       /*
+        * Test if inline SVGs are supported.
+        * @link https://github.com/Modernizr/Modernizr/
+        */
+       function supportsInlineSVG() {
+               var div = document.createElement( 'div' );
+               div.innerHTML = '<svg/>';
+               return 'http://www.w3.org/2000/svg' === ( 'undefined' !== typeof SVGRect && div.firstChild && div.firstChild.namespaceURI );
+       }
+
+       /**
+        * Test if an iOS device.
+       */
+       function checkiOS() {
+               return /iPad|iPhone|iPod/.test(navigator.userAgent) && ! window.MSStream;
+       }
+
+       /*
+        * Test if background-attachment: fixed is supported.
+        * @link http://stackoverflow.com/questions/14115080/detect-support-for-background-attachment-fixed
+        */
+       function supportsFixedBackground() {
+               var el = document.createElement('div'),
+                       isSupported;
+
+               try {
+                       if ( ! ( 'backgroundAttachment' in el.style ) || checkiOS() ) {
+                               return false;
+                       }
+                       el.style.backgroundAttachment = 'fixed';
+                       isSupported = ( 'fixed' === el.style.backgroundAttachment );
+                       return isSupported;
+               }
+               catch (e) {
+                       return false;
+               }
+       }
+
+       // Fire on document ready.
+       $( document ).ready( function() {
+
+               // If navigation menu is present on page, setNavProps and adjustScrollClass.
+               if ( $navigation.length ) {
+                       setNavProps();
+                       adjustScrollClass();
+               }
+
+               // If 'Scroll Down' arrow in present on page, calculate scroll offset and bind an event handler to the click event.
+               if ( $menuScrollDown.length ) {
+
+                       if ( $( 'body' ).hasClass( 'admin-bar' ) ) {
+                               menuTop -= 32;
+                       }
+                       if ( $( 'body' ).hasClass( 'blog' ) ) {
+                               menuTop -= 30; // The div for latest posts has no space above content, add some to account for this.
+                       }
+                       if ( ! $navigation.length ) {
+                               navigationOuterHeight = 0;
+                       }
+
+                       $menuScrollDown.click( function( e ) {
+                               e.preventDefault();
+                               $( window ).scrollTo( '#primary', {
+                                       duration: 600,
+                                       offset: { top: menuTop - navigationOuterHeight }
+                               });
+                       });
+               }
+
+               adjustHeaderHeight();
+               setQuotesIcon();
+               if ( true === supportsInlineSVG() ) {
+                       document.documentElement.className = document.documentElement.className.replace( /(\s*)no-svg(\s*)/, '$1svg$2' );
+               }
+
+               if ( true === supportsFixedBackground() ) {
+                       document.documentElement.className += ' background-fixed';
+               }
+       });
+
+       // If navigation menu is present on page, adjust it on scroll and screen resize.
+       if ( $navigation.length ) {
+
+               // On scroll, we want to stick/unstick the navigation.
+               $( window ).on( 'scroll', function() {
+                       adjustScrollClass();
+                       adjustHeaderHeight();
+               });
+
+               // Also want to make sure the navigation is where it should be on resize.
+               $( window ).resize( function() {
+                       setNavProps();
+                       setTimeout( adjustScrollClass, 500 );
+               });
+       }
+
+       $( window ).resize( function() {
+               clearTimeout( resizeTimer );
+               resizeTimer = setTimeout( function() {
+                       belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' );
+               }, 300 );
+               setTimeout( adjustHeaderHeight, 1000 );
+       });
+
+       // Add header video class after the video is loaded.
+       $( document ).on( 'wp-custom-header-video-loaded', function() {
+               $body.addClass( 'has-header-video' );
+       });
+
+})( jQuery );
diff --git a/wp-content/themes/twentyseventeen/assets/js/html5.js b/wp-content/themes/twentyseventeen/assets/js/html5.js
new file mode 100644 (file)
index 0000000..9c1f049
--- /dev/null
@@ -0,0 +1,326 @@
+/**
+* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+*/
+;(function(window, document) {
+/*jshint evil:true */
+  /** version */
+  var version = '3.7.3';
+
+  /** Preset options */
+  var options = window.html5 || {};
+
+  /** Used to skip problem elements */
+  var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+  /** Not all elements can be cloned in IE **/
+  var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+  /** Detect whether the browser supports default html5 styles */
+  var supportsHtml5Styles;
+
+  /** Name of the expando, to work with multiple documents or to re-shiv one document */
+  var expando = '_html5shiv';
+
+  /** The id for the the documents expando */
+  var expanID = 0;
+
+  /** Cached data for each document */
+  var expandoData = {};
+
+  /** Detect whether the browser supports unknown elements */
+  var supportsUnknownElements;
+
+  (function() {
+    try {
+        var a = document.createElement('a');
+        a.innerHTML = '<xyz></xyz>';
+        //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
+        supportsHtml5Styles = ('hidden' in a);
+
+        supportsUnknownElements = a.childNodes.length == 1 || (function() {
+          // assign a false positive if unable to shiv
+          (document.createElement)('a');
+          var frag = document.createDocumentFragment();
+          return (
+            typeof frag.cloneNode == 'undefined' ||
+            typeof frag.createDocumentFragment == 'undefined' ||
+            typeof frag.createElement == 'undefined'
+          );
+        }());
+    } catch(e) {
+      // assign a false positive if detection fails => unable to shiv
+      supportsHtml5Styles = true;
+      supportsUnknownElements = true;
+    }
+
+  }());
+
+  /*--------------------------------------------------------------------------*/
+
+  /**
+   * Creates a style sheet with the given CSS text and adds it to the document.
+   * @private
+   * @param {Document} ownerDocument The document.
+   * @param {String} cssText The CSS text.
+   * @returns {StyleSheet} The style element.
+   */
+  function addStyleSheet(ownerDocument, cssText) {
+    var p = ownerDocument.createElement('p'),
+        parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
+
+    p.innerHTML = 'x<style>' + cssText + '</style>';
+    return parent.insertBefore(p.lastChild, parent.firstChild);
+  }
+
+  /**
+   * Returns the value of `html5.elements` as an array.
+   * @private
+   * @returns {Array} An array of shived element node names.
+   */
+  function getElements() {
+    var elements = html5.elements;
+    return typeof elements == 'string' ? elements.split(' ') : elements;
+  }
+
+  /**
+   * Extends the built-in list of html5 elements
+   * @memberOf html5
+   * @param {String|Array} newElements whitespace separated list or array of new element names to shiv
+   * @param {Document} ownerDocument The context document.
+   */
+  function addElements(newElements, ownerDocument) {
+    var elements = html5.elements;
+    if(typeof elements != 'string'){
+      elements = elements.join(' ');
+    }
+    if(typeof newElements != 'string'){
+      newElements = newElements.join(' ');
+    }
+    html5.elements = elements +' '+ newElements;
+    shivDocument(ownerDocument);
+  }
+
+   /**
+   * Returns the data associated to the given document
+   * @private
+   * @param {Document} ownerDocument The document.
+   * @returns {Object} An object of data.
+   */
+  function getExpandoData(ownerDocument) {
+    var data = expandoData[ownerDocument[expando]];
+    if (!data) {
+        data = {};
+        expanID++;
+        ownerDocument[expando] = expanID;
+        expandoData[expanID] = data;
+    }
+    return data;
+  }
+
+  /**
+   * returns a shived element for the given nodeName and document
+   * @memberOf html5
+   * @param {String} nodeName name of the element
+   * @param {Document|DocumentFragment} ownerDocument The context document.
+   * @returns {Object} The shived element.
+   */
+  function createElement(nodeName, ownerDocument, data){
+    if (!ownerDocument) {
+        ownerDocument = document;
+    }
+    if(supportsUnknownElements){
+        return ownerDocument.createElement(nodeName);
+    }
+    if (!data) {
+        data = getExpandoData(ownerDocument);
+    }
+    var node;
+
+    if (data.cache[nodeName]) {
+        node = data.cache[nodeName].cloneNode();
+    } else if (saveClones.test(nodeName)) {
+        node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+    } else {
+        node = data.createElem(nodeName);
+    }
+
+    // Avoid adding some elements to fragments in IE < 9 because
+    // * Attributes like `name` or `type` cannot be set/changed once an element
+    //   is inserted into a document/fragment
+    // * Link elements with `src` attributes that are inaccessible, as with
+    //   a 403 response, will cause the tab/window to crash
+    // * Script elements appended to fragments will execute when their `src`
+    //   or `text` property is set
+    return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
+  }
+
+  /**
+   * returns a shived DocumentFragment for the given document
+   * @memberOf html5
+   * @param {Document} ownerDocument The context document.
+   * @returns {Object} The shived DocumentFragment.
+   */
+  function createDocumentFragment(ownerDocument, data){
+    if (!ownerDocument) {
+        ownerDocument = document;
+    }
+    if(supportsUnknownElements){
+        return ownerDocument.createDocumentFragment();
+    }
+    data = data || getExpandoData(ownerDocument);
+    var clone = data.frag.cloneNode(),
+        i = 0,
+        elems = getElements(),
+        l = elems.length;
+    for(;i<l;i++){
+        clone.createElement(elems[i]);
+    }
+    return clone;
+  }
+
+  /**
+   * Shivs the `createElement` and `createDocumentFragment` methods of the document.
+   * @private
+   * @param {Document|DocumentFragment} ownerDocument The document.
+   * @param {Object} data of the document.
+   */
+  function shivMethods(ownerDocument, data) {
+    if (!data.cache) {
+        data.cache = {};
+        data.createElem = ownerDocument.createElement;
+        data.createFrag = ownerDocument.createDocumentFragment;
+        data.frag = data.createFrag();
+    }
+
+
+    ownerDocument.createElement = function(nodeName) {
+      //abort shiv
+      if (!html5.shivMethods) {
+          return data.createElem(nodeName);
+      }
+      return createElement(nodeName, ownerDocument, data);
+    };
+
+    ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
+      'var n=f.cloneNode(),c=n.createElement;' +
+      'h.shivMethods&&(' +
+        // unroll the `createElement` calls
+        getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
+          data.createElem(nodeName);
+          data.frag.createElement(nodeName);
+          return 'c("' + nodeName + '")';
+        }) +
+      ');return n}'
+    )(html5, data.frag);
+  }
+
+  /*--------------------------------------------------------------------------*/
+
+  /**
+   * Shivs the given document.
+   * @memberOf html5
+   * @param {Document} ownerDocument The document to shiv.
+   * @returns {Document} The shived document.
+   */
+  function shivDocument(ownerDocument) {
+    if (!ownerDocument) {
+        ownerDocument = document;
+    }
+    var data = getExpandoData(ownerDocument);
+
+    if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
+      data.hasCSS = !!addStyleSheet(ownerDocument,
+        // corrects block display not defined in IE6/7/8/9
+        'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
+        // adds styling not present in IE6/7/8/9
+        'mark{background:#FF0;color:#000}' +
+        // hides non-rendered elements
+        'template{display:none}'
+      );
+    }
+    if (!supportsUnknownElements) {
+      shivMethods(ownerDocument, data);
+    }
+    return ownerDocument;
+  }
+
+  /*--------------------------------------------------------------------------*/
+
+  /**
+   * The `html5` object is exposed so that more elements can be shived and
+   * existing shiving can be detected on iframes.
+   * @type Object
+   * @example
+   *
+   * // options can be changed before the script is included
+   * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
+   */
+  var html5 = {
+
+    /**
+     * An array or space separated string of node names of the elements to shiv.
+     * @memberOf html5
+     * @type Array|String
+     */
+    'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
+
+    /**
+     * current version of html5shiv
+     */
+    'version': version,
+
+    /**
+     * A flag to indicate that the HTML5 style sheet should be inserted.
+     * @memberOf html5
+     * @type Boolean
+     */
+    'shivCSS': (options.shivCSS !== false),
+
+    /**
+     * Is equal to true if a browser supports creating unknown/HTML5 elements
+     * @memberOf html5
+     * @type boolean
+     */
+    'supportsUnknownElements': supportsUnknownElements,
+
+    /**
+     * A flag to indicate that the document's `createElement` and `createDocumentFragment`
+     * methods should be overwritten.
+     * @memberOf html5
+     * @type Boolean
+     */
+    'shivMethods': (options.shivMethods !== false),
+
+    /**
+     * A string to describe the type of `html5` object ("default" or "default print").
+     * @memberOf html5
+     * @type String
+     */
+    'type': 'default',
+
+    // shivs the document according to the specified `html5` object options
+    'shivDocument': shivDocument,
+
+    //creates a shived element
+    createElement: createElement,
+
+    //creates a shived documentFragment
+    createDocumentFragment: createDocumentFragment,
+
+    //extends list of elements
+    addElements: addElements
+  };
+
+  /*--------------------------------------------------------------------------*/
+
+  // expose html5
+  window.html5 = html5;
+
+  // shiv the document
+  shivDocument(document);
+
+  if(typeof module == 'object' && module.exports){
+    module.exports = html5;
+  }
+
+}(typeof window !== "undefined" ? window : this, document));
\ No newline at end of file
diff --git a/wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js b/wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
new file mode 100644 (file)
index 0000000..80ff3fa
--- /dev/null
@@ -0,0 +1,209 @@
+/*!
+ * jQuery.scrollTo
+ * Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
+ * Licensed under MIT
+ * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
+ * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery
+ * @author Ariel Flesler
+ * @version 2.1.2
+ */
+;(function(factory) {
+       'use strict';
+       if (typeof define === 'function' && define.amd) {
+               // AMD
+               define( ['jquery'], factory );
+       } else if (typeof module !== 'undefined' && module.exports) {
+               // CommonJS
+               module.exports = factory( require( 'jquery' ) );
+       } else {
+               // Global
+               factory( jQuery );
+       }
+})(function($) {
+       'use strict';
+
+       var $scrollTo = $.scrollTo = function(target, duration, settings) {
+               return $( window ).scrollTo( target, duration, settings );
+       };
+
+       $scrollTo.defaults = {
+               axis:'xy',
+               duration: 0,
+               limit:true
+       };
+
+       function isWin(elem) {
+               return ! elem.nodeName ||
+                       $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) !== -1;
+       }
+
+       $.fn.scrollTo = function(target, duration, settings) {
+               if (typeof duration === 'object') {
+                       settings = duration;
+                       duration = 0;
+               }
+               if (typeof settings === 'function') {
+                       settings = { onAfter:settings };
+               }
+               if (target === 'max') {
+                       target = 9e9;
+               }
+
+               settings = $.extend( {}, $scrollTo.defaults, settings );
+               // Speed is still recognized for backwards compatibility
+               duration = duration || settings.duration;
+               // Make sure the settings are given right
+               var queue = settings.queue && settings.axis.length > 1;
+               if (queue) {
+                       // Let's keep the overall duration
+                       duration /= 2;
+               }
+               settings.offset = both( settings.offset );
+               settings.over = both( settings.over );
+
+               return this.each(function() {
+                       // Null target yields nothing, just like jQuery does
+                       if (target === null) { return; }
+
+                       var win = isWin( this ),
+                               elem = win ? this.contentWindow || window : this,
+                               $elem = $( elem ),
+                               targ = target,
+                               attr = {},
+                               toff;
+
+                       switch (typeof targ) {
+                               // A number will pass the regex
+                               case 'number':
+                               case 'string':
+                                       if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test( targ )) {
+                                               targ = both( targ );
+                                               // We are done
+                                               break;
+                                       }
+                                       // Relative/Absolute selector
+                                       targ = win ? $( targ ) : $( targ, elem );
+                                       /* falls through */
+                               case 'object':
+                                       if (targ.length === 0) { return; }
+                                       // DOMElement / jQuery
+                                       if (targ.is || targ.style) {
+                                               // Get the real position of the target
+                                               toff = (targ = $( targ )).offset();
+                                       }
+                       }
+
+                       var offset = $.isFunction( settings.offset ) && settings.offset( elem, targ ) || settings.offset;
+
+                       $.each(settings.axis.split( '' ), function(i, axis) {
+                               var Pos = axis === 'x' ? 'Left' : 'Top',
+                                       pos = Pos.toLowerCase(),
+                                       key = 'scroll' + Pos,
+                                       prev = $elem[key](),
+                                       max = $scrollTo.max( elem, axis );
+
+                               if (toff) {// jQuery / DOMElement
+                                       attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]);
+
+                                       // If it's a dom element, reduce the margin
+                                       if (settings.margin) {
+                                               attr[key] -= parseInt( targ.css( 'margin' + Pos ), 10 ) || 0;
+                                               attr[key] -= parseInt( targ.css( 'border' + Pos + 'Width' ), 10 ) || 0;
+                                       }
+
+                                       attr[key] += offset[pos] || 0;
+
+                                       if (settings.over[pos]) {
+                                               // Scroll to a fraction of its width/height
+                                               attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos];
+                                       }
+                               } else {
+                                       var val = targ[pos];
+                                       // Handle percentage values
+                                       attr[key] = val.slice && val.slice( -1 ) === '%' ?
+                                               parseFloat( val ) / 100 * max
+                                               : val;
+                               }
+
+                               // Number or 'number'
+                               if (settings.limit && /^\d+$/.test( attr[key] )) {
+                                       // Check the limits
+                                       attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max );
+                               }
+
+                               // Don't waste time animating, if there's no need.
+                               if ( ! i && settings.axis.length > 1) {
+                                       if (prev === attr[key]) {
+                                               // No animation needed
+                                               attr = {};
+                                       } else if (queue) {
+                                               // Intermediate animation
+                                               animate( settings.onAfterFirst );
+                                               // Don't animate this axis again in the next iteration.
+                                               attr = {};
+                                       }
+                               }
+                       });
+
+                       animate( settings.onAfter );
+
+                       function animate(callback) {
+                               var opts = $.extend({}, settings, {
+                                       // The queue setting conflicts with animate()
+                                       // Force it to always be true
+                                       queue: true,
+                                       duration: duration,
+                                       complete: callback && function() {
+                                               callback.call( elem, targ, settings );
+                                       }
+                               });
+                               $elem.animate( attr, opts );
+                       }
+               });
+       };
+
+       // Max scrolling position, works on quirks mode
+       // It only fails (not too badly) on IE, quirks mode.
+       $scrollTo.max = function(elem, axis) {
+               var Dim = axis === 'x' ? 'Width' : 'Height',
+                       scroll = 'scroll' + Dim;
+
+               if ( ! isWin( elem )) {
+                       return elem[scroll] - $( elem )[Dim.toLowerCase()](); }
+
+               var size = 'client' + Dim,
+                       doc = elem.ownerDocument || elem.document,
+                       html = doc.documentElement,
+                       body = doc.body;
+
+               return Math.max( html[scroll], body[scroll] ) - Math.min( html[size], body[size] );
+       };
+
+       function both(val) {
+               return $.isFunction( val ) || $.isPlainObject( val ) ? val : { top:val, left:val };
+       }
+
+       // Add special hooks so that window scroll properties can be animated
+       $.Tween.propHooks.scrollLeft = $.Tween.propHooks.scrollTop = {
+               get: function(t) {
+                       return $( t.elem )[t.prop]();
+               },
+               set: function(t) {
+                       var curr = this.get( t );
+                       // If interrupt is true and user scrolled, stop animating
+                       if (t.options.interrupt && t._last && t._last !== curr) {
+                               return $( t.elem ).stop();
+                       }
+                       var next = Math.round( t.now );
+                       // Don't waste CPU
+                       // Browsers don't render floating point scroll
+                       if (curr !== next) {
+                               $( t.elem )[t.prop](next);
+                               t._last = this.get( t );
+                       }
+               }
+       };
+
+       // AMD requirement
+       return $scrollTo;
+});
diff --git a/wp-content/themes/twentyseventeen/assets/js/navigation.js b/wp-content/themes/twentyseventeen/assets/js/navigation.js
new file mode 100644 (file)
index 0000000..f0fd652
--- /dev/null
@@ -0,0 +1,109 @@
+/* global twentyseventeenScreenReaderText */
+/**
+ * Theme functions file.
+ *
+ * Contains handlers for navigation and widget area.
+ */
+
+(function( $ ) {
+       var masthead, menuToggle, siteNavContain, siteNavigation;
+
+       function initMainNavigation( container ) {
+
+               // Add dropdown toggle that displays child menu items.
+               var dropdownToggle = $( '<button />', { 'class': 'dropdown-toggle', 'aria-expanded': false })
+                       .append( twentyseventeenScreenReaderText.icon )
+                       .append( $( '<span />', { 'class': 'screen-reader-text', text: twentyseventeenScreenReaderText.expand }) );
+
+               container.find( '.menu-item-has-children > a, .page_item_has_children > a' ).after( dropdownToggle );
+
+               // Set the active submenu dropdown toggle button initial state.
+               container.find( '.current-menu-ancestor > button' )
+                       .addClass( 'toggled-on' )
+                       .attr( 'aria-expanded', 'true' )
+                       .find( '.screen-reader-text' )
+                       .text( twentyseventeenScreenReaderText.collapse );
+               // Set the active submenu initial state.
+               container.find( '.current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' );
+
+               container.find( '.dropdown-toggle' ).click( function( e ) {
+                       var _this = $( this ),
+                               screenReaderSpan = _this.find( '.screen-reader-text' );
+
+                       e.preventDefault();
+                       _this.toggleClass( 'toggled-on' );
+                       _this.next( '.children, .sub-menu' ).toggleClass( 'toggled-on' );
+
+                       _this.attr( 'aria-expanded', _this.attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' );
+
+                       screenReaderSpan.text( screenReaderSpan.text() === twentyseventeenScreenReaderText.expand ? twentyseventeenScreenReaderText.collapse : twentyseventeenScreenReaderText.expand );
+               });
+       }
+
+       initMainNavigation( $( '.main-navigation' ) );
+
+       masthead       = $( '#masthead' );
+       menuToggle     = masthead.find( '.menu-toggle' );
+       siteNavContain = masthead.find( '.main-navigation' );
+       siteNavigation = masthead.find( '.main-navigation > div > ul' );
+
+       // Enable menuToggle.
+       (function() {
+
+               // Return early if menuToggle is missing.
+               if ( ! menuToggle.length ) {
+                       return;
+               }
+
+               // Add an initial value for the attribute.
+               menuToggle.attr( 'aria-expanded', 'false' );
+
+               menuToggle.on( 'click.twentyseventeen', function() {
+                       siteNavContain.toggleClass( 'toggled-on' );
+
+                       $( this ).attr( 'aria-expanded', siteNavContain.hasClass( 'toggled-on' ) );
+               });
+       })();
+
+       // Fix sub-menus for touch devices and better focus for hidden submenu items for accessibility.
+       (function() {
+               if ( ! siteNavigation.length || ! siteNavigation.children().length ) {
+                       return;
+               }
+
+               // Toggle `focus` class to allow submenu access on tablets.
+               function toggleFocusClassTouchScreen() {
+                       if ( 'none' === $( '.menu-toggle' ).css( 'display' ) ) {
+
+                               $( document.body ).on( 'touchstart.twentyseventeen', function( e ) {
+                                       if ( ! $( e.target ).closest( '.main-navigation li' ).length ) {
+                                               $( '.main-navigation li' ).removeClass( 'focus' );
+                                       }
+                               });
+
+                               siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' )
+                                       .on( 'touchstart.twentyseventeen', function( e ) {
+                                               var el = $( this ).parent( 'li' );
+
+                                               if ( ! el.hasClass( 'focus' ) ) {
+                                                       e.preventDefault();
+                                                       el.toggleClass( 'focus' );
+                                                       el.siblings( '.focus' ).removeClass( 'focus' );
+                                               }
+                                       });
+
+                       } else {
+                               siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' ).unbind( 'touchstart.twentyseventeen' );
+                       }
+               }
+
+               if ( 'ontouchstart' in window ) {
+                       $( window ).on( 'resize.twentyseventeen', toggleFocusClassTouchScreen );
+                       toggleFocusClassTouchScreen();
+               }
+
+               siteNavigation.find( 'a' ).on( 'focus.twentyseventeen blur.twentyseventeen', function() {
+                       $( this ).parents( '.menu-item, .page_item' ).toggleClass( 'focus' );
+               });
+       })();
+})( jQuery );
diff --git a/wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js b/wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
new file mode 100644 (file)
index 0000000..a40ebac
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * File skip-link-focus-fix.js.
+ *
+ * Helps with accessibility for keyboard only users.
+ *
+ * Learn more: https://git.io/vWdr2
+ */
+(function() {
+       var isIe = /(trident|msie)/i.test( navigator.userAgent );
+
+       if ( isIe && document.getElementById && window.addEventListener ) {
+               window.addEventListener( 'hashchange', function() {
+                       var id = location.hash.substring( 1 ),
+                               element;
+
+                       if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
+                               return;
+                       }
+
+                       element = document.getElementById( id );
+
+                       if ( element ) {
+                               if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
+                                       element.tabIndex = -1;
+                               }
+
+                               element.focus();
+                       }
+               }, false );
+       }
+})();
diff --git a/wp-content/themes/twentyseventeen/comments.php b/wp-content/themes/twentyseventeen/comments.php
new file mode 100644 (file)
index 0000000..de52e90
--- /dev/null
@@ -0,0 +1,82 @@
+<?php
+/**
+ * The template for displaying comments
+ *
+ * This is the template that displays the area of the page that contains both the current comments
+ * and the comment form.
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+/*
+ * If the current post is protected by a password and
+ * the visitor has not yet entered the password we will
+ * return early without loading the comments.
+ */
+if ( post_password_required() ) {
+       return;
+}
+?>
+
+<div id="comments" class="comments-area">
+
+       <?php
+       // You can start editing here -- including this comment!
+       if ( have_comments() ) : ?>
+               <h2 class="comments-title">
+                       <?php
+                               $comments_number = get_comments_number();
+                               if ( '1' === $comments_number ) {
+                                       /* translators: %s: post title */
+                                       printf( _x( 'One Reply to &ldquo;%s&rdquo;', 'comments title', 'twentyseventeen' ), get_the_title() );
+                               } else {
+                                       printf(
+                                               /* translators: 1: number of comments, 2: post title */
+                                               _nx(
+                                                       '%1$s Reply to &ldquo;%2$s&rdquo;',
+                                                       '%1$s Replies to &ldquo;%2$s&rdquo;',
+                                                       $comments_number,
+                                                       'comments title',
+                                                       'twentyseventeen'
+                                               ),
+                                               number_format_i18n( $comments_number ),
+                                               get_the_title()
+                                       );
+                               }
+                       ?>
+               </h2>
+
+               <ol class="comment-list">
+                       <?php
+                               wp_list_comments( array(
+                                       'avatar_size' => 100,
+                                       'style'       => 'ol',
+                                       'short_ping'  => true,
+                                       'reply_text'  => twentyseventeen_get_svg( array( 'icon' => 'mail-reply' ) ) . __( 'Reply', 'twentyseventeen' ),
+                               ) );
+                       ?>
+               </ol>
+
+               <?php the_comments_pagination( array(
+                       'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous', 'twentyseventeen' ) . '</span>',
+                       'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
+               ) );
+
+       endif; // Check for have_comments().
+
+       // If comments are closed and there are comments, let's leave a little note, shall we?
+       if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
+
+               <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyseventeen' ); ?></p>
+       <?php
+       endif;
+
+       comment_form();
+       ?>
+
+</div><!-- #comments -->
diff --git a/wp-content/themes/twentyseventeen/footer.php b/wp-content/themes/twentyseventeen/footer.php
new file mode 100644 (file)
index 0000000..dacc418
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/**
+ * The template for displaying the footer
+ *
+ * Contains the closing of the #content div and all content after.
+ *
+ * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+
+               </div><!-- #content -->
+
+               <footer id="colophon" class="site-footer" role="contentinfo">
+                       <div class="wrap">
+                               <?php
+                               get_template_part( 'template-parts/footer/footer', 'widgets' );
+
+                               if ( has_nav_menu( 'social' ) ) : ?>
+                                       <nav class="social-navigation" role="navigation" aria-label="<?php _e( 'Footer Social Links Menu', 'twentyseventeen' ); ?>">
+                                               <?php
+                                                       wp_nav_menu( array(
+                                                               'theme_location' => 'social',
+                                                               'menu_class'     => 'social-links-menu',
+                                                               'depth'          => 1,
+                                                               'link_before'    => '<span class="screen-reader-text">',
+                                                               'link_after'     => '</span>' . twentyseventeen_get_svg( array( 'icon' => 'chain' ) ),
+                                                       ) );
+                                               ?>
+                                       </nav><!-- .social-navigation -->
+                               <?php endif;
+
+                               get_template_part( 'template-parts/footer/site', 'info' );
+                               ?>
+                       </div><!-- .wrap -->
+               </footer><!-- #colophon -->
+       </div><!-- .site-content-contain -->
+</div><!-- #page -->
+<?php wp_footer(); ?>
+
+</body>
+</html>
diff --git a/wp-content/themes/twentyseventeen/front-page.php b/wp-content/themes/twentyseventeen/front-page.php
new file mode 100644 (file)
index 0000000..99860a0
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+/**
+ * The front page template file
+ *
+ * If the user has selected a static page for their homepage, this is what will
+ * appear.
+ * Learn more: https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+get_header(); ?>
+
+<div id="primary" class="content-area">
+       <main id="main" class="site-main" role="main">
+
+               <?php // Show the selected frontpage content.
+               if ( have_posts() ) :
+                       while ( have_posts() ) : the_post();
+                               get_template_part( 'template-parts/page/content', 'front-page' );
+                       endwhile;
+               else : // I'm not sure it's possible to have no posts when this page is shown, but WTH.
+                       get_template_part( 'template-parts/post/content', 'none' );
+               endif; ?>
+
+               <?php
+               // Get each of our panels and show the post data.
+               if ( 0 !== twentyseventeen_panel_count() || is_customize_preview() ) : // If we have pages to show.
+
+                       /**
+                        * Filter number of front page sections in Twenty Seventeen.
+                        *
+                        * @since Twenty Seventeen 1.0
+                        *
+                        * @param $num_sections integer
+                        */
+                       $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 );
+                       global $twentyseventeencounter;
+
+                       // Create a setting and control for each of the sections available in the theme.
+                       for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
+                               $twentyseventeencounter = $i;
+                               twentyseventeen_front_page_section( null, $i );
+                       }
+
+       endif; // The if ( 0 !== twentyseventeen_panel_count() ) ends here. ?>
+
+       </main><!-- #main -->
+</div><!-- #primary -->
+
+<?php get_footer();
diff --git a/wp-content/themes/twentyseventeen/functions.php b/wp-content/themes/twentyseventeen/functions.php
new file mode 100644 (file)
index 0000000..30fdfcc
--- /dev/null
@@ -0,0 +1,527 @@
+<?php
+/**
+ * Twenty Seventeen functions and definitions
+ *
+ * @link https://developer.wordpress.org/themes/basics/theme-functions/
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ */
+
+/**
+ * Twenty Seventeen only works in WordPress 4.7 or later.
+ */
+if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '<' ) ) {
+       require get_template_directory() . '/inc/back-compat.php';
+       return;
+}
+
+/**
+ * Sets up theme defaults and registers support for various WordPress features.
+ *
+ * Note that this function is hooked into the after_setup_theme hook, which
+ * runs before the init hook. The init hook is too late for some features, such
+ * as indicating support for post thumbnails.
+ */
+function twentyseventeen_setup() {
+       /*
+        * Make theme available for translation.
+        * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyseventeen
+        * If you're building a theme based on Twenty Seventeen, use a find and replace
+        * to change 'twentyseventeen' to the name of your theme in all the template files.
+        */
+       load_theme_textdomain( 'twentyseventeen' );
+
+       // Add default posts and comments RSS feed links to head.
+       add_theme_support( 'automatic-feed-links' );
+
+       /*
+        * Let WordPress manage the document title.
+        * By adding theme support, we declare that this theme does not use a
+        * hard-coded <title> tag in the document head, and expect WordPress to
+        * provide it for us.
+        */
+       add_theme_support( 'title-tag' );
+
+       /*
+        * Enable support for Post Thumbnails on posts and pages.
+        *
+        * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
+        */
+       add_theme_support( 'post-thumbnails' );
+
+       add_image_size( 'twentyseventeen-featured-image', 2000, 1200, true );
+
+       add_image_size( 'twentyseventeen-thumbnail-avatar', 100, 100, true );
+
+       // This theme uses wp_nav_menu() in two locations.
+       register_nav_menus( array(
+               'top'    => __( 'Top Menu', 'twentyseventeen' ),
+               'social' => __( 'Social Links Menu', 'twentyseventeen' ),
+       ) );
+
+       /*
+        * Switch default core markup for search form, comment form, and comments
+        * to output valid HTML5.
+        */
+       add_theme_support( 'html5', array(
+               'comment-form',
+               'comment-list',
+               'gallery',
+               'caption',
+       ) );
+
+       /*
+        * Enable support for Post Formats.
+        *
+        * See: https://codex.wordpress.org/Post_Formats
+        */
+       add_theme_support( 'post-formats', array(
+               'aside',
+               'image',
+               'video',
+               'quote',
+               'link',
+               'gallery',
+               'audio',
+       ) );
+
+       // Add theme support for Custom Logo.
+       add_theme_support( 'custom-logo', array(
+               'width'       => 250,
+               'height'      => 250,
+               'flex-width'  => true,
+       ) );
+
+       // Add theme support for selective refresh for widgets.
+       add_theme_support( 'customize-selective-refresh-widgets' );
+
+       /*
+        * This theme styles the visual editor to resemble the theme style,
+        * specifically font, colors, and column width.
+        */
+       add_editor_style( array( 'assets/css/editor-style.css', twentyseventeen_fonts_url() ) );
+
+       add_theme_support( 'starter-content', array(
+               'widgets' => array(
+                       'sidebar-1' => array(
+                               'text_business_info',
+                               'search',
+                               'text_about',
+                       ),
+
+                       'sidebar-2' => array(
+                               'text_business_info',
+                       ),
+
+                       'sidebar-3' => array(
+                               'text_about',
+                               'search',
+                       ),
+               ),
+
+               'posts' => array(
+                       'home',
+                       'about' => array(
+                               'thumbnail' => '{{image-sandwich}}',
+                       ),
+                       'contact' => array(
+                               'thumbnail' => '{{image-espresso}}',
+                       ),
+                       'blog' => array(
+                               'thumbnail' => '{{image-coffee}}',
+                       ),
+                       'homepage-section' => array(
+                               'thumbnail' => '{{image-espresso}}',
+                       ),
+               ),
+
+               'attachments' => array(
+                       'image-espresso' => array(
+                               'post_title' => _x( 'Espresso', 'Theme starter content', 'twentyseventeen' ),
+                               'file' => 'assets/images/espresso.jpg',
+                       ),
+                       'image-sandwich' => array(
+                               'post_title' => _x( 'Sandwich', 'Theme starter content', 'twentyseventeen' ),
+                               'file' => 'assets/images/sandwich.jpg',
+                       ),
+                       'image-coffee' => array(
+                               'post_title' => _x( 'Coffee', 'Theme starter content', 'twentyseventeen' ),
+                               'file' => 'assets/images/coffee.jpg',
+                       ),
+               ),
+
+               'options' => array(
+                       'show_on_front' => 'page',
+                       'page_on_front' => '{{home}}',
+                       'page_for_posts' => '{{blog}}',
+               ),
+
+               'theme_mods' => array(
+                       'panel_1' => '{{homepage-section}}',
+                       'panel_2' => '{{about}}',
+                       'panel_3' => '{{blog}}',
+                       'panel_4' => '{{contact}}',
+               ),
+
+               'nav_menus' => array(
+                       'top' => array(
+                               'name' => __( 'Top Menu', 'twentyseventeen' ),
+                               'items' => array(
+                                       'page_home',
+                                       'page_about',
+                                       'page_blog',
+                                       'page_contact',
+                               ),
+                       ),
+                       'social' => array(
+                               'name' => __( 'Social Links Menu', 'twentyseventeen' ),
+                               'items' => array(
+                                       'link_yelp',
+                                       'link_facebook',
+                                       'link_twitter',
+                                       'link_instagram',
+                                       'link_email',
+                               ),
+                       ),
+               ),
+       ) );
+}
+add_action( 'after_setup_theme', 'twentyseventeen_setup' );
+
+/**
+ * Set the content width in pixels, based on the theme's design and stylesheet.
+ *
+ * Priority 0 to make it available to lower priority callbacks.
+ *
+ * @global int $content_width
+ */
+function twentyseventeen_content_width() {
+
+       $content_width = 700;
+
+       if ( twentyseventeen_is_frontpage() ) {
+               $content_width = 1120;
+       }
+
+       /**
+        * Filter Twenty Seventeen content width of the theme.
+        *
+        * @since Twenty Seventeen 1.0
+        *
+        * @param $content_width integer
+        */
+       $GLOBALS['content_width'] = apply_filters( 'twentyseventeen_content_width', $content_width );
+}
+add_action( 'after_setup_theme', 'twentyseventeen_content_width', 0 );
+
+/**
+ * Register custom fonts.
+ */
+function twentyseventeen_fonts_url() {
+       $fonts_url = '';
+
+       /**
+        * Translators: If there are characters in your language that are not
+        * supported by Libre Franklin, translate this to 'off'. Do not translate
+        * into your own language.
+        */
+       $libre_franklin = _x( 'on', 'Libre Franklin font: on or off', 'twentyseventeen' );
+
+       if ( 'off' !== $libre_franklin ) {
+               $font_families = array();
+
+               $font_families[] = 'Libre Franklin:300,300i,400,400i,600,600i,800,800i';
+
+               $query_args = array(
+                       'family' => urlencode( implode( '|', $font_families ) ),
+                       'subset' => urlencode( 'latin,latin-ext' ),
+               );
+
+               $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
+       }
+
+       return esc_url_raw( $fonts_url );
+}
+
+/**
+ * Add preconnect for Google Fonts.
+ *
+ * @since Twenty Seventeen 1.0
+ *
+ * @param array  $urls           URLs to print for resource hints.
+ * @param string $relation_type  The relation type the URLs are printed.
+ * @return array $urls           URLs to print for resource hints.
+ */
+function twentyseventeen_resource_hints( $urls, $relation_type ) {
+       if ( wp_style_is( 'twentyseventeen-fonts', 'queue' ) && 'preconnect' === $relation_type ) {
+               $urls[] = array(
+                       'href' => 'https://fonts.gstatic.com',
+                       'crossorigin',
+               );
+       }
+
+       return $urls;
+}
+add_filter( 'wp_resource_hints', 'twentyseventeen_resource_hints', 10, 2 );
+
+/**
+ * Register widget area.
+ *
+ * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
+ */
+function twentyseventeen_widgets_init() {
+       register_sidebar( array(
+               'name'          => __( 'Sidebar', 'twentyseventeen' ),
+               'id'            => 'sidebar-1',
+               'description'   => __( 'Add widgets here to appear in your sidebar.', 'twentyseventeen' ),
+               'before_widget' => '<section id="%1$s" class="widget %2$s">',
+               'after_widget'  => '</section>',
+               'before_title'  => '<h2 class="widget-title">',
+               'after_title'   => '</h2>',
+       ) );
+
+       register_sidebar( array(
+               'name'          => __( 'Footer 1', 'twentyseventeen' ),
+               'id'            => 'sidebar-2',
+               'description'   => __( 'Add widgets here to appear in your footer.', 'twentyseventeen' ),
+               'before_widget' => '<section id="%1$s" class="widget %2$s">',
+               'after_widget'  => '</section>',
+               'before_title'  => '<h2 class="widget-title">',
+               'after_title'   => '</h2>',
+       ) );
+
+       register_sidebar( array(
+               'name'          => __( 'Footer 2', 'twentyseventeen' ),
+               'id'            => 'sidebar-3',
+               'description'   => __( 'Add widgets here to appear in your footer.', 'twentyseventeen' ),
+               'before_widget' => '<section id="%1$s" class="widget %2$s">',
+               'after_widget'  => '</section>',
+               'before_title'  => '<h2 class="widget-title">',
+               'after_title'   => '</h2>',
+       ) );
+}
+add_action( 'widgets_init', 'twentyseventeen_widgets_init' );
+
+/**
+ * Replaces "[...]" (appended to automatically generated excerpts) with ... and
+ * a 'Continue reading' link.
+ *
+ * @since Twenty Seventeen 1.0
+ *
+ * @return string 'Continue reading' link prepended with an ellipsis.
+ */
+function twentyseventeen_excerpt_more( $link ) {
+       if ( is_admin() ) {
+               return $link;
+       }
+
+       $link = sprintf( '<p class="link-more"><a href="%1$s" class="more-link">%2$s</a></p>',
+               esc_url( get_permalink( get_the_ID() ) ),
+               /* translators: %s: Name of current post */
+               sprintf( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), get_the_title( get_the_ID() ) )
+       );
+       return ' &hellip; ' . $link;
+}
+add_filter( 'excerpt_more', 'twentyseventeen_excerpt_more' );
+
+/**
+ * Handles JavaScript detection.
+ *
+ * Adds a `js` class to the root `<html>` element when JavaScript is detected.
+ *
+ * @since Twenty Seventeen 1.0
+ */
+function twentyseventeen_javascript_detection() {
+       echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
+}
+add_action( 'wp_head', 'twentyseventeen_javascript_detection', 0 );
+
+/**
+ * Add a pingback url auto-discovery header for singularly identifiable articles.
+ */
+function twentyseventeen_pingback_header() {
+       if ( is_singular() && pings_open() ) {
+               printf( '<link rel="pingback" href="%s">' . "\n", get_bloginfo( 'pingback_url' ) );
+       }
+}
+add_action( 'wp_head', 'twentyseventeen_pingback_header' );
+
+/**
+ * Display custom color CSS.
+ */
+function twentyseventeen_colors_css_wrap() {
+       if ( 'custom' !== get_theme_mod( 'colorscheme' ) && ! is_customize_preview() ) {
+               return;
+       }
+
+       require_once( get_parent_theme_file_path( '/inc/color-patterns.php' ) );
+       $hue = absint( get_theme_mod( 'colorscheme_hue', 250 ) );
+?>
+       <style type="text/css" id="custom-theme-colors" <?php if ( is_customize_preview() ) { echo 'data-hue="' . $hue . '"'; } ?>>
+               <?php echo twentyseventeen_custom_colors_css(); ?>
+       </style>
+<?php }
+add_action( 'wp_head', 'twentyseventeen_colors_css_wrap' );
+
+/**
+ * Enqueue scripts and styles.
+ */
+function twentyseventeen_scripts() {
+       // Add custom fonts, used in the main stylesheet.
+       wp_enqueue_style( 'twentyseventeen-fonts', twentyseventeen_fonts_url(), array(), null );
+
+       // Theme stylesheet.
+       wp_enqueue_style( 'twentyseventeen-style', get_stylesheet_uri() );
+
+       // Load the dark colorscheme.
+       if ( 'dark' === get_theme_mod( 'colorscheme', 'light' ) || is_customize_preview() ) {
+               wp_enqueue_style( 'twentyseventeen-colors-dark', get_theme_file_uri( '/assets/css/colors-dark.css' ), array( 'twentyseventeen-style' ), '1.0' );
+       }
+
+       // Load the Internet Explorer 9 specific stylesheet, to fix display issues in the Customizer.
+       if ( is_customize_preview() ) {
+               wp_enqueue_style( 'twentyseventeen-ie9', get_theme_file_uri( '/assets/css/ie9.css' ), array( 'twentyseventeen-style' ), '1.0' );
+               wp_style_add_data( 'twentyseventeen-ie9', 'conditional', 'IE 9' );
+       }
+
+       // Load the Internet Explorer 8 specific stylesheet.
+       wp_enqueue_style( 'twentyseventeen-ie8', get_theme_file_uri( '/assets/css/ie8.css' ), array( 'twentyseventeen-style' ), '1.0' );
+       wp_style_add_data( 'twentyseventeen-ie8', 'conditional', 'lt IE 9' );
+
+       // Load the html5 shiv.
+       wp_enqueue_script( 'html5', get_theme_file_uri( '/assets/js/html5.js' ), array(), '3.7.3' );
+       wp_script_add_data( 'html5', 'conditional', 'lt IE 9' );
+
+       wp_enqueue_script( 'twentyseventeen-skip-link-focus-fix', get_theme_file_uri( '/assets/js/skip-link-focus-fix.js' ), array(), '1.0', true );
+
+       $twentyseventeen_l10n = array(
+               'quote'          => twentyseventeen_get_svg( array( 'icon' => 'quote-right' ) ),
+       );
+
+       if ( has_nav_menu( 'top' ) ) {
+               wp_enqueue_script( 'twentyseventeen-navigation', get_theme_file_uri( '/assets/js/navigation.js' ), array(), '1.0', true );
+               $twentyseventeen_l10n['expand']         = __( 'Expand child menu', 'twentyseventeen' );
+               $twentyseventeen_l10n['collapse']       = __( 'Collapse child menu', 'twentyseventeen' );
+               $twentyseventeen_l10n['icon']           = twentyseventeen_get_svg( array( 'icon' => 'angle-down', 'fallback' => true ) );
+       }
+
+       wp_enqueue_script( 'twentyseventeen-global', get_theme_file_uri( '/assets/js/global.js' ), array( 'jquery' ), '1.0', true );
+
+       wp_enqueue_script( 'jquery-scrollto', get_theme_file_uri( '/assets/js/jquery.scrollTo.js' ), array( 'jquery' ), '2.1.2', true );
+
+       wp_localize_script( 'twentyseventeen-skip-link-focus-fix', 'twentyseventeenScreenReaderText', $twentyseventeen_l10n );
+
+       if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
+               wp_enqueue_script( 'comment-reply' );
+       }
+}
+add_action( 'wp_enqueue_scripts', 'twentyseventeen_scripts' );
+
+/**
+ * Add custom image sizes attribute to enhance responsive image functionality
+ * for content images.
+ *
+ * @since Twenty Seventeen 1.0
+ *
+ * @param string $sizes A source size value for use in a 'sizes' attribute.
+ * @param array  $size  Image size. Accepts an array of width and height
+ *                      values in pixels (in that order).
+ * @return string A source size value for use in a content image 'sizes' attribute.
+ */
+function twentyseventeen_content_image_sizes_attr( $sizes, $size ) {
+       $width = $size[0];
+
+       if ( 740 <= $width ) {
+               $sizes = '(max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px';
+       }
+
+       if ( is_active_sidebar( 'sidebar-1' ) || is_archive() || is_search() || is_home() || is_page() ) {
+               if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) && 767 <= $width ) {
+                        $sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px';
+               }
+       }
+
+       return $sizes;
+}
+add_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_attr', 10, 2 );
+
+/**
+ * Filter the `sizes` value in the header image markup.
+ *
+ * @since Twenty Seventeen 1.0
+ *
+ * @param string $html   The HTML image tag markup being filtered.
+ * @param object $header The custom header object returned by 'get_custom_header()'.
+ * @param array  $attr   Array of the attributes for the image tag.
+ * @return string The filtered header image HTML.
+ */
+function twentyseventeen_header_image_tag( $html, $header, $attr ) {
+       if ( isset( $attr['sizes'] ) ) {
+               $html = str_replace( $attr['sizes'], '100vw', $html );
+       }
+       return $html;
+}
+add_filter( 'get_header_image_tag', 'twentyseventeen_header_image_tag', 10, 3 );
+
+/**
+ * Add custom image sizes attribute to enhance responsive image functionality
+ * for post thumbnails.
+ *
+ * @since Twenty Seventeen 1.0
+ *
+ * @param array $attr       Attributes for the image markup.
+ * @param int   $attachment Image attachment ID.
+ * @param array $size       Registered image size or flat array of height and width dimensions.
+ * @return string A source size value for use in a post thumbnail 'sizes' attribute.
+ */
+function twentyseventeen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) {
+       if ( is_archive() || is_search() || is_home() ) {
+               $attr['sizes'] = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px';
+       } else {
+               $attr['sizes'] = '100vw';
+       }
+
+       return $attr;
+}
+add_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnail_sizes_attr', 10, 3 );
+
+/**
+ * Use front-page.php when Front page displays is set to a static page.
+ *
+ * @since Twenty Seventeen 1.0
+ *
+ * @param string $template front-page.php.
+ *
+ * @return string The template to be used: blank if is_home() is true (defaults to index.php), else $template.
+ */
+function twentyseventeen_front_page_template( $template ) {
+       return is_home() ? '' : $template;
+}
+add_filter( 'frontpage_template',  'twentyseventeen_front_page_template' );
+
+/**
+ * Implement the Custom Header feature.
+ */
+require get_parent_theme_file_path( '/inc/custom-header.php' );
+
+/**
+ * Custom template tags for this theme.
+ */
+require get_parent_theme_file_path( '/inc/template-tags.php' );
+
+/**
+ * Additional features to allow styling of the templates.
+ */
+require get_parent_theme_file_path( '/inc/template-functions.php' );
+
+/**
+ * Customizer additions.
+ */
+require get_parent_theme_file_path( '/inc/customizer.php' );
+
+/**
+ * SVG icons functions and filters.
+ */
+require get_parent_theme_file_path( '/inc/icon-functions.php' );
diff --git a/wp-content/themes/twentyseventeen/header.php b/wp-content/themes/twentyseventeen/header.php
new file mode 100644 (file)
index 0000000..30d7d2a
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+/**
+ * The header for our theme
+ *
+ * This is the template that displays all of the <head> section and everything up until <div id="content">
+ *
+ * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?><!DOCTYPE html>
+<html <?php language_attributes(); ?> class="no-js no-svg">
+<head>
+<meta charset="<?php bloginfo( 'charset' ); ?>">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="profile" href="http://gmpg.org/xfn/11">
+
+<?php wp_head(); ?>
+</head>
+
+<body <?php body_class(); ?>>
+<div id="page" class="site">
+       <a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyseventeen' ); ?></a>
+
+       <header id="masthead" class="site-header" role="banner">
+
+               <?php get_template_part( 'template-parts/header/header', 'image' ); ?>
+
+               <?php if ( has_nav_menu( 'top' ) ) : ?>
+                       <div class="navigation-top">
+                               <div class="wrap">
+                                       <?php get_template_part( 'template-parts/navigation/navigation', 'top' ); ?>
+                               </div><!-- .wrap -->
+                       </div><!-- .navigation-top -->
+               <?php endif; ?>
+
+       </header><!-- #masthead -->
+
+       <?php
+       // If a regular post or page, and not the front page, show the featured image.
+       if ( has_post_thumbnail() && ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) ) :
+               echo '<div class="single-featured-image-header">';
+               the_post_thumbnail( 'twentyseventeen-featured-image' );
+               echo '</div><!-- .single-featured-image-header -->';
+       endif;
+       ?>
+
+       <div class="site-content-contain">
+               <div id="content" class="site-content">
diff --git a/wp-content/themes/twentyseventeen/inc/back-compat.php b/wp-content/themes/twentyseventeen/inc/back-compat.php
new file mode 100644 (file)
index 0000000..4772f56
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+/**
+ * Twenty Seventeen back compat functionality
+ *
+ * Prevents Twenty Seventeen from running on WordPress versions prior to 4.7,
+ * since this theme is not meant to be backward compatible beyond that and
+ * relies on many newer functions and markup changes introduced in 4.7.
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since Twenty Seventeen 1.0
+ */
+
+/**
+ * Prevent switching to Twenty Seventeen on old versions of WordPress.
+ *
+ * Switches to the default theme.
+ *
+ * @since Twenty Seventeen 1.0
+ */
+function twentyseventeen_switch_theme() {
+       switch_theme( WP_DEFAULT_THEME );
+       unset( $_GET['activated'] );
+       add_action( 'admin_notices', 'twentyseventeen_upgrade_notice' );
+}
+add_action( 'after_switch_theme', 'twentyseventeen_switch_theme' );
+
+/**
+ * Adds a message for unsuccessful theme switch.
+ *
+ * Prints an update nag after an unsuccessful attempt to switch to
+ * Twenty Seventeen on WordPress versions prior to 4.7.
+ *
+ * @since Twenty Seventeen 1.0
+ *
+ * @global string $wp_version WordPress version.
+ */
+function twentyseventeen_upgrade_notice() {
+       $message = sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] );
+       printf( '<div class="error"><p>%s</p></div>', $message );
+}
+
+/**
+ * Prevents the Customizer from being loaded on WordPress versions prior to 4.7.
+ *
+ * @since Twenty Seventeen 1.0
+ *
+ * @global string $wp_version WordPress version.
+ */
+function twentyseventeen_customize() {
+       wp_die( sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] ), '', array(
+               'back_link' => true,
+       ) );
+}
+add_action( 'load-customize.php', 'twentyseventeen_customize' );
+
+/**
+ * Prevents the Theme Preview from being loaded on WordPress versions prior to 4.7.
+ *
+ * @since Twenty Seventeen 1.0
+ *
+ * @global string $wp_version WordPress version.
+ */
+function twentyseventeen_preview() {
+       if ( isset( $_GET['preview'] ) ) {
+               wp_die( sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] ) );
+       }
+}
+add_action( 'template_redirect', 'twentyseventeen_preview' );
diff --git a/wp-content/themes/twentyseventeen/inc/color-patterns.php b/wp-content/themes/twentyseventeen/inc/color-patterns.php
new file mode 100644 (file)
index 0000000..bd261ef
--- /dev/null
@@ -0,0 +1,574 @@
+<?php
+/**
+ * Twenty Seventeen: Color Patterns
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ */
+
+/**
+ * Generate the CSS for the current custom color scheme.
+ */
+function twentyseventeen_custom_colors_css() {
+       $hue = absint( get_theme_mod( 'colorscheme_hue', 250 ) );
+
+       /**
+        * Filter Twenty Seventeen default saturation level.
+        *
+        * @since Twenty Seventeen 1.0
+        *
+        * @param $saturation integer
+        */
+       $saturation = absint( apply_filters( 'twentyseventeen_custom_colors_saturation', 50 ) );
+       $reduced_saturation = ( .8 * $saturation ) . '%';
+       $saturation = $saturation . '%';
+       $css = '
+/**
+ * Twenty Seventeen: Color Patterns
+ *
+ * Colors are ordered from dark to light.
+ */
+
+.colors-custom a:hover,
+.colors-custom a:active,
+.colors-custom .entry-content a:focus,
+.colors-custom .entry-content a:hover,
+.colors-custom .entry-summary a:focus,
+.colors-custom .entry-summary a:hover,
+.colors-custom .widget a:focus,
+.colors-custom .widget a:hover,
+.colors-custom .site-footer .widget-area a:focus,
+.colors-custom .site-footer .widget-area a:hover,
+.colors-custom .posts-navigation a:focus,
+.colors-custom .posts-navigation a:hover,
+.colors-custom .comment-metadata a:focus,
+.colors-custom .comment-metadata a:hover,
+.colors-custom .comment-metadata a.comment-edit-link:focus,
+.colors-custom .comment-metadata a.comment-edit-link:hover,
+.colors-custom .comment-reply-link:focus,
+.colors-custom .comment-reply-link:hover,
+.colors-custom .widget_authors a:focus strong,
+.colors-custom .widget_authors a:hover strong,
+.colors-custom .entry-title a:focus,
+.colors-custom .entry-title a:hover,
+.colors-custom .entry-meta a:focus,
+.colors-custom .entry-meta a:hover,
+.colors-custom.blog .entry-meta a.post-edit-link:focus,
+.colors-custom.blog .entry-meta a.post-edit-link:hover,
+.colors-custom.archive .entry-meta a.post-edit-link:focus,
+.colors-custom.archive .entry-meta a.post-edit-link:hover,
+.colors-custom.search .entry-meta a.post-edit-link:focus,
+.colors-custom.search .entry-meta a.post-edit-link:hover,
+.colors-custom .page-links a:focus .page-number,
+.colors-custom .page-links a:hover .page-number,
+.colors-custom .entry-footer a:focus,
+.colors-custom .entry-footer a:hover,
+.colors-custom .entry-footer .cat-links a:focus,
+.colors-custom .entry-footer .cat-links a:hover,
+.colors-custom .entry-footer .tags-links a:focus,
+.colors-custom .entry-footer .tags-links a:hover,
+.colors-custom .post-navigation a:focus,
+.colors-custom .post-navigation a:hover,
+.colors-custom .pagination a:not(.prev):not(.next):focus,
+.colors-custom .pagination a:not(.prev):not(.next):hover,
+.colors-custom .comments-pagination a:not(.prev):not(.next):focus,
+.colors-custom .comments-pagination a:not(.prev):not(.next):hover,
+.colors-custom .logged-in-as a:focus,
+.colors-custom .logged-in-as a:hover,
+.colors-custom a:focus .nav-title,
+.colors-custom a:hover .nav-title,
+.colors-custom .edit-link a:focus,
+.colors-custom .edit-link a:hover,
+.colors-custom .site-info a:focus,
+.colors-custom .site-info a:hover,
+.colors-custom .widget .widget-title a:focus,
+.colors-custom .widget .widget-title a:hover,
+.colors-custom .widget ul li a:focus,
+.colors-custom .widget ul li a:hover {
+       color: hsl( ' . $hue . ', ' . $saturation . ', 0% ); /* base: #000; */
+}
+
+.colors-custom .entry-content a,
+.colors-custom .entry-summary a,
+.colors-custom .widget a,
+.colors-custom .site-footer .widget-area a,
+.colors-custom .posts-navigation a,
+.colors-custom .widget_authors a strong {
+       -webkit-box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation  . ', 6% ); /* base: rgba(15, 15, 15, 1); */
+       box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation . ', 6% ); /* base: rgba(15, 15, 15, 1); */
+}
+
+.colors-custom button,
+.colors-custom input[type="button"],
+.colors-custom input[type="submit"],
+.colors-custom .entry-footer .edit-link a.post-edit-link {
+       background-color: hsl( ' . $hue . ', ' . $saturation . ', 13% ); /* base: #222; */
+}
+
+.colors-custom input[type="text"]:focus,
+.colors-custom input[type="email"]:focus,
+.colors-custom input[type="url"]:focus,
+.colors-custom input[type="password"]:focus,
+.colors-custom input[type="search"]:focus,
+.colors-custom input[type="number"]:focus,
+.colors-custom input[type="tel"]:focus,
+.colors-custom input[type="range"]:focus,
+.colors-custom input[type="date"]:focus,
+.colors-custom input[type="month"]:focus,
+.colors-custom input[type="week"]:focus,
+.colors-custom input[type="time"]:focus,
+.colors-custom input[type="datetime"]:focus,
+.colors-custom .colors-custom input[type="datetime-local"]:focus,
+.colors-custom input[type="color"]:focus,
+.colors-custom textarea:focus,
+.colors-custom button.secondary,
+.colors-custom input[type="reset"],
+.colors-custom input[type="button"].secondary,
+.colors-custom input[type="reset"].secondary,
+.colors-custom input[type="submit"].secondary,
+.colors-custom a,
+.colors-custom .site-title,
+.colors-custom .site-title a,
+.colors-custom .navigation-top a,
+.colors-custom .dropdown-toggle,
+.colors-custom .menu-toggle,
+.colors-custom .page .panel-content .entry-title,
+.colors-custom .page-title,
+.colors-custom.page:not(.twentyseventeen-front-page) .entry-title,
+.colors-custom .page-links a .page-number,
+.colors-custom .comment-metadata a.comment-edit-link,
+.colors-custom .comment-reply-link .icon,
+.colors-custom h2.widget-title,
+.colors-custom mark,
+.colors-custom .post-navigation a:focus .icon,
+.colors-custom .post-navigation a:hover .icon,
+.colors-custom .site-content .site-content-light,
+.colors-custom .twentyseventeen-panel .recent-posts .entry-header .edit-link {
+       color: hsl( ' . $hue . ', ' . $saturation . ', 13% ); /* base: #222; */
+}
+
+.colors-custom .entry-content a:focus,
+.colors-custom .entry-content a:hover,
+.colors-custom .entry-summary a:focus,
+.colors-custom .entry-summary a:hover,
+.colors-custom .widget a:focus,
+.colors-custom .widget a:hover,
+.colors-custom .site-footer .widget-area a:focus,
+.colors-custom .site-footer .widget-area a:hover,
+.colors-custom .posts-navigation a:focus,
+.colors-custom .posts-navigation a:hover,
+.colors-custom .comment-metadata a:focus,
+.colors-custom .comment-metadata a:hover,
+.colors-custom .comment-metadata a.comment-edit-link:focus,
+.colors-custom .comment-metadata a.comment-edit-link:hover,
+.colors-custom .comment-reply-link:focus,
+.colors-custom .comment-reply-link:hover,
+.colors-custom .widget_authors a:focus strong,
+.colors-custom .widget_authors a:hover strong,
+.colors-custom .entry-title a:focus,
+.colors-custom .entry-title a:hover,
+.colors-custom .entry-meta a:focus,
+.colors-custom .entry-meta a:hover,
+.colors-custom.blog .entry-meta a.post-edit-link:focus,
+.colors-custom.blog .entry-meta a.post-edit-link:hover,
+.colors-custom.archive .entry-meta a.post-edit-link:focus,
+.colors-custom.archive .entry-meta a.post-edit-link:hover,
+.colors-custom.search .entry-meta a.post-edit-link:focus,
+.colors-custom.search .entry-meta a.post-edit-link:hover,
+.colors-custom .page-links a:focus .page-number,
+.colors-custom .page-links a:hover .page-number,
+.colors-custom .entry-footer .cat-links a:focus,
+.colors-custom .entry-footer .cat-links a:hover,
+.colors-custom .entry-footer .tags-links a:focus,
+.colors-custom .entry-footer .tags-links a:hover,
+.colors-custom .post-navigation a:focus,
+.colors-custom .post-navigation a:hover,
+.colors-custom .pagination a:not(.prev):not(.next):focus,
+.colors-custom .pagination a:not(.prev):not(.next):hover,
+.colors-custom .comments-pagination a:not(.prev):not(.next):focus,
+.colors-custom .comments-pagination a:not(.prev):not(.next):hover,
+.colors-custom .logged-in-as a:focus,
+.colors-custom .logged-in-as a:hover,
+.colors-custom a:focus .nav-title,
+.colors-custom a:hover .nav-title,
+.colors-custom .edit-link a:focus,
+.colors-custom .edit-link a:hover,
+.colors-custom .site-info a:focus,
+.colors-custom .site-info a:hover,
+.colors-custom .widget .widget-title a:focus,
+.colors-custom .widget .widget-title a:hover,
+.colors-custom .widget ul li a:focus,
+.colors-custom .widget ul li a:hover {
+       -webkit-box-shadow: inset 0 0 0 hsl( ' . $hue . ', ' . $saturation . ', 13% ), 0 3px 0 hsl( ' . $hue . ', ' . $saturation . ', 13% );
+       box-shadow: inset 0 0 0 hsl( ' . $hue . ', ' . $saturation. ' , 13% ), 0 3px 0 hsl( ' . $hue . ', ' . $saturation . ', 13% );
+}
+
+body.colors-custom,
+.colors-custom button,
+.colors-custom input,
+.colors-custom select,
+.colors-custom textarea,
+.colors-custom h3,
+.colors-custom h4,
+.colors-custom h6,
+.colors-custom label,
+.colors-custom .entry-title a,
+.colors-custom.twentyseventeen-front-page .panel-content .recent-posts article,
+.colors-custom .entry-footer .cat-links a,
+.colors-custom .entry-footer .tags-links a,
+.colors-custom .format-quote blockquote,
+.colors-custom .nav-title,
+.colors-custom .comment-body,
+.colors-custom .site-content .wp-playlist-light .wp-playlist-current-item .wp-playlist-item-album {
+       color: hsl( ' . $hue . ', ' . $reduced_saturation . ', 20% ); /* base: #333; */
+}
+
+.colors-custom .social-navigation a:hover,
+.colors-custom .social-navigation a:focus {
+       background: hsl( ' . $hue . ', ' . $reduced_saturation . ', 20% ); /* base: #333; */
+}
+
+.colors-custom input[type="text"]:focus,
+.colors-custom input[type="email"]:focus,
+.colors-custom input[type="url"]:focus,
+.colors-custom input[type="password"]:focus,
+.colors-custom input[type="search"]:focus,
+.colors-custom input[type="number"]:focus,
+.colors-custom input[type="tel"]:focus,
+.colors-custom input[type="range"]:focus,
+.colors-custom input[type="date"]:focus,
+.colors-custom input[type="month"]:focus,
+.colors-custom input[type="week"]:focus,
+.colors-custom input[type="time"]:focus,
+.colors-custom input[type="datetime"]:focus,
+.colors-custom input[type="datetime-local"]:focus,
+.colors-custom input[type="color"]:focus,
+.colors-custom textarea:focus,
+.bypostauthor > .comment-body > .comment-meta > .comment-author .avatar {
+       border-color: hsl( ' . $hue . ', ' . $reduced_saturation . ', 20% ); /* base: #333; */
+}
+
+.colors-custom h2,
+.colors-custom blockquote,
+.colors-custom input[type="text"],
+.colors-custom input[type="email"],
+.colors-custom input[type="url"],
+.colors-custom input[type="password"],
+.colors-custom input[type="search"],
+.colors-custom input[type="number"],
+.colors-custom input[type="tel"],
+.colors-custom input[type="range"],
+.colors-custom input[type="date"],
+.colors-custom input[type="month"],
+.colors-custom input[type="week"],
+.colors-custom input[type="time"],
+.colors-custom input[type="datetime"],
+.colors-custom input[type="datetime-local"],
+.colors-custom input[type="color"],
+.colors-custom textarea,
+.colors-custom .site-description,
+.colors-custom .entry-content blockquote.alignleft,
+.colors-custom .entry-content blockquote.alignright,
+.colors-custom .colors-custom .taxonomy-description,
+.colors-custom .site-info a,
+.colors-custom .wp-caption,
+.colors-custom .gallery-caption {
+       color: hsl( ' . $hue . ', ' . $saturation . ', 40% ); /* base: #666; */
+}
+
+.colors-custom abbr,
+.colors-custom acronym {
+       border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 40% ); /* base: #666; */
+}
+
+.colors-custom h5,
+.colors-custom .entry-meta,
+.colors-custom .entry-meta a,
+.colors-custom.blog .entry-meta a.post-edit-link,
+.colors-custom.archive .entry-meta a.post-edit-link,
+.colors-custom.search .entry-meta a.post-edit-link,
+.colors-custom .nav-subtitle,
+.colors-custom .comment-metadata,
+.colors-custom .comment-metadata a,
+.colors-custom .no-comments,
+.colors-custom .comment-awaiting-moderation,
+.colors-custom .page-numbers.current,
+.colors-custom .page-links .page-number,
+.colors-custom .navigation-top .current-menu-item > a,
+.colors-custom .navigation-top .current_page_item > a,
+.colors-custom .main-navigation a:hover,
+.colors-custom .site-content .wp-playlist-light .wp-playlist-current-item .wp-playlist-item-artist {
+       color: hsl( ' . $hue . ', ' . $saturation . ', 46% ); /* base: #767676; */
+}
+
+.colors-custom button:hover,
+.colors-custom button:focus,
+.colors-custom input[type="button"]:hover,
+.colors-custom input[type="button"]:focus,
+.colors-custom input[type="submit"]:hover,
+.colors-custom input[type="submit"]:focus,
+.colors-custom .entry-footer .edit-link a.post-edit-link:hover,
+.colors-custom .entry-footer .edit-link a.post-edit-link:focus,
+.colors-custom .social-navigation a,
+.colors-custom .prev.page-numbers:focus,
+.colors-custom .prev.page-numbers:hover,
+.colors-custom .next.page-numbers:focus,
+.colors-custom .next.page-numbers:hover,
+.colors-custom .site-content .wp-playlist-light .wp-playlist-item:hover,
+.colors-custom .site-content .wp-playlist-light .wp-playlist-item:focus {
+       background: hsl( ' . esc_attr( $hue ) . ', ' . esc_attr( $saturation ) . ', 46% ); /* base: #767676; */
+}
+
+.colors-custom button.secondary:hover,
+.colors-custom button.secondary:focus,
+.colors-custom input[type="reset"]:hover,
+.colors-custom input[type="reset"]:focus,
+.colors-custom input[type="button"].secondary:hover,
+.colors-custom input[type="button"].secondary:focus,
+.colors-custom input[type="reset"].secondary:hover,
+.colors-custom input[type="reset"].secondary:focus,
+.colors-custom input[type="submit"].secondary:hover,
+.colors-custom input[type="submit"].secondary:focus,
+.colors-custom hr {
+       background: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */
+}
+
+.colors-custom input[type="text"],
+.colors-custom input[type="email"],
+.colors-custom input[type="url"],
+.colors-custom input[type="password"],
+.colors-custom input[type="search"],
+.colors-custom input[type="number"],
+.colors-custom input[type="tel"],
+.colors-custom input[type="range"],
+.colors-custom input[type="date"],
+.colors-custom input[type="month"],
+.colors-custom input[type="week"],
+.colors-custom input[type="time"],
+.colors-custom input[type="datetime"],
+.colors-custom input[type="datetime-local"],
+.colors-custom input[type="color"],
+.colors-custom textarea,
+.colors-custom select,
+.colors-custom fieldset,
+.colors-custom .widget .tagcloud a:hover,
+.colors-custom .widget .tagcloud a:focus,
+.colors-custom .widget.widget_tag_cloud a:hover,
+.colors-custom .widget.widget_tag_cloud a:focus,
+.colors-custom .wp_widget_tag_cloud a:hover,
+.colors-custom .wp_widget_tag_cloud a:focus {
+       border-color: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */
+}
+
+.colors-custom thead th {
+       border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */
+}
+
+.colors-custom .entry-footer .cat-links .icon,
+.colors-custom .entry-footer .tags-links .icon {
+       color: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */
+}
+
+.colors-custom button.secondary,
+.colors-custom input[type="reset"],
+.colors-custom input[type="button"].secondary,
+.colors-custom input[type="reset"].secondary,
+.colors-custom input[type="submit"].secondary,
+.colors-custom .prev.page-numbers,
+.colors-custom .next.page-numbers {
+       background-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */
+}
+
+.colors-custom .widget .tagcloud a,
+.colors-custom .widget.widget_tag_cloud a,
+.colors-custom .wp_widget_tag_cloud a {
+       border-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */
+}
+
+.colors-custom.twentyseventeen-front-page article:not(.has-post-thumbnail):not(:first-child),
+.colors-custom .widget ul li {
+       border-top-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */
+}
+
+.colors-custom .widget ul li {
+       border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */
+}
+
+.colors-custom pre,
+.colors-custom mark,
+.colors-custom ins {
+       background: hsl( ' . $hue . ', ' . $saturation . ', 93% ); /* base: #eee; */
+}
+
+.colors-custom .navigation-top,
+.colors-custom .main-navigation > div > ul,
+.colors-custom .pagination,
+.colors-custom .comments-pagination,
+.colors-custom .entry-footer,
+.colors-custom .site-footer {
+       border-top-color: hsl( ' . $hue . ', ' . $saturation . ', 93% ); /* base: #eee; */
+}
+
+.colors-custom .navigation-top,
+.colors-custom .main-navigation li,
+.colors-custom .entry-footer,
+.colors-custom .single-featured-image-header,
+.colors-custom .site-content .wp-playlist-light .wp-playlist-item,
+.colors-custom tr {
+       border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 93% ); /* base: #eee; */
+}
+
+.colors-custom .site-content .wp-playlist-light {
+       border-color: hsl( ' . $hue . ', ' . $saturation . ', 93% ); /* base: #eee; */
+}
+
+.colors-custom .site-header,
+.colors-custom .single-featured-image-header {
+       background-color: hsl( ' . $hue . ', ' . $saturation . ', 98% ); /* base: #fafafa; */
+}
+
+.colors-custom button,
+.colors-custom input[type="button"],
+.colors-custom input[type="submit"],
+.colors-custom .entry-footer .edit-link a.post-edit-link,
+.colors-custom .social-navigation a,
+.colors-custom .site-content .wp-playlist-light a.wp-playlist-caption:hover,
+.colors-custom .site-content .wp-playlist-light .wp-playlist-item:hover a,
+.colors-custom .site-content .wp-playlist-light .wp-playlist-item:focus a,
+.colors-custom .site-content .wp-playlist-light .wp-playlist-item:hover,
+.colors-custom .site-content .wp-playlist-light .wp-playlist-item:focus,
+.colors-custom .prev.page-numbers:focus,
+.colors-custom .prev.page-numbers:hover,
+.colors-custom .next.page-numbers:focus,
+.colors-custom .next.page-numbers:hover,
+.colors-custom.has-header-image .site-title,
+.colors-custom.has-header-video .site-title,
+.colors-custom.has-header-image .site-title a,
+.colors-custom.has-header-video .site-title a,
+.colors-custom.has-header-image .site-description,
+.colors-custom.has-header-video .site-description {
+       color: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */
+}
+
+body.colors-custom,
+.colors-custom .navigation-top,
+.colors-custom .main-navigation ul {
+       background: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */
+}
+
+.colors-custom .widget ul li a,
+.colors-custom .site-footer .widget-area ul li a {
+       -webkit-box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: rgba(255, 255, 255, 1); */
+       box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation . ', 100% );  /* base: rgba(255, 255, 255, 1); */
+}
+
+.colors-custom .menu-toggle,
+.colors-custom .menu-toggle:hover,
+.colors-custom .menu-toggle:focus,
+.colors-custom .menu .dropdown-toggle,
+.colors-custom .menu-scroll-down,
+.colors-custom .menu-scroll-down:hover,
+.colors-custom .menu-scroll-down:focus {
+       background-color: transparent;
+}
+
+.colors-custom .widget .tagcloud a,
+.colors-custom .widget .tagcloud a:focus,
+.colors-custom .widget .tagcloud a:hover,
+.colors-custom .widget.widget_tag_cloud a,
+.colors-custom .widget.widget_tag_cloud a:focus,
+.colors-custom .widget.widget_tag_cloud a:hover,
+.colors-custom .wp_widget_tag_cloud a,
+.colors-custom .wp_widget_tag_cloud a:focus,
+.colors-custom .wp_widget_tag_cloud a:hover,
+.colors-custom .entry-footer .edit-link a.post-edit-link:focus,
+.colors-custom .entry-footer .edit-link a.post-edit-link:hover {
+       -webkit-box-shadow: none !important;
+       box-shadow: none !important;
+}
+
+/* Reset non-customizable hover styling for links */
+.colors-custom .entry-content a:hover,
+.colors-custom .entry-content a:focus,
+.colors-custom .entry-summary a:hover,
+.colors-custom .entry-summary a:focus,
+.colors-custom .widget a:hover,
+.colors-custom .widget a:focus,
+.colors-custom .site-footer .widget-area a:hover,
+.colors-custom .site-footer .widget-area a:focus,
+.colors-custom .posts-navigation a:hover,
+.colors-custom .posts-navigation a:focus,
+.colors-custom .widget_authors a:hover strong,
+.colors-custom .widget_authors a:focus strong {
+       -webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 3px 0 rgba(0, 0, 0, 1);
+       box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 3px 0 rgba(0, 0, 0, 1);
+}
+
+.colors-custom .gallery-item a,
+.colors-custom .gallery-item a:hover,
+.colors-custom .gallery-item a:focus {
+       -webkit-box-shadow: none;
+       box-shadow: none;
+}
+
+@media screen and (min-width: 48em) {
+
+       .colors-custom .nav-links .nav-previous .nav-title .icon,
+       .colors-custom .nav-links .nav-next .nav-title .icon {
+               color: hsl( ' . $hue . ', ' . $saturation . ', 20% ); /* base: #222; */
+       }
+
+       .colors-custom .main-navigation li li:hover,
+       .colors-custom .main-navigation li li.focus {
+               background: hsl( ' . $hue . ', ' . $saturation . ', 46% ); /* base: #767676; */
+       }
+
+       .colors-custom .navigation-top .menu-scroll-down {
+               color: hsl( ' . $hue . ', ' . $saturation . ', 46% ); /* base: #767676; */;
+       }
+
+       .colors-custom abbr[title] {
+               border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 46% ); /* base: #767676; */;
+       }
+
+       .colors-custom .main-navigation ul ul {
+               border-color: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */
+               background: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */
+       }
+
+       .colors-custom .main-navigation ul li.menu-item-has-children:before,
+       .colors-custom .main-navigation ul li.page_item_has_children:before {
+               border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */
+       }
+
+       .colors-custom .main-navigation ul li.menu-item-has-children:after,
+       .colors-custom .main-navigation ul li.page_item_has_children:after {
+               border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */
+       }
+
+       .colors-custom .main-navigation li li.focus > a,
+       .colors-custom .main-navigation li li:focus > a,
+       .colors-custom .main-navigation li li:hover > a,
+       .colors-custom .main-navigation li li a:hover,
+       .colors-custom .main-navigation li li a:focus,
+       .colors-custom .main-navigation li li.current_page_item a:hover,
+       .colors-custom .main-navigation li li.current-menu-item a:hover,
+       .colors-custom .main-navigation li li.current_page_item a:focus,
+       .colors-custom .main-navigation li li.current-menu-item a:focus {
+               color: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */
+       }
+}';
+
+
+       /**
+        * Filters Twenty Seventeen custom colors CSS.
+        *
+        * @since Twenty Seventeen 1.0
+        *
+        * @param $css        string Base theme colors CSS.
+        * @param $hue        int    The user's selected color hue.
+        * @param $saturation string Filtered theme color saturation level.
+        */
+       return apply_filters( 'twentyseventeen_custom_colors_css', $css, $hue, $saturation );
+}
diff --git a/wp-content/themes/twentyseventeen/inc/custom-header.php b/wp-content/themes/twentyseventeen/inc/custom-header.php
new file mode 100644 (file)
index 0000000..92940a8
--- /dev/null
@@ -0,0 +1,120 @@
+<?php
+/**
+ * Custom header implementation
+ *
+ * @link https://codex.wordpress.org/Custom_Headers
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ */
+
+/**
+ * Set up the WordPress core custom header feature.
+ *
+ * @uses twentyseventeen_header_style()
+ */
+function twentyseventeen_custom_header_setup() {
+
+       /**
+        * Filter Twenty Seventeen custom-header support arguments.
+        *
+        * @since Twenty Seventeen 1.0
+        *
+        * @param array $args {
+        *     An array of custom-header support arguments.
+        *
+        *     @type string $default-image              Default image of the header.
+        *     @type string $default_text_color     Default color of the header text.
+        *     @type int    $width                  Width in pixels of the custom header image. Default 954.
+        *     @type int    $height                 Height in pixels of the custom header image. Default 1300.
+        *     @type string $wp-head-callback       Callback function used to styles the header image and text
+        *                                          displayed on the blog.
+        *     @type string $flex-height                Flex support for height of header.
+        * }
+        */
+       add_theme_support( 'custom-header', apply_filters( 'twentyseventeen_custom_header_args', array(
+               'default-image'      => get_parent_theme_file_uri( '/assets/images/header.jpg' ),
+               'width'              => 2000,
+               'height'             => 1200,
+               'flex-height'        => true,
+               'video'              => true,
+               'wp-head-callback'   => 'twentyseventeen_header_style',
+       ) ) );
+
+       register_default_headers( array(
+               'default-image' => array(
+                       'url'           => '%s/assets/images/header.jpg',
+                       'thumbnail_url' => '%s/assets/images/header.jpg',
+                       'description'   => __( 'Default Header Image', 'twentyseventeen' ),
+               ),
+       ) );
+}
+add_action( 'after_setup_theme', 'twentyseventeen_custom_header_setup' );
+
+if ( ! function_exists( 'twentyseventeen_header_style' ) ) :
+/**
+ * Styles the header image and text displayed on the blog.
+ *
+ * @see twentyseventeen_custom_header_setup().
+ */
+function twentyseventeen_header_style() {
+       $header_text_color = get_header_textcolor();
+
+       // If no custom options for text are set, let's bail.
+       // get_header_textcolor() options: add_theme_support( 'custom-header' ) is default, hide text (returns 'blank') or any hex value.
+       if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) {
+               return;
+       }
+
+       // If we get this far, we have custom styles. Let's do this.
+       ?>
+       <style id="twentyseventeen-custom-header-styles" type="text/css">
+       <?php
+               // Has the text been hidden?
+               if ( 'blank' === $header_text_color ) :
+       ?>
+               .site-title,
+               .site-description {
+                       position: absolute;
+                       clip: rect(1px, 1px, 1px, 1px);
+               }
+       <?php
+               // If the user has set a custom color for the text use that.
+               else :
+       ?>
+               .site-title a,
+               .colors-dark .site-title a,
+               .colors-custom .site-title a,
+               body.has-header-image .site-title a,
+               body.has-header-video .site-title a,
+               body.has-header-image.colors-dark .site-title a,
+               body.has-header-video.colors-dark .site-title a,
+               body.has-header-image.colors-custom .site-title a,
+               body.has-header-video.colors-custom .site-title a,
+               .site-description,
+               .colors-dark .site-description,
+               .colors-custom .site-description,
+               body.has-header-image .site-description,
+               body.has-header-video .site-description,
+               body.has-header-image.colors-dark .site-description,
+               body.has-header-video.colors-dark .site-description,
+               body.has-header-image.colors-custom .site-description,
+               body.has-header-video.colors-custom .site-description {
+                       color: #<?php echo esc_attr( $header_text_color ); ?>;
+               }
+       <?php endif; ?>
+       </style>
+       <?php
+}
+endif; // End of twentyseventeen_header_style.
+
+/**
+ * Customize video play/pause button in the custom header.
+ */
+function twentyseventeen_video_controls( $settings ) {
+       $settings['l10n']['play'] = '<span class="screen-reader-text">' . __( 'Play background video', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'play' ) );
+       $settings['l10n']['pause'] = '<span class="screen-reader-text">' . __( 'Pause background video', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'pause' ) );
+       return $settings;
+}
+add_filter( 'header_video_settings', 'twentyseventeen_video_controls' );
diff --git a/wp-content/themes/twentyseventeen/inc/customizer.php b/wp-content/themes/twentyseventeen/inc/customizer.php
new file mode 100644 (file)
index 0000000..5963f79
--- /dev/null
@@ -0,0 +1,206 @@
+<?php
+/**
+ * Twenty Seventeen: Customizer
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ */
+
+/**
+ * Add postMessage support for site title and description for the Theme Customizer.
+ *
+ * @param WP_Customize_Manager $wp_customize Theme Customizer object.
+ */
+function twentyseventeen_customize_register( $wp_customize ) {
+       $wp_customize->get_setting( 'blogname' )->transport          = 'postMessage';
+       $wp_customize->get_setting( 'blogdescription' )->transport   = 'postMessage';
+       $wp_customize->get_setting( 'header_textcolor' )->transport  = 'postMessage';
+
+       $wp_customize->selective_refresh->add_partial( 'blogname', array(
+               'selector' => '.site-title a',
+               'render_callback' => 'twentyseventeen_customize_partial_blogname',
+       ) );
+       $wp_customize->selective_refresh->add_partial( 'blogdescription', array(
+               'selector' => '.site-description',
+               'render_callback' => 'twentyseventeen_customize_partial_blogdescription',
+       ) );
+
+       /**
+        * Custom colors.
+        */
+       $wp_customize->add_setting( 'colorscheme', array(
+               'default'           => 'light',
+               'transport'         => 'postMessage',
+               'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme',
+       ) );
+
+       $wp_customize->add_setting( 'colorscheme_hue', array(
+               'default'           => 250,
+               'transport'         => 'postMessage',
+               'sanitize_callback' => 'absint', // The hue is stored as a positive integer.
+       ) );
+
+       $wp_customize->add_control( 'colorscheme', array(
+               'type'    => 'radio',
+               'label'    => __( 'Color Scheme', 'twentyseventeen' ),
+               'choices'  => array(
+                       'light'  => __( 'Light', 'twentyseventeen' ),
+                       'dark'   => __( 'Dark', 'twentyseventeen' ),
+                       'custom' => __( 'Custom', 'twentyseventeen' ),
+               ),
+               'section'  => 'colors',
+               'priority' => 5,
+       ) );
+
+       $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'colorscheme_hue', array(
+               'mode' => 'hue',
+               'section'  => 'colors',
+               'priority' => 6,
+       ) ) );
+
+       /**
+        * Theme options.
+        */
+       $wp_customize->add_section( 'theme_options', array(
+               'title'    => __( 'Theme Options', 'twentyseventeen' ),
+               'priority' => 130, // Before Additional CSS.
+       ) );
+
+       $wp_customize->add_setting( 'page_layout', array(
+               'default'           => 'two-column',
+               'sanitize_callback' => 'twentyseventeen_sanitize_page_layout',
+               'transport'         => 'postMessage',
+       ) );
+
+       $wp_customize->add_control( 'page_layout', array(
+               'label'       => __( 'Page Layout', 'twentyseventeen' ),
+               'section'     => 'theme_options',
+               'type'        => 'radio',
+               'description' => __( 'When the two column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ),
+               'choices'     => array(
+                       'one-column' => __( 'One Column', 'twentyseventeen' ),
+                       'two-column' => __( 'Two Column', 'twentyseventeen' ),
+               ),
+               'active_callback' => 'twentyseventeen_is_view_with_layout_option',
+       ) );
+
+       /**
+        * Filter number of front page sections in Twenty Seventeen.
+        *
+        * @since Twenty Seventeen 1.0
+        *
+        * @param $num_sections integer
+        */
+       $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 );
+
+       // Create a setting and control for each of the sections available in the theme.
+       for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
+               $wp_customize->add_setting( 'panel_' . $i, array(
+                       'default'           => false,
+                       'sanitize_callback' => 'absint',
+                       'transport'         => 'postMessage',
+               ) );
+
+               $wp_customize->add_control( 'panel_' . $i, array(
+                       /* translators: %d is the front page section number */
+                       'label'          => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ),
+                       'description'    => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ),
+                       'section'        => 'theme_options',
+                       'type'           => 'dropdown-pages',
+                       'allow_addition' => true,
+                       'active_callback' => 'twentyseventeen_is_static_front_page',
+               ) );
+
+               $wp_customize->selective_refresh->add_partial( 'panel_' . $i, array(
+                       'selector'            => '#panel' . $i,
+                       'render_callback'     => 'twentyseventeen_front_page_section',
+                       'container_inclusive' => true,
+               ) );
+       }
+}
+add_action( 'customize_register', 'twentyseventeen_customize_register' );
+
+/**
+ * Sanitize the page layout options.
+ */
+function twentyseventeen_sanitize_page_layout( $input ) {
+       $valid = array(
+               'one-column' => __( 'One Column', 'twentyseventeen' ),
+               'two-column' => __( 'Two Column', 'twentyseventeen' ),
+       );
+
+       if ( array_key_exists( $input, $valid ) ) {
+               return $input;
+       }
+
+       return '';
+}
+
+/**
+ * Sanitize the colorscheme.
+ */
+function twentyseventeen_sanitize_colorscheme( $input ) {
+       $valid = array( 'light', 'dark', 'custom' );
+
+       if ( in_array( $input, $valid ) ) {
+               return $input;
+       }
+
+       return 'light';
+}
+
+/**
+ * Render the site title for the selective refresh partial.
+ *
+ * @since Twenty Seventeen 1.0
+ * @see twentyseventeen_customize_register()
+ *
+ * @return void
+ */
+function twentyseventeen_customize_partial_blogname() {
+       bloginfo( 'name' );
+}
+
+/**
+ * Render the site tagline for the selective refresh partial.
+ *
+ * @since Twenty Seventeen 1.0
+ * @see twentyseventeen_customize_register()
+ *
+ * @return void
+ */
+function twentyseventeen_customize_partial_blogdescription() {
+       bloginfo( 'description' );
+}
+
+/**
+ * Return whether we're previewing the front page and it's a static page.
+ */
+function twentyseventeen_is_static_front_page() {
+       return ( is_front_page() && ! is_home() );
+}
+
+/**
+ * Return whether we're on a view that supports a one or two column layout.
+ */
+function twentyseventeen_is_view_with_layout_option() {
+       // This option is available on all pages. It's also available on archives when there isn't a sidebar.
+       return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
+}
+
+/**
+ * Bind JS handlers to instantly live-preview changes.
+ */
+function twentyseventeen_customize_preview_js() {
+       wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '1.0', true );
+}
+add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' );
+
+/**
+ * Load dynamic logic for the customizer controls area.
+ */
+function twentyseventeen_panels_js() {
+       wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '1.0', true );
+}
+add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' );
diff --git a/wp-content/themes/twentyseventeen/inc/icon-functions.php b/wp-content/themes/twentyseventeen/inc/icon-functions.php
new file mode 100644 (file)
index 0000000..dc423ee
--- /dev/null
@@ -0,0 +1,218 @@
+<?php
+/**
+ * SVG icons related functions and filters
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ */
+
+/**
+ * Add SVG definitions to the footer.
+ */
+function twentyseventeen_include_svg_icons() {
+       // Define SVG sprite file.
+       $svg_icons = get_parent_theme_file_path( '/assets/images/svg-icons.svg' );
+
+       // If it exists, include it.
+       if ( file_exists( $svg_icons ) ) {
+               require_once( $svg_icons );
+       }
+}
+add_action( 'wp_footer', 'twentyseventeen_include_svg_icons', 9999 );
+
+/**
+ * Return SVG markup.
+ *
+ * @param array $args {
+ *     Parameters needed to display an SVG.
+ *
+ *     @type string $icon  Required SVG icon filename.
+ *     @type string $title Optional SVG title.
+ *     @type string $desc  Optional SVG description.
+ * }
+ * @return string SVG markup.
+ */
+function twentyseventeen_get_svg( $args = array() ) {
+       // Make sure $args are an array.
+       if ( empty( $args ) ) {
+               return __( 'Please define default parameters in the form of an array.', 'twentyseventeen' );
+       }
+
+       // Define an icon.
+       if ( false === array_key_exists( 'icon', $args ) ) {
+               return __( 'Please define an SVG icon filename.', 'twentyseventeen' );
+       }
+
+       // Set defaults.
+       $defaults = array(
+               'icon'        => '',
+               'title'       => '',
+               'desc'        => '',
+               'fallback'    => false,
+       );
+
+       // Parse args.
+       $args = wp_parse_args( $args, $defaults );
+
+       // Set aria hidden.
+       $aria_hidden = ' aria-hidden="true"';
+
+       // Set ARIA.
+       $aria_labelledby = '';
+
+       /*
+        * Twenty Seventeen doesn't use the SVG title or description attributes; non-decorative icons are described with .screen-reader-text.
+        *
+        * However, child themes can use the title and description to add information to non-decorative SVG icons to improve accessibility.
+        *
+        * Example 1 with title: <?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right', 'title' => __( 'This is the title', 'textdomain' ) ) ); ?>
+        *
+        * Example 2 with title and description: <?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right', 'title' => __( 'This is the title', 'textdomain' ), 'desc' => __( 'This is the description', 'textdomain' ) ) ); ?>
+        *
+        * See https://www.paciellogroup.com/blog/2013/12/using-aria-enhance-svg-accessibility/.
+        */
+       if ( $args['title'] ) {
+               $aria_hidden     = '';
+               $unique_id       = uniqid();
+               $aria_labelledby = ' aria-labelledby="title-' . $unique_id . '"';
+
+               if ( $args['desc'] ) {
+                       $aria_labelledby = ' aria-labelledby="title-' . $unique_id . ' desc-' . $unique_id . '"';
+               }
+       }
+
+       // Begin SVG markup.
+       $svg = '<svg class="icon icon-' . esc_attr( $args['icon'] ) . '"' . $aria_hidden . $aria_labelledby . ' role="img">';
+
+       // Display the title.
+       if ( $args['title'] ) {
+               $svg .= '<title id="title-' . $unique_id . '">' . esc_html( $args['title'] ) . '</title>';
+
+               // Display the desc only if the title is already set.
+               if ( $args['desc'] ) {
+                       $svg .= '<desc id="desc-' . $unique_id . '">' . esc_html( $args['desc'] ) . '</desc>';
+               }
+       }
+
+       /*
+        * Display the icon.
+        *
+        * The whitespace around `<use>` is intentional - it is a work around to a keyboard navigation bug in Safari 10.
+        *
+        * See https://core.trac.wordpress.org/ticket/38387.
+        */
+       $svg .= ' <use href="#icon-' . esc_html( $args['icon'] ) . '" xlink:href="#icon-' . esc_html( $args['icon'] ) . '"></use> ';
+
+       // Add some markup to use as a fallback for browsers that do not support SVGs.
+       if ( $args['fallback'] ) {
+               $svg .= '<span class="svg-fallback icon-' . esc_attr( $args['icon'] ) . '"></span>';
+       }
+
+       $svg .= '</svg>';
+
+       return $svg;
+}
+
+/**
+ * Display SVG icons in social links menu.
+ *
+ * @param  string  $item_output The menu item output.
+ * @param  WP_Post $item        Menu item object.
+ * @param  int     $depth       Depth of the menu.
+ * @param  array   $args        wp_nav_menu() arguments.
+ * @return string  $item_output The menu item output with social icon.
+ */
+function twentyseventeen_nav_menu_social_icons( $item_output, $item, $depth, $args ) {
+       // Get supported social icons.
+       $social_icons = twentyseventeen_social_links_icons();
+
+       // Change SVG icon inside social links menu if there is supported URL.
+       if ( 'social' === $args->theme_location ) {
+               foreach ( $social_icons as $attr => $value ) {
+                       if ( false !== strpos( $item_output, $attr ) ) {
+                               $item_output = str_replace( $args->link_after, '</span>' . twentyseventeen_get_svg( array( 'icon' => esc_attr( $value ) ) ), $item_output );
+                       }
+               }
+       }
+
+       return $item_output;
+}
+add_filter( 'walker_nav_menu_start_el', 'twentyseventeen_nav_menu_social_icons', 10, 4 );
+
+/**
+ * Add dropdown icon if menu item has children.
+ *
+ * @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.
+ * @return string $title The menu item's title with dropdown icon.
+ */
+function twentyseventeen_dropdown_icon_to_menu_link( $title, $item, $args, $depth ) {
+       if ( 'top' === $args->theme_location ) {
+               foreach ( $item->classes as $value ) {
+                       if ( 'menu-item-has-children' === $value || 'page_item_has_children' === $value ) {
+                               $title = $title . twentyseventeen_get_svg( array( 'icon' => 'angle-down' ) );
+                       }
+               }
+       }
+
+       return $title;
+}
+add_filter( 'nav_menu_item_title', 'twentyseventeen_dropdown_icon_to_menu_link', 10, 4 );
+
+/**
+ * Returns an array of supported social links (URL and icon name).
+ *
+ * @return array $social_links_icons
+ */
+function twentyseventeen_social_links_icons() {
+       // Supported social links icons.
+       $social_links_icons = array(
+               'behance.net'     => 'behance',
+               'codepen.io'      => 'codepen',
+               'deviantart.com'  => 'deviantart',
+               'digg.com'        => 'digg',
+               'dribbble.com'    => 'dribbble',
+               'dropbox.com'     => 'dropbox',
+               'facebook.com'    => 'facebook',
+               'flickr.com'      => 'flickr',
+               'foursquare.com'  => 'foursquare',
+               'plus.google.com' => 'google-plus',
+               'github.com'      => 'github',
+               'instagram.com'   => 'instagram',
+               'linkedin.com'    => 'linkedin',
+               'mailto:'         => 'envelope-o',
+               'medium.com'      => 'medium',
+               'pinterest.com'   => 'pinterest-p',
+               'getpocket.com'   => 'get-pocket',
+               'reddit.com'      => 'reddit-alien',
+               'skype.com'       => 'skype',
+               'skype:'          => 'skype',
+               'slideshare.net'  => 'slideshare',
+               'snapchat.com'    => 'snapchat-ghost',
+               'soundcloud.com'  => 'soundcloud',
+               'spotify.com'     => 'spotify',
+               'stumbleupon.com' => 'stumbleupon',
+               'tumblr.com'      => 'tumblr',
+               'twitch.tv'       => 'twitch',
+               'twitter.com'     => 'twitter',
+               'vimeo.com'       => 'vimeo',
+               'vine.co'         => 'vine',
+               'vk.com'          => 'vk',
+               'wordpress.org'   => 'wordpress',
+               'wordpress.com'   => 'wordpress',
+               'yelp.com'        => 'yelp',
+               'youtube.com'     => 'youtube',
+       );
+
+       /**
+        * Filter Twenty Seventeen social links icons.
+        *
+        * @since Twenty Seventeen 1.0
+        *
+        * @param array $social_links_icons
+        */
+       return apply_filters( 'twentyseventeen_social_links_icons', $social_links_icons );
+}
diff --git a/wp-content/themes/twentyseventeen/inc/template-functions.php b/wp-content/themes/twentyseventeen/inc/template-functions.php
new file mode 100644 (file)
index 0000000..6b136c4
--- /dev/null
@@ -0,0 +1,102 @@
+<?php
+/**
+ * Additional features to allow styling of the templates
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ */
+
+/**
+ * Adds custom classes to the array of body classes.
+ *
+ * @param array $classes Classes for the body element.
+ * @return array
+ */
+function twentyseventeen_body_classes( $classes ) {
+       // Add class of group-blog to blogs with more than 1 published author.
+       if ( is_multi_author() ) {
+               $classes[] = 'group-blog';
+       }
+
+       // Add class of hfeed to non-singular pages.
+       if ( ! is_singular() ) {
+               $classes[] = 'hfeed';
+       }
+
+       // Add class if we're viewing the Customizer for easier styling of theme options.
+       if ( is_customize_preview() ) {
+               $classes[] = 'twentyseventeen-customizer';
+       }
+
+       // Add class on front page.
+       if ( is_front_page() && 'posts' !== get_option( 'show_on_front' ) ) {
+               $classes[] = 'twentyseventeen-front-page';
+       }
+
+       // Add a class if there is a custom header.
+       if ( has_header_image() ) {
+               $classes[] = 'has-header-image';
+       }
+
+       // Add class if sidebar is used.
+       if ( is_active_sidebar( 'sidebar-1' ) && ! is_page() ) {
+               $classes[] = 'has-sidebar';
+       }
+
+       // Add class for one or two column page layouts.
+       if ( is_page() || is_archive() ) {
+               if ( 'one-column' === get_theme_mod( 'page_layout' ) ) {
+                       $classes[] = 'page-one-column';
+               } else {
+                       $classes[] = 'page-two-column';
+               }
+       }
+
+       // Add class if the site title and tagline is hidden.
+       if ( 'blank' === get_header_textcolor() ) {
+               $classes[] = 'title-tagline-hidden';
+       }
+
+       // Get the colorscheme or the default if there isn't one.
+       $colors = twentyseventeen_sanitize_colorscheme( get_theme_mod( 'colorscheme', 'light' ) );
+       $classes[] = 'colors-' . $colors;
+
+       return $classes;
+}
+add_filter( 'body_class', 'twentyseventeen_body_classes' );
+
+/**
+ * Count our number of active panels.
+ *
+ * Primarily used to see if we have any panels active, duh.
+ */
+function twentyseventeen_panel_count() {
+
+       $panel_count = 0;
+
+       /**
+        * Filter number of front page sections in Twenty Seventeen.
+        *
+        * @since Twenty Seventeen 1.0
+        *
+        * @param $num_sections integer
+        */
+       $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 );
+
+       // Create a setting and control for each of the sections available in the theme.
+       for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
+               if ( get_theme_mod( 'panel_' . $i ) ) {
+                       $panel_count++;
+               }
+       }
+
+       return $panel_count;
+}
+
+/**
+ * Checks to see if we're on the homepage or not.
+ */
+function twentyseventeen_is_frontpage() {
+       return ( is_front_page() && ! is_home() );
+}
diff --git a/wp-content/themes/twentyseventeen/inc/template-tags.php b/wp-content/themes/twentyseventeen/inc/template-tags.php
new file mode 100644 (file)
index 0000000..5367e60
--- /dev/null
@@ -0,0 +1,196 @@
+<?php
+/**
+ * Custom template tags for this theme
+ *
+ * Eventually, some of the functionality here could be replaced by core features.
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ */
+
+if ( ! function_exists( 'twentyseventeen_posted_on' ) ) :
+/**
+ * Prints HTML with meta information for the current post-date/time and author.
+ */
+function twentyseventeen_posted_on() {
+
+       // Get the author name; wrap it in a link.
+       $byline = sprintf(
+               /* translators: %s: post author */
+               __( 'by %s', 'twentyseventeen' ),
+               '<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . get_the_author() . '</a></span>'
+       );
+
+       // Finally, let's write all of this to the page.
+       echo '<span class="posted-on">' . twentyseventeen_time_link() . '</span><span class="byline"> ' . $byline . '</span>';
+}
+endif;
+
+
+if ( ! function_exists( 'twentyseventeen_time_link' ) ) :
+/**
+ * Gets a nicely formatted string for the published date.
+ */
+function twentyseventeen_time_link() {
+       $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
+       if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
+               $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
+       }
+
+       $time_string = sprintf( $time_string,
+               get_the_date( DATE_W3C ),
+               get_the_date(),
+               get_the_modified_date( DATE_W3C ),
+               get_the_modified_date()
+       );
+
+       // Wrap the time string in a link, and preface it with 'Posted on'.
+       return sprintf(
+               /* translators: %s: post date */
+               __( '<span class="screen-reader-text">Posted on</span> %s', 'twentyseventeen' ),
+               '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
+       );
+}
+endif;
+
+
+if ( ! function_exists( 'twentyseventeen_entry_footer' ) ) :
+/**
+ * Prints HTML with meta information for the categories, tags and comments.
+ */
+function twentyseventeen_entry_footer() {
+
+       /* translators: used between list items, there is a space after the comma */
+       $separate_meta = __( ', ', 'twentyseventeen' );
+
+       // Get Categories for posts.
+       $categories_list = get_the_category_list( $separate_meta );
+
+       // Get Tags for posts.
+       $tags_list = get_the_tag_list( '', $separate_meta );
+
+       // We don't want to output .entry-footer if it will be empty, so make sure its not.
+       if ( ( ( twentyseventeen_categorized_blog() && $categories_list ) || $tags_list ) || get_edit_post_link() ) {
+
+               echo '<footer class="entry-footer">';
+
+                       if ( 'post' === get_post_type() ) {
+                               if ( ( $categories_list && twentyseventeen_categorized_blog() ) || $tags_list ) {
+                                       echo '<span class="cat-tags-links">';
+
+                                               // Make sure there's more than one category before displaying.
+                                               if ( $categories_list && twentyseventeen_categorized_blog() ) {
+                                                       echo '<span class="cat-links">' . twentyseventeen_get_svg( array( 'icon' => 'folder-open' ) ) . '<span class="screen-reader-text">' . __( 'Categories', 'twentyseventeen' ) . '</span>' . $categories_list . '</span>';
+                                               }
+
+                                               if ( $tags_list ) {
+                                                       echo '<span class="tags-links">' . twentyseventeen_get_svg( array( 'icon' => 'hashtag' ) ) . '<span class="screen-reader-text">' . __( 'Tags', 'twentyseventeen' ) . '</span>' . $tags_list . '</span>';
+                                               }
+
+                                       echo '</span>';
+                               }
+                       }
+
+                       twentyseventeen_edit_link();
+
+               echo '</footer> <!-- .entry-footer -->';
+       }
+}
+endif;
+
+
+if ( ! function_exists( 'twentyseventeen_edit_link' ) ) :
+/**
+ * Returns an accessibility-friendly link to edit a post or page.
+ *
+ * This also gives us a little context about what exactly we're editing
+ * (post or page?) so that users understand a bit more where they are in terms
+ * of the template hierarchy and their content. Helpful when/if the single-page
+ * layout with multiple posts/pages shown gets confusing.
+ */
+function twentyseventeen_edit_link() {
+
+       $link = edit_post_link(
+               sprintf(
+                       /* translators: %s: Name of current post */
+                       __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
+                       get_the_title()
+               ),
+               '<span class="edit-link">',
+               '</span>'
+       );
+
+       return $link;
+}
+endif;
+
+/**
+ * Display a front page section.
+ *
+ * @param $partial WP_Customize_Partial Partial associated with a selective refresh request.
+ * @param $id integer Front page section to display.
+ */
+function twentyseventeen_front_page_section( $partial = null, $id = 0 ) {
+       if ( is_a( $partial, 'WP_Customize_Partial' ) ) {
+               // Find out the id and set it up during a selective refresh.
+               global $twentyseventeencounter;
+               $id = str_replace( 'panel_', '', $partial->id );
+               $twentyseventeencounter = $id;
+       }
+
+       global $post; // Modify the global post object before setting up post data.
+       if ( get_theme_mod( 'panel_' . $id ) ) {
+               global $post;
+               $post = get_post( get_theme_mod( 'panel_' . $id ) );
+               setup_postdata( $post );
+               set_query_var( 'panel', $id );
+
+               get_template_part( 'template-parts/page/content', 'front-page-panels' );
+
+               wp_reset_postdata();
+       } elseif ( is_customize_preview() ) {
+               // The output placeholder anchor.
+               echo '<article class="panel-placeholder panel twentyseventeen-panel twentyseventeen-panel' . $id . '" id="panel' . $id . '"><span class="twentyseventeen-panel-title">' . sprintf( __( 'Front Page Section %1$s Placeholder', 'twentyseventeen' ), $id ) . '</span></article>';
+       }
+}
+
+/**
+ * Returns true if a blog has more than 1 category.
+ *
+ * @return bool
+ */
+function twentyseventeen_categorized_blog() {
+       $category_count = get_transient( 'twentyseventeen_categories' );
+
+       if ( false === $category_count ) {
+               // Create an array of all the categories that are attached to posts.
+               $categories = get_categories( array(
+                       'fields'     => 'ids',
+                       'hide_empty' => 1,
+                       // We only need to know if there is more than one category.
+                       'number'     => 2,
+               ) );
+
+               // Count the number of categories that are attached to the posts.
+               $category_count = count( $categories );
+
+               set_transient( 'twentyseventeen_categories', $category_count );
+       }
+
+       return $category_count > 1;
+}
+
+
+/**
+ * Flush out the transients used in twentyseventeen_categorized_blog.
+ */
+function twentyseventeen_category_transient_flusher() {
+       if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
+               return;
+       }
+       // Like, beat it. Dig?
+       delete_transient( 'twentyseventeen_categories' );
+}
+add_action( 'edit_category', 'twentyseventeen_category_transient_flusher' );
+add_action( 'save_post',     'twentyseventeen_category_transient_flusher' );
diff --git a/wp-content/themes/twentyseventeen/index.php b/wp-content/themes/twentyseventeen/index.php
new file mode 100644 (file)
index 0000000..78d1b4c
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+/**
+ * The main template file
+ *
+ * This is the most generic template file in a WordPress theme
+ * and one of the two required files for a theme (the other being style.css).
+ * It is used to display a page when nothing more specific matches a query.
+ * E.g., it puts together the home page when no home.php file exists.
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+get_header(); ?>
+
+<div class="wrap">
+       <?php if ( is_home() && ! is_front_page() ) : ?>
+               <header class="page-header">
+                       <h1 class="page-title"><?php single_post_title(); ?></h1>
+               </header>
+       <?php else : ?>
+       <header class="page-header">
+               <h2 class="page-title"><?php _e( 'Posts', 'twentyseventeen' ); ?></h2>
+       </header>
+       <?php endif; ?>
+
+       <div id="primary" class="content-area">
+               <main id="main" class="site-main" role="main">
+
+                       <?php
+                       if ( have_posts() ) :
+
+                               /* Start the Loop */
+                               while ( have_posts() ) : the_post();
+
+                                       /*
+                                        * Include the Post-Format-specific template for the content.
+                                        * If you want to override this in a child theme, then include a file
+                                        * called content-___.php (where ___ is the Post Format name) and that will be used instead.
+                                        */
+                                       get_template_part( 'template-parts/post/content', get_post_format() );
+
+                               endwhile;
+
+                               the_posts_pagination( array(
+                                       'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
+                                       'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
+                                       'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
+                               ) );
+
+                       else :
+
+                               get_template_part( 'template-parts/post/content', 'none' );
+
+                       endif;
+                       ?>
+
+               </main><!-- #main -->
+       </div><!-- #primary -->
+       <?php get_sidebar(); ?>
+</div><!-- .wrap -->
+
+<?php get_footer();
diff --git a/wp-content/themes/twentyseventeen/page.php b/wp-content/themes/twentyseventeen/page.php
new file mode 100644 (file)
index 0000000..96211f4
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/**
+ * The template for displaying all pages
+ *
+ * This is the template that displays all pages by default.
+ * Please note that this is the WordPress construct of pages
+ * and that other 'pages' on your WordPress site may use a
+ * different template.
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+get_header(); ?>
+
+<div class="wrap">
+       <div id="primary" class="content-area">
+               <main id="main" class="site-main" role="main">
+
+                       <?php
+                       while ( have_posts() ) : the_post();
+
+                               get_template_part( 'template-parts/page/content', 'page' );
+
+                               // If comments are open or we have at least one comment, load up the comment template.
+                               if ( comments_open() || get_comments_number() ) :
+                                       comments_template();
+                               endif;
+
+                       endwhile; // End of the loop.
+                       ?>
+
+               </main><!-- #main -->
+       </div><!-- #primary -->
+</div><!-- .wrap -->
+
+<?php get_footer();
diff --git a/wp-content/themes/twentyseventeen/rtl.css b/wp-content/themes/twentyseventeen/rtl.css
new file mode 100644 (file)
index 0000000..059355a
--- /dev/null
@@ -0,0 +1,546 @@
+/*
+Theme Name: Twenty Seventeen
+
+Adding support for languages written in a Right To Left (RTL) direction is easy,
+it's just a matter of overwriting all the horizontal positioning attributes
+of your CSS stylesheet in a separate stylesheet file named rtl.css.
+
+https://codex.wordpress.org/Right-to-Left_Language_Support
+
+*/
+
+/* Reset */
+
+body {
+       direction: rtl;
+       unicode-bidi: embed;
+}
+
+th {
+       text-align: right;
+}
+
+/* Accessibility */
+
+.screen-reader-text:focus {
+       left: auto;
+       right: 5px;
+}
+
+/* Typography */
+
+textarea {
+       padding-right: 3px;
+}
+
+li > ul,
+li > ol {
+       margin-left: 0;
+       margin-right: 1.5em;
+}
+
+th:first-child,
+td:first-child {
+       padding-left: 0.4em;
+       padding-right: 0;
+}
+
+th:last-child,
+td:last-child {
+       padding-left: 0;
+       padding-right: 0.4em;
+}
+
+/* Forms */
+
+input[type="radio"],
+input[type="checkbox"] {
+       margin-left: 0.5em;
+       margin-right: 0;
+}
+
+/* Media */
+
+.mejs-offscreen {
+       right: -10000px;
+}
+
+/* Site Branding */
+
+.custom-logo-link {
+       padding-left: 1em;
+       padding-right: 0;
+}
+
+/* Main Navigation */
+
+.main-navigation ul {
+       text-align: right;
+}
+
+.main-navigation ul ul {
+       padding-left: 0;
+       padding-right: 1.5em;
+}
+
+.menu-toggle .icon {
+       margin-left: 0.5em;
+       margin-right: 0;
+}
+
+.dropdown-toggle {
+       left: -0.5em;
+       right: auto;
+}
+
+/* Front Page */
+
+.wp-custom-header-video-button {
+       left: 30px;
+       right: auto;
+}
+
+.twentyseventeen-panel .recent-posts .entry-header .edit-link {
+       margin-left: 0;
+       margin-right: 1em;
+}
+
+/* Blog, Archive, Search */
+
+.blog .entry-meta a.post-edit-link,
+.archive .entry-meta a.post-edit-link,
+.search .entry-meta a.post-edit-link {
+       margin-left: 0;
+       margin-right: 1em;
+}
+
+.search .page .entry-meta a.post-edit-link {
+       margin-right: 0;
+}
+
+.sticky .icon-thumb-tack {
+       left: auto;
+       right: -1.5em;
+}
+
+.prev.page-numbers .icon,
+.next.page-numbers .icon {
+       display: inline-block;
+       -ms-transform: rotate(180deg); /* IE 9 */
+       -webkit-transform: rotate(180deg); /* Chrome, Safari, Opera */
+       transform: rotate(180deg);
+}
+
+.prev.page-numbers {
+       float: right;
+}
+
+.next.page-numbers {
+       float: left;
+}
+
+.nav-links .nav-previous .nav-title .nav-title-icon-wrapper {
+       margin-left: 0.5em;
+       margin-right: 0;
+}
+
+.nav-links .nav-next .nav-title .nav-title-icon-wrapper {
+       margin-left: 0;
+       margin-right: 0.5em;
+}
+
+/* Blog Entries */
+
+.entry-footer .cat-links,
+.entry-footer .tags-links {
+       padding-left: 0;
+       padding-right: 2.5em;
+}
+
+.entry-footer .cat-links .icon,
+.entry-footer .tags-links .icon {
+       left: auto;
+       margin-left: 0.5em;
+       margin-right: 0;
+       right: 0;
+}
+
+/* Comments */
+
+.comment-body {
+       margin-left: 0;
+       margin-right: 65px;
+}
+
+.comment-reply-link .icon {
+       left: auto;
+       right: -2em;
+       -webkit-transform: scale(-1, 1);
+       -ms-transform: scale(-1, 1);
+       transform: scale(-1, 1);
+}
+
+.comment-author .avatar {
+       left: auto;
+       right: -65px;
+}
+
+.comment-reply-link:before {
+       left: auto;
+       right: -2em;
+}
+
+.children .comment-author .avatar {
+       left: auto;
+       right: -45px;
+}
+
+.form-submit {
+       text-align: left;
+}
+
+/* Post Formats */
+
+.format-quote blockquote .icon {
+       left: auto;
+       right: -1.25em;
+       -webkit-transform: none;
+       -ms-transform: none;
+       transform: none;
+}
+
+/* Post Navigation */
+
+.nav-links .nav-previous .nav-title .nav-title-icon-wrapper,
+.nav-links .nav-next .nav-title .nav-title-icon-wrapper {
+       display: inline-block;
+       -ms-transform: rotate(180deg); /* IE 9 */
+       -webkit-transform: rotate(180deg); /* Chrome, Safari, Opera */
+       transform: rotate(180deg);
+}
+
+/* Widgets */
+
+.widget ul {
+       margin: 0;
+}
+
+.search-form .search-submit {
+       left: 3px;
+       right: auto;
+}
+
+.widget .tagcloud a,
+.widget.widget_tag_cloud a,
+.wp_widget_tag_cloud a {
+       float: right;
+       margin: 4px 0 0 4px !important; /* !important to override inline styles */
+}
+
+.widget ul li li {
+       padding-left: 0;
+       padding-right: 1.5rem;
+}
+
+/* Footer */
+
+.social-navigation a {
+       margin-left: 1em;
+       margin-right: 0;
+}
+
+/* Customizer styles */
+
+.twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel .twentyseventeen-panel-title {
+       left: 3.2em;
+       right: auto;
+}
+
+/* Gallery Styles */
+
+.gallery-item,
+.gallery-caption {
+       text-align: right;
+}
+
+/* SVG Fallback */
+
+.no-svg .dropdown-toggle {
+       left: 0;
+       right: auto;
+}
+
+/* Media queries */
+
+@media screen and (min-width: 48em) {
+
+       body.page-template-full-width-page #primary {
+               float: none;
+       }
+
+       .has-sidebar:not(.error404) #primary {
+               float: right;
+       }
+
+       .has-sidebar #secondary {
+               float: left;
+       }
+
+       .error404 #primary {
+               float: none;
+       }
+
+       /* Site Branding */
+
+       .custom-logo-link {
+               padding-left: 2em;
+               padding-right: 0;
+       }
+
+       /* Navigation */
+
+       .main-navigation ul ul {
+               padding-right: 0;
+       }
+
+       .main-navigation ul ul:before,
+       .main-navigation ul ul:after {
+               left: 0.5em;
+               right: auto;
+       }
+
+       .main-navigation ul ul,
+       .main-navigation ul ul ul {
+               left: auto;
+               right: -999em;
+       }
+
+       .main-navigation ul ul li:hover > ul,
+       .main-navigation ul ul li.focus > ul {
+               left: auto;
+               right: 100%;
+       }
+
+       .main-navigation ul li:hover > ul,
+       .main-navigation ul li.focus > ul {
+               left: auto;
+               right: 0.5em;
+       }
+
+       .main-navigation ul li.menu-item-has-children:before,
+       .main-navigation ul li.menu-item-has-children:after,
+       .main-navigation ul li.page_item_has_children:before,
+       .main-navigation ul li.page_item_has_children:after {
+               left: 1em;
+               right: auto;
+       }
+
+       .main-navigation .menu-item-has-children > a > .icon,
+       .main-navigation .page_item_has_children > a > .icon {
+               left: auto;
+               right: 5px;
+       }
+
+       .main-navigation ul ul .menu-item-has-children > a > .icon,
+       .main-navigation ul ul .page_item_has_children > a > .icon {
+               left: 1em;
+               right: auto;
+               -webkit-transform: rotate(90deg);
+               -ms-transform: rotate(90deg);
+               transform: rotate(90deg);
+       }
+
+       /* Scroll down arrow */
+
+       .navigation-top .menu-scroll-down {
+               left: 0;
+               right: auto;
+       }
+
+       .site-header .menu-scroll-down {
+               left: 0;
+               right: auto;
+       }
+
+       .entry-title a {
+               margin-left: auto;
+               margin-right: -2px;
+       }
+
+       /* Front Page */
+
+       .page-two-column .panel-content .entry-header {
+               float: right;
+       }
+
+       .page-two-column .panel-content .entry-content {
+               float: left;
+       }
+
+       /* Front Page - Recent Posts */
+
+       .page-two-column .panel-content .recent-posts {
+               clear: left;
+               float: left;
+       }
+
+       /* Blog, Archive, Search */
+
+       .sticky .icon-thumb-tack {
+               left: auto;
+               right: -2.5em;
+       }
+
+       body:not(.has-sidebar):not(.page-one-column) .page-header,
+       body.has-sidebar.error404 #primary .page-header,
+       body.page-two-column:not(.archive) #primary .entry-header,
+       body.page-two-column.archive:not(.has-sidebar) #primary .page-header {
+               float: right;
+       }
+
+       .blog:not(.has-sidebar) #primary article,
+       .archive:not(.has-sidebar):not(.page-one-column) #primary article,
+       .search:not(.has-sidebar) #primary article,
+       .has-sidebar.error404 #primary .page-content,
+       .error404.has-sidebar #primary .page-content,
+       body.page-two-column:not(.archive) #primary .entry-content,
+       body.page-two-column #comments {
+               float: left;
+       }
+
+       .entry-footer .edit-link a.post-edit-link {
+               margin-left: 0;
+               margin-right: 1em;
+       }
+
+       /* Entry content */
+
+       /* with sidebar */
+
+       .has-sidebar .entry-content blockquote.alignleft {
+               margin-left: 0;
+               width: 34%;
+       }
+
+       .has-sidebar #primary .entry-content blockquote.alignright,
+       .has-sidebar #primary .entry-content blockquote.alignright.below-entry-meta {
+               margin-right: 0;
+               width: 34%;
+       }
+
+       .has-sidebar #primary .entry-content blockquote.alignleft.below-entry-meta {
+               margin-left: -72.5%;
+               width: 62%;
+       }
+
+       /* blog index and archive */
+
+       .blog:not(.has-sidebar) .entry-content blockquote.alignleft,
+       .twentyseventeen-front-page.page-two-column .entry-content blockquote.alignleft,
+       .archive:not(.has-sidebar) .entry-content blockquote.alignleft,
+       .page-two-column .entry-content blockquote.alignleft {
+               margin-left: 0;
+               width: 34%;
+       }
+
+       .blog:not(.has-sidebar) .entry-content blockquote.alignright,
+       .twentyseventeen-front-page.page-two-column #primary .entry-content blockquote.alignright,
+       .archive:not(.has-sidebar) .entry-content blockquote.alignright,
+       .page-two-column #primary .entry-content blockquote.alignright {
+               margin-right: -72.5%;
+               width: 62%;
+       }
+
+       /* Post formats */
+
+       .format-quote blockquote .icon {
+               left: auto;
+               right: -1.5em;
+       }
+
+       .navigation.pagination {
+               float: left;
+       }
+
+       .has-sidebar .navigation.pagination,
+       .archive.page-one-column:not(.has-sidebar) .navigation.pagination {
+               float: none;
+       }
+
+       .post-navigation .nav-previous {
+               float: right;
+       }
+
+       .post-navigation .nav-next {
+               float: left;
+               text-align: left;
+       }
+
+       /* Comments */
+
+       ol.children .children {
+               padding-left: 0;
+               padding-right: 2em;
+       }
+
+       /* Post Navigation */
+
+       .nav-links .nav-previous .nav-title .nav-title-icon-wrapper {
+               left: auto;
+               right: -2em;
+       }
+
+       .nav-links .nav-next .nav-title .nav-title-icon-wrapper {
+               left: -2em;
+               right: auto;
+       }
+
+       /* Footer */
+
+       .site-footer .widget-column.footer-widget-1 {
+               float: right;
+       }
+
+       .site-footer .widget-column.footer-widget-2 {
+               float: left;
+       }
+
+       .social-navigation {
+               clear: right;
+               float: right;
+       }
+
+       .site-info {
+               float: right;
+       }
+
+       .social-navigation + .site-info {
+               margin-left: 0;
+               margin-right: 6%;
+       }
+}
+
+@media screen and (min-width: 67em) {
+
+       /* Sticky posts */
+
+       .sticky .icon-thumb-tack {
+               left: auto;
+               right: -1.25em;
+       }
+}
+
+@media screen and (min-width: 79em) {
+
+       .has-sidebar #primary .entry-content blockquote.alignright,
+       .has-sidebar #primary .entry-content blockquote.alignright.below-entry-meta {
+               margin-right: -20%;
+       }
+
+       .blog:not(.has-sidebar) .entry-content blockquote.alignleft,
+       .archive:not(.has-sidebar) .entry-content blockquote.alignleft,
+       .page-two-column .entry-content blockquote.alignleft,
+       .twentyseventeen-front-page .entry-content blockquote.alignleft {
+               margin-left: -20%;
+       }
+}
diff --git a/wp-content/themes/twentyseventeen/screenshot.png b/wp-content/themes/twentyseventeen/screenshot.png
new file mode 100644 (file)
index 0000000..088b741
Binary files /dev/null and b/wp-content/themes/twentyseventeen/screenshot.png differ
diff --git a/wp-content/themes/twentyseventeen/search.php b/wp-content/themes/twentyseventeen/search.php
new file mode 100644 (file)
index 0000000..c6967f2
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+/**
+ * The template for displaying search results pages
+ *
+ * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+get_header(); ?>
+
+<div class="wrap">
+
+       <header class="page-header">
+               <?php if ( have_posts() ) : ?>
+                       <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyseventeen' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
+               <?php else : ?>
+                       <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyseventeen' ); ?></h1>
+               <?php endif; ?>
+       </header><!-- .page-header -->
+
+       <div id="primary" class="content-area">
+               <main id="main" class="site-main" role="main">
+
+               <?php
+               if ( have_posts() ) :
+                       /* Start the Loop */
+                       while ( have_posts() ) : the_post();
+
+                               /**
+                                * Run the loop for the search to output the results.
+                                * If you want to overload this in a child theme then include a file
+                                * called content-search.php and that will be used instead.
+                                */
+                               get_template_part( 'template-parts/post/content', 'excerpt' );
+
+                       endwhile; // End of the loop.
+
+                       the_posts_pagination( array(
+                               'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
+                               'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
+                               'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
+                       ) );
+
+               else : ?>
+
+                       <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyseventeen' ); ?></p>
+                       <?php
+                               get_search_form();
+
+               endif;
+               ?>
+
+               </main><!-- #main -->
+       </div><!-- #primary -->
+       <?php get_sidebar(); ?>
+</div><!-- .wrap -->
+
+<?php get_footer();
diff --git a/wp-content/themes/twentyseventeen/searchform.php b/wp-content/themes/twentyseventeen/searchform.php
new file mode 100644 (file)
index 0000000..ab60714
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Template for displaying search forms in Twenty Seventeen
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+?>
+
+<?php $unique_id = esc_attr( uniqid( 'search-form-' ) ); ?>
+
+<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
+       <label for="<?php echo $unique_id; ?>">
+               <span class="screen-reader-text"><?php echo _x( 'Search for:', 'label', 'twentyseventeen' ); ?></span>
+       </label>
+       <input type="search" id="<?php echo $unique_id; ?>" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'twentyseventeen' ); ?>" value="<?php echo get_search_query(); ?>" name="s" />
+       <button type="submit" class="search-submit"><?php echo twentyseventeen_get_svg( array( 'icon' => 'search' ) ); ?><span class="screen-reader-text"><?php echo _x( 'Search', 'submit button', 'twentyseventeen' ); ?></span></button>
+</form>
diff --git a/wp-content/themes/twentyseventeen/sidebar.php b/wp-content/themes/twentyseventeen/sidebar.php
new file mode 100644 (file)
index 0000000..ae1761a
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+/**
+ * The sidebar containing the main widget area
+ *
+ * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+if ( ! is_active_sidebar( 'sidebar-1' ) ) {
+       return;
+}
+?>
+
+<aside id="secondary" class="widget-area" role="complementary">
+       <?php dynamic_sidebar( 'sidebar-1' ); ?>
+</aside><!-- #secondary -->
diff --git a/wp-content/themes/twentyseventeen/single.php b/wp-content/themes/twentyseventeen/single.php
new file mode 100644 (file)
index 0000000..af7671b
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/**
+ * The template for displaying all single posts
+ *
+ * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+get_header(); ?>
+
+<div class="wrap">
+       <div id="primary" class="content-area">
+               <main id="main" class="site-main" role="main">
+
+                       <?php
+                               /* Start the Loop */
+                               while ( have_posts() ) : the_post();
+
+                                       get_template_part( 'template-parts/post/content', get_post_format() );
+
+                                       // If comments are open or we have at least one comment, load up the comment template.
+                                       if ( comments_open() || get_comments_number() ) :
+                                               comments_template();
+                                       endif;
+
+                                       the_post_navigation( array(
+                                               'prev_text' => '<span class="screen-reader-text">' . __( 'Previous Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Previous', 'twentyseventeen' ) . '</span> <span class="nav-title"><span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '</span>%title</span>',
+                                               'next_text' => '<span class="screen-reader-text">' . __( 'Next Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Next', 'twentyseventeen' ) . '</span> <span class="nav-title">%title<span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ) . '</span></span>',
+                                       ) );
+
+                               endwhile; // End of the loop.
+                       ?>
+
+               </main><!-- #main -->
+       </div><!-- #primary -->
+       <?php get_sidebar(); ?>
+</div><!-- .wrap -->
+
+<?php get_footer();
diff --git a/wp-content/themes/twentyseventeen/style.css b/wp-content/themes/twentyseventeen/style.css
new file mode 100644 (file)
index 0000000..fd8543b
--- /dev/null
@@ -0,0 +1,4235 @@
+/*
+Theme Name: Twenty Seventeen
+Theme URI: https://wordpress.org/themes/twentyseventeen/
+Author: the WordPress team
+Author URI: https://wordpress.org/
+Description: Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.
+Version: 1.0
+License: GNU General Public License v2 or later
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
+Text Domain: twentyseventeen
+Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
+
+This theme, like WordPress, is licensed under the GPL.
+Use it to make something cool, have fun, and share what you've learned with others.
+*/
+
+/*--------------------------------------------------------------
+>>> TABLE OF CONTENTS:
+----------------------------------------------------------------
+1.0 Normalize
+2.0 Accessibility
+3.0 Alignments
+4.0 Clearings
+5.0 Typography
+6.0 Forms
+7.0 Formatting
+8.0 Lists
+9.0 Tables
+10.0 Links
+11.0 Featured Image Hover
+12.0 Navigation
+13.0 Layout
+   13.1 Header
+   13.2 Front Page
+   13.3 Regular Content
+   13.4 Posts
+   13.5 Pages
+   13.6 Footer
+14.0 Comments
+15.0 Widgets
+16.0 Media
+   16.1 Galleries
+17.0 Customizer
+18.0 SVGs Fallbacks
+19.0 Media Queries
+20.0 Print
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+1.0 Normalize
+Styles based on Normalize v5.0.0 @link https://github.com/necolas/normalize.css
+--------------------------------------------------------------*/
+
+html {
+       font-family: sans-serif;
+       line-height: 1.15;
+       -ms-text-size-adjust: 100%;
+       -webkit-text-size-adjust: 100%;
+}
+
+body {
+       margin: 0;
+}
+
+article,
+aside,
+footer,
+header,
+nav,
+section {
+       display: block;
+}
+
+h1 {
+       font-size: 2em;
+       margin: 0.67em 0;
+}
+
+figcaption,
+figure,
+main {
+       display: block;
+}
+
+figure {
+       margin: 1em 0;
+}
+
+hr {
+       -webkit-box-sizing: content-box;
+       -moz-box-sizing: content-box;
+       box-sizing: content-box;
+       height: 0;
+       overflow: visible;
+}
+
+pre {
+       font-family: monospace, monospace;
+       font-size: 1em;
+}
+
+a {
+       background-color: transparent;
+       -webkit-text-decoration-skip: objects;
+}
+
+a:active,
+a:hover {
+       outline-width: 0;
+}
+
+abbr[title] {
+       border-bottom: 1px #767676 dotted;
+       text-decoration: none;
+}
+
+b,
+strong {
+       font-weight: inherit;
+}
+
+b,
+strong {
+       font-weight: 700;
+}
+
+code,
+kbd,
+samp {
+       font-family: monospace, monospace;
+       font-size: 1em;
+}
+
+dfn {
+       font-style: italic;
+}
+
+mark {
+       background-color: #eee;
+       color: #222;
+}
+
+small {
+       font-size: 80%;
+}
+
+sub,
+sup {
+       font-size: 75%;
+       line-height: 0;
+       position: relative;
+       vertical-align: baseline;
+}
+
+sub {
+       bottom: -0.25em;
+}
+
+sup {
+       top: -0.5em;
+}
+
+audio,
+video {
+       display: inline-block;
+}
+
+audio:not([controls]) {
+       display: none;
+       height: 0;
+}
+
+img {
+       border-style: none;
+}
+
+svg:not(:root) {
+       overflow: hidden;
+}
+
+button,
+input,
+optgroup,
+select,
+textarea {
+       font-family: sans-serif;
+       font-size: 100%;
+       line-height: 1.15;
+       margin: 0;
+}
+
+button,
+input {
+       overflow: visible;
+}
+
+button,
+select {
+       text-transform: none;
+}
+
+button,
+html [type="button"],
+[type="reset"],
+[type="submit"] {
+       -webkit-appearance: button;
+}
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+       border-style: none;
+       padding: 0;
+}
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+       outline: 1px dotted ButtonText;
+}
+
+fieldset {
+       border: 1px solid #bbb;
+       margin: 0 2px;
+       padding: 0.35em 0.625em 0.75em;
+}
+
+legend {
+       -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+       box-sizing: border-box;
+       color: inherit;
+       display: table;
+       max-width: 100%;
+       padding: 0;
+       white-space: normal;
+}
+
+progress {
+       display: inline-block;
+       vertical-align: baseline;
+}
+
+textarea {
+       overflow: auto;
+}
+
+[type="checkbox"],
+[type="radio"] {
+       -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+       box-sizing: border-box;
+       padding: 0;
+}
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+       height: auto;
+}
+
+[type="search"] {
+       -webkit-appearance: textfield;
+       outline-offset: -2px;
+}
+
+[type="search"]::-webkit-search-cancel-button,
+[type="search"]::-webkit-search-decoration {
+       -webkit-appearance: none;
+}
+
+::-webkit-file-upload-button {
+       -webkit-appearance: button;
+       font: inherit;
+}
+
+details,
+menu {
+       display: block;
+}
+
+summary {
+       display: list-item;
+}
+
+canvas {
+       display: inline-block;
+}
+
+template {
+       display: none;
+}
+
+[hidden] {
+       display: none;
+}
+
+/*--------------------------------------------------------------
+2.0 Accessibility
+--------------------------------------------------------------*/
+
+/* Text meant only for screen readers. */
+
+.screen-reader-text {
+       clip: rect(1px, 1px, 1px, 1px);
+       height: 1px;
+       overflow: hidden;
+       position: absolute !important;
+       width: 1px;
+       word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
+}
+
+.screen-reader-text:focus {
+       background-color: #f1f1f1;
+       -webkit-border-radius: 3px;
+       border-radius: 3px;
+       -webkit-box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
+       box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
+       clip: auto !important;
+       color: #21759b;
+       display: block;
+       font-size: 14px;
+       font-size: 0.875rem;
+       font-weight: 700;
+       height: auto;
+       left: 5px;
+       line-height: normal;
+       padding: 15px 23px 14px;
+       text-decoration: none;
+       top: 5px;
+       width: auto;
+       z-index: 100000; /* Above WP toolbar. */
+}
+
+/*--------------------------------------------------------------
+3.0 Alignments
+--------------------------------------------------------------*/
+
+.alignleft {
+       display: inline;
+       float: left;
+       margin-right: 1.5em;
+}
+
+.alignright {
+       display: inline;
+       float: right;
+       margin-left: 1.5em;
+}
+
+.aligncenter {
+       clear: both;
+       display: block;
+       margin-left: auto;
+       margin-right: auto;
+}
+
+/*--------------------------------------------------------------
+4.0 Clearings
+--------------------------------------------------------------*/
+
+.clear:before,
+.clear:after,
+.entry-content:before,
+.entry-content:after,
+.entry-footer:before,
+.entry-footer:after,
+.comment-content:before,
+.comment-content:after,
+.site-header:before,
+.site-header:after,
+.site-content:before,
+.site-content:after,
+.site-footer:before,
+.site-footer:after,
+.nav-links:before,
+.nav-links:after,
+.pagination:before,
+.pagination:after,
+.comment-author:before,
+.comment-author:after,
+.widget-area:before,
+.widget-area:after,
+.widget:before,
+.widget:after,
+.comment-meta:before,
+.comment-meta:after {
+       content: "";
+       display: table;
+       table-layout: fixed;
+}
+
+.clear:after,
+.entry-content:after,
+.entry-footer:after,
+.comment-content:after,
+.site-header:after,
+.site-content:after,
+.site-footer:after,
+.nav-links:after,
+.pagination:after,
+.comment-author:after,
+.widget-area:after,
+.widget:after,
+.comment-meta:after {
+       clear: both;
+}
+
+/*--------------------------------------------------------------
+5.0 Typography
+--------------------------------------------------------------*/
+
+body,
+button,
+input,
+select,
+textarea {
+       color: #333;
+       font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
+       font-size: 15px;
+       font-size: 0.9375rem;
+       font-weight: 400;
+       line-height: 1.66;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+       clear: both;
+       line-height: 1.4;
+       margin: 0 0 0.75em;
+       padding: 1.5em 0 0;
+}
+
+h1:first-child,
+h2:first-child,
+h3:first-child,
+h4:first-child,
+h5:first-child,
+h6:first-child {
+       padding-top: 0;
+}
+
+h1 {
+       font-size: 24px;
+       font-size: 1.5rem;
+       font-weight: 300;
+}
+
+h2 {
+       color: #666;
+       font-size: 20px;
+       font-size: 1.25rem;
+       font-weight: 300;
+}
+
+h3 {
+       color: #333;
+       font-size: 18px;
+       font-size: 1.125rem;
+       font-weight: 300;
+}
+
+h4 {
+       color: #333;
+       font-size: 16px;
+       font-size: 1rem;
+       font-weight: 800;
+}
+
+h5 {
+       color: #767676;
+       font-size: 13px;
+       font-size: 0.8125rem;
+       font-weight: 800;
+       letter-spacing: 0.15em;
+       text-transform: uppercase;
+}
+
+h6 {
+       color: #333;
+       font-size: 15px;
+       font-size: 0.9375rem;
+       font-weight: 800;
+}
+
+p {
+       margin: 0 0 1.5em;
+       padding: 0;
+}
+
+dfn,
+cite,
+em,
+i {
+       font-style: italic;
+}
+
+blockquote {
+       color: #666;
+       font-size: 18px;
+       font-size: 1.125rem;
+       font-style: italic;
+       line-height: 1.7;
+       margin: 0;
+       overflow: hidden;
+       padding: 0;
+}
+
+blockquote cite {
+       display: block;
+       font-style: normal;
+       font-weight: 600;
+       margin-top: 0.5em;
+}
+
+address {
+       margin: 0 0 1.5em;
+}
+
+pre {
+       background: #eee;
+       font-family: "Courier 10 Pitch", Courier, monospace;
+       font-size: 15px;
+       font-size: 0.9375rem;
+       line-height: 1.6;
+       margin-bottom: 1.6em;
+       max-width: 100%;
+       overflow: auto;
+       padding: 1.6em;
+}
+
+code,
+kbd,
+tt,
+var {
+       font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
+       font-size: 15px;
+       font-size: 0.9375rem;
+}
+
+abbr,
+acronym {
+       border-bottom: 1px dotted #666;
+       cursor: help;
+}
+
+mark,
+ins {
+       background: #eee;
+       text-decoration: none;
+}
+
+big {
+       font-size: 125%;
+}
+
+blockquote {
+       quotes: "" "";
+}
+
+q {
+       quotes: "“" "”" "‘" "’";
+}
+
+blockquote:before,
+blockquote:after {
+       content: "";
+}
+
+:focus {
+       outline: none;
+}
+
+/* Typography for Arabic Font */
+
+html[lang="ar"] body,
+html[lang="ar"] button,
+html[lang="ar"] input,
+html[lang="ar"] select,
+html[lang="ar"] textarea,
+html[lang="ary"] body,
+html[lang="ary"] button,
+html[lang="ary"] input,
+html[lang="ary"] select,
+html[lang="ary"] textarea,
+html[lang="azb"] body,
+html[lang="azb"] button,
+html[lang="azb"] input,
+html[lang="azb"] select,
+html[lang="azb"] textarea,
+html[lang="fa-IR"] body,
+html[lang="fa-IR"] button,
+html[lang="fa-IR"] input,
+html[lang="fa-IR"] select,
+html[lang="fa-IR"] textarea,
+html[lang="haz"] body,
+html[lang="haz"] button,
+html[lang="haz"] input,
+html[lang="haz"] select,
+html[lang="haz"] textarea,
+html[lang="ps"] body,
+html[lang="ps"] button,
+html[lang="ps"] input,
+html[lang="ps"] select,
+html[lang="ps"] textarea,
+html[lang="ur"] body,
+html[lang="ur"] button,
+html[lang="ur"] input,
+html[lang="ur"] select,
+html[lang="ur"] textarea {
+       font-family: Tahoma, Arial, sans-serif;
+}
+
+html[lang="ar"] h1,
+html[lang="ar"] h2,
+html[lang="ar"] h3,
+html[lang="ar"] h4,
+html[lang="ar"] h5,
+html[lang="ar"] h6,
+html[lang="ary"] h1,
+html[lang="ary"] h2,
+html[lang="ary"] h3,
+html[lang="ary"] h4,
+html[lang="ary"] h5,
+html[lang="ary"] h6,
+html[lang="azb"] h1,
+html[lang="azb"] h2,
+html[lang="azb"] h3,
+html[lang="azb"] h4,
+html[lang="azb"] h5,
+html[lang="azb"] h6,
+html[lang="fa-IR"] h1,
+html[lang="fa-IR"] h2,
+html[lang="fa-IR"] h3,
+html[lang="fa-IR"] h4,
+html[lang="fa-IR"] h5,
+html[lang="fa-IR"] h6,
+html[lang="haz"] h1,
+html[lang="haz"] h2,
+html[lang="haz"] h3,
+html[lang="haz"] h4,
+html[lang="haz"] h5,
+html[lang="haz"] h6,
+html[lang="ps"] h1,
+html[lang="ps"] h2,
+html[lang="ps"] h3,
+html[lang="ps"] h4,
+html[lang="ps"] h5,
+html[lang="ps"] h6,
+html[lang="ur"] h1,
+html[lang="ur"] h2,
+html[lang="ur"] h3,
+html[lang="ur"] h4,
+html[lang="ur"] h5,
+html[lang="ur"] h6 {
+       font-weight: 700;
+}
+
+/* Typography for Chinese Font */
+
+html[lang^="zh-"] body,
+html[lang^="zh-"] button,
+html[lang^="zh-"] input,
+html[lang^="zh-"] select,
+html[lang^="zh-"] textarea {
+       font-family: "PingFang TC", "Helvetica Neue", Helvetica, STHeitiTC-Light, Arial, sans-serif;
+}
+
+html[lang^="zh-"] h1,
+html[lang^="zh-"] h2,
+html[lang^="zh-"] h3,
+html[lang^="zh-"] h4,
+html[lang^="zh-"] h5,
+html[lang^="zh-"] h6 {
+       font-weight: 700;
+}
+
+/* Typography for Cyrillic Font */
+
+html[lang="bg-BG"] body,
+html[lang="bg-BG"] button,
+html[lang="bg-BG"] input,
+html[lang="bg-BG"] select,
+html[lang="bg-BG"] textarea,
+html[lang="ru-RU"] body,
+html[lang="ru-RU"] button,
+html[lang="ru-RU"] input,
+html[lang="ru-RU"] select,
+html[lang="ru-RU"] textarea,
+html[lang="uk"] body,
+html[lang="uk"] button,
+html[lang="uk"] input,
+html[lang="uk"] select,
+html[lang="uk"] textarea {
+       font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
+}
+
+html[lang="bg-BG"] h1,
+html[lang="bg-BG"] h2,
+html[lang="bg-BG"] h3,
+html[lang="bg-BG"] h4,
+html[lang="bg-BG"] h5,
+html[lang="bg-BG"] h6,
+html[lang="ru-RU"] h1,
+html[lang="ru-RU"] h2,
+html[lang="ru-RU"] h3,
+html[lang="ru-RU"] h4,
+html[lang="ru-RU"] h5,
+html[lang="ru-RU"] h6,
+html[lang="uk"] h1,
+html[lang="uk"] h2,
+html[lang="uk"] h3,
+html[lang="uk"] h4,
+html[lang="uk"] h5,
+html[lang="uk"] h6 {
+       font-weight: 700;
+       line-height: 1.2;
+}
+
+/* Typography for Devanagari Font */
+
+html[lang="bn-BD"] body,
+html[lang="bn-BD"] button,
+html[lang="bn-BD"] input,
+html[lang="bn-BD"] select,
+html[lang="bn-BD"] textarea,
+html[lang="hi-IN"] body,
+html[lang="hi-IN"] button,
+html[lang="hi-IN"] input,
+html[lang="hi-IN"] select,
+html[lang="hi-IN"] textarea,
+html[lang="mr-IN"] body,
+html[lang="mr-IN"] button,
+html[lang="mr-IN"] input,
+html[lang="mr-IN"] select,
+html[lang="mr-IN"] textarea {
+       font-family: Arial, sans-serif;
+}
+
+html[lang="bn-BD"] h1,
+html[lang="bn-BD"] h2,
+html[lang="bn-BD"] h3,
+html[lang="bn-BD"] h4,
+html[lang="bn-BD"] h5,
+html[lang="bn-BD"] h6,
+html[lang="hi-IN"] h1,
+html[lang="hi-IN"] h2,
+html[lang="hi-IN"] h3,
+html[lang="hi-IN"] h4,
+html[lang="hi-IN"] h5,
+html[lang="hi-IN"] h6,
+html[lang="mr-IN"] h1,
+html[lang="mr-IN"] h2,
+html[lang="mr-IN"] h3,
+html[lang="mr-IN"] h4,
+html[lang="mr-IN"] h5,
+html[lang="mr-IN"] h6 {
+       font-weight: 700;
+}
+
+/* Typography for Greek Font */
+
+html[lang="el"] body,
+html[lang="el"] button,
+html[lang="el"] input,
+html[lang="el"] select,
+html[lang="el"] textarea {
+       font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+html[lang="el"] h1,
+html[lang="el"] h2,
+html[lang="el"] h3,
+html[lang="el"] h4,
+html[lang="el"] h5,
+html[lang="el"] h6 {
+       font-weight: 700;
+       line-height: 1.3;
+}
+
+/* Typography for Gujarati Font */
+
+html[lang="gu-IN"] body,
+html[lang="gu-IN"] button,
+html[lang="gu-IN"] input,
+html[lang="gu-IN"] select,
+html[lang="gu-IN"] textarea {
+       font-family: Arial, sans-serif;
+}
+
+html[lang="gu-IN"] h1,
+html[lang="gu-IN"] h2,
+html[lang="gu-IN"] h3,
+html[lang="gu-IN"] h4,
+html[lang="gu-IN"] h5,
+html[lang="gu-IN"] h6 {
+       font-weight: 700;
+}
+
+/* Typography for Hebrew Font */
+
+html[lang="he-IL"] body,
+html[lang="he-IL"] button,
+html[lang="he-IL"] input,
+html[lang="he-IL"] select,
+html[lang="he-IL"] textarea {
+       font-family: "Arial Hebrew", Arial, sans-serif;
+}
+
+html[lang="he-IL"] h1,
+html[lang="he-IL"] h2,
+html[lang="he-IL"] h3,
+html[lang="he-IL"] h4,
+html[lang="he-IL"] h5,
+html[lang="he-IL"] h6 {
+       font-weight: 700;
+}
+
+/* Typography for Japanese Font */
+
+html[lang="ja"] body,
+html[lang="ja"] button,
+html[lang="ja"] input,
+html[lang="ja"] select,
+html[lang="ja"] textarea {
+       font-family: "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;
+}
+
+html[lang="ja"] h1,
+html[lang="ja"] h2,
+html[lang="ja"] h3,
+html[lang="ja"] h4,
+html[lang="ja"] h5,
+html[lang="ja"] h6 {
+       font-weight: 700;
+}
+
+/* Typography for Korean font */
+
+html[lang="ko-KR"] body,
+html[lang="ko-KR"] button,
+html[lang="ko-KR"] input,
+html[lang="ko-KR"] select,
+html[lang="ko-KR"] textarea {
+       font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Nanum Gothic", Dotum, sans-serif;
+}
+
+html[lang="ko-KR"] h1,
+html[lang="ko-KR"] h2,
+html[lang="ko-KR"] h3,
+html[lang="ko-KR"] h4,
+html[lang="ko-KR"] h5,
+html[lang="ko-KR"] h6 {
+       font-weight: 600;
+}
+
+/* Typography for Thai Font */
+
+html[lang="th"] h1,
+html[lang="th"] h2,
+html[lang="th"] h3,
+html[lang="th"] h4,
+html[lang="th"] h5,
+html[lang="th"] h6 {
+       line-height: 1.65;
+       font-family: "Sukhumvit Set", "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+html[lang="th"] body,
+html[lang="th"] button,
+html[lang="th"] input,
+html[lang="th"] select,
+html[lang="th"] textarea {
+       line-height: 1.8;
+       font-family: "Sukhumvit Set", "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+/* Remove letter-spacing for all non-latin alphabets */
+
+html[lang="ar"] *,
+html[lang="ary"] *,
+html[lang="azb"] *,
+html[lang="haz"] *,
+html[lang="ps"] *,
+html[lang^="zh-"] *,
+html[lang="bg-BG"] *,
+html[lang="ru-RU"] *,
+html[lang="uk"] *,
+html[lang="bn-BD"] *,
+html[lang="hi-IN"] *,
+html[lang="mr-IN"] *,
+html[lang="el"] *,
+html[lang="gu-IN"] *,
+html[lang="he-IL"] *,
+html[lang="ja"] *,
+html[lang="ko-KR"] *,
+html[lang="th"] * {
+       letter-spacing: 0 !important;
+}
+
+/*--------------------------------------------------------------
+6.0 Forms
+--------------------------------------------------------------*/
+
+label {
+       color: #333;
+       display: block;
+       font-weight: 800;
+       margin-bottom: 0.5em;
+}
+
+fieldset {
+       margin-bottom: 1em;
+}
+
+input[type="text"],
+input[type="email"],
+input[type="url"],
+input[type="password"],
+input[type="search"],
+input[type="number"],
+input[type="tel"],
+input[type="range"],
+input[type="date"],
+input[type="month"],
+input[type="week"],
+input[type="time"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="color"],
+textarea {
+       color: #666;
+       background: #fff;
+       background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0));
+       border: 1px solid #bbb;
+       -webkit-border-radius: 3px;
+       border-radius: 3px;
+       display: block;
+       padding: 0.7em;
+       width: 100%;
+}
+
+input[type="text"]:focus,
+input[type="email"]:focus,
+input[type="url"]:focus,
+input[type="password"]:focus,
+input[type="search"]:focus,
+input[type="number"]:focus,
+input[type="tel"]:focus,
+input[type="range"]:focus,
+input[type="date"]:focus,
+input[type="month"]:focus,
+input[type="week"]:focus,
+input[type="time"]:focus,
+input[type="datetime"]:focus,
+input[type="datetime-local"]:focus,
+input[type="color"]:focus,
+textarea:focus {
+       color: #222;
+       border-color: #333;
+}
+
+select {
+       border: 1px solid #bbb;
+       -webkit-border-radius: 3px;
+       border-radius: 3px;
+       height: 3em;
+       max-width: 100%;
+}
+
+input[type="radio"],
+input[type="checkbox"] {
+       margin-right: 0.5em;
+}
+
+input[type="radio"] + label,
+input[type="checkbox"] + label {
+       font-weight: 400;
+}
+
+button,
+input[type="button"],
+input[type="submit"] {
+       background-color: #222;
+       border: 0;
+       -webkit-border-radius: 2px;
+       border-radius: 2px;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       color: #fff;
+       cursor: pointer;
+       display: inline-block;
+       font-size: 14px;
+       font-size: 0.875rem;
+       font-weight: 800;
+       line-height: 1;
+       padding: 1em 2em;
+       text-shadow: none;
+       -webkit-transition: background 0.2s;
+       transition: background 0.2s;
+}
+
+input + button,
+input + input[type="button"],
+input + input[type="submit"] {
+       padding: 0.75em 2em;
+}
+
+button.secondary,
+input[type="reset"],
+input[type="button"].secondary,
+input[type="reset"].secondary,
+input[type="submit"].secondary {
+       background-color: #ddd;
+       color: #222;
+}
+
+button:hover,
+button:focus,
+input[type="button"]:hover,
+input[type="button"]:focus,
+input[type="submit"]:hover,
+input[type="submit"]:focus {
+       background: #767676;
+}
+
+button.secondary:hover,
+button.secondary:focus,
+input[type="reset"]:hover,
+input[type="reset"]:focus,
+input[type="button"].secondary:hover,
+input[type="button"].secondary:focus,
+input[type="reset"].secondary:hover,
+input[type="reset"].secondary:focus,
+input[type="submit"].secondary:hover,
+input[type="submit"].secondary:focus {
+       background: #bbb;
+}
+
+/* Placeholder text color -- selectors need to be separate to work. */
+::-webkit-input-placeholder {
+       color: #333;
+       font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
+}
+
+:-moz-placeholder {
+       color: #333;
+       font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
+}
+
+::-moz-placeholder {
+       color: #333;
+       font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
+       opacity: 1;
+       /* Since FF19 lowers the opacity of the placeholder by default */
+}
+
+:-ms-input-placeholder {
+       color: #333;
+       font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
+}
+
+/*--------------------------------------------------------------
+7.0 Formatting
+--------------------------------------------------------------*/
+
+hr {
+       background-color: #bbb;
+       border: 0;
+       height: 1px;
+       margin-bottom: 1.5em;
+}
+
+/*--------------------------------------------------------------
+8.0 Lists
+--------------------------------------------------------------*/
+
+ul,
+ol {
+       margin: 0 0 1.5em;
+       padding: 0;
+}
+
+ul {
+       list-style: disc;
+}
+
+ol {
+       list-style: decimal;
+}
+
+li > ul,
+li > ol {
+       margin-bottom: 0;
+       margin-left: 1.5em;
+}
+
+dt {
+       font-weight: 700;
+}
+
+dd {
+       margin: 0 1.5em 1.5em;
+}
+
+/*--------------------------------------------------------------
+9.0 Tables
+--------------------------------------------------------------*/
+
+table {
+       border-collapse: collapse;
+       margin: 0 0 1.5em;
+       width: 100%;
+}
+
+thead th {
+       border-bottom: 2px solid #bbb;
+       padding-bottom: 0.5em;
+}
+
+th {
+       padding: 0.4em;
+       text-align: left;
+}
+
+tr {
+       border-bottom: 1px solid #eee;
+}
+
+td {
+       padding: 0.4em;
+}
+
+th:first-child,
+td:first-child {
+       padding-left: 0;
+}
+
+th:last-child,
+td:last-child {
+       padding-right: 0;
+}
+
+/*--------------------------------------------------------------
+10.0 Links
+--------------------------------------------------------------*/
+
+a {
+       color: #222;
+       text-decoration: none;
+}
+
+a:focus {
+       outline: thin dotted;
+}
+
+a:hover,
+a:active {
+       color: #000;
+       outline: 0;
+}
+
+/* Hover effects */
+
+.entry-content a,
+.entry-summary a,
+.widget a,
+.site-footer .widget-area a,
+.posts-navigation a,
+.widget_authors a strong {
+       -webkit-box-shadow: inset 0 -1px 0 rgba(15, 15, 15, 1);
+       box-shadow: inset 0 -1px 0 rgba(15, 15, 15, 1);
+       -webkit-transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
+       transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
+       transition: color 80ms ease-in, box-shadow 130ms ease-in-out;
+       transition: color 80ms ease-in, box-shadow 130ms ease-in-out, -webkit-box-shadow 130ms ease-in-out;
+}
+
+.entry-title a,
+.entry-meta a,
+.page-links a,
+.page-links a .page-number,
+.entry-footer a,
+.entry-footer .cat-links a,
+.entry-footer .tags-links a,
+.edit-link a,
+.post-navigation a,
+.logged-in-as a,
+.comment-navigation a,
+.comment-metadata a,
+.comment-metadata a.comment-edit-link,
+.comment-reply-link,
+a .nav-title,
+.pagination a,
+.comments-pagination a,
+.site-info a,
+.widget .widget-title a,
+.widget ul li a,
+.site-footer .widget-area ul li a,
+.site-footer .widget-area ul li a {
+       -webkit-box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 1);
+       box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 1);
+       text-decoration: none;
+       -webkit-transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
+       transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
+       transition: color 80ms ease-in, box-shadow 130ms ease-in-out;
+       transition: color 80ms ease-in, box-shadow 130ms ease-in-out, -webkit-box-shadow 130ms ease-in-out;
+}
+
+.entry-content a:focus,
+.entry-content a:hover,
+.entry-summary a:focus,
+.entry-summary a:hover,
+.widget a:focus,
+.widget a:hover,
+.site-footer .widget-area a:focus,
+.site-footer .widget-area a:hover,
+.posts-navigation a:focus,
+.posts-navigation a:hover,
+.comment-metadata a:focus,
+.comment-metadata a:hover,
+.comment-metadata a.comment-edit-link:focus,
+.comment-metadata a.comment-edit-link:hover,
+.comment-reply-link:focus,
+.comment-reply-link:hover,
+.widget_authors a:focus strong,
+.widget_authors a:hover strong,
+.entry-title a:focus,
+.entry-title a:hover,
+.entry-meta a:focus,
+.entry-meta a:hover,
+.page-links a:focus .page-number,
+.page-links a:hover .page-number,
+.entry-footer a:focus,
+.entry-footer a:hover,
+.entry-footer .cat-links a:focus,
+.entry-footer .cat-links a:hover,
+.entry-footer .tags-links a:focus,
+.entry-footer .tags-links a:hover,
+.post-navigation a:focus,
+.post-navigation a:hover,
+.pagination a:not(.prev):not(.next):focus,
+.pagination a:not(.prev):not(.next):hover,
+.comments-pagination a:not(.prev):not(.next):focus,
+.comments-pagination a:not(.prev):not(.next):hover,
+.logged-in-as a:focus,
+.logged-in-as a:hover,
+a:focus .nav-title,
+a:hover .nav-title,
+.edit-link a:focus,
+.edit-link a:hover,
+.site-info a:focus,
+.site-info a:hover,
+.widget .widget-title a:focus,
+.widget .widget-title a:hover,
+.widget ul li a:focus,
+.widget ul li a:hover {
+       color: #000;
+       -webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 3px 0 rgba(0, 0, 0, 1);
+       box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 3px 0 rgba(0, 0, 0, 1);
+}
+
+/* Fixes linked images */
+.entry-content a img,
+.widget a img {
+       -webkit-box-shadow: 0 0 0 8px #fff;
+       box-shadow: 0 0 0 8px #fff;
+}
+
+.post-navigation a:focus .icon,
+.post-navigation a:hover .icon {
+       color: #222;
+}
+
+/*--------------------------------------------------------------
+11.0 Featured Image Hover
+--------------------------------------------------------------*/
+
+.post-thumbnail {
+       margin-bottom: 1em;
+}
+
+.post-thumbnail a img {
+       -webkit-backface-visibility: hidden;
+       -webkit-transition: opacity 0.2s;
+       transition: opacity 0.2s;
+}
+
+.post-thumbnail a:hover img,
+.post-thumbnail a:focus img {
+       opacity: 0.7;
+}
+
+/*--------------------------------------------------------------
+12.0 Navigation
+--------------------------------------------------------------*/
+
+.navigation-top {
+       background: #fff;
+       border-bottom: 1px solid #eee;
+       border-top: 1px solid #eee;
+       font-size: 16px;
+       font-size: 1rem;
+       position: relative;
+}
+
+.navigation-top .wrap {
+       max-width: 1000px;
+       padding: 0;
+}
+
+.navigation-top a {
+       color: #222;
+       font-weight: 600;
+       -webkit-transition: color 0.2s;
+       transition: color 0.2s;
+}
+
+.navigation-top .current-menu-item > a,
+.navigation-top .current_page_item > a {
+       color: #767676;
+}
+
+.main-navigation {
+       clear: both;
+       display: block;
+}
+
+.main-navigation ul {
+       background: #fff;
+       list-style: none;
+       margin: 0;
+       padding: 0 1.5em;
+       text-align: left;
+}
+
+/* Hide the menu on small screens when JavaScript is available.
+ * It only works with JavaScript.
+ */
+
+.js .main-navigation ul,
+.main-navigation .menu-item-has-children > a > .icon,
+.main-navigation .page_item_has_children > a > .icon,
+.main-navigation ul a > .icon {
+       display: none;
+}
+
+.main-navigation > div > ul {
+       border-top: 1px solid #eee;
+       padding: 0.75em 1.695em;
+}
+
+.js .main-navigation.toggled-on > div > ul {
+       display: block;
+}
+
+.main-navigation ul ul {
+       padding: 0 0 0 1.5em;
+}
+
+.main-navigation ul ul.toggled-on {
+       display: block;
+}
+
+.main-navigation ul ul a {
+       letter-spacing: 0;
+       padding: 0.4em 0;
+       position: relative;
+       text-transform: none;
+}
+
+.main-navigation li {
+       border-bottom: 1px solid #eee;
+       position: relative;
+}
+
+.main-navigation li li,
+.main-navigation li:last-child {
+       border: 0;
+}
+
+.main-navigation a {
+       display: block;
+       padding: 0.5em 0;
+       text-decoration: none;
+}
+
+.main-navigation a:hover {
+       color: #767676;
+}
+
+/* Menu toggle */
+
+.menu-toggle {
+       background-color: transparent;
+       border: 0;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       color: #222;
+       display: none;
+       font-size: 14px;
+       font-size: 0.875rem;
+       font-weight: 800;
+       line-height: 1.5;
+       margin: 1px auto 2px;
+       padding: 1em;
+       text-shadow: none;
+}
+
+/* Display the menu toggle when JavaScript is available. */
+
+.js .menu-toggle {
+       display: block;
+}
+
+.main-navigation.toggled-on ul.nav-menu {
+       display: block;
+}
+
+.menu-toggle:hover,
+.menu-toggle:focus {
+       background-color: transparent;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+}
+
+.menu-toggle:focus {
+       outline: thin solid;
+}
+
+.menu-toggle .icon {
+       margin-right: 0.5em;
+       top: -2px;
+}
+
+.toggled-on .menu-toggle .icon-bars,
+.menu-toggle .icon-close {
+       display: none;
+}
+
+.toggled-on .menu-toggle .icon-close {
+       display: inline-block;
+}
+
+/* Dropdown Toggle */
+
+.dropdown-toggle {
+       background-color: transparent;
+       border: 0;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       color: #222;
+       display: block;
+       font-size: 16px;
+       right: -0.5em;
+       line-height: 1.5;
+       margin: 0 auto;
+       padding: 0.5em;
+       position: absolute;
+       text-shadow: none;
+       top: 0;
+}
+
+.dropdown-toggle:hover,
+.dropdown-toggle:focus {
+       background: transparent;
+}
+
+.dropdown-toggle:focus {
+       outline: thin dotted;
+}
+
+.dropdown-toggle.toggled-on .icon {
+       -ms-transform: rotate(-180deg); /* IE 9 */
+       -webkit-transform: rotate(-180deg); /* Chrome, Safari, Opera */
+       transform: rotate(-180deg);
+}
+
+/* Scroll down arrow */
+
+.site-header .menu-scroll-down {
+       display: none;
+}
+
+/*--------------------------------------------------------------
+13.0 Layout
+--------------------------------------------------------------*/
+
+html {
+       -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+       box-sizing: border-box;
+}
+
+*,
+*:before,
+*:after {
+       /* Inherit box-sizing to make it easier to change the property for components that leverage other behavior; see http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
+       -webkit-box-sizing: inherit;
+       -moz-box-sizing: inherit;
+       box-sizing: inherit;
+}
+
+body {
+       background: #fff;
+       /* Fallback for when there is no custom background color defined. */
+}
+
+#page {
+       position: relative;
+       word-wrap: break-word;
+}
+
+.wrap {
+       margin-left: auto;
+       margin-right: auto;
+       max-width: 700px;
+       padding-left: 2em;
+       padding-right: 2em;
+}
+
+.wrap:after {
+       clear: both;
+       content: "";
+       display: block;
+}
+
+/*--------------------------------------------------------------
+13.1 Header
+--------------------------------------------------------------*/
+
+#masthead .wrap {
+       position: relative;
+}
+
+.site-header {
+       background-color: #fafafa;
+       position: relative;
+}
+
+/* Site branding */
+
+.site-branding {
+       padding: 1em 0;
+       position: relative;
+       -webkit-transition: margin-bottom 0.2s;
+       transition: margin-bottom 0.2s;
+       z-index: 3;
+}
+
+.site-branding a {
+       text-decoration: none;
+       -webkit-transition: opacity 0.2s;
+       transition: opacity 0.2s;
+}
+
+.site-branding a:hover,
+.site-branding a:focus {
+       opacity: 0.7;
+}
+
+.site-title {
+       clear: none;
+       font-size: 24px;
+       font-size: 1.5rem;
+       font-weight: 800;
+       line-height: 1.25;
+       letter-spacing: 0.08em;
+       margin: 0;
+       padding: 0;
+       text-transform: uppercase;
+}
+
+.site-title,
+.site-title a {
+       color: #222;
+       opacity: 1; /* Prevent opacity from changing during selective refreshes in the customize preview */
+}
+
+body.has-header-image .site-title,
+body.has-header-video .site-title,
+body.has-header-image .site-title a,
+body.has-header-video .site-title a {
+       color: #fff;
+}
+
+.site-description {
+       color: #666;
+       font-size: 13px;
+       font-size: 0.8125rem;
+       margin-bottom: 0;
+}
+
+body.has-header-image .site-description,
+body.has-header-video .site-description {
+       color: #fff;
+       opacity: 0.8;
+}
+
+.custom-logo-link {
+       display: inline-block;
+       padding-right: 1em;
+       vertical-align: middle;
+       width: auto;
+}
+
+.custom-logo-link img {
+       display: inline-block;
+       max-height: 80px;
+       width: auto;
+}
+
+body.home.title-tagline-hidden.has-header-image .custom-logo-link img,
+body.home.title-tagline-hidden.has-header-video .custom-logo-link img {
+       max-height: 200px;
+       max-width: 100%;
+}
+
+.custom-logo-link a:hover,
+.custom-logo-link a:focus {
+       opacity: 0.9;
+}
+
+body:not(.title-tagline-hidden) .site-branding-text {
+       display: inline-block;
+       vertical-align: middle;
+}
+
+.custom-header {
+       position: relative;
+}
+
+.has-header-image.twentyseventeen-front-page .custom-header,
+.has-header-video.twentyseventeen-front-page .custom-header,
+.has-header-image.home.blog .custom-header,
+.has-header-video.home.blog .custom-header {
+       display: table;
+       height: 300px;
+       height: 75vh;
+       width: 100%;
+}
+
+.custom-header-media {
+       bottom: 0;
+       left: 0;
+       overflow: hidden;
+       position: absolute;
+       right: 0;
+       top: 0;
+       width: 100%;
+}
+
+.custom-header-media:before {
+       /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#000000+0,000000+100&0+0,0.3+75 */
+       background: -moz-linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 75%, rgba(0, 0, 0, 0.3) 100%); /* FF3.6-15 */
+       background: -webkit-linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 75%, rgba(0, 0, 0, 0.3) 100%); /* Chrome10-25,Safari5.1-6 */
+       background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 75%, rgba(0, 0, 0, 0.3) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
+       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#00000000", endColorstr="#4d000000", GradientType=0); /* IE6-9 */
+       bottom: 0;
+       content: "";
+       display: block;
+       height: 100%;
+       left: 0;
+       position: absolute;
+       right: 0;
+       z-index: 2;
+}
+
+.has-header-image .custom-header-media img,
+.has-header-video .custom-header-media video,
+.has-header-video .custom-header-media iframe {
+       position: fixed;
+       height: auto;
+       left: 50%;
+       max-width: 1000%;
+       min-height: 100%;
+       min-width: 100%;
+       min-width: 100vw; /* vw prevents 1px gap on left that 100% has */
+       width: auto;
+       top: 50%;
+       padding-bottom: 1px; /* Prevent header from extending beyond the footer */
+       -ms-transform: translateX(-50%) translateY(-50%);
+       -moz-transform: translateX(-50%) translateY(-50%);
+       -webkit-transform: translateX(-50%) translateY(-50%);
+       transform: translateX(-50%) translateY(-50%);
+}
+
+.wp-custom-header .wp-custom-header-video-button { /* Specificity prevents .color-dark button overrides */
+       background-color: rgba(34, 34, 34, 0.5);
+       border: 1px solid rgba(255, 255, 255, 0.6);
+       color: rgba(255, 255, 255, 0.6);
+       height: 45px;
+       overflow: hidden;
+       padding: 0;
+       position: fixed;
+       right: 30px;
+       top: 30px;
+       -webkit-transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+       transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+       width: 45px;
+}
+
+.wp-custom-header .wp-custom-header-video-button:hover,
+.wp-custom-header .wp-custom-header-video-button:focus { /* Specificity prevents .color-dark button overrides */
+       border-color: rgba(255, 255, 255, 0.8);
+       background-color: rgba(34, 34, 34, 0.8);
+       color: #fff;
+}
+
+.admin-bar .wp-custom-header-video-button {
+       top: 62px;
+}
+
+.has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media img {
+       bottom: 0;
+       position: absolute;
+       top: auto;
+       -ms-transform: translateX(-50%) translateY(0);
+       -moz-transform: translateX(-50%) translateY(0);
+       -webkit-transform: translateX(-50%) translateY(0);
+       transform: translateX(-50%) translateY(0);
+}
+
+/* For browsers that support 'object-fit' */
+@supports ( object-fit: cover ) {
+       .has-header-image .custom-header-media img,
+       .has-header-video .custom-header-media video,
+       .has-header-video .custom-header-media iframe,
+       .has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media img {
+               height: 100%;
+               left: 0;
+               -o-object-fit: cover;
+               object-fit: cover;
+               top: 0;
+               -ms-transform: none;
+               -moz-transform: none;
+               -webkit-transform: none;
+               transform: none;
+               width: 100%;
+       }
+}
+
+/* Hides div in Customizer preview when header images or videos change. */
+
+body:not(.has-header-image):not(.has-header-video) .custom-header-media {
+       display: none;
+}
+
+.has-header-image.twentyseventeen-front-page .site-branding,
+.has-header-video.twentyseventeen-front-page .site-branding,
+.has-header-image.home.blog .site-branding,
+.has-header-video.home.blog .site-branding {
+       display: table-cell;
+       height: 100%;
+       vertical-align: bottom;
+}
+
+/*--------------------------------------------------------------
+13.2 Front Page
+--------------------------------------------------------------*/
+
+.twentyseventeen-front-page .site-content {
+       padding: 0;
+}
+
+.twentyseventeen-panel {
+       overflow: hidden;
+       position: relative;
+}
+
+.panel-image {
+       background-position: center center;
+       background-repeat: no-repeat;
+       -webkit-background-size: cover;
+       background-size: cover;
+       position: relative;
+}
+
+.panel-image:before {
+       /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#000000+0,000000+100&0+0,0.3+100 */ /* FF3.6-15 */
+       background: -webkit-linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%); /* Chrome10-25,Safari5.1-6 */
+       background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.3)));
+       background: -webkit-linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
+       background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
+       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#00000000", endColorstr="#4d000000", GradientType=0); /* IE6-9 */
+       bottom: 0;
+       content: "";
+       left: 0;
+       right: 0;
+       position: absolute;
+       top: 100px;
+}
+
+.twentyseventeen-front-page article:not(.has-post-thumbnail):not(:first-child) {
+       border-top: 1px solid #ddd;
+}
+
+.panel-content {
+       position: relative;
+}
+
+.panel-content .wrap {
+       padding-bottom: 0.5em;
+       padding-top: 1.75em;
+}
+
+/* Panel edit link */
+
+.twentyseventeen-panel .edit-link {
+       display: block;
+       margin: 0.3em 0 0;
+}
+
+.twentyseventeen-panel .entry-header .edit-link {
+       font-size: 14px;
+       font-size: 0.875rem;
+}
+
+/* Front Page - Recent Posts */
+
+.twentyseventeen-front-page .panel-content .recent-posts article {
+       border: 0;
+       color: #333;
+       margin-bottom: 3em;
+}
+
+.recent-posts .entry-header {
+       margin-bottom: 1.2em;
+}
+
+.page .panel-content .recent-posts .entry-title {
+       font-size: 20px;
+       font-size: 1.25rem;
+       font-weight: 300;
+       letter-spacing: 0;
+       text-transform: none;
+}
+
+.twentyseventeen-panel .recent-posts .entry-header .edit-link {
+       color: #222;
+       display: inline-block;
+       font-size: 11px;
+       font-size: 0.6875rem;
+       margin-left: 1em;
+}
+
+/*--------------------------------------------------------------
+13.3 Regular Content
+--------------------------------------------------------------*/
+
+.site-content-contain {
+       background-color: #fff;
+       position: relative;
+}
+
+.site-content {
+       padding: 2.5em 0 0;
+}
+
+/*--------------------------------------------------------------
+13.4 Posts
+--------------------------------------------------------------*/
+
+/* Post Landing Page */
+
+.sticky {
+       position: relative;
+}
+
+.post:not(.sticky) .icon-thumb-tack {
+       display: none;
+}
+
+.sticky .icon-thumb-tack {
+       display: block;
+       height: 18px;
+       left: -1.5em;
+       position: absolute;
+       top: 1.65em;
+       width: 20px;
+}
+
+.page .panel-content .entry-title,
+.page-title,
+body.page:not(.twentyseventeen-front-page) .entry-title {
+       color: #222;
+       font-size: 14px;
+       font-size: 0.875rem;
+       font-weight: 800;
+       letter-spacing: 0.14em;
+       text-transform: uppercase;
+}
+
+.entry-header .entry-title {
+       margin-bottom: 0.25em;
+}
+
+.entry-title a {
+       color: #333;
+       text-decoration: none;
+       margin-left: -2px;
+}
+
+.entry-title:not(:first-child) {
+       padding-top: 0;
+}
+
+.entry-meta {
+       color: #767676;
+       font-size: 11px;
+       font-size: 0.6875rem;
+       font-weight: 800;
+       letter-spacing: 0.1818em;
+       padding-bottom: 0.25em;
+       text-transform: uppercase;
+}
+
+.entry-meta a {
+       color: #767676;
+}
+
+.byline,
+.updated:not(.published) {
+       display: none;
+}
+
+.single .byline,
+.group-blog .byline {
+       display: inline;
+}
+
+.pagination,
+.comments-pagination {
+       border-top: 1px solid #eee;
+       font-size: 14px;
+       font-size: 0.875rem;
+       font-weight: 800;
+       padding: 2em 0 3em;
+       text-align: center;
+}
+
+.pagination .icon,
+.comments-pagination .icon {
+       width: 0.666666666em;
+       height: 0.666666666em;
+}
+
+.comments-pagination {
+       border: 0;
+}
+
+.page-numbers {
+       display: none;
+       padding: 0.5em 0.75em;
+}
+
+.page-numbers.current {
+       color: #767676;
+       display: inline-block;
+}
+
+.page-numbers.current .screen-reader-text {
+       clip: auto;
+       height: auto;
+       overflow: auto;
+       position: relative !important;
+       width: auto;
+}
+
+.prev.page-numbers,
+.next.page-numbers {
+       background-color: #ddd;
+       -webkit-border-radius: 2px;
+       border-radius: 2px;
+       display: inline-block;
+       font-size: 24px;
+       font-size: 1.5rem;
+       line-height: 1;
+       padding: 0.25em 0.5em 0.4em;
+}
+
+.prev.page-numbers,
+.next.page-numbers {
+       -webkit-transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+       transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+}
+
+.prev.page-numbers:focus,
+.prev.page-numbers:hover,
+.next.page-numbers:focus,
+.next.page-numbers:hover {
+       background-color: #767676;
+       color: #fff;
+}
+
+.prev.page-numbers {
+       float: left;
+}
+
+.next.page-numbers {
+       float: right;
+}
+
+/* Aligned blockquotes */
+
+.entry-content blockquote.alignleft,
+.entry-content blockquote.alignright {
+       color: #666;
+       font-size: 13px;
+       font-size: 0.8125rem;
+       width: 48%;
+}
+
+/* Blog landing, search, archives */
+
+.blog .site-main > article,
+.archive .site-main > article,
+.search .site-main > article {
+       padding-bottom: 2em;
+}
+
+body:not(.twentyseventeen-front-page) .entry-header {
+       padding: 1em 0;
+}
+
+body:not(.twentyseventeen-front-page) .entry-header,
+body:not(.twentyseventeen-front-page) .entry-content,
+body:not(.twentyseventeen-front-page) #comments {
+       margin-left: auto;
+       margin-right: auto;
+}
+
+body:not(.twentyseventeen-front-page) .entry-header {
+       padding-top: 0;
+}
+
+.blog .entry-meta a.post-edit-link,
+.archive .entry-meta a.post-edit-link,
+.search .entry-meta a.post-edit-link {
+       color: #222;
+       display: inline-block;
+       margin-left: 1em;
+       white-space: nowrap;
+}
+
+.search .page .entry-meta a.post-edit-link {
+       margin-left: 0;
+       white-space: nowrap;
+}
+
+.taxonomy-description {
+       color: #666;
+       font-size: 13px;
+       font-size: 0.8125rem;
+}
+
+/* More tag */
+
+.entry-content .more-link:before {
+       content: "";
+       display: block;
+       margin-top: 1.5em;
+}
+
+/* Single Post */
+
+.single-post:not(.has-sidebar) #primary,
+.page.page-one-column:not(.twentyseventeen-front-page) #primary,
+.archive.page-one-column:not(.has-sidebar) .page-header,
+.archive.page-one-column:not(.has-sidebar) #primary {
+       margin-left: auto;
+       margin-right: auto;
+       max-width: 740px;
+}
+
+.single-featured-image-header {
+       background-color: #fafafa;
+       border-bottom: 1px solid #eee;
+}
+
+.single-featured-image-header img {
+       display: block;
+       margin: auto;
+}
+
+.page-links {
+       font-size: 14px;
+       font-size: 0.875rem;
+       font-weight: 800;
+       padding: 2em 0 3em;
+}
+
+.page-links .page-number {
+       color: #767676;
+       display: inline-block;
+       padding: 0.5em 1em;
+}
+
+.page-links a {
+       display: inline-block;
+}
+
+.page-links a .page-number {
+       color: #222;
+}
+
+/* Entry footer */
+
+.entry-footer {
+       border-bottom: 1px solid #eee;
+       border-top: 1px solid #eee;
+       margin-top: 2em;
+       padding: 2em 0;
+}
+
+.entry-footer .cat-links,
+.entry-footer .tags-links {
+       display: block;
+       font-size: 11px;
+       font-size: 0.6875rem;
+       font-weight: 800;
+       letter-spacing: 0.1818em;
+       padding-left: 2.5em;
+       position: relative;
+       text-transform: uppercase;
+}
+
+.entry-footer .cat-links + .tags-links {
+       margin-top: 1em;
+}
+
+.entry-footer .cat-links a,
+.entry-footer .tags-links a {
+       color: #333;
+}
+
+.entry-footer .cat-links .icon,
+.entry-footer .tags-links .icon {
+       color: #767676;
+       left: 0;
+       margin-right: 0.5em;
+       position: absolute;
+       top: 2px;
+}
+
+.entry-footer .edit-link {
+       display: inline-block;
+}
+
+.entry-footer .edit-link a.post-edit-link {
+       background-color: #222;
+       -webkit-border-radius: 2px;
+       border-radius: 2px;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       color: #fff;
+       display: inline-block;
+       font-size: 14px;
+       font-size: 0.875rem;
+       font-weight: 800;
+       margin-top: 2em;
+       padding: 0.7em 2em;
+       -webkit-transition: background-color 0.2s ease-in-out;
+       transition: background-color 0.2s ease-in-out;
+       white-space: nowrap;
+}
+
+.entry-footer .edit-link a.post-edit-link:hover,
+.entry-footer .edit-link a.post-edit-link:focus {
+       background-color: #767676;
+}
+
+/* Post Formats */
+
+.blog .format-status .entry-title,
+.archive .format-status .entry-title,
+.blog .format-aside .entry-title,
+.archive .format-aside .entry-title {
+       display: none;
+}
+
+.format-quote blockquote {
+       color: #333;
+       font-size: 20px;
+       font-size: 1.25rem;
+       font-weight: 300;
+       overflow: visible;
+       position: relative;
+}
+
+.format-quote blockquote .icon {
+       display: block;
+       height: 20px;
+       left: -1.25em;
+       position: absolute;
+       top: 0.4em;
+       -webkit-transform: scale(-1, 1);
+       -ms-transform: scale(-1, 1);
+       transform: scale(-1, 1);
+       width: 20px;
+}
+
+/* Post Navigation */
+
+.post-navigation {
+       font-weight: 800;
+       margin: 3em 0;
+}
+
+.post-navigation .nav-links {
+       padding: 1em 0;
+}
+
+.nav-subtitle {
+       background: transparent;
+       color: #767676;
+       display: block;
+       font-size: 11px;
+       font-size: 0.6875rem;
+       letter-spacing: 0.1818em;
+       margin-bottom: 1em;
+       text-transform: uppercase;
+}
+
+.nav-title {
+       color: #333;
+       font-size: 15px;
+       font-size: 0.9375rem;
+}
+
+.post-navigation .nav-next {
+       margin-top: 1.5em;
+}
+
+.nav-links .nav-previous .nav-title .nav-title-icon-wrapper {
+       margin-right: 0.5em;
+}
+
+.nav-links .nav-next .nav-title .nav-title-icon-wrapper {
+       margin-left: 0.5em;
+}
+
+/*--------------------------------------------------------------
+13.5 Pages
+--------------------------------------------------------------*/
+
+.page-header {
+       padding-bottom: 2em;
+}
+
+.page .entry-header .edit-link {
+       font-size: 14px;
+       font-size: 0.875rem;
+}
+
+.search .page .entry-header .edit-link {
+       font-size: 11px;
+       font-size: 0.6875rem;
+}
+
+.page-links {
+       clear: both;
+       margin: 0 0 1.5em;
+}
+
+.page:not(.home) #content {
+       padding-bottom: 1.5em;
+}
+
+/* 404 page */
+
+.error404 .page-content {
+       padding-bottom: 4em;
+}
+
+.error404 .page-content .search-form,
+.search .page-content .search-form {
+       margin-bottom: 3em;
+}
+
+/*--------------------------------------------------------------
+13.6 Footer
+--------------------------------------------------------------*/
+
+.site-footer {
+       border-top: 1px solid #eee;
+}
+
+.site-footer .wrap {
+       padding-bottom: 1.5em;
+       padding-top: 2em;
+}
+
+/* Footer widgets */
+
+.site-footer .widget-area {
+       padding-bottom: 2em;
+       padding-top: 2em;
+}
+
+/* Social nav */
+
+.social-navigation {
+       font-size: 16px;
+       font-size: 1rem;
+       margin-bottom: 1em;
+}
+
+.social-navigation ul {
+       list-style: none;
+       margin-bottom: 0;
+       margin-left: 0;
+}
+
+.social-navigation li {
+       display: inline;
+}
+
+.social-navigation a {
+       background-color: #767676;
+       -webkit-border-radius: 40px;
+       border-radius: 40px;
+       color: #fff;
+       display: inline-block;
+       height: 40px;
+       margin: 0 1em 0.5em 0;
+       text-align: center;
+       width: 40px;
+}
+
+.social-navigation a:hover,
+.social-navigation a:focus {
+       background-color: #333;
+}
+
+.social-navigation .icon {
+       height: 16px;
+       top: 12px;
+       width: 16px;
+       vertical-align: top;
+}
+
+/* Site info */
+
+.site-info {
+       font-size: 14px;
+       font-size: 0.875rem;
+       margin-bottom: 1em;
+}
+
+.site-info a {
+       color: #666;
+}
+
+.site-info .sep {
+       margin: 0;
+       display: block;
+       visibility: hidden;
+       height: 0;
+       width: 100%;
+}
+
+/*--------------------------------------------------------------
+14.0 Comments
+--------------------------------------------------------------*/
+
+#comments {
+       clear: both;
+       padding: 2em 0 0.5em;
+}
+
+.comments-title {
+       font-size: 20px;
+       font-size: 1.25rem;
+       margin-bottom: 1.5em;
+}
+
+.comment-list,
+.comment-list .children {
+       list-style: none;
+       margin: 0;
+       padding: 0;
+}
+
+.comment-list li:before {
+       display: none;
+}
+
+.comment-body {
+       margin-left: 65px;
+}
+
+.comment-author {
+       font-size: 16px;
+       font-size: 1rem;
+       margin-bottom: 0.4em;
+       position: relative;
+       z-index: 2;
+}
+
+.comment-author .avatar {
+       height: 50px;
+       left: -65px;
+       position: absolute;
+       width: 50px;
+}
+
+.comment-author .says {
+       display: none;
+}
+
+.comment-meta {
+       margin-bottom: 1.5em;
+}
+
+.comment-metadata {
+       color: #767676;
+       font-size: 10px;
+       font-size: 0.625rem;
+       font-weight: 800;
+       letter-spacing: 0.1818em;
+       text-transform: uppercase;
+}
+
+.comment-metadata a {
+       color: #767676;
+}
+
+.comment-metadata a.comment-edit-link {
+       color: #222;
+       margin-left: 1em;
+}
+
+.comment-body {
+       color: #333;
+       font-size: 14px;
+       font-size: 0.875rem;
+       margin-bottom: 4em;
+}
+
+.comment-reply-link {
+       font-weight: 800;
+       position: relative;
+}
+
+.comment-reply-link .icon {
+       color: #222;
+       left: -2em;
+       height: 1em;
+       position: absolute;
+       top: 0;
+       width: 1em;
+}
+
+.children .comment-author .avatar {
+       height: 30px;
+       left: -45px;
+       width: 30px;
+}
+
+.bypostauthor > .comment-body > .comment-meta > .comment-author .avatar {
+       border: 1px solid #333;
+       padding: 2px;
+}
+
+.no-comments,
+.comment-awaiting-moderation {
+       color: #767676;
+       font-size: 14px;
+       font-size: 0.875rem;
+       font-style: italic;
+}
+
+.comments-pagination {
+       margin: 2em 0 3em;
+}
+
+.form-submit {
+       text-align: right;
+}
+
+/*--------------------------------------------------------------
+15.0 Widgets
+--------------------------------------------------------------*/
+
+#secondary {
+       padding: 1em 0 2em;
+}
+
+.widget {
+       padding-bottom: 3em;
+}
+
+h2.widget-title {
+       color: #222;
+       font-size: 13px;
+       font-size: 0.8125rem;
+       font-weight: 800;
+       letter-spacing: 0.1818em;
+       margin-bottom: 1.5em;
+       text-transform: uppercase;
+}
+
+.widget-title a {
+       color: inherit;
+}
+
+/* widget forms */
+
+.widget select {
+       width: 100%;
+}
+
+
+/* widget lists */
+
+.widget ul {
+       list-style: none;
+       margin: 0;
+}
+
+.widget ul li {
+       border-bottom: 1px solid #ddd;
+       border-top: 1px solid #ddd;
+       padding: 0.5em 0;
+}
+
+.widget ul li + li {
+       margin-top: -1px;
+}
+
+.widget ul li ul {
+       margin: 0 0 -1px;
+       padding: 0;
+       position: relative;
+}
+
+.widget ul li li {
+       border: 0;
+       padding-left: 24px;
+       padding-left: 1.5rem;
+}
+
+/* Widget lists of links */
+
+.widget_top-posts ul li ul,
+.widget_rss_links ul li ul,
+.widget-grofile ul.grofile-links li ul,
+.widget_pages ul li ul,
+.widget_meta ul li ul {
+       bottom: 0;
+}
+
+.widget_nav_menu ul li li,
+.widget_top-posts ul li,
+.widget_top-posts ul li li,
+.widget_rss_links ul li,
+.widget_rss_links ul li li,
+.widget-grofile ul.grofile-links li,
+.widget-grofile ul.grofile-links li li {
+       padding-bottom: 0.25em;
+       padding-top: 0.25em;
+}
+
+.widget_rss ul li {
+       padding-bottom: 1em;
+       padding-top: 1em;
+}
+
+/* widget markup */
+
+.widget .post-date,
+.widget .rss-date {
+       font-size: 0.81em;
+}
+
+/* Text widget */
+
+.widget_text {
+       word-wrap: break-word;
+}
+
+/* RSS Widget */
+
+.widget_rss .widget-title .rsswidget:first-child {
+       float: right;
+}
+
+.widget_rss .widget-title .rsswidget:first-child:hover {
+       background-color: transparent;
+}
+
+.widget_rss .widget-title .rsswidget:first-child img {
+       display: block;
+}
+
+.widget_rss ul li {
+       padding: 2.125em 0;
+}
+
+.widget_rss ul li:first-child {
+       border-top: none;
+       padding-top: 0;
+}
+
+.widget_rss li .rsswidget {
+       font-size: 22px;
+       font-size: 1.375rem;
+       font-weight: 300;
+       line-height: 1.4;
+}
+
+.widget_rss .rss-date,
+.widget_rss li cite {
+       color: #767676;
+       display: block;
+       font-size: 10px;
+       font-size: 0.625rem;
+       font-style: normal;
+       font-weight: 800;
+       letter-spacing: 0.18em;
+       line-height: 1.5;
+       text-transform: uppercase;
+}
+
+.widget_rss .rss-date {
+       margin: 0.5em 0 1.5em;
+       padding: 0;
+}
+
+.widget_rss .rssSummary {
+       margin-bottom: 0.5em;
+}
+
+/* Contact Info Widget */
+
+.widget_contact_info .contact-map {
+       margin-bottom: 0.5em;
+}
+
+/* Gravatar */
+
+.widget-grofile h4 {
+       font-size: 16px;
+       font-size: 1rem;
+       margin-bottom: 0;
+}
+
+/* Recent Comments */
+
+.widget_recent_comments table,
+.widget_recent_comments th,
+.widget_recent_comments td {
+       border: 0;
+}
+
+/* Recent Posts widget */
+
+.widget_recent_entries .post-date {
+       display: block;
+}
+
+/* Search */
+
+.search-form {
+       position: relative;
+}
+
+.search-form .search-submit {
+       bottom: 3px;
+       padding: 0.5em 1em;
+       position: absolute;
+       right: 3px;
+       top: 3px;
+}
+
+.search-form .search-submit .icon {
+       height: 24px;
+       top: -2px;
+       width: 24px;
+}
+
+/* Tag cloud widget */
+
+.tagcloud,
+.widget_tag_cloud,
+.wp_widget_tag_cloud {
+       line-height: 1.5;
+}
+
+.widget .tagcloud a,
+.widget.widget_tag_cloud a,
+.wp_widget_tag_cloud a {
+       border: 1px solid #ddd;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       display: inline-block;
+       float: left;
+       font-size: 14px !important; /* !important to overwrite inline styles */
+       font-size: 0.875rem !important;
+       margin: 4px 4px 0 0 !important;
+       padding: 4px 10px 5px !important;
+       position: relative;
+       -webkit-transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+       transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+       width: auto;
+       word-wrap: break-word;
+       z-index: 0;
+}
+
+.widget .tagcloud a:hover,
+.widget .tagcloud a:focus,
+.widget.widget_tag_cloud a:hover,
+.widget.widget_tag_cloud a:focus,
+.wp_widget_tag_cloud a:hover,
+.wp_widget_tag_cloud a:focus {
+       border-color: #bbb;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       text-decoration: none;
+}
+
+/* Calendar widget */
+
+.widget_calendar th,
+.widget_calendar td {
+       text-align: center;
+}
+
+.widget_calendar tfoot td {
+       border: 0;
+}
+
+/*--------------------------------------------------------------
+16.0 Media
+--------------------------------------------------------------*/
+
+img,
+video {
+       height: auto; /* Make sure images are scaled correctly. */
+       max-width: 100%; /* Adhere to container width. */
+}
+
+img.alignleft,
+img.alignright {
+       float: none;
+       margin: 0;
+}
+
+.page-content .wp-smiley,
+.entry-content .wp-smiley,
+.comment-content .wp-smiley {
+       border: none;
+       margin-bottom: 0;
+       margin-top: 0;
+       padding: 0;
+}
+
+/* Make sure embeds and iframes fit their containers. */
+
+embed,
+iframe,
+object {
+       margin-bottom: 1.5em;
+       max-width: 100%;
+}
+
+.wp-caption,
+.gallery-caption {
+       color: #666;
+       font-size: 13px;
+       font-size: 0.8125rem;
+       font-style: italic;
+       margin-bottom: 1.5em;
+       max-width: 100%;
+}
+
+.wp-caption img[class*="wp-image-"] {
+       display: block;
+       margin-left: auto;
+       margin-right: auto;
+}
+
+.wp-caption .wp-caption-text {
+       margin: 0.8075em 0;
+}
+
+/* Media Elements */
+
+.mejs-container {
+       margin-bottom: 1.5em;
+}
+
+/* Audio Player */
+
+.mejs-controls a.mejs-horizontal-volume-slider,
+.mejs-controls a.mejs-horizontal-volume-slider:focus,
+.mejs-controls a.mejs-horizontal-volume-slider:hover {
+       background: transparent;
+       border: 0;
+}
+
+/* Playlist Color Overrides: Light */
+
+.site-content .wp-playlist-light {
+       border-color: #eee;
+       color: #222;
+}
+
+.site-content .wp-playlist-light .wp-playlist-current-item .wp-playlist-item-album {
+       color: #333;
+}
+
+.site-content .wp-playlist-light .wp-playlist-current-item .wp-playlist-item-artist {
+       color: #767676;
+}
+
+.site-content .wp-playlist-light .wp-playlist-item {
+       border-bottom: 1px dotted #eee;
+       -webkit-transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+       transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+}
+
+.site-content .wp-playlist-light .wp-playlist-item:hover,
+.site-content .wp-playlist-light .wp-playlist-item:focus {
+       border-bottom-color: rgba(0, 0, 0, 0);
+       background-color: #767676;
+       color: #fff;
+}
+
+.site-content .wp-playlist-light a.wp-playlist-caption:hover,
+.site-content .wp-playlist-light .wp-playlist-item:hover a,
+.site-content .wp-playlist-light .wp-playlist-item:focus a {
+       color: #fff;
+}
+
+/* Playlist Color Overrides: Dark */
+
+.site-content .wp-playlist-dark {
+       background: #222;
+       border-color: #333;
+}
+
+.site-content .wp-playlist-dark .mejs-container .mejs-controls {
+       background-color: #333;
+}
+
+.site-content .wp-playlist-dark .wp-playlist-caption {
+       color: #fff;
+}
+
+.site-content .wp-playlist-dark .wp-playlist-current-item .wp-playlist-item-album {
+       color: #eee;
+}
+
+.site-content .wp-playlist-dark .wp-playlist-current-item .wp-playlist-item-artist {
+       color: #aaa;
+}
+
+.site-content .wp-playlist-dark .wp-playlist-playing {
+       background-color: #333;
+}
+
+.site-content .wp-playlist-dark .wp-playlist-item {
+       border-bottom: 1px dotted #555;
+       -webkit-transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+       transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
+}
+
+.site-content .wp-playlist-dark .wp-playlist-item:hover,
+.site-content .wp-playlist-dark .wp-playlist-item:focus {
+       border-bottom-color: rgba(0, 0, 0, 0);
+       background-color: #aaa;
+       color: #222;
+}
+
+.site-content .wp-playlist-dark a.wp-playlist-caption:hover,
+.site-content .wp-playlist-dark .wp-playlist-item:hover a,
+.site-content .wp-playlist-dark .wp-playlist-item:focus a {
+       color: #222;
+}
+
+/* Playlist Style Overrides */
+
+.site-content .wp-playlist {
+       padding: 0.625em 0.625em 0.3125em;
+}
+
+.site-content .wp-playlist-current-item .wp-playlist-item-title {
+       font-weight: 700;
+}
+
+.site-content .wp-playlist-current-item .wp-playlist-item-album {
+       font-style: normal;
+}
+
+.site-content .wp-playlist-current-item .wp-playlist-item-artist {
+       font-size: 10px;
+       font-size: 0.625rem;
+       font-weight: 800;
+       letter-spacing: 0.1818em;
+       text-transform: uppercase;
+}
+
+.site-content .wp-playlist-item {
+       padding: 0 0.3125em;
+       cursor: pointer;
+}
+
+.site-content .wp-playlist-item:last-of-type {
+       border-bottom: none;
+}
+
+.site-content .wp-playlist-item a {
+       padding: 0.3125em 0;
+       border-bottom: none;
+}
+
+.site-content .wp-playlist-item a,
+.site-content .wp-playlist-item a:focus,
+.site-content .wp-playlist-item a:hover {
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       background: transparent;
+}
+
+.site-content .wp-playlist-item-length {
+       top: 5px;
+}
+
+/* SVG Icons base styles */
+
+.icon {
+       display: inline-block;
+       fill: currentColor;
+       height: 1em;
+       position: relative; /* Align more nicely with capital letters */
+       top: -0.0625em;
+       vertical-align: middle;
+       width: 1em;
+}
+
+/*--------------------------------------------------------------
+16.1 Galleries
+--------------------------------------------------------------*/
+
+.gallery-item {
+       display: inline-block;
+       text-align: left;
+       vertical-align: top;
+       margin: 0 0 1.5em;
+       padding: 0 1em 0 0;
+       width: 50%;
+}
+
+.gallery-columns-1 .gallery-item {
+       width: 100%;
+}
+
+.gallery-columns-2 .gallery-item {
+       max-width: 50%;
+}
+
+.gallery-item a,
+.gallery-item a:hover,
+.gallery-item a:focus {
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       background: none;
+       display: inline-block;
+       max-width: 100%;
+}
+
+.gallery-item a img {
+       display: block;
+       -webkit-transition: -webkit-filter 0.2s ease-in;
+       transition: -webkit-filter 0.2s ease-in;
+       transition: filter 0.2s ease-in;
+       transition: filter 0.2s ease-in, -webkit-filter 0.2s ease-in;
+       -webkit-backface-visibility: hidden;
+       backface-visibility: hidden;
+}
+
+.gallery-item a:hover img,
+.gallery-item a:focus img {
+       -webkit-filter: opacity(60%);
+       filter: opacity(60%);
+}
+
+.gallery-caption {
+       display: block;
+       text-align: left;
+       padding: 0 10px 0 0;
+       margin-bottom: 0;
+}
+
+/*--------------------------------------------------------------
+17.0 Customizer
+--------------------------------------------------------------*/
+
+.highlight-front-sections.twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:after {
+       border: 2px dashed #0085ba; /* Matches visible edit shortcuts. */
+       bottom: 1em;
+       content: "";
+       display: block;
+       left: 1em;
+       position: absolute;
+       right: 1em;
+       top: 1em;
+       z-index: 1;
+}
+
+.highlight-front-sections.twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel .panel-content {
+       z-index: 2; /* Prevent :after from preventing interactions within the section */
+}
+
+/* Used for placeholder text */
+.twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel .twentyseventeen-panel-title {
+       display: block;
+       font-size: 14px;
+       font-size: 0.875rem;
+       font-weight: 700;
+       letter-spacing: 1px;
+       padding: 3em;
+       text-transform: uppercase;
+       text-align: center;
+}
+
+/* Show borders on the custom page panels only when the front page sections are being edited */
+.highlight-front-sections.twentyseventeen-customizer.twentyseventeen-front-page .twentyseventeen-panel:nth-of-type(1):after {
+       border: none;
+}
+
+.twentyseventeen-front-page.twentyseventeen-customizer #primary article.panel-placeholder {
+       border: 0;
+}
+
+/* Add some space around the visual edit shortcut buttons. */
+.twentyseventeen-panel .customize-partial-edit-shortcut button {
+       top: 30px;
+       left: 30px;
+}
+
+/* Ensure that placeholder icons are visible. */
+.twentyseventeen-panel .customize-partial-edit-shortcut-hidden:before {
+       visibility: visible;
+}
+
+/*--------------------------------------------------------------
+18.0 SVGs Fallbacks
+--------------------------------------------------------------*/
+
+.svg-fallback {
+       display: none;
+}
+
+.no-svg .svg-fallback {
+       display: inline-block;
+}
+
+.no-svg .dropdown-toggle {
+       padding: 0.5em 0 0;
+       right: 0;
+       text-align: center;
+       width: 2em;
+}
+
+.no-svg .dropdown-toggle .svg-fallback.icon-angle-down {
+       font-size: 20px;
+       font-size: 1.25rem;
+       font-weight: 400;
+       line-height: 1;
+       -webkit-transform: rotate(180deg); /* Chrome, Safari, Opera */
+       -ms-transform: rotate(180deg); /* IE 9 */
+       transform: rotate(180deg);
+}
+
+.no-svg .dropdown-toggle.toggled-on .svg-fallback.icon-angle-down {
+       -webkit-transform: rotate(0); /* Chrome, Safari, Opera */
+       -ms-transform: rotate(0); /* IE 9 */
+       transform: rotate(0);
+}
+
+.no-svg .dropdown-toggle .svg-fallback.icon-angle-down:before {
+       content: "\005E";
+}
+
+/* Social Menu fallbacks */
+
+.no-svg .social-navigation a {
+       background: transparent;
+       color: #222;
+       height: auto;
+       width: auto;
+}
+
+/* Show screen reader text in some cases */
+
+.no-svg .next.page-numbers .screen-reader-text,
+.no-svg .prev.page-numbers .screen-reader-text,
+.no-svg .social-navigation li a .screen-reader-text,
+.no-svg .search-submit .screen-reader-text {
+       clip: auto;
+       font-size: 16px;
+       font-size: 1rem;
+       font-weight: 400;
+       height: auto;
+       position: relative !important; /* overrides previous !important styles */
+       width: auto;
+}
+
+/*--------------------------------------------------------------
+19.0 Media Queries
+--------------------------------------------------------------*/
+
+/* Adjust positioning of edit shortcuts, override style in customize-preview.css */
+@media screen and (min-width: 20em) {
+
+       body.customize-partial-edit-shortcuts-shown .site-header .site-title {
+               padding-left: 0;
+       }
+}
+
+@media screen and (min-width: 30em) {
+
+       /* Typography */
+
+       body,
+       button,
+       input,
+       select,
+       textarea {
+               font-size: 18px;
+               font-size: 1.125rem;
+       }
+
+       h1 {
+               font-size: 30px;
+               font-size: 1.875rem;
+       }
+
+       h2,
+       .page .panel-content .recent-posts .entry-title {
+               font-size: 26px;
+               font-size: 1.625rem;
+       }
+
+       h3 {
+               font-size: 22px;
+               font-size: 1.375rem;
+       }
+
+       h4 {
+               font-size: 18px;
+               font-size: 1.125rem;
+       }
+
+       h5 {
+               font-size: 13px;
+               font-size: 0.8125rem;
+       }
+
+       h6 {
+               font-size: 16px;
+               font-size: 1rem;
+       }
+
+       .entry-content blockquote.alignleft,
+       .entry-content blockquote.alignright {
+               font-size: 14px;
+               font-size: 0.875rem;
+       }
+
+       /* Fix image alignment */
+       img.alignleft {
+               float: left;
+               margin-right: 1.5em;
+       }
+
+       img.alignright {
+               float: right;
+               margin-left: 1.5em;
+       }
+
+       /* Site Branding */
+
+       .site-branding {
+               padding: 3em 0;
+       }
+
+       /* Front Page */
+
+       .panel-content .wrap {
+               padding-bottom: 2em;
+               padding-top: 3.5em;
+       }
+
+       .page-one-column .panel-content .wrap {
+               max-width: 740px;
+       }
+
+       .panel-content .entry-header {
+               margin-bottom: 4.5em;
+       }
+
+       .panel-content .recent-posts .entry-header {
+               margin-bottom: 0;
+       }
+
+       /* Blog Index, Archive, Search */
+
+       .taxonomy-description {
+               font-size: 14px;
+               font-size: 0.875rem;
+       }
+
+       .page-numbers.current {
+               font-size: 16px;
+               font-size: 1rem;
+       }
+
+       /* Site Footer */
+
+       .site-footer {
+               font-size: 16px;
+               font-size: 1rem;
+       }
+
+       /* Gallery Columns */
+
+       .gallery-item {
+               max-width: 25%;
+       }
+
+       .gallery-columns-1 .gallery-item {
+               max-width: 100%;
+       }
+
+       .gallery-columns-2 .gallery-item {
+               max-width: 50%;
+       }
+
+       .gallery-columns-3 .gallery-item {
+               max-width: 33.33%;
+       }
+
+       .gallery-columns-4 .gallery-item {
+               max-width: 25%;
+       }
+}
+
+@media screen and (min-width: 48em) {
+
+       /* Typography */
+
+       body,
+       button,
+       input,
+       select,
+       textarea {
+               font-size: 16px;
+               font-size: 1rem;
+               line-height: 1.5;
+       }
+
+       .entry-content blockquote.alignleft,
+       .entry-content blockquote.alignright {
+               font-size: 13px;
+               font-size: 0.8125rem;
+       }
+
+       /* Layout */
+
+       .wrap {
+               max-width: 1000px;
+               padding-left: 3em;
+               padding-right: 3em;
+       }
+
+       .has-sidebar:not(.error404) #primary {
+               float: left;
+               width: 58%;
+       }
+
+       .has-sidebar #secondary {
+               float: right;
+               padding-top: 0;
+               width: 36%;
+       }
+
+       .error404 #primary {
+               float: none;
+       }
+
+       /* Site Branding */
+
+       .site-branding {
+               margin-bottom: 0;
+       }
+
+       .has-header-image.twentyseventeen-front-page .site-branding,
+       .has-header-video.twentyseventeen-front-page .site-branding,
+       .has-header-image.home.blog .site-branding,
+       .has-header-video.home.blog .site-branding {
+               bottom: 0;
+               display: block;
+               left: 0;
+               height: auto;
+               padding-top: 0;
+               position: absolute;
+               width: 100%;
+       }
+
+       .has-header-image.twentyseventeen-front-page .custom-header,
+       .has-header-video.twentyseventeen-front-page .custom-header,
+       .has-header-image.home.blog .custom-header,
+       .has-header-video.home.blog .custom-header {
+               display: block;
+               height: auto;
+       }
+
+       .custom-header-media {
+               height: 165px;
+               position: relative;
+       }
+
+       .twentyseventeen-front-page.has-header-image .custom-header-media,
+       .twentyseventeen-front-page.has-header-video .custom-header-media,
+       .home.blog.has-header-image .custom-header-media,
+       .home.blog.has-header-video .custom-header-media {
+               height: 0;
+               position: relative;
+       }
+
+       .has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media,
+       .has-header-video:not(.twentyseventeen-front-page):not(.home) .custom-header-media {
+               bottom: 0;
+               height: auto;
+               left: 0;
+               position: absolute;
+               right: 0;
+               top: 0;
+       }
+
+       .custom-logo-link {
+               padding-right: 2em;
+       }
+
+       .custom-logo-link img,
+       body.home.title-tagline-hidden.has-header-image .custom-logo-link img,
+       body.home.title-tagline-hidden.has-header-video .custom-logo-link img {
+               max-width: 350px;
+       }
+
+       .title-tagline-hidden.home.has-header-image .custom-logo-link img,
+       .title-tagline-hidden.home.has-header-video .custom-logo-link img {
+               max-height: 200px;
+       }
+
+       .site-title {
+               font-size: 36px;
+               font-size: 2.25rem;
+       }
+
+       .site-description {
+               font-size: 16px;
+               font-size: 1rem;
+       }
+
+       /* Navigation */
+
+       .navigation-top {
+               bottom: 0;
+               font-size: 14px;
+               font-size: 0.875rem;
+               left: 0;
+               position: absolute;
+               right: 0;
+               width: 100%;
+               z-index: 3;
+       }
+
+       .navigation-top .wrap {
+               max-width: 1000px;
+               /* The font size is 14px here and we need 50px padding in ems */
+               padding: 0.75em 3.4166666666667em;
+       }
+
+       .navigation-top nav {
+               margin-left: -1.25em;
+       }
+
+       .site-navigation-fixed.navigation-top {
+               bottom: auto;
+               position: fixed;
+               left: 0;
+               right: 0;
+               top: 0;
+               width: 100%;
+               z-index: 7;
+       }
+
+       .admin-bar .site-navigation-fixed.navigation-top {
+               top: 32px;
+       }
+
+       /* Main Navigation */
+
+       .js .menu-toggle,
+       .js .dropdown-toggle {
+               display: none;
+       }
+
+       .main-navigation {
+               width: auto;
+       }
+
+       .js .main-navigation ul,
+       .js .main-navigation ul ul,
+       .js .main-navigation > div > ul {
+               display: block;
+       }
+
+       .main-navigation ul {
+               background: transparent;
+               padding: 0;
+       }
+
+       .main-navigation > div > ul {
+               border: 0;
+               margin-bottom: 0;
+               padding: 0;
+       }
+
+       .main-navigation li {
+               border: 0;
+               display: inline-block;
+       }
+
+       .main-navigation li li {
+               display: block;
+       }
+
+       .main-navigation a {
+               padding: 1em 1.25em;
+       }
+
+       .main-navigation ul ul {
+               background: #fff;
+               border: 1px solid #bbb;
+               left: -999em;
+               padding: 0;
+               position: absolute;
+               top: 100%;
+               z-index: 99999;
+       }
+
+       .main-navigation ul li.menu-item-has-children:before,
+       .main-navigation ul li.menu-item-has-children:after,
+       .main-navigation ul li.page_item_has_children:before,
+       .main-navigation ul li.page_item_has_children:after {
+               border-style: solid;
+               border-width: 0 6px 6px;
+               content: "";
+               display: none;
+               height: 0;
+               position: absolute;
+               right: 1em;
+               bottom: -1px;
+               width: 0;
+               z-index: 100000;
+       }
+
+       .main-navigation ul li.menu-item-has-children.focus:before,
+       .main-navigation ul li.menu-item-has-children:hover:before,
+       .main-navigation ul li.menu-item-has-children.focus:after,
+       .main-navigation ul li.menu-item-has-children:hover:after,
+       .main-navigation ul li.page_item_has_children.focus:before,
+       .main-navigation ul li.page_item_has_children:hover:before,
+       .main-navigation ul li.page_item_has_children.focus:after,
+       .main-navigation ul li.page_item_has_children:hover:after {
+               display: block;
+       }
+
+       .main-navigation ul li.menu-item-has-children:before,
+       .main-navigation ul li.page_item_has_children:before {
+               border-color: transparent transparent #bbb;
+               bottom: 0;
+       }
+
+       .main-navigation ul li.menu-item-has-children:after,
+       .main-navigation ul li.page_item_has_children:after {
+               border-color: transparent transparent #fff;
+       }
+
+       .main-navigation ul ul li:hover > ul,
+       .main-navigation ul ul li.focus > ul {
+               left: 100%;
+               right: auto;
+       }
+
+       .main-navigation ul ul a {
+               padding: 0.75em 1.25em;
+               width: 16em;
+       }
+
+       .main-navigation li li {
+               -webkit-transition: background-color 0.2s ease-in-out;
+               transition: background-color 0.2s ease-in-out;
+       }
+
+       .main-navigation li li:hover,
+       .main-navigation li li.focus {
+               background: #767676;
+       }
+
+       .main-navigation li li a {
+               -webkit-transition: color 0.3s ease-in-out;
+               transition: color 0.3s ease-in-out;
+       }
+
+       .main-navigation li li.focus > a,
+       .main-navigation li li:focus > a,
+       .main-navigation li li:hover > a,
+       .main-navigation li li a:hover,
+       .main-navigation li li a:focus,
+       .main-navigation li li.current_page_item a:hover,
+       .main-navigation li li.current-menu-item a:hover,
+       .main-navigation li li.current_page_item a:focus,
+       .main-navigation li li.current-menu-item a:focus {
+               color: #fff;
+       }
+
+       .main-navigation ul li:hover > ul,
+       .main-navigation ul li.focus > ul {
+               left: 0.5em;
+               right: auto;
+       }
+
+       .main-navigation .menu-item-has-children > a > .icon,
+       .main-navigation .page_item_has_children > a > .icon {
+               display: inline;
+               left: 5px;
+               position: relative;
+               top: -1px;
+       }
+
+       .main-navigation ul ul .menu-item-has-children > a > .icon,
+       .main-navigation ul ul .page_item_has_children > a > .icon {
+               margin-top: -9px;
+               left: auto;
+               position: absolute;
+               right: 1em;
+               top: 50%;
+               -webkit-transform: rotate(-90deg); /* Chrome, Safari, Opera */
+               -ms-transform: rotate(-90deg); /* IE 9 */
+               transform: rotate(-90deg);
+       }
+
+       .main-navigation ul ul ul {
+               left: -999em;
+               margin-top: -1px;
+               top: 0;
+       }
+
+       .main-navigation ul ul li.menu-item-has-children.focus:before,
+       .main-navigation ul ul li.menu-item-has-children:hover:before,
+       .main-navigation ul ul li.menu-item-has-children.focus:after,
+       .main-navigation ul ul li.menu-item-has-children:hover:after,
+       .main-navigation ul ul li.page_item_has_children.focus:before,
+       .main-navigation ul ul li.page_item_has_children:hover:before,
+       .main-navigation ul ul li.page_item_has_children.focus:after,
+       .main-navigation ul ul li.page_item_has_children:hover:after {
+               display: none;
+       }
+
+       .site-header .site-navigation-fixed .menu-scroll-down {
+               display: none;
+       }
+
+       /* Scroll down arrow */
+
+       .site-header .menu-scroll-down {
+               display: block;
+               padding: 1em;
+               position: absolute;
+               right: 0;
+       }
+
+       .site-header .menu-scroll-down .icon {
+               -webkit-transform: rotate(90deg); /* Chrome, Safari, Opera */
+               -ms-transform: rotate(90deg); /* IE 9 */
+               transform: rotate(90deg);
+       }
+
+       .site-header .menu-scroll-down {
+               color: #fff;
+               top: 2em;
+       }
+
+       .site-header .navigation-top .menu-scroll-down {
+               color: #767676;
+               top: 0.7em;
+       }
+
+       .menu-scroll-down:focus {
+               outline: thin dotted;
+       }
+
+       .menu-scroll-down .icon {
+               height: 18px;
+               width: 18px;
+       }
+
+       /* Front Page */
+
+       .twentyseventeen-front-page.has-header-image .site-branding,
+       .twentyseventeen-front-page.has-header-video .site-branding,
+       .home.blog.has-header-image .site-branding,
+       .home.blog.has-header-video .site-branding {
+               margin-bottom: 70px;
+       }
+
+       .twentyseventeen-front-page.has-header-image .custom-header-media,
+       .twentyseventeen-front-page.has-header-video .custom-header-media,
+       .home.blog.has-header-image .custom-header-media,
+       .home.blog.has-header-video .custom-header-media {
+               height: 1200px;
+               height: 100vh;
+               max-height: 100%;
+               overflow: hidden;
+       }
+
+       .twentyseventeen-front-page.has-header-image .custom-header-media:before,
+       .twentyseventeen-front-page.has-header-video .custom-header-media:before,
+       .home.blog.has-header-image .custom-header-media:before,
+       .home.blog.has-header-video .custom-header-media:before {
+               height: 33%;
+       }
+
+       .admin-bar.twentyseventeen-front-page.has-header-image .custom-header-media,
+       .admin-bar.twentyseventeen-front-page.has-header-video .custom-header-media,
+       .admin-bar.home.blog.has-header-image .custom-header-media,
+       .admin-bar.home.blog.has-header-video .custom-header-media {
+               height: calc(100vh - 32px);
+       }
+
+       .panel-content .wrap {
+               padding-bottom: 4.5em;
+               padding-top: 6em;
+       }
+
+       .panel-image {
+               height: 100vh;
+               max-height: 1200px;
+       }
+
+       /* With panel images 100% of the screen height, we're going to fix the background image where supported to create a parallax-like effect. */
+       .background-fixed .panel-image {
+               background-attachment: fixed;
+       }
+
+       .page-two-column .panel-content .entry-header {
+               float: left;
+               width: 36%;
+       }
+
+       .page-two-column .panel-content .entry-content {
+               float: right;
+               width: 58%;
+       }
+
+       /* Front Page - Recent Posts */
+
+       .page-two-column .panel-content .recent-posts {
+               clear: right;
+               float: right;
+               width: 58%;
+       }
+
+       .panel-content .recent-posts article {
+               margin-bottom: 4em;
+       }
+
+       .panel-content .recent-posts .entry-header,
+       .page-two-column #primary .panel-content .recent-posts .entry-header,
+       .panel-content .recent-posts .entry-content,
+       .page-two-column #primary .panel-content .recent-posts .entry-content {
+               float: none;
+               width: 100%;
+       }
+
+       .panel-content .recent-posts .entry-header {
+               margin-bottom: 1.5em;
+       }
+
+       .page .panel-content .recent-posts .entry-title {
+               font-size: 26px;
+               font-size: 1.625rem;
+       }
+
+       /* Posts */
+
+       .site-content {
+               padding: 5.5em 0 0;
+       }
+
+       .single-post .entry-title,
+       .page .entry-title {
+               font-size: 26px;
+               font-size: 1.625rem;
+       }
+
+       .comments-pagination,
+       .post-navigation {
+               clear: both;
+       }
+
+       .post-navigation .nav-previous {
+               float: left;
+               width: 50%;
+       }
+
+       .post-navigation .nav-next {
+               float: right;
+               text-align: right;
+               width: 50%;
+       }
+
+       .nav-next,
+       .post-navigation .nav-next {
+               margin-top: 0;
+       }
+
+       /* Blog, archive, search */
+
+       .sticky .icon-thumb-tack {
+               height: 23px;
+               left: -2.5em;
+               top: 1.5em;
+               width: 32px;
+       }
+
+       body:not(.has-sidebar):not(.page-one-column) .page-header,
+       body.has-sidebar.error404 #primary .page-header,
+       body.page-two-column:not(.archive) #primary .entry-header,
+       body.page-two-column.archive:not(.has-sidebar) #primary .page-header {
+               float: left;
+               width: 36%;
+       }
+
+       .blog:not(.has-sidebar) #primary article,
+       .archive:not(.page-one-column):not(.has-sidebar) #primary article,
+       .search:not(.has-sidebar) #primary article,
+       .error404:not(.has-sidebar) #primary .page-content,
+       .error404.has-sidebar #primary .page-content,
+       body.page-two-column:not(.archive) #primary .entry-content,
+       body.page-two-column #comments {
+               float: right;
+               width: 58%;
+       }
+
+       .blog .site-main > article,
+       .archive .site-main > article,
+       .search .site-main > article {
+               padding-bottom: 4em;
+       }
+
+       .navigation.pagination {
+               clear: both;
+               float: right;
+               width: 58%;
+       }
+
+       .has-sidebar .navigation.pagination,
+       .archive.page-one-column:not(.has-sidebar) .navigation.pagination {
+               float: none;
+               width: 100%;
+       }
+
+       .entry-footer {
+               display: table;
+               width: 100%;
+       }
+
+       .entry-footer .cat-tags-links {
+               display: table-cell;
+               vertical-align: middle;
+               width: 100%;
+       }
+
+       .entry-footer .edit-link {
+               display: table-cell;
+               text-align: right;
+               vertical-align: middle;
+       }
+
+       .entry-footer .edit-link a.post-edit-link {
+               margin-top: 0;
+               margin-left: 1em;
+       }
+
+       /* Entry content */
+
+       /* without sidebar */
+
+       :not(.has-sidebar) .entry-content blockquote.alignleft {
+               margin-left: -17.5%;
+               width: 48%;
+       }
+
+       :not(.has-sidebar) .entry-content blockquote.alignright {
+               margin-right: -17.5%;
+               width: 48%;
+       }
+
+       /* with sidebar */
+
+       .has-sidebar .entry-content blockquote.alignleft {
+               margin-left: 0;
+               width: 34%;
+       }
+
+       .has-sidebar .entry-content blockquote.alignright {
+               margin-right: 0;
+               width: 34%;
+       }
+
+       .has-sidebar #primary .entry-content blockquote.alignright.below-entry-meta {
+               margin-right: -72.5%;
+               width: 62%;
+       }
+
+       /* blog and archive */
+
+       .blog:not(.has-sidebar) .entry-content blockquote.alignleft,
+       .twentyseventeen-front-page.page-two-column .entry-content blockquote.alignleft,
+       .archive:not(.has-sidebar) .entry-content blockquote.alignleft,
+       .page-two-column .entry-content blockquote.alignleft {
+               margin-left: -72.5%;
+               width: 62%;
+       }
+
+       .blog:not(.has-sidebar) .entry-content blockquote.alignright,
+       .twentyseventeen-front-page.page-two-column .entry-content blockquote.alignright,
+       .archive:not(.has-sidebar) .entry-content blockquote.alignright,
+       .page-two-column .entry-content blockquote.alignright {
+               margin-right: 0;
+               width: 36%;
+       }
+
+       /* Post formats */
+
+       .format-quote blockquote .icon {
+               left: -1.5em;
+       }
+
+       /* Pages */
+
+       .page.page-one-column .entry-header,
+       .twentyseventeen-front-page.page-one-column .entry-header,
+       .archive.page-one-column:not(.has-sidebar) .page-header {
+               margin-bottom: 4em;
+       }
+
+       .page:not(.home) #content {
+               padding-bottom: 3.25em;
+       }
+
+       /* 404 page */
+
+       .error404 .page-content {
+               padding-bottom: 9em;
+       }
+
+       /* Comments */
+
+       #comments {
+               padding-top: 5em;
+       }
+
+       .comments-title {
+               margin-bottom: 2.5em;
+       }
+
+       ol.children .children {
+               padding-left: 2em;
+       }
+
+       /* Posts pagination */
+
+       .nav-links .nav-title {
+               position: relative;
+       }
+
+       .nav-title-icon-wrapper {
+               position: absolute;
+               text-align: center;
+               width: 2em;
+       }
+
+       .nav-links .nav-previous .nav-title .nav-title-icon-wrapper {
+               left: -2em;
+       }
+
+       .nav-links .nav-next .nav-title .nav-title-icon-wrapper {
+               right: -2em;
+       }
+
+       /* Secondary */
+
+       #secondary {
+               font-size: 14px;
+               font-size: 0.875rem;
+               line-height: 1.6;
+       }
+
+       /* Widgets */
+
+       h2.widget-title {
+               font-size: 11px;
+               font-size: 0.6875rem;
+               margin-bottom: 2em;
+       }
+
+       /* Footer */
+
+       .site-footer {
+               font-size: 14px;
+               font-size: 0.875rem;
+               line-height: 1.6;
+               margin-top: 3em;
+       }
+
+       .site-footer .widget-column.footer-widget-1 {
+               float: left;
+               width: 36%;
+       }
+
+       .site-footer .widget-column.footer-widget-2 {
+               float: right;
+               width: 58%;
+       }
+
+       .social-navigation {
+               clear: left;
+               float: left;
+               margin-bottom: 0;
+               width: 36%;
+       }
+
+       .site-info {
+               float: left;
+               padding: 0.7em 0 0;
+               width: 58%;
+       }
+
+       .social-navigation + .site-info {
+               margin-left: 6%;
+       }
+
+       .site-info .sep {
+               margin: 0 0.5em;
+               display: inline;
+               visibility: visible;
+               height: auto;
+               width: auto;
+       }
+
+       /* Gallery Columns */
+
+       .gallery-columns-5 .gallery-item {
+               max-width: 20%;
+       }
+
+       .gallery-columns-6 .gallery-item {
+               max-width: 16.66%;
+       }
+
+       .gallery-columns-7 .gallery-item {
+               max-width: 14.28%;
+       }
+
+       .gallery-columns-8 .gallery-item {
+               max-width: 12.5%;
+       }
+
+       .gallery-columns-9 .gallery-item {
+               max-width: 11.11%;
+       }
+}
+
+@media screen and ( min-width: 67em ) {
+
+       /* Layout */
+
+       /* Navigation */
+       .navigation-top .wrap {
+               padding: 0.75em 2em;
+       }
+
+       .navigation-top nav {
+               margin-left: 0;
+       }
+
+       /* Sticky posts */
+
+       .sticky .icon-thumb-tack {
+               font-size: 32px;
+               font-size: 2rem;
+               height: 22px;
+               left: -1.25em;
+               top: 0.75em;
+               width: 32px;
+       }
+
+       /* Pagination */
+
+       .page-numbers {
+               display: inline-block;
+       }
+
+       .page-numbers.current {
+               font-size: 15px;
+               font-size: 0.9375rem;
+       }
+
+       .page-numbers.current .screen-reader-text {
+               clip: rect(1px, 1px, 1px, 1px);
+               height: 1px;
+               overflow: hidden;
+               position: absolute !important;
+               width: 1px;
+       }
+
+       /* Comments */
+
+       .comment-body {
+               margin-left: 0;
+       }
+}
+
+@media screen and ( min-width: 79em ) {
+
+       .has-sidebar .entry-content blockquote.alignleft {
+               margin-left: -20%;
+       }
+
+       .blog:not(.has-sidebar) .entry-content blockquote.alignright,
+       .archive:not(.has-sidebar) .entry-content blockquote.alignright,
+       .page-two-column .entry-content blockquote.alignright,
+       .twentyseventeen-front-page .entry-content blockquote.alignright {
+               margin-right: -20%;
+       }
+}
+
+@media screen and ( max-width: 48.875em ) and ( min-width: 48em ) {
+
+       .admin-bar .site-navigation-fixed.navigation-top,
+       .admin-bar .site-navigation-hidden.navigation-top {
+               top: 46px;
+       }
+}
+
+/*--------------------------------------------------------------
+20.0 Print
+--------------------------------------------------------------*/
+
+@media print {
+
+       /* Hide elements */
+
+       form,
+       button,
+       input,
+       select,
+       textarea,
+       .navigation-top,
+       .social-navigation,
+       #secondary,
+       .content-bottom-widgets,
+       .header-image,
+       .panel-image-prop,
+       .icon-thumb-tack,
+       .page-links,
+       .edit-link,
+       .post-navigation,
+       .pagination.navigation,
+       .comments-pagination,
+       .comment-respond,
+       .comment-edit-link,
+       .comment-reply-link,
+       .comment-metadata .edit-link,
+       .pingback .edit-link,
+       .site-footer aside.widget-area,
+       .site-info {
+               display: none !important;
+       }
+
+       .entry-footer,
+       #comments,
+       .site-footer,
+       .single-featured-image-header {
+               border: 0;
+       }
+
+       /* Font sizes */
+
+       body {
+               font-size: 12pt;
+       }
+
+       h1 {
+               font-size: 24pt;
+       }
+
+       h2 {
+               font-size: 22pt;
+       }
+
+       h3 {
+               font-size: 17pt;
+       }
+
+       h4 {
+               font-size: 12pt;
+       }
+
+       h5 {
+               font-size: 11pt;
+       }
+
+       h6 {
+               font-size: 12pt;
+       }
+
+       .page .panel-content .entry-title,
+       .page-title,
+       body.page:not(.twentyseventeen-front-page) .entry-title {
+               font-size: 10pt;
+       }
+
+       /* Layout */
+
+       .wrap {
+               padding-left: 5% !important;
+               padding-right: 5% !important;
+               max-width: none;
+       }
+
+       /* Site Branding */
+
+       .site-header {
+               background: transparent;
+               padding: 0;
+       }
+
+       .custom-header-media {
+               padding: 0;
+       }
+
+       .twentyseventeen-front-page.has-header-image .site-branding,
+       .twentyseventeen-front-page.has-header-video .site-branding,
+       .home.blog.has-header-image .site-branding,
+       .home.blog.has-header-video .site-branding {
+               position: relative;
+       }
+
+       .site-branding {
+               margin-top: 0;
+               margin-bottom: 1.75em !important; /* override styles added by JavaScript */
+       }
+
+       .site-title {
+               font-size: 25pt;
+       }
+
+       .site-description {
+               font-size: 12pt;
+               opacity: 1;
+       }
+
+       /* Posts */
+
+       .single-featured-image-header {
+               background: transparent;
+       }
+
+       .entry-meta {
+               font-size: 9pt;
+       }
+
+       /* Colors */
+
+       body,
+       .site {
+               background: none !important; /* Brute force since user agents all print differently. */
+       }
+
+       body,
+       a,
+       .site-title a,
+       .twentyseventeen-front-page.has-header-image .site-title,
+       .twentyseventeen-front-page.has-header-video .site-title,
+       .twentyseventeen-front-page.has-header-image .site-title a,
+       .twentyseventeen-front-page.has-header-video .site-title a {
+               color: #222 !important; /* Make sure color schemes don't affect to print */
+       }
+
+       h2,
+       h5,
+       blockquote,
+       .site-description,
+       .twentyseventeen-front-page.has-header-image .site-description,
+       .twentyseventeen-front-page.has-header-video .site-description,
+       .entry-meta,
+       .entry-meta a {
+               color: #777 !important; /* Make sure color schemes don't affect to print */
+       }
+
+       .entry-content blockquote.alignleft,
+       .entry-content blockquote.alignright {
+               font-size: 11pt;
+               width: 34%;
+       }
+
+       .site-footer {
+               padding: 0;
+       }
+}
diff --git a/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php b/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php
new file mode 100644 (file)
index 0000000..ed6bb59
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Displays footer widgets if assigned
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+
+<?php
+if ( is_active_sidebar( 'sidebar-2' ) ||
+        is_active_sidebar( 'sidebar-3' ) ) :
+?>
+
+       <aside class="widget-area" role="complementary">
+               <?php
+               if ( is_active_sidebar( 'sidebar-2' ) ) { ?>
+                       <div class="widget-column footer-widget-1">
+                               <?php dynamic_sidebar( 'sidebar-2' ); ?>
+                       </div>
+               <?php }
+               if ( is_active_sidebar( 'sidebar-3' ) ) { ?>
+                       <div class="widget-column footer-widget-2">
+                               <?php dynamic_sidebar( 'sidebar-3' ); ?>
+                       </div>
+               <?php } ?>
+       </aside><!-- .widget-area -->
+
+<?php endif; ?>
diff --git a/wp-content/themes/twentyseventeen/template-parts/footer/site-info.php b/wp-content/themes/twentyseventeen/template-parts/footer/site-info.php
new file mode 100644 (file)
index 0000000..8455dc4
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Displays footer site info
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+<div class="site-info">
+       <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyseventeen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' ); ?></a>
+</div><!-- .site-info -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/header/header-image.php b/wp-content/themes/twentyseventeen/template-parts/header/header-image.php
new file mode 100644 (file)
index 0000000..6398b22
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Displays header media
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+<div class="custom-header">
+
+       <div class="custom-header-media">
+               <?php the_custom_header_markup(); ?>
+       </div>
+
+       <?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
+
+</div><!-- .custom-header -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php b/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php
new file mode 100644 (file)
index 0000000..a863938
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Displays header site branding
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+<div class="site-branding">
+       <div class="wrap">
+
+               <?php the_custom_logo(); ?>
+
+               <div class="site-branding-text">
+                       <?php if ( is_front_page() ) : ?>
+                               <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
+                       <?php else : ?>
+                               <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
+                       <?php endif; ?>
+
+                       <?php $description = get_bloginfo( 'description', 'display' );
+                               if ( $description || is_customize_preview() ) : ?>
+                                       <p class="site-description"><?php echo $description; ?></p>
+                               <?php endif; ?>
+               </div><!-- .site-branding-text -->
+
+               <?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && ! has_nav_menu( 'top' ) ) : ?>
+               <a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text"><?php _e( 'Scroll down to content', 'twentyseventeen' ); ?></span></a>
+       <?php endif; ?>
+
+       </div><!-- .wrap -->
+</div><!-- .site-branding -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/navigation/navigation-top.php b/wp-content/themes/twentyseventeen/template-parts/navigation/navigation-top.php
new file mode 100644 (file)
index 0000000..3a8837f
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Displays top navigation
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php _e( 'Top Menu', 'twentyseventeen' ); ?>">
+       <button class="menu-toggle" aria-controls="top-menu" aria-expanded="false"><?php echo twentyseventeen_get_svg( array( 'icon' => 'bars' ) ); echo twentyseventeen_get_svg( array( 'icon' => 'close' ) ); _e( 'Menu', 'twentyseventeen' ); ?></button>
+       <?php wp_nav_menu( array(
+               'theme_location' => 'top',
+               'menu_id'        => 'top-menu',
+       ) ); ?>
+
+       <?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && has_custom_header() ) : ?>
+               <a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text"><?php _e( 'Scroll down to content', 'twentyseventeen' ); ?></span></a>
+       <?php endif; ?>
+</nav><!-- #site-navigation -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php b/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php
new file mode 100644 (file)
index 0000000..79e1194
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Template part for displaying pages on front page
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+global $twentyseventeencounter;
+
+?>
+
+<article id="panel<?php echo $twentyseventeencounter; ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> >
+
+       <?php if ( has_post_thumbnail() ) :
+               $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
+
+               // Calculate aspect ratio: h / w * 100%.
+               $ratio = $thumbnail[2] / $thumbnail[1] * 100;
+               ?>
+
+               <div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);">
+                       <div class="panel-image-prop" style="padding-top: <?php echo esc_attr( $ratio ); ?>%"></div>
+               </div><!-- .panel-image -->
+
+       <?php endif; ?>
+
+       <div class="panel-content">
+               <div class="wrap">
+                       <header class="entry-header">
+                               <?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
+
+                               <?php twentyseventeen_edit_link( get_the_ID() ); ?>
+
+                       </header><!-- .entry-header -->
+
+                       <div class="entry-content">
+                               <?php
+                                       /* translators: %s: Name of current post */
+                                       the_content( sprintf(
+                                               __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
+                                               get_the_title()
+                                       ) );
+                               ?>
+                       </div><!-- .entry-content -->
+
+                       <?php
+                       // Show recent blog posts if is blog posts page (Note that get_option returns a string, so we're casting the result as an int).
+                       if ( get_the_ID() === (int) get_option( 'page_for_posts' )  ) : ?>
+
+                               <?php // Show four most recent posts.
+                               $recent_posts = new WP_Query( array(
+                                       'posts_per_page'      => 3,
+                                       'post_status'         => 'publish',
+                                       'ignore_sticky_posts' => true,
+                                       'no_found_rows'       => true,
+                               ) );
+                               ?>
+
+                               <?php if ( $recent_posts->have_posts() ) : ?>
+
+                                       <div class="recent-posts">
+
+                                               <?php
+                                               while ( $recent_posts->have_posts() ) : $recent_posts->the_post();
+                                                       get_template_part( 'template-parts/post/content', 'excerpt' );
+                                               endwhile;
+                                               wp_reset_postdata();
+                                               ?>
+                                       </div><!-- .recent-posts -->
+                               <?php endif; ?>
+                       <?php endif; ?>
+
+               </div><!-- .wrap -->
+       </div><!-- .panel-content -->
+
+</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php b/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php
new file mode 100644 (file)
index 0000000..38fa0f7
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Displays content for front page
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+<article id="post-<?php the_ID(); ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> >
+
+       <?php if ( has_post_thumbnail() ) :
+               $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
+
+               $post_thumbnail_id = get_post_thumbnail_id( $post->ID );
+
+               $thumbnail_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
+
+               // Calculate aspect ratio: h / w * 100%.
+               $ratio = $thumbnail_attributes[2] / $thumbnail_attributes[1] * 100;
+               ?>
+
+               <div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);">
+                       <div class="panel-image-prop" style="padding-top: <?php echo esc_attr( $ratio ); ?>%"></div>
+               </div><!-- .panel-image -->
+
+       <?php endif; ?>
+
+       <div class="panel-content">
+               <div class="wrap">
+                       <header class="entry-header">
+                               <?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
+
+                               <?php twentyseventeen_edit_link( get_the_ID() ); ?>
+
+                       </header><!-- .entry-header -->
+
+                       <div class="entry-content">
+                               <?php
+                                       /* translators: %s: Name of current post */
+                                       the_content( sprintf(
+                                               __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
+                                               get_the_title()
+                                       ) );
+                               ?>
+                       </div><!-- .entry-content -->
+
+               </div><!-- .wrap -->
+       </div><!-- .panel-content -->
+
+</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/page/content-page.php b/wp-content/themes/twentyseventeen/template-parts/page/content-page.php
new file mode 100644 (file)
index 0000000..4c470ac
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Template part for displaying page content in page.php
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+
+<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+       <header class="entry-header">
+               <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
+               <?php twentyseventeen_edit_link( get_the_ID() ); ?>
+       </header><!-- .entry-header -->
+       <div class="entry-content">
+               <?php
+                       the_content();
+
+                       wp_link_pages( array(
+                               'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
+                               'after'  => '</div>',
+                       ) );
+               ?>
+       </div><!-- .entry-content -->
+</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php b/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php
new file mode 100644 (file)
index 0000000..19c79ac
--- /dev/null
@@ -0,0 +1,99 @@
+<?php
+/**
+ * Template part for displaying audio posts
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+
+<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+       <?php
+               if ( is_sticky() && is_home() ) :
+                       echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
+               endif;
+       ?>
+       <header class="entry-header">
+               <?php
+                       if ( 'post' === get_post_type() ) :
+                               echo '<div class="entry-meta">';
+                                       if ( is_single() ) :
+                                               twentyseventeen_posted_on();
+                                       else :
+                                               echo twentyseventeen_time_link();
+                                               twentyseventeen_edit_link();
+                                       endif;
+                               echo '</div><!-- .entry-meta -->';
+                       endif;
+
+                       if ( is_single() ) {
+                               the_title( '<h1 class="entry-title">', '</h1>' );
+                       } else {
+                               the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
+                       }
+               ?>
+       </header><!-- .entry-header -->
+
+       <?php
+               $content = apply_filters( 'the_content', get_the_content() );
+               $audio = false;
+
+               // Only get audio from the content if a playlist isn't present.
+               if ( false === strpos( $content, 'wp-playlist-script' ) ) {
+                       $audio = get_media_embedded_in_content( $content, array( 'audio' ) );
+               }
+
+       ?>
+
+       <?php if ( '' !== get_the_post_thumbnail() && ! is_single() ) : ?>
+               <div class="post-thumbnail">
+                       <a href="<?php the_permalink(); ?>">
+                               <?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?>
+                       </a>
+               </div><!-- .post-thumbnail -->
+       <?php endif; ?>
+
+       <div class="entry-content">
+
+               <?php if ( ! is_single() ) :
+
+                       // If not a single post, highlight the audio file.
+                       if ( ! empty( $audio ) ) :
+                               foreach ( $audio as $audio_html ) {
+                                       echo '<div class="entry-audio">';
+                                               echo $audio_html;
+                                       echo '</div><!-- .entry-audio -->';
+                               }
+                       endif;
+
+               endif;
+
+               if ( is_single() || empty( $audio ) ) :
+
+                       /* translators: %s: Name of current post */
+                       the_content( sprintf(
+                               __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
+                               get_the_title()
+                       ) );
+
+                       wp_link_pages( array(
+                               'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
+                               'after'       => '</div>',
+                               'link_before' => '<span class="page-number">',
+                               'link_after'  => '</span>',
+                       ) );
+
+               endif; ?>
+
+       </div><!-- .entry-content -->
+
+       <?php if ( is_single() ) : ?>
+               <?php twentyseventeen_entry_footer(); ?>
+       <?php endif; ?>
+
+</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php b/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php
new file mode 100644 (file)
index 0000000..0b342d2
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Template part for displaying posts with excerpts
+ *
+ * Used in Search Results and for Recent Posts in Front Page panels.
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+
+<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+
+       <header class="entry-header">
+               <?php if ( 'post' === get_post_type() ) : ?>
+                       <div class="entry-meta">
+                               <?php
+                                       echo twentyseventeen_time_link();
+                                       twentyseventeen_edit_link();
+                               ?>
+                       </div><!-- .entry-meta -->
+               <?php elseif ( 'page' === get_post_type() && get_edit_post_link() ) : ?>
+                       <div class="entry-meta">
+                               <?php twentyseventeen_edit_link(); ?>
+                       </div><!-- .entry-meta -->
+               <?php endif; ?>
+
+               <?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
+       </header><!-- .entry-header -->
+
+       <div class="entry-summary">
+               <?php the_excerpt(); ?>
+       </div><!-- .entry-summary -->
+
+</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php b/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php
new file mode 100644 (file)
index 0000000..7f4a643
--- /dev/null
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Template part for displaying gallery posts
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+?>
+
+<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+       <?php
+               if ( is_sticky() && is_home() ) :
+                       echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
+               endif;
+       ?>
+       <header class="entry-header">
+               <?php
+                       if ( 'post' === get_post_type() ) :
+                               echo '<div class="entry-meta">';
+                                       if ( is_single() ) :
+                                               twentyseventeen_posted_on();
+                                       else :
+                                               echo twentyseventeen_time_link();
+                                               twentyseventeen_edit_link();
+                                       endif;
+                               echo '</div><!-- .entry-meta -->';
+                       endif;
+
+                       if ( is_single() ) {
+                               the_title( '<h1 class="entry-title">', '</h1>' );
+                       } else {
+                               the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
+                       }
+               ?>
+       </header><!-- .entry-header -->
+
+       <?php if ( '' !== get_the_post_thumbnail() && ! is_single() && ! get_post_gallery() ) : ?>
+               <div class="post-thumbnail">
+                       <a href="<?php the_permalink(); ?>">
+                               <?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?>
+                       </a>
+               </div><!-- .post-thumbnail -->
+       <?php endif; ?>
+
+       <div class="entry-content">
+
+               <?php if ( ! is_single() ) :
+
+                       // If not a single post, highlight the gallery.
+                       if ( get_post_gallery() ) :
+                               echo '<div class="entry-gallery">';
+                                       echo get_post_gallery();
+                               echo '</div>';
+                       endif;
+
+               endif;
+
+               if ( is_single() || ! get_post_gallery() ) :
+
+                       /* translators: %s: Name of current post */
+                       the_content( sprintf(
+                               __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
+                               get_the_title()
+                       ) );
+
+                       wp_link_pages( array(
+                               'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
+                               'after'       => '</div>',
+                               'link_before' => '<span class="page-number">',
+                               'link_after'  => '</span>',
+                       ) );
+
+               endif; ?>
+
+       </div><!-- .entry-content -->
+
+       <?php if ( is_single() ) : ?>
+               <?php twentyseventeen_entry_footer(); ?>
+       <?php endif; ?>
+
+</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-image.php b/wp-content/themes/twentyseventeen/template-parts/post/content-image.php
new file mode 100644 (file)
index 0000000..f40e1e6
--- /dev/null
@@ -0,0 +1,75 @@
+<?php
+/**
+ * Template part for displaying image posts
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+?>
+
+<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+       <?php
+               if ( is_sticky() && is_home() ) :
+                       echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
+               endif;
+       ?>
+       <header class="entry-header">
+               <?php
+                       if ( 'post' === get_post_type() ) :
+                               echo '<div class="entry-meta">';
+                                       if ( is_single() ) :
+                                               twentyseventeen_posted_on();
+                                       else :
+                                               echo twentyseventeen_time_link();
+                                               twentyseventeen_edit_link();
+                                       endif;
+                               echo '</div><!-- .entry-meta -->';
+                       endif;
+
+                       if ( is_single() ) {
+                               the_title( '<h1 class="entry-title">', '</h1>' );
+                       } else {
+                               the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
+                       }
+               ?>
+       </header><!-- .entry-header -->
+
+       <?php if ( '' !== get_the_post_thumbnail() && ! is_single() ) : ?>
+               <div class="post-thumbnail">
+                       <a href="<?php the_permalink(); ?>">
+                               <?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?>
+                       </a>
+               </div><!-- .post-thumbnail -->
+       <?php endif; ?>
+
+       <div class="entry-content">
+
+               <?php if ( is_single() || '' === get_the_post_thumbnail() ) :
+
+                       // Only show content if is a single post, or if there's no featured image.
+                       /* translators: %s: Name of current post */
+                       the_content( sprintf(
+                               __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
+                               get_the_title()
+                       ) );
+
+                       wp_link_pages( array(
+                               'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
+                               'after'       => '</div>',
+                               'link_before' => '<span class="page-number">',
+                               'link_after'  => '</span>',
+                       ) );
+
+               endif; ?>
+
+       </div><!-- .entry-content -->
+
+       <?php if ( is_single() ) : ?>
+               <?php twentyseventeen_entry_footer(); ?>
+       <?php endif; ?>
+
+</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-none.php b/wp-content/themes/twentyseventeen/template-parts/post/content-none.php
new file mode 100644 (file)
index 0000000..c42941b
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Template part for displaying a message that posts cannot be found
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+
+<section class="no-results not-found">
+       <header class="page-header">
+               <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyseventeen' ); ?></h1>
+       </header>
+       <div class="page-content">
+               <?php
+               if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
+
+                       <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyseventeen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
+
+               <?php else : ?>
+
+                       <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyseventeen' ); ?></p>
+                       <?php
+                               get_search_form();
+
+               endif; ?>
+       </div><!-- .page-content -->
+</section><!-- .no-results -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-video.php b/wp-content/themes/twentyseventeen/template-parts/post/content-video.php
new file mode 100644 (file)
index 0000000..cfa3755
--- /dev/null
@@ -0,0 +1,97 @@
+<?php
+/**
+ * Template part for displaying video posts
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+?>
+
+<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+       <?php
+               if ( is_sticky() && is_home() ) :
+                       echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
+               endif;
+       ?>
+       <header class="entry-header">
+               <?php
+                       if ( 'post' === get_post_type() ) :
+                               echo '<div class="entry-meta">';
+                                       if ( is_single() ) :
+                                               twentyseventeen_posted_on();
+                                       else :
+                                               echo twentyseventeen_time_link();
+                                               twentyseventeen_edit_link();
+                                       endif;
+                               echo '</div><!-- .entry-meta -->';
+                       endif;
+
+                       if ( is_single() ) {
+                               the_title( '<h1 class="entry-title">', '</h1>' );
+                       } else {
+                               the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
+                       }
+               ?>
+       </header><!-- .entry-header -->
+
+       <?php
+               $content = apply_filters( 'the_content', get_the_content() );
+               $video = false;
+
+               // Only get video from the content if a playlist isn't present.
+               if ( false === strpos( $content, 'wp-playlist-script' ) ) {
+                       $video = get_media_embedded_in_content( $content, array( 'video', 'object', 'embed', 'iframe' ) );
+               }
+       ?>
+
+       <?php if ( '' !== get_the_post_thumbnail() && ! is_single() && empty( $video ) ) : ?>
+               <div class="post-thumbnail">
+                       <a href="<?php the_permalink(); ?>">
+                               <?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?>
+                       </a>
+               </div><!-- .post-thumbnail -->
+       <?php endif; ?>
+
+       <div class="entry-content">
+
+               <?php if ( ! is_single() ) :
+
+                       // If not a single post, highlight the video file.
+                       if ( ! empty( $video ) ) :
+                               foreach ( $video as $video_html ) {
+                                       echo '<div class="entry-video">';
+                                               echo $video_html;
+                                       echo '</div>';
+                               }
+                       endif;
+
+               endif;
+
+               if ( is_single() || empty( $video ) ) :
+
+                       /* translators: %s: Name of current post */
+                       the_content( sprintf(
+                               __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
+                               get_the_title()
+                       ) );
+
+                       wp_link_pages( array(
+                               'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
+                               'after'       => '</div>',
+                               'link_before' => '<span class="page-number">',
+                               'link_after'  => '</span>',
+                       ) );
+
+               endif; ?>
+
+       </div><!-- .entry-content -->
+
+       <?php if ( is_single() ) : ?>
+               <?php twentyseventeen_entry_footer(); ?>
+       <?php endif; ?>
+
+</article><!-- #post-## -->
diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content.php b/wp-content/themes/twentyseventeen/template-parts/post/content.php
new file mode 100644 (file)
index 0000000..7eeaa20
--- /dev/null
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Template part for displaying posts
+ *
+ * @link https://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty_Seventeen
+ * @since 1.0
+ * @version 1.0
+ */
+
+?>
+
+<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+       <?php
+               if ( is_sticky() && is_home() ) :
+                       echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
+               endif;
+       ?>
+       <header class="entry-header">
+               <?php
+                       if ( 'post' === get_post_type() ) :
+                               echo '<div class="entry-meta">';
+                                       if ( is_single() ) :
+                                               twentyseventeen_posted_on();
+                                       else :
+                                               echo twentyseventeen_time_link();
+                                               twentyseventeen_edit_link();
+                                       endif;
+                               echo '</div><!-- .entry-meta -->';
+                       endif;
+
+                       if ( is_single() ) {
+                               the_title( '<h1 class="entry-title">', '</h1>' );
+                       } else {
+                               the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
+                       }
+               ?>
+       </header><!-- .entry-header -->
+
+       <?php if ( '' !== get_the_post_thumbnail() && ! is_single() ) : ?>
+               <div class="post-thumbnail">
+                       <a href="<?php the_permalink(); ?>">
+                               <?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?>
+                       </a>
+               </div><!-- .post-thumbnail -->
+       <?php endif; ?>
+
+       <div class="entry-content">
+               <?php
+                       /* translators: %s: Name of current post */
+                       the_content( sprintf(
+                               __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
+                               get_the_title()
+                       ) );
+
+                       wp_link_pages( array(
+                               'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
+                               'after'       => '</div>',
+                               'link_before' => '<span class="page-number">',
+                               'link_after'  => '</span>',
+                       ) );
+               ?>
+       </div><!-- .entry-content -->
+
+       <?php if ( is_single() ) : ?>
+               <?php twentyseventeen_entry_footer(); ?>
+       <?php endif; ?>
+
+</article><!-- #post-## -->
diff --git a/wp-includes/IXR/class-IXR-base64.php b/wp-includes/IXR/class-IXR-base64.php
new file mode 100644 (file)
index 0000000..910f81b
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * IXR_Base64
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+class IXR_Base64
+{
+    var $data;
+
+       /**
+        * PHP5 constructor.
+        */
+    function __construct( $data )
+    {
+        $this->data = $data;
+    }
+
+       /**
+        * PHP4 constructor.
+        */
+       public function IXR_Base64( $data ) {
+               self::__construct( $data );
+       }
+
+    function getXml()
+    {
+        return '<base64>'.base64_encode($this->data).'</base64>';
+    }
+}
diff --git a/wp-includes/IXR/class-IXR-client.php b/wp-includes/IXR/class-IXR-client.php
new file mode 100644 (file)
index 0000000..f66bcb3
--- /dev/null
@@ -0,0 +1,166 @@
+<?php
+
+/**
+ * IXR_Client
+ *
+ * @package IXR
+ * @since 1.5.0
+ *
+ */
+class IXR_Client
+{
+    var $server;
+    var $port;
+    var $path;
+    var $useragent;
+    var $response;
+    var $message = false;
+    var $debug = false;
+    var $timeout;
+    var $headers = array();
+
+    // Storage place for an error message
+    var $error = false;
+
+       /**
+        * PHP5 constructor.
+        */
+    function __construct( $server, $path = false, $port = 80, $timeout = 15 )
+    {
+        if (!$path) {
+            // Assume we have been given a URL instead
+            $bits = parse_url($server);
+            $this->server = $bits['host'];
+            $this->port = isset($bits['port']) ? $bits['port'] : 80;
+            $this->path = isset($bits['path']) ? $bits['path'] : '/';
+
+            // Make absolutely sure we have a path
+            if (!$this->path) {
+                $this->path = '/';
+            }
+
+            if ( ! empty( $bits['query'] ) ) {
+                $this->path .= '?' . $bits['query'];
+            }
+        } else {
+            $this->server = $server;
+            $this->path = $path;
+            $this->port = $port;
+        }
+        $this->useragent = 'The Incutio XML-RPC PHP Library';
+        $this->timeout = $timeout;
+    }
+
+       /**
+        * PHP4 constructor.
+        */
+       public function IXR_Client( $server, $path = false, $port = 80, $timeout = 15 ) {
+               self::__construct( $server, $path, $port, $timeout );
+       }
+
+    function query()
+    {
+        $args = func_get_args();
+        $method = array_shift($args);
+        $request = new IXR_Request($method, $args);
+        $length = $request->getLength();
+        $xml = $request->getXml();
+        $r = "\r\n";
+        $request  = "POST {$this->path} HTTP/1.0$r";
+
+        // Merged from WP #8145 - allow custom headers
+        $this->headers['Host']          = $this->server;
+        $this->headers['Content-Type']  = 'text/xml';
+        $this->headers['User-Agent']    = $this->useragent;
+        $this->headers['Content-Length']= $length;
+
+        foreach( $this->headers as $header => $value ) {
+            $request .= "{$header}: {$value}{$r}";
+        }
+        $request .= $r;
+
+        $request .= $xml;
+
+        // Now send the request
+        if ($this->debug) {
+            echo '<pre class="ixr_request">'.htmlspecialchars($request)."\n</pre>\n\n";
+        }
+
+        if ($this->timeout) {
+            $fp = @fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout);
+        } else {
+            $fp = @fsockopen($this->server, $this->port, $errno, $errstr);
+        }
+        if (!$fp) {
+            $this->error = new IXR_Error(-32300, 'transport error - could not open socket');
+            return false;
+        }
+        fputs($fp, $request);
+        $contents = '';
+        $debugContents = '';
+        $gotFirstLine = false;
+        $gettingHeaders = true;
+        while (!feof($fp)) {
+            $line = fgets($fp, 4096);
+            if (!$gotFirstLine) {
+                // Check line for '200'
+                if (strstr($line, '200') === false) {
+                    $this->error = new IXR_Error(-32300, 'transport error - HTTP status code was not 200');
+                    return false;
+                }
+                $gotFirstLine = true;
+            }
+            if (trim($line) == '') {
+                $gettingHeaders = false;
+            }
+            if (!$gettingHeaders) {
+               // merged from WP #12559 - remove trim
+                $contents .= $line;
+            }
+            if ($this->debug) {
+               $debugContents .= $line;
+            }
+        }
+        if ($this->debug) {
+            echo '<pre class="ixr_response">'.htmlspecialchars($debugContents)."\n</pre>\n\n";
+        }
+
+        // Now parse what we've got back
+        $this->message = new IXR_Message($contents);
+        if (!$this->message->parse()) {
+            // XML error
+            $this->error = new IXR_Error(-32700, 'parse error. not well formed');
+            return false;
+        }
+
+        // Is the message a fault?
+        if ($this->message->messageType == 'fault') {
+            $this->error = new IXR_Error($this->message->faultCode, $this->message->faultString);
+            return false;
+        }
+
+        // Message must be OK
+        return true;
+    }
+
+    function getResponse()
+    {
+        // methodResponses can only have one param - return that
+        return $this->message->params[0];
+    }
+
+    function isError()
+    {
+        return (is_object($this->error));
+    }
+
+    function getErrorCode()
+    {
+        return $this->error->code;
+    }
+
+    function getErrorMessage()
+    {
+        return $this->error->message;
+    }
+}
diff --git a/wp-includes/IXR/class-IXR-clientmulticall.php b/wp-includes/IXR/class-IXR-clientmulticall.php
new file mode 100644 (file)
index 0000000..bc40efd
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+/**
+ * IXR_ClientMulticall
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+class IXR_ClientMulticall extends IXR_Client
+{
+    var $calls = array();
+
+       /**
+        * PHP5 constructor.
+        */
+    function __construct( $server, $path = false, $port = 80 )
+    {
+        parent::IXR_Client($server, $path, $port);
+        $this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)';
+    }
+
+       /**
+        * PHP4 constructor.
+        */
+       public function IXR_ClientMulticall( $server, $path = false, $port = 80 ) {
+               self::__construct( $server, $path, $port );
+       }
+
+    function addCall()
+    {
+        $args = func_get_args();
+        $methodName = array_shift($args);
+        $struct = array(
+            'methodName' => $methodName,
+            'params' => $args
+        );
+        $this->calls[] = $struct;
+    }
+
+    function query()
+    {
+        // Prepare multicall, then call the parent::query() method
+        return parent::query('system.multicall', $this->calls);
+    }
+}
diff --git a/wp-includes/IXR/class-IXR-date.php b/wp-includes/IXR/class-IXR-date.php
new file mode 100644 (file)
index 0000000..7304f60
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+
+/**
+ * IXR_Date
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+class IXR_Date {
+    var $year;
+    var $month;
+    var $day;
+    var $hour;
+    var $minute;
+    var $second;
+    var $timezone;
+
+       /**
+        * PHP5 constructor.
+        */
+    function __construct( $time )
+    {
+        // $time can be a PHP timestamp or an ISO one
+        if (is_numeric($time)) {
+            $this->parseTimestamp($time);
+        } else {
+            $this->parseIso($time);
+        }
+    }
+
+       /**
+        * PHP4 constructor.
+        */
+       public function IXR_Date( $time ) {
+               self::__construct( $time );
+       }
+
+    function parseTimestamp($timestamp)
+    {
+        $this->year = date('Y', $timestamp);
+        $this->month = date('m', $timestamp);
+        $this->day = date('d', $timestamp);
+        $this->hour = date('H', $timestamp);
+        $this->minute = date('i', $timestamp);
+        $this->second = date('s', $timestamp);
+        $this->timezone = '';
+    }
+
+    function parseIso($iso)
+    {
+        $this->year = substr($iso, 0, 4);
+        $this->month = substr($iso, 4, 2);
+        $this->day = substr($iso, 6, 2);
+        $this->hour = substr($iso, 9, 2);
+        $this->minute = substr($iso, 12, 2);
+        $this->second = substr($iso, 15, 2);
+        $this->timezone = substr($iso, 17);
+    }
+
+    function getIso()
+    {
+        return $this->year.$this->month.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second.$this->timezone;
+    }
+
+    function getXml()
+    {
+        return '<dateTime.iso8601>'.$this->getIso().'</dateTime.iso8601>';
+    }
+
+    function getTimestamp()
+    {
+        return mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year);
+    }
+}
diff --git a/wp-includes/IXR/class-IXR-error.php b/wp-includes/IXR/class-IXR-error.php
new file mode 100644 (file)
index 0000000..660f7d1
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+
+/**
+ * IXR_Error
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+class IXR_Error
+{
+    var $code;
+    var $message;
+
+       /**
+        * PHP5 constructor.
+        */
+    function __construct( $code, $message )
+    {
+        $this->code = $code;
+        $this->message = htmlspecialchars($message);
+    }
+
+       /**
+        * PHP4 constructor.
+        */
+       public function IXR_Error( $code, $message ) {
+               self::__construct( $code, $message );
+       }
+
+    function getXml()
+    {
+        $xml = <<<EOD
+<methodResponse>
+  <fault>
+    <value>
+      <struct>
+        <member>
+          <name>faultCode</name>
+          <value><int>{$this->code}</int></value>
+        </member>
+        <member>
+          <name>faultString</name>
+          <value><string>{$this->message}</string></value>
+        </member>
+      </struct>
+    </value>
+  </fault>
+</methodResponse>
+
+EOD;
+        return $xml;
+    }
+}
diff --git a/wp-includes/IXR/class-IXR-introspectionserver.php b/wp-includes/IXR/class-IXR-introspectionserver.php
new file mode 100644 (file)
index 0000000..5628d81
--- /dev/null
@@ -0,0 +1,174 @@
+<?php
+
+/**
+ * IXR_IntrospectionServer
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+class IXR_IntrospectionServer extends IXR_Server
+{
+    var $signatures;
+    var $help;
+
+       /**
+        * PHP5 constructor.
+        */
+    function __construct()
+    {
+        $this->setCallbacks();
+        $this->setCapabilities();
+        $this->capabilities['introspection'] = array(
+            'specUrl' => 'http://xmlrpc.usefulinc.com/doc/reserved.html',
+            'specVersion' => 1
+        );
+        $this->addCallback(
+            'system.methodSignature',
+            'this:methodSignature',
+            array('array', 'string'),
+            'Returns an array describing the return type and required parameters of a method'
+        );
+        $this->addCallback(
+            'system.getCapabilities',
+            'this:getCapabilities',
+            array('struct'),
+            'Returns a struct describing the XML-RPC specifications supported by this server'
+        );
+        $this->addCallback(
+            'system.listMethods',
+            'this:listMethods',
+            array('array'),
+            'Returns an array of available methods on this server'
+        );
+        $this->addCallback(
+            'system.methodHelp',
+            'this:methodHelp',
+            array('string', 'string'),
+            'Returns a documentation string for the specified method'
+        );
+    }
+
+       /**
+        * PHP4 constructor.
+        */
+       public function IXR_IntrospectionServer() {
+               self::__construct();
+       }
+
+    function addCallback($method, $callback, $args, $help)
+    {
+        $this->callbacks[$method] = $callback;
+        $this->signatures[$method] = $args;
+        $this->help[$method] = $help;
+    }
+
+    function call($methodname, $args)
+    {
+        // Make sure it's in an array
+        if ($args && !is_array($args)) {
+            $args = array($args);
+        }
+
+        // Over-rides default call method, adds signature check
+        if (!$this->hasMethod($methodname)) {
+            return new IXR_Error(-32601, 'server error. requested method "'.$this->message->methodName.'" not specified.');
+        }
+        $method = $this->callbacks[$methodname];
+        $signature = $this->signatures[$methodname];
+        $returnType = array_shift($signature);
+
+        // Check the number of arguments
+        if (count($args) != count($signature)) {
+            return new IXR_Error(-32602, 'server error. wrong number of method parameters');
+        }
+
+        // Check the argument types
+        $ok = true;
+        $argsbackup = $args;
+        for ($i = 0, $j = count($args); $i < $j; $i++) {
+            $arg = array_shift($args);
+            $type = array_shift($signature);
+            switch ($type) {
+                case 'int':
+                case 'i4':
+                    if (is_array($arg) || !is_int($arg)) {
+                        $ok = false;
+                    }
+                    break;
+                case 'base64':
+                case 'string':
+                    if (!is_string($arg)) {
+                        $ok = false;
+                    }
+                    break;
+                case 'boolean':
+                    if ($arg !== false && $arg !== true) {
+                        $ok = false;
+                    }
+                    break;
+                case 'float':
+                case 'double':
+                    if (!is_float($arg)) {
+                        $ok = false;
+                    }
+                    break;
+                case 'date':
+                case 'dateTime.iso8601':
+                    if (!is_a($arg, 'IXR_Date')) {
+                        $ok = false;
+                    }
+                    break;
+            }
+            if (!$ok) {
+                return new IXR_Error(-32602, 'server error. invalid method parameters');
+            }
+        }
+        // It passed the test - run the "real" method call
+        return parent::call($methodname, $argsbackup);
+    }
+
+    function methodSignature($method)
+    {
+        if (!$this->hasMethod($method)) {
+            return new IXR_Error(-32601, 'server error. requested method "'.$method.'" not specified.');
+        }
+        // We should be returning an array of types
+        $types = $this->signatures[$method];
+        $return = array();
+        foreach ($types as $type) {
+            switch ($type) {
+                case 'string':
+                    $return[] = 'string';
+                    break;
+                case 'int':
+                case 'i4':
+                    $return[] = 42;
+                    break;
+                case 'double':
+                    $return[] = 3.1415;
+                    break;
+                case 'dateTime.iso8601':
+                    $return[] = new IXR_Date(time());
+                    break;
+                case 'boolean':
+                    $return[] = true;
+                    break;
+                case 'base64':
+                    $return[] = new IXR_Base64('base64');
+                    break;
+                case 'array':
+                    $return[] = array('array');
+                    break;
+                case 'struct':
+                    $return[] = array('struct' => 'struct');
+                    break;
+            }
+        }
+        return $return;
+    }
+
+    function methodHelp($method)
+    {
+        return $this->help[$method];
+    }
+}
diff --git a/wp-includes/IXR/class-IXR-message.php b/wp-includes/IXR/class-IXR-message.php
new file mode 100644 (file)
index 0000000..69af8aa
--- /dev/null
@@ -0,0 +1,234 @@
+<?php
+
+/**
+ * IXR_MESSAGE
+ *
+ * @package IXR
+ * @since 1.5.0
+ *
+ */
+class IXR_Message
+{
+    var $message;
+    var $messageType;  // methodCall / methodResponse / fault
+    var $faultCode;
+    var $faultString;
+    var $methodName;
+    var $params;
+
+    // Current variable stacks
+    var $_arraystructs = array();   // The stack used to keep track of the current array/struct
+    var $_arraystructstypes = array(); // Stack keeping track of if things are structs or array
+    var $_currentStructName = array();  // A stack as well
+    var $_param;
+    var $_value;
+    var $_currentTag;
+    var $_currentTagContents;
+    // The XML parser
+    var $_parser;
+
+       /**
+        * PHP5 constructor.
+        */
+    function __construct( $message )
+    {
+        $this->message =& $message;
+    }
+
+       /**
+        * PHP4 constructor.
+        */
+       public function IXR_Message( $message ) {
+               self::__construct( $message );
+       }
+
+    function parse()
+    {
+        if ( ! function_exists( 'xml_parser_create' ) ) {
+            trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );
+            return false;
+        }
+
+        // first remove the XML declaration
+        // merged from WP #10698 - this method avoids the RAM usage of preg_replace on very large messages
+        $header = preg_replace( '/<\?xml.*?\?'.'>/s', '', substr( $this->message, 0, 100 ), 1 );
+        $this->message = trim( substr_replace( $this->message, $header, 0, 100 ) );
+        if ( '' == $this->message ) {
+            return false;
+        }
+
+        // Then remove the DOCTYPE
+        $header = preg_replace( '/^<!DOCTYPE[^>]*+>/i', '', substr( $this->message, 0, 200 ), 1 );
+        $this->message = trim( substr_replace( $this->message, $header, 0, 200 ) );
+        if ( '' == $this->message ) {
+            return false;
+        }
+
+        // Check that the root tag is valid
+        $root_tag = substr( $this->message, 0, strcspn( substr( $this->message, 0, 20 ), "> \t\r\n" ) );
+        if ( '<!DOCTYPE' === strtoupper( $root_tag ) ) {
+            return false;
+        }
+        if ( ! in_array( $root_tag, array( '<methodCall', '<methodResponse', '<fault' ) ) ) {
+            return false;
+        }
+
+        // Bail if there are too many elements to parse
+        $element_limit = 30000;
+        if ( function_exists( 'apply_filters' ) ) {
+            /**
+             * Filters the number of elements to parse in an XML-RPC response.
+             *
+             * @since 4.0.0
+             *
+             * @param int $element_limit Default elements limit.
+             */
+            $element_limit = apply_filters( 'xmlrpc_element_limit', $element_limit );
+        }
+        if ( $element_limit && 2 * $element_limit < substr_count( $this->message, '<' ) ) {
+            return false;
+        }
+
+        $this->_parser = xml_parser_create();
+        // Set XML parser to take the case of tags in to account
+        xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, false);
+        // Set XML parser callback functions
+        xml_set_object($this->_parser, $this);
+        xml_set_element_handler($this->_parser, 'tag_open', 'tag_close');
+        xml_set_character_data_handler($this->_parser, 'cdata');
+
+        // 256Kb, parse in chunks to avoid the RAM usage on very large messages
+        $chunk_size = 262144;
+
+        /**
+         * Filters the chunk size that can be used to parse an XML-RPC reponse message.
+         *
+         * @since 4.4.0
+         *
+         * @param int $chunk_size Chunk size to parse in bytes.
+         */
+        $chunk_size = apply_filters( 'xmlrpc_chunk_parsing_size', $chunk_size );
+
+        $final = false;
+        do {
+            if (strlen($this->message) <= $chunk_size) {
+                $final = true;
+            }
+            $part = substr($this->message, 0, $chunk_size);
+            $this->message = substr($this->message, $chunk_size);
+            if (!xml_parse($this->_parser, $part, $final)) {
+                return false;
+            }
+            if ($final) {
+                break;
+            }
+        } while (true);
+        xml_parser_free($this->_parser);
+
+        // Grab the error messages, if any
+        if ($this->messageType == 'fault') {
+            $this->faultCode = $this->params[0]['faultCode'];
+            $this->faultString = $this->params[0]['faultString'];
+        }
+        return true;
+    }
+
+    function tag_open($parser, $tag, $attr)
+    {
+        $this->_currentTagContents = '';
+        $this->currentTag = $tag;
+        switch($tag) {
+            case 'methodCall':
+            case 'methodResponse':
+            case 'fault':
+                $this->messageType = $tag;
+                break;
+                /* Deal with stacks of arrays and structs */
+            case 'data':    // data is to all intents and puposes more interesting than array
+                $this->_arraystructstypes[] = 'array';
+                $this->_arraystructs[] = array();
+                break;
+            case 'struct':
+                $this->_arraystructstypes[] = 'struct';
+                $this->_arraystructs[] = array();
+                break;
+        }
+    }
+
+    function cdata($parser, $cdata)
+    {
+        $this->_currentTagContents .= $cdata;
+    }
+
+    function tag_close($parser, $tag)
+    {
+        $valueFlag = false;
+        switch($tag) {
+            case 'int':
+            case 'i4':
+                $value = (int)trim($this->_currentTagContents);
+                $valueFlag = true;
+                break;
+            case 'double':
+                $value = (double)trim($this->_currentTagContents);
+                $valueFlag = true;
+                break;
+            case 'string':
+                $value = (string)trim($this->_currentTagContents);
+                $valueFlag = true;
+                break;
+            case 'dateTime.iso8601':
+                $value = new IXR_Date(trim($this->_currentTagContents));
+                $valueFlag = true;
+                break;
+            case 'value':
+                // "If no type is indicated, the type is string."
+                if (trim($this->_currentTagContents) != '') {
+                    $value = (string)$this->_currentTagContents;
+                    $valueFlag = true;
+                }
+                break;
+            case 'boolean':
+                $value = (boolean)trim($this->_currentTagContents);
+                $valueFlag = true;
+                break;
+            case 'base64':
+                $value = base64_decode($this->_currentTagContents);
+                $valueFlag = true;
+                break;
+                /* Deal with stacks of arrays and structs */
+            case 'data':
+            case 'struct':
+                $value = array_pop($this->_arraystructs);
+                array_pop($this->_arraystructstypes);
+                $valueFlag = true;
+                break;
+            case 'member':
+                array_pop($this->_currentStructName);
+                break;
+            case 'name':
+                $this->_currentStructName[] = trim($this->_currentTagContents);
+                break;
+            case 'methodName':
+                $this->methodName = trim($this->_currentTagContents);
+                break;
+        }
+
+        if ($valueFlag) {
+            if (count($this->_arraystructs) > 0) {
+                // Add value to struct or array
+                if ($this->_arraystructstypes[count($this->_arraystructstypes)-1] == 'struct') {
+                    // Add to struct
+                    $this->_arraystructs[count($this->_arraystructs)-1][$this->_currentStructName[count($this->_currentStructName)-1]] = $value;
+                } else {
+                    // Add to array
+                    $this->_arraystructs[count($this->_arraystructs)-1][] = $value;
+                }
+            } else {
+                // Just add as a parameter
+                $this->params[] = $value;
+            }
+        }
+        $this->_currentTagContents = '';
+    }
+}
diff --git a/wp-includes/IXR/class-IXR-request.php b/wp-includes/IXR/class-IXR-request.php
new file mode 100644 (file)
index 0000000..b00687b
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+
+/**
+ * IXR_Request
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+class IXR_Request
+{
+    var $method;
+    var $args;
+    var $xml;
+
+       /**
+        * PHP5 constructor.
+        */
+    function __construct($method, $args)
+    {
+        $this->method = $method;
+        $this->args = $args;
+        $this->xml = <<<EOD
+<?xml version="1.0"?>
+<methodCall>
+<methodName>{$this->method}</methodName>
+<params>
+
+EOD;
+        foreach ($this->args as $arg) {
+            $this->xml .= '<param><value>';
+            $v = new IXR_Value($arg);
+            $this->xml .= $v->getXml();
+            $this->xml .= "</value></param>\n";
+        }
+        $this->xml .= '</params></methodCall>';
+    }
+
+       /**
+        * PHP4 constructor.
+        */
+       public function IXR_Request( $method, $args ) {
+               self::__construct( $method, $args );
+       }
+
+    function getLength()
+    {
+        return strlen($this->xml);
+    }
+
+    function getXml()
+    {
+        return $this->xml;
+    }
+}
diff --git a/wp-includes/IXR/class-IXR-server.php b/wp-includes/IXR/class-IXR-server.php
new file mode 100644 (file)
index 0000000..095e445
--- /dev/null
@@ -0,0 +1,225 @@
+<?php
+
+/**
+ * IXR_Server
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+class IXR_Server
+{
+    var $data;
+    var $callbacks = array();
+    var $message;
+    var $capabilities;
+
+       /**
+        * PHP5 constructor.
+        */
+    function __construct( $callbacks = false, $data = false, $wait = false )
+    {
+        $this->setCapabilities();
+        if ($callbacks) {
+            $this->callbacks = $callbacks;
+        }
+        $this->setCallbacks();
+        if (!$wait) {
+            $this->serve($data);
+        }
+    }
+
+       /**
+        * PHP4 constructor.
+        */
+       public function IXR_Server( $callbacks = false, $data = false, $wait = false ) {
+               self::__construct( $callbacks, $data, $wait );
+       }
+
+    function serve($data = false)
+    {
+        if (!$data) {
+            if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] !== 'POST') {
+                if ( function_exists( 'status_header' ) ) {
+                    status_header( 405 ); // WP #20986
+                    header( 'Allow: POST' );
+                }
+                header('Content-Type: text/plain'); // merged from WP #9093
+                die('XML-RPC server accepts POST requests only.');
+            }
+
+            global $HTTP_RAW_POST_DATA;
+            if (empty($HTTP_RAW_POST_DATA)) {
+                // workaround for a bug in PHP 5.2.2 - http://bugs.php.net/bug.php?id=41293
+                $data = file_get_contents('php://input');
+            } else {
+                $data =& $HTTP_RAW_POST_DATA;
+            }
+        }
+        $this->message = new IXR_Message($data);
+        if (!$this->message->parse()) {
+            $this->error(-32700, 'parse error. not well formed');
+        }
+        if ($this->message->messageType != 'methodCall') {
+            $this->error(-32600, 'server error. invalid xml-rpc. not conforming to spec. Request must be a methodCall');
+        }
+        $result = $this->call($this->message->methodName, $this->message->params);
+
+        // Is the result an error?
+        if (is_a($result, 'IXR_Error')) {
+            $this->error($result);
+        }
+
+        // Encode the result
+        $r = new IXR_Value($result);
+        $resultxml = $r->getXml();
+
+        // Create the XML
+        $xml = <<<EOD
+<methodResponse>
+  <params>
+    <param>
+      <value>
+      $resultxml
+      </value>
+    </param>
+  </params>
+</methodResponse>
+
+EOD;
+      // Send it
+      $this->output($xml);
+    }
+
+    function call($methodname, $args)
+    {
+        if (!$this->hasMethod($methodname)) {
+            return new IXR_Error(-32601, 'server error. requested method '.$methodname.' does not exist.');
+        }
+        $method = $this->callbacks[$methodname];
+
+        // Perform the callback and send the response
+        if (count($args) == 1) {
+            // If only one parameter just send that instead of the whole array
+            $args = $args[0];
+        }
+
+        // Are we dealing with a function or a method?
+        if (is_string($method) && substr($method, 0, 5) == 'this:') {
+            // It's a class method - check it exists
+            $method = substr($method, 5);
+            if (!method_exists($this, $method)) {
+                return new IXR_Error(-32601, 'server error. requested class method "'.$method.'" does not exist.');
+            }
+
+            //Call the method
+            $result = $this->$method($args);
+        } else {
+            // It's a function - does it exist?
+            if (is_array($method)) {
+                if (!is_callable(array($method[0], $method[1]))) {
+                    return new IXR_Error(-32601, 'server error. requested object method "'.$method[1].'" does not exist.');
+                }
+            } else if (!function_exists($method)) {
+                return new IXR_Error(-32601, 'server error. requested function "'.$method.'" does not exist.');
+            }
+
+            // Call the function
+            $result = call_user_func($method, $args);
+        }
+        return $result;
+    }
+
+    function error($error, $message = false)
+    {
+        // Accepts either an error object or an error code and message
+        if ($message && !is_object($error)) {
+            $error = new IXR_Error($error, $message);
+        }
+        $this->output($error->getXml());
+    }
+
+    function output($xml)
+    {
+        $charset = function_exists('get_option') ? get_option('blog_charset') : '';
+        if ($charset)
+            $xml = '<?xml version="1.0" encoding="'.$charset.'"?>'."\n".$xml;
+        else
+            $xml = '<?xml version="1.0"?>'."\n".$xml;
+        $length = strlen($xml);
+        header('Connection: close');
+        if ($charset)
+            header('Content-Type: text/xml; charset='.$charset);
+        else
+            header('Content-Type: text/xml');
+        header('Date: '.date('r'));
+        echo $xml;
+        exit;
+    }
+
+    function hasMethod($method)
+    {
+        return in_array($method, array_keys($this->callbacks));
+    }
+
+    function setCapabilities()
+    {
+        // Initialises capabilities array
+        $this->capabilities = array(
+            'xmlrpc' => array(
+                'specUrl' => 'http://www.xmlrpc.com/spec',
+                'specVersion' => 1
+        ),
+            'faults_interop' => array(
+                'specUrl' => 'http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php',
+                'specVersion' => 20010516
+        ),
+            'system.multicall' => array(
+                'specUrl' => 'http://www.xmlrpc.com/discuss/msgReader$1208',
+                'specVersion' => 1
+        ),
+        );
+    }
+
+    function getCapabilities($args)
+    {
+        return $this->capabilities;
+    }
+
+    function setCallbacks()
+    {
+        $this->callbacks['system.getCapabilities'] = 'this:getCapabilities';
+        $this->callbacks['system.listMethods'] = 'this:listMethods';
+        $this->callbacks['system.multicall'] = 'this:multiCall';
+    }
+
+    function listMethods($args)
+    {
+        // Returns a list of methods - uses array_reverse to ensure user defined
+        // methods are listed before server defined methods
+        return array_reverse(array_keys($this->callbacks));
+    }
+
+    function multiCall($methodcalls)
+    {
+        // See http://www.xmlrpc.com/discuss/msgReader$1208
+        $return = array();
+        foreach ($methodcalls as $call) {
+            $method = $call['methodName'];
+            $params = $call['params'];
+            if ($method == 'system.multicall') {
+                $result = new IXR_Error(-32600, 'Recursive calls to system.multicall are forbidden');
+            } else {
+                $result = $this->call($method, $params);
+            }
+            if (is_a($result, 'IXR_Error')) {
+                $return[] = array(
+                    'faultCode' => $result->code,
+                    'faultString' => $result->message
+                );
+            } else {
+                $return[] = array($result);
+            }
+        }
+        return $return;
+    }
+}
diff --git a/wp-includes/IXR/class-IXR-value.php b/wp-includes/IXR/class-IXR-value.php
new file mode 100644 (file)
index 0000000..0fd878b
--- /dev/null
@@ -0,0 +1,138 @@
+<?php
+/**
+ * IXR_Value
+ *
+ * @package IXR
+ * @since 1.5.0
+ */
+class IXR_Value {
+    var $data;
+    var $type;
+
+       /**
+        * PHP5 constructor.
+        */
+       function __construct( $data, $type = false )
+    {
+        $this->data = $data;
+        if (!$type) {
+            $type = $this->calculateType();
+        }
+        $this->type = $type;
+        if ($type == 'struct') {
+            // Turn all the values in the array in to new IXR_Value objects
+            foreach ($this->data as $key => $value) {
+                $this->data[$key] = new IXR_Value($value);
+            }
+        }
+        if ($type == 'array') {
+            for ($i = 0, $j = count($this->data); $i < $j; $i++) {
+                $this->data[$i] = new IXR_Value($this->data[$i]);
+            }
+        }
+    }
+
+       /**
+        * PHP4 constructor.
+        */
+       public function IXR_Value( $data, $type = false ) {
+               self::__construct( $data, $type );
+       }
+
+    function calculateType()
+    {
+        if ($this->data === true || $this->data === false) {
+            return 'boolean';
+        }
+        if (is_integer($this->data)) {
+            return 'int';
+        }
+        if (is_double($this->data)) {
+            return 'double';
+        }
+
+        // Deal with IXR object types base64 and date
+        if (is_object($this->data) && is_a($this->data, 'IXR_Date')) {
+            return 'date';
+        }
+        if (is_object($this->data) && is_a($this->data, 'IXR_Base64')) {
+            return 'base64';
+        }
+
+        // If it is a normal PHP object convert it in to a struct
+        if (is_object($this->data)) {
+            $this->data = get_object_vars($this->data);
+            return 'struct';
+        }
+        if (!is_array($this->data)) {
+            return 'string';
+        }
+
+        // We have an array - is it an array or a struct?
+        if ($this->isStruct($this->data)) {
+            return 'struct';
+        } else {
+            return 'array';
+        }
+    }
+
+    function getXml()
+    {
+        // Return XML for this value
+        switch ($this->type) {
+            case 'boolean':
+                return '<boolean>'.(($this->data) ? '1' : '0').'</boolean>';
+                break;
+            case 'int':
+                return '<int>'.$this->data.'</int>';
+                break;
+            case 'double':
+                return '<double>'.$this->data.'</double>';
+                break;
+            case 'string':
+                return '<string>'.htmlspecialchars($this->data).'</string>';
+                break;
+            case 'array':
+                $return = '<array><data>'."\n";
+                foreach ($this->data as $item) {
+                    $return .= '  <value>'.$item->getXml()."</value>\n";
+                }
+                $return .= '</data></array>';
+                return $return;
+                break;
+            case 'struct':
+                $return = '<struct>'."\n";
+                foreach ($this->data as $name => $value) {
+                                       $name = htmlspecialchars($name);
+                    $return .= "  <member><name>$name</name><value>";
+                    $return .= $value->getXml()."</value></member>\n";
+                }
+                $return .= '</struct>';
+                return $return;
+                break;
+            case 'date':
+            case 'base64':
+                return $this->data->getXml();
+                break;
+        }
+        return false;
+    }
+
+    /**
+     * Checks whether or not the supplied array is a struct or not
+     *
+     * @param array $array
+     * @return bool
+     */
+    function isStruct($array)
+    {
+        $expected = 0;
+        foreach ($array as $key => $value) {
+            if ((string)$key !== (string)$expected) {
+                return true;
+            }
+            $expected++;
+        }
+        return false;
+    }
+}
index b57dfaeb37247d405d86d48b77c29cced06df3a7..83deb9609e9515c979fa4c0bfb65a452b521d58a 100644 (file)
@@ -107,19 +107,36 @@ function wp_admin_bar_render() {
  * @param WP_Admin_Bar $wp_admin_bar
  */
 function wp_admin_bar_wp_menu( $wp_admin_bar ) {
-       $wp_admin_bar->add_menu( array(
+       if ( current_user_can( 'read' ) ) {
+               $about_url = self_admin_url( 'about.php' );
+       } elseif ( is_multisite() ) {
+               $about_url = get_dashboard_url( get_current_user_id(), 'about.php' );
+       } else {
+               $about_url = false;
+       }
+
+       $wp_logo_menu_args = array(
                'id'    => 'wp-logo',
                'title' => '<span class="ab-icon"></span><span class="screen-reader-text">' . __( 'About WordPress' ) . '</span>',
-               'href'  => self_admin_url( 'about.php' ),
-       ) );
+               'href'  => $about_url,
+       );
+
+       // Set tabindex="0" to make sub menus accessible when no URL is available.
+       if ( ! $about_url ) {
+               $wp_logo_menu_args['meta'] = array(
+                       'tabindex' => 0,
+               );
+       }
 
-       if ( is_user_logged_in() ) {
+       $wp_admin_bar->add_menu( $wp_logo_menu_args );
+
+       if ( $about_url ) {
                // Add "About WordPress" link
                $wp_admin_bar->add_menu( array(
                        'parent' => 'wp-logo',
                        'id'     => 'about',
                        'title'  => __('About WordPress'),
-                       'href'   => self_admin_url( 'about.php' ),
+                       'href'   => $about_url,
                ) );
        }
 
@@ -196,7 +213,8 @@ function wp_admin_bar_my_account_item( $wp_admin_bar ) {
        }
 
        $avatar = get_avatar( $user_id, 26 );
-       $howdy  = sprintf( __('Howdy, %1$s'), $current_user->display_name );
+       /* translators: %s: current user's display name */
+       $howdy  = sprintf( __( 'Howdy, %s' ), $current_user->display_name );
        $class  = empty( $avatar ) ? '' : 'with-avatar';
 
        $wp_admin_bar->add_menu( array(
@@ -293,9 +311,11 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) {
        }
 
        if ( is_network_admin() ) {
-               $blogname = sprintf( __('Network Admin: %s'), esc_html( get_current_site()->site_name ) );
+               /* translators: %s: site name */
+               $blogname = sprintf( __( 'Network Admin: %s' ), esc_html( get_network()->site_name ) );
        } elseif ( is_user_admin() ) {
-               $blogname = sprintf( __('User Dashboard: %s'), esc_html( get_current_site()->site_name ) );
+               /* translators: %s: site name */
+               $blogname = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) );
        }
 
        $title = wp_html_excerpt( $blogname, 40, '&hellip;' );
@@ -346,15 +366,30 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) {
  * @since 4.3.0
  *
  * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance.
+ * @global WP_Customize_Manager $wp_customize
  */
 function wp_admin_bar_customize_menu( $wp_admin_bar ) {
+       global $wp_customize;
+
        // Don't show for users who can't access the customizer or when in the admin.
        if ( ! current_user_can( 'customize' ) || is_admin() ) {
                return;
        }
 
+       // Don't show if the user cannot edit a given customize_changeset post currently being previewed.
+       if ( is_customize_preview() && $wp_customize->changeset_post_id() && ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $wp_customize->changeset_post_id() ) ) {
+               return;
+       }
+
        $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+       if ( is_customize_preview() && $wp_customize->changeset_uuid() ) {
+               $current_url = remove_query_arg( 'customize_changeset_uuid', $current_url );
+       }
+
        $customize_url = add_query_arg( 'url', urlencode( $current_url ), wp_customize_url() );
+       if ( is_customize_preview() ) {
+               $customize_url = add_query_arg( array( 'changeset_uuid' => $wp_customize->changeset_uuid() ), $customize_url );
+       }
 
        $wp_admin_bar->add_menu( array(
                'id'     => 'customize',
@@ -574,6 +609,18 @@ function wp_admin_bar_edit_menu( $wp_admin_bar ) {
                                        'href' => get_permalink( $post->ID )
                                ) );
                        }
+               } elseif ( 'edit' == $current_screen->base
+                       && ( $post_type_object = get_post_type_object( $current_screen->post_type ) )
+                       && ( $post_type_object->public )
+                       && ( $post_type_object->show_in_admin_bar )
+                       && ( get_post_type_archive_link( $post_type_object->name ) )
+                       && ! ( 'post' === $post_type_object->name && 'posts' === get_option( 'show_on_front' ) ) )
+               {
+                       $wp_admin_bar->add_node( array(
+                               'id' => 'archive',
+                               'title' => $post_type_object->labels->view_items,
+                               'href' => get_post_type_archive_link( $current_screen->post_type )
+                       ) );
                } elseif ( 'term' == $current_screen->base
                        && isset( $tag ) && is_object( $tag ) && ! is_wp_error( $tag )
                        && ( $tax = get_taxonomy( $tag->taxonomy ) )
@@ -604,7 +651,7 @@ function wp_admin_bar_edit_menu( $wp_admin_bar ) {
                        ) );
                } elseif ( ! empty( $current_object->taxonomy )
                        && ( $tax = get_taxonomy( $current_object->taxonomy ) )
-                       && current_user_can( $tax->cap->edit_terms )
+                       && current_user_can( 'edit_term', $current_object->term_id )
                        && $edit_term_link = get_edit_term_link( $current_object->term_id, $current_object->taxonomy ) )
                {
                        $wp_admin_bar->add_menu( array(
@@ -696,7 +743,7 @@ function wp_admin_bar_comments_menu( $wp_admin_bar ) {
        $awaiting_text = sprintf( _n( '%s comment awaiting moderation', '%s comments awaiting moderation', $awaiting_mod ), number_format_i18n( $awaiting_mod ) );
 
        $icon  = '<span class="ab-icon"></span>';
-       $title = '<span id="ab-awaiting-mod" class="ab-label awaiting-mod pending-count count-' . $awaiting_mod . '" aria-hidden="true">' . number_format_i18n( $awaiting_mod ) . '</span>';
+       $title = '<span class="ab-label awaiting-mod pending-count count-' . $awaiting_mod . '" aria-hidden="true">' . number_format_i18n( $awaiting_mod ) . '</span>';
        $title .= '<span class="screen-reader-text">' . $awaiting_text . '</span>';
 
        $wp_admin_bar->add_menu( array(
index 368015adb185953b8213d4c8d3058d8d0df1492c..f2cba56361aaac15a45c5197f0cba3fdca568731 100644 (file)
@@ -121,6 +121,11 @@ class AtomParser {
 
         array_unshift($this->ns_contexts, array());
 
+        if ( ! function_exists( 'xml_parser_create_ns' ) ) {
+               trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );
+               return false;
+        }
+
         $parser = xml_parser_create_ns();
         xml_set_object($parser, $this);
         xml_set_element_handler($parser, "start_element", "end_element");
index 915805fcb9271a5f57adcbd60991259164e83580..b2b6ea3159e791fc1d666589b83fe3fa9667828f 100644 (file)
@@ -188,7 +188,12 @@ function the_author_meta( $field = '', $user_id = false ) {
  */
 function get_the_author_link() {
        if ( get_the_author_meta('url') ) {
-               return '<a href="' . esc_url( get_the_author_meta('url') ) . '" title="' . esc_attr( sprintf(__("Visit %s&#8217;s website"), get_the_author()) ) . '" rel="author external">' . get_the_author() . '</a>';
+               return sprintf( '<a href="%1$s" title="%2$s" rel="author external">%3$s</a>',
+                       esc_url( get_the_author_meta('url') ),
+                       /* translators: %s: author's display name */
+                       esc_attr( sprintf( __( 'Visit %s&#8217;s website' ), get_the_author() ) ),
+                       get_the_author()
+               );
        } else {
                return get_the_author();
        }
@@ -250,9 +255,9 @@ function get_the_author_posts_link() {
                return;
        }
 
-       $link = sprintf(
-               '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
+       $link = sprintf( '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
                esc_url( get_author_posts_url( $authordata->ID, $authordata->user_nicename ) ),
+               /* translators: %s: author's display name */
                esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),
                get_the_author()
        );
@@ -412,7 +417,12 @@ function wp_list_authors( $args = '' ) {
                        $return .= '<li>';
                }
 
-               $link = '<a href="' . get_author_posts_url( $author->ID, $author->user_nicename ) . '" title="' . esc_attr( sprintf(__("Posts by %s"), $author->display_name) ) . '">' . $name . '</a>';
+               $link = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>',
+                       get_author_posts_url( $author->ID, $author->user_nicename ),
+                       /* translators: %s: author's display name */
+                       esc_attr( sprintf( __( 'Posts by %s' ), $author->display_name ) ),
+                       $name
+               );
 
                if ( ! empty( $args['feed_image'] ) || ! empty( $args['feed'] ) ) {
                        $link .= ' ';
index fc719d5898594c414569a0b37f8d8cf61e1fa922..718760be98cb3d695cc088543f110dc69565220f 100644 (file)
@@ -14,7 +14,8 @@
  * @global wpdb $wpdb WordPress database abstraction object.
  *
  * @param int|stdClass $bookmark
- * @param string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant
+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                       an stdClass object, an associative array, or a numeric array, respectively. Default OBJECT.
  * @param string $filter Optional, default is 'raw'.
  * @return array|object|null Type returned depends on $output value.
  */
@@ -300,10 +301,10 @@ function get_bookmarks( $args = '' ) {
  *
  * @since 2.3.0
  *
- * @param object|array $bookmark Bookmark row
+ * @param stdClass|array $bookmark Bookmark row
  * @param string $context Optional, default is 'display'. How to filter the
  *             fields
- * @return object|array Same type as $bookmark but with fields sanitized.
+ * @return stdClass|array Same type as $bookmark but with fields sanitized.
  */
 function sanitize_bookmark($bookmark, $context = 'display') {
        $fields = array('link_id', 'link_url', 'link_name', 'link_image', 'link_target', 'link_category',
index 6c53eabb78ff7ebfbf422867cb8e59abeeee1386..b974756914a0e164a453c10b17bd607725931eb4 100644 (file)
@@ -254,7 +254,7 @@ function wp_cache_add_non_persistent_groups( $groups ) {
  * This function is deprecated. Use wp_cache_switch_to_blog() instead of this
  * function when preparing the cache for a blog switch. For clearing the cache
  * during unit tests, consider using wp_cache_init(). wp_cache_init() is not
- * recommended outside of unit tests as the performance penality for using it is
+ * recommended outside of unit tests as the performance penalty for using it is
  * high.
  *
  * @since 2.6.0
@@ -302,10 +302,10 @@ class WP_Object_Cache {
         * The amount of times the cache data was already stored in the cache.
         *
         * @since 2.5.0
-        * @access private
+        * @access public
         * @var int
         */
-       private $cache_hits = 0;
+       public $cache_hits = 0;
 
        /**
         * Amount of times the cache did not have the request in cache.
@@ -729,14 +729,10 @@ class WP_Object_Cache {
         * Sets up object properties; PHP 5 style constructor.
         *
         * @since 2.0.8
-        *
-     * @global int $blog_id Global blog ID.
         */
        public function __construct() {
-               global $blog_id;
-
                $this->multisite = is_multisite();
-               $this->blog_prefix =  $this->multisite ? $blog_id . ':' : '';
+               $this->blog_prefix =  $this->multisite ? get_current_blog_id() . ':' : '';
 
 
                /**
index eac359630bf2aa6108bd5233d4ce5a305c7d3b11..c1e644a85f3b530fe78a187db06b893aa940882b 100644 (file)
@@ -67,6 +67,11 @@ function map_meta_cap( $cap, $user_id ) {
                        }
                }
 
+               if ( ( get_option( 'page_for_posts' ) == $post->ID ) || ( get_option( 'page_on_front' ) == $post->ID ) ) {
+                       $caps[] = 'manage_options';
+                       break;
+               }
+
                $post_type = get_post_type_object( $post->post_type );
                if ( ! $post_type ) {
                        /* translators: 1: post type, 2: capability name */
@@ -237,56 +242,77 @@ function map_meta_cap( $cap, $user_id ) {
        case 'edit_post_meta':
        case 'delete_post_meta':
        case 'add_post_meta':
-               $post = get_post( $args[0] );
-               if ( ! $post ) {
+       case 'edit_comment_meta':
+       case 'delete_comment_meta':
+       case 'add_comment_meta':
+       case 'edit_term_meta':
+       case 'delete_term_meta':
+       case 'add_term_meta':
+       case 'edit_user_meta':
+       case 'delete_user_meta':
+       case 'add_user_meta':
+               list( $_, $object_type, $_ ) = explode( '_', $cap );
+               $object_id = (int) $args[0];
+
+               switch ( $object_type ) {
+                       case 'post':
+                               $post = get_post( $object_id );
+                               if ( ! $post ) {
+                                       break;
+                               }
+
+                               $sub_type = get_post_type( $post );
+                               break;
+
+                       case 'comment':
+                               $comment = get_comment( $object_id );
+                               if ( ! $comment ) {
+                                       break;
+                               }
+
+                               $sub_type = empty( $comment->comment_type ) ? 'comment' : $comment->comment_type;
+                               break;
+
+                       case 'term':
+                               $term = get_term( $object_id );
+                               if ( ! $term ) {
+                                       break;
+                               }
+
+                               $sub_type = $term->taxonomy;
+                               break;
+
+                       case 'user':
+                               $user = get_user_by( 'id', $object_id );
+                               if ( ! $user ) {
+                                       break;
+                               }
+
+                               $sub_type = 'user';
+                               break;
+               }
+
+               if ( empty( $sub_type ) ) {
                        $caps[] = 'do_not_allow';
                        break;
                }
 
-               $post_type = get_post_type( $post );
-
-               $caps = map_meta_cap( 'edit_post', $user_id, $post->ID );
+               $caps = map_meta_cap( "edit_{$object_type}", $user_id, $object_id );
 
-               $meta_key = isset( $args[ 1 ] ) ? $args[ 1 ] : false;
+               $meta_key = isset( $args[1] ) ? $args[1] : false;
 
-               if ( $meta_key && ( has_filter( "auth_post_meta_{$meta_key}" ) || has_filter( "auth_post_{$post_type}_meta_{$meta_key}" ) ) ) {
-                       /**
-                        * 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 map_meta_cap().
-                        *
-                        * @since 3.3.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_meta_{$meta_key}", false, $meta_key, $post->ID, $user_id, $cap, $caps );
+               $has_filter = has_filter( "auth_{$object_type}_meta_{$meta_key}" ) || has_filter( "auth_{$object_type}_{$sub_type}_meta_{$meta_key}" );
+               if ( $meta_key && $has_filter ) {
+                       /** This filter is documented in wp-includes/meta.php */
+                       $allowed = apply_filters( "auth_{$object_type}_meta_{$meta_key}", false, $meta_key, $object_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 );
+                       /** This filter is documented in wp-includes/meta.php */
+                       $allowed = apply_filters( "auth_{$object_type}_{$sub_type}_meta_{$meta_key}", $allowed, $meta_key, $object_id, $user_id, $cap, $caps );
 
-                       if ( ! $allowed )
+                       if ( ! $allowed ) {
                                $caps[] = $cap;
-               } elseif ( $meta_key && is_protected_meta( $meta_key, 'post' ) ) {
+                       }
+               } elseif ( $meta_key && is_protected_meta( $meta_key, $object_type ) ) {
                        $caps[] = $cap;
                }
                break;
@@ -315,6 +341,7 @@ function map_meta_cap( $cap, $user_id ) {
                else
                        $caps[] = 'do_not_allow';
                break;
+       case 'edit_css' :
        case 'unfiltered_html' :
                // Disallow unfiltered_html for all users, even admins and super admins.
                if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML )
@@ -322,7 +349,7 @@ function map_meta_cap( $cap, $user_id ) {
                elseif ( is_multisite() && ! is_super_admin( $user_id ) )
                        $caps[] = 'do_not_allow';
                else
-                       $caps[] = $cap;
+                       $caps[] = 'unfiltered_html';
                break;
        case 'edit_files':
        case 'edit_plugins':
@@ -397,6 +424,53 @@ function map_meta_cap( $cap, $user_id ) {
        case 'delete_site':
                $caps[] = 'manage_options';
                break;
+       case 'edit_term':
+       case 'delete_term':
+       case 'assign_term':
+               $term_id = (int) $args[0];
+               $term = get_term( $term_id );
+               if ( ! $term || is_wp_error( $term ) ) {
+                       $caps[] = 'do_not_allow';
+                       break;
+               }
+
+               $tax = get_taxonomy( $term->taxonomy );
+               if ( ! $tax ) {
+                       $caps[] = 'do_not_allow';
+                       break;
+               }
+
+               if ( 'delete_term' === $cap && ( $term->term_id == get_option( 'default_' . $term->taxonomy ) ) ) {
+                       $caps[] = 'do_not_allow';
+                       break;
+               }
+
+               $taxo_cap = $cap . 's';
+
+               $caps = map_meta_cap( $tax->cap->$taxo_cap, $user_id, $term_id );
+
+               break;
+       case 'manage_post_tags':
+       case 'edit_categories':
+       case 'edit_post_tags':
+       case 'delete_categories':
+       case 'delete_post_tags':
+               $caps[] = 'manage_categories';
+               break;
+       case 'assign_categories':
+       case 'assign_post_tags':
+               $caps[] = 'edit_posts';
+               break;
+       case 'create_sites':
+       case 'delete_sites':
+       case 'manage_network':
+       case 'manage_sites':
+       case 'manage_network_users':
+       case 'manage_network_plugins':
+       case 'manage_network_themes':
+       case 'manage_network_options':
+               $caps[] = $cap;
+               break;
        default:
                // Handle meta capabilities for custom post types.
                global $post_type_meta_caps;
index 7063c2d4c91d3f6304e07bf98c04c07c879bb5a5..ac992d6b3c2a337b6f549ed99b9ddc38b95fec8e 100644 (file)
@@ -99,45 +99,6 @@ function get_the_category( $id = false ) {
        return apply_filters( 'get_the_categories', $categories, $id );
 }
 
-/**
- * Sort categories by name.
- *
- * Used by usort() as a callback, should not be used directly. Can actually be
- * used to sort any term object.
- *
- * @since 2.3.0
- * @access private
- *
- * @param object $a
- * @param object $b
- * @return int
- */
-function _usort_terms_by_name( $a, $b ) {
-       return strcmp( $a->name, $b->name );
-}
-
-/**
- * Sort categories by ID.
- *
- * Used by usort() as a callback, should not be used directly. Can actually be
- * used to sort any term object.
- *
- * @since 2.3.0
- * @access private
- *
- * @param object $a
- * @param object $b
- * @return int
- */
-function _usort_terms_by_ID( $a, $b ) {
-       if ( $a->term_id > $b->term_id )
-               return 1;
-       elseif ( $a->term_id < $b->term_id )
-               return -1;
-       else
-               return 0;
-}
-
 /**
  * Retrieve category name based on category ID.
  *
@@ -255,7 +216,7 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false )
 }
 
 /**
- * Check if the current post in within any of the given categories.
+ * Check if the current post is within any of the given categories.
  *
  * The given categories are checked against the post's categories' term_ids, names and slugs.
  * Categories given as integers will only be checked against the post's categories' term_ids.
@@ -663,8 +624,9 @@ function wp_list_categories( $args = '' ) {
                $output .= walk_category_tree( $categories, $depth, $r );
        }
 
-       if ( $r['title_li'] && 'list' == $r['style'] )
+       if ( $r['title_li'] && 'list' == $r['style'] && ( ! empty( $categories ) || ! $r['hide_title_if_empty'] ) ) {
                $output .= '</ul></li>';
+       }
 
        /**
         * Filters the HTML output of a taxonomy list.
@@ -917,6 +879,7 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
                $tags_data[] = array(
                        'id'         => $tag_id,
                        'url'        => '#' != $tag->link ? $tag->link : '#',
+                       'role'       => '#' != $tag->link ? '' : ' role="button"',
                        'name'       => $tag->name,
                        'title'      => $title,
                        'slug'       => $tag->slug,
@@ -940,7 +903,7 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
        // generate the output links array
        foreach ( $tags_data as $key => $tag_data ) {
                $class = $tag_data['class'] . ' tag-link-position-' . ( $key + 1 );
-               $a[] = "<a href='" . esc_url( $tag_data['url'] ) . "' class='" . esc_attr( $class ) . "' title='" . esc_attr( $tag_data['title'] ) . "' style='font-size: " . esc_attr( str_replace( ',', '.', $tag_data['font_size'] ) . $args['unit'] ) . ";'>" . esc_html( $tag_data['name'] ) . "</a>";
+               $a[] = "<a href='" . esc_url( $tag_data['url'] ) . "'" . $tag_data['role'] . " class='" . esc_attr( $class ) . "' title='" . esc_attr( $tag_data['title'] ) . "' style='font-size: " . esc_attr( str_replace( ',', '.', $tag_data['font_size'] ) . $args['unit'] ) . ";'>" . esc_html( $tag_data['name'] ) . "</a>";
        }
 
        switch ( $args['format'] ) {
@@ -1142,7 +1105,12 @@ function get_the_tag_list( $before = '', $sep = '', $after = '', $id = 0 ) {
 function the_tags( $before = null, $sep = ', ', $after = '' ) {
        if ( null === $before )
                $before = __('Tags: ');
-       echo get_the_tag_list($before, $sep, $after);
+
+       $the_tags = get_the_tag_list( $before, $sep, $after );
+
+       if ( ! is_wp_error( $the_tags ) ) {
+               echo $the_tags;
+       }
 }
 
 /**
@@ -1259,7 +1227,7 @@ function get_the_term_list( $id, $taxonomy, $before = '', $sep = '', $after = ''
         *
         * @param array $links An array of term links.
         */
-       $term_links = apply_filters( "term_links-$taxonomy", $links );
+       $term_links = apply_filters( "term_links-{$taxonomy}", $links );
 
        return $before . join( $sep, $term_links ) . $after;
 }
index 08d18c0a657b72f26217eb5e7d5d019bc237ea3f..2ab54a5a94909fae037711b41452018089751a4a 100644 (file)
@@ -82,7 +82,8 @@ function get_categories( $args = '' ) {
  * @since 1.5.1
  *
  * @param int|object $category Category ID or Category row object
- * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to a
+ *                       WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
  * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
  * @return object|array|WP_Error|null Category data in type defined by $output parameter.
  *                                    WP_Error if $category is empty, null if it does not exist.
@@ -113,9 +114,10 @@ function get_category( $category, $output = OBJECT, $filter = 'raw' ) {
  * @since 2.1.0
  *
  * @param string $category_path URL containing category slugs.
- * @param bool $full_match Optional. Whether full path should be matched.
- * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
- * @return object|array|WP_Error|void Type is based on $output value.
+ * @param bool   $full_match    Optional. Whether full path should be matched.
+ * @param string $output        Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                              a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
+ * @return WP_Term|array|WP_Error|null Type is based on $output value.
  */
 function get_category_by_path( $category_path, $full_match = true, $output = OBJECT ) {
        $category_path = rawurlencode( urldecode( $category_path ) );
@@ -296,10 +298,11 @@ function get_tags( $args = '' ) {
  *
  * @since 2.3.0
  *
- * @param int|object $tag
- * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
- * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
- * @return object|array|WP_Error|null Tag data in type defined by $output parameter. WP_Error if $tag is empty, null if it does not exist.
+ * @param int|WP_Term|object $tag    A tag ID or object.
+ * @param string             $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                                   a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
+ * @param string             $filter Optional. Default is raw or no WordPress defined filter will applied.
+ * @return WP_Term|array|WP_Error|null Tag data in type defined by $output parameter. WP_Error if $tag is empty, null if it does not exist.
  */
 function get_tag( $tag, $output = OBJECT, $filter = 'raw' ) {
        return get_term( $tag, 'post_tag', $output, $filter );
index a8e31983e880f24a0baf17d318d010ce07453086..706e5e320a08cf85bb7eae44f735b298b7b2cfd9 100644 (file)
  * @license    http://www.opensource.org/licenses/bsd-license.php BSD
  */
 
-/**
- * IXR_Value
- *
- * @package IXR
- * @since 1.5.0
- */
-class IXR_Value {
-    var $data;
-    var $type;
-
-       /**
-        * PHP5 constructor.
-        */
-       function __construct( $data, $type = false )
-    {
-        $this->data = $data;
-        if (!$type) {
-            $type = $this->calculateType();
-        }
-        $this->type = $type;
-        if ($type == 'struct') {
-            // Turn all the values in the array in to new IXR_Value objects
-            foreach ($this->data as $key => $value) {
-                $this->data[$key] = new IXR_Value($value);
-            }
-        }
-        if ($type == 'array') {
-            for ($i = 0, $j = count($this->data); $i < $j; $i++) {
-                $this->data[$i] = new IXR_Value($this->data[$i]);
-            }
-        }
-    }
-
-       /**
-        * PHP4 constructor.
-        */
-       public function IXR_Value( $data, $type = false ) {
-               self::__construct( $data, $type );
-       }
-
-    function calculateType()
-    {
-        if ($this->data === true || $this->data === false) {
-            return 'boolean';
-        }
-        if (is_integer($this->data)) {
-            return 'int';
-        }
-        if (is_double($this->data)) {
-            return 'double';
-        }
-
-        // Deal with IXR object types base64 and date
-        if (is_object($this->data) && is_a($this->data, 'IXR_Date')) {
-            return 'date';
-        }
-        if (is_object($this->data) && is_a($this->data, 'IXR_Base64')) {
-            return 'base64';
-        }
-
-        // If it is a normal PHP object convert it in to a struct
-        if (is_object($this->data)) {
-            $this->data = get_object_vars($this->data);
-            return 'struct';
-        }
-        if (!is_array($this->data)) {
-            return 'string';
-        }
-
-        // We have an array - is it an array or a struct?
-        if ($this->isStruct($this->data)) {
-            return 'struct';
-        } else {
-            return 'array';
-        }
-    }
-
-    function getXml()
-    {
-        // Return XML for this value
-        switch ($this->type) {
-            case 'boolean':
-                return '<boolean>'.(($this->data) ? '1' : '0').'</boolean>';
-                break;
-            case 'int':
-                return '<int>'.$this->data.'</int>';
-                break;
-            case 'double':
-                return '<double>'.$this->data.'</double>';
-                break;
-            case 'string':
-                return '<string>'.htmlspecialchars($this->data).'</string>';
-                break;
-            case 'array':
-                $return = '<array><data>'."\n";
-                foreach ($this->data as $item) {
-                    $return .= '  <value>'.$item->getXml()."</value>\n";
-                }
-                $return .= '</data></array>';
-                return $return;
-                break;
-            case 'struct':
-                $return = '<struct>'."\n";
-                foreach ($this->data as $name => $value) {
-                                       $name = htmlspecialchars($name);
-                    $return .= "  <member><name>$name</name><value>";
-                    $return .= $value->getXml()."</value></member>\n";
-                }
-                $return .= '</struct>';
-                return $return;
-                break;
-            case 'date':
-            case 'base64':
-                return $this->data->getXml();
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Checks whether or not the supplied array is a struct or not
-     *
-     * @param array $array
-     * @return bool
-     */
-    function isStruct($array)
-    {
-        $expected = 0;
-        foreach ($array as $key => $value) {
-            if ((string)$key !== (string)$expected) {
-                return true;
-            }
-            $expected++;
-        }
-        return false;
-    }
-}
-
-/**
- * IXR_MESSAGE
- *
- * @package IXR
- * @since 1.5.0
- *
- */
-class IXR_Message
-{
-    var $message;
-    var $messageType;  // methodCall / methodResponse / fault
-    var $faultCode;
-    var $faultString;
-    var $methodName;
-    var $params;
-
-    // Current variable stacks
-    var $_arraystructs = array();   // The stack used to keep track of the current array/struct
-    var $_arraystructstypes = array(); // Stack keeping track of if things are structs or array
-    var $_currentStructName = array();  // A stack as well
-    var $_param;
-    var $_value;
-    var $_currentTag;
-    var $_currentTagContents;
-    // The XML parser
-    var $_parser;
-
-       /**
-        * PHP5 constructor.
-        */
-    function __construct( $message )
-    {
-        $this->message =& $message;
-    }
-
-       /**
-        * PHP4 constructor.
-        */
-       public function IXR_Message( $message ) {
-               self::__construct( $message );
-       }
-
-    function parse()
-    {
-        // first remove the XML declaration
-        // merged from WP #10698 - this method avoids the RAM usage of preg_replace on very large messages
-        $header = preg_replace( '/<\?xml.*?\?'.'>/s', '', substr( $this->message, 0, 100 ), 1 );
-        $this->message = trim( substr_replace( $this->message, $header, 0, 100 ) );
-        if ( '' == $this->message ) {
-            return false;
-        }
-
-        // Then remove the DOCTYPE
-        $header = preg_replace( '/^<!DOCTYPE[^>]*+>/i', '', substr( $this->message, 0, 200 ), 1 );
-        $this->message = trim( substr_replace( $this->message, $header, 0, 200 ) );
-        if ( '' == $this->message ) {
-            return false;
-        }
-
-        // Check that the root tag is valid
-        $root_tag = substr( $this->message, 0, strcspn( substr( $this->message, 0, 20 ), "> \t\r\n" ) );
-        if ( '<!DOCTYPE' === strtoupper( $root_tag ) ) {
-            return false;
-        }
-        if ( ! in_array( $root_tag, array( '<methodCall', '<methodResponse', '<fault' ) ) ) {
-            return false;
-        }
-
-        // Bail if there are too many elements to parse
-        $element_limit = 30000;
-        if ( function_exists( 'apply_filters' ) ) {
-            /**
-             * Filters the number of elements to parse in an XML-RPC response.
-             *
-             * @since 4.0.0
-             *
-             * @param int $element_limit Default elements limit.
-             */
-            $element_limit = apply_filters( 'xmlrpc_element_limit', $element_limit );
-        }
-        if ( $element_limit && 2 * $element_limit < substr_count( $this->message, '<' ) ) {
-            return false;
-        }
-
-        $this->_parser = xml_parser_create();
-        // Set XML parser to take the case of tags in to account
-        xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, false);
-        // Set XML parser callback functions
-        xml_set_object($this->_parser, $this);
-        xml_set_element_handler($this->_parser, 'tag_open', 'tag_close');
-        xml_set_character_data_handler($this->_parser, 'cdata');
-
-        // 256Kb, parse in chunks to avoid the RAM usage on very large messages
-        $chunk_size = 262144;
-
-        /**
-         * Filters the chunk size that can be used to parse an XML-RPC reponse message.
-         *
-         * @since 4.4.0
-         *
-         * @param int $chunk_size Chunk size to parse in bytes.
-         */
-        $chunk_size = apply_filters( 'xmlrpc_chunk_parsing_size', $chunk_size );
-
-        $final = false;
-        do {
-            if (strlen($this->message) <= $chunk_size) {
-                $final = true;
-            }
-            $part = substr($this->message, 0, $chunk_size);
-            $this->message = substr($this->message, $chunk_size);
-            if (!xml_parse($this->_parser, $part, $final)) {
-                return false;
-            }
-            if ($final) {
-                break;
-            }
-        } while (true);
-        xml_parser_free($this->_parser);
-
-        // Grab the error messages, if any
-        if ($this->messageType == 'fault') {
-            $this->faultCode = $this->params[0]['faultCode'];
-            $this->faultString = $this->params[0]['faultString'];
-        }
-        return true;
-    }
-
-    function tag_open($parser, $tag, $attr)
-    {
-        $this->_currentTagContents = '';
-        $this->currentTag = $tag;
-        switch($tag) {
-            case 'methodCall':
-            case 'methodResponse':
-            case 'fault':
-                $this->messageType = $tag;
-                break;
-                /* Deal with stacks of arrays and structs */
-            case 'data':    // data is to all intents and puposes more interesting than array
-                $this->_arraystructstypes[] = 'array';
-                $this->_arraystructs[] = array();
-                break;
-            case 'struct':
-                $this->_arraystructstypes[] = 'struct';
-                $this->_arraystructs[] = array();
-                break;
-        }
-    }
-
-    function cdata($parser, $cdata)
-    {
-        $this->_currentTagContents .= $cdata;
-    }
-
-    function tag_close($parser, $tag)
-    {
-        $valueFlag = false;
-        switch($tag) {
-            case 'int':
-            case 'i4':
-                $value = (int)trim($this->_currentTagContents);
-                $valueFlag = true;
-                break;
-            case 'double':
-                $value = (double)trim($this->_currentTagContents);
-                $valueFlag = true;
-                break;
-            case 'string':
-                $value = (string)trim($this->_currentTagContents);
-                $valueFlag = true;
-                break;
-            case 'dateTime.iso8601':
-                $value = new IXR_Date(trim($this->_currentTagContents));
-                $valueFlag = true;
-                break;
-            case 'value':
-                // "If no type is indicated, the type is string."
-                if (trim($this->_currentTagContents) != '') {
-                    $value = (string)$this->_currentTagContents;
-                    $valueFlag = true;
-                }
-                break;
-            case 'boolean':
-                $value = (boolean)trim($this->_currentTagContents);
-                $valueFlag = true;
-                break;
-            case 'base64':
-                $value = base64_decode($this->_currentTagContents);
-                $valueFlag = true;
-                break;
-                /* Deal with stacks of arrays and structs */
-            case 'data':
-            case 'struct':
-                $value = array_pop($this->_arraystructs);
-                array_pop($this->_arraystructstypes);
-                $valueFlag = true;
-                break;
-            case 'member':
-                array_pop($this->_currentStructName);
-                break;
-            case 'name':
-                $this->_currentStructName[] = trim($this->_currentTagContents);
-                break;
-            case 'methodName':
-                $this->methodName = trim($this->_currentTagContents);
-                break;
-        }
-
-        if ($valueFlag) {
-            if (count($this->_arraystructs) > 0) {
-                // Add value to struct or array
-                if ($this->_arraystructstypes[count($this->_arraystructstypes)-1] == 'struct') {
-                    // Add to struct
-                    $this->_arraystructs[count($this->_arraystructs)-1][$this->_currentStructName[count($this->_currentStructName)-1]] = $value;
-                } else {
-                    // Add to array
-                    $this->_arraystructs[count($this->_arraystructs)-1][] = $value;
-                }
-            } else {
-                // Just add as a parameter
-                $this->params[] = $value;
-            }
-        }
-        $this->_currentTagContents = '';
-    }
-}
-
-/**
- * IXR_Server
- *
- * @package IXR
- * @since 1.5.0
- */
-class IXR_Server
-{
-    var $data;
-    var $callbacks = array();
-    var $message;
-    var $capabilities;
-
-       /**
-        * PHP5 constructor.
-        */
-    function __construct( $callbacks = false, $data = false, $wait = false )
-    {
-        $this->setCapabilities();
-        if ($callbacks) {
-            $this->callbacks = $callbacks;
-        }
-        $this->setCallbacks();
-        if (!$wait) {
-            $this->serve($data);
-        }
-    }
-
-       /**
-        * PHP4 constructor.
-        */
-       public function IXR_Server( $callbacks = false, $data = false, $wait = false ) {
-               self::__construct( $callbacks, $data, $wait );
-       }
-
-    function serve($data = false)
-    {
-        if (!$data) {
-            if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] !== 'POST') {
-                if ( function_exists( 'status_header' ) ) {
-                    status_header( 405 ); // WP #20986
-                    header( 'Allow: POST' );
-                }
-                header('Content-Type: text/plain'); // merged from WP #9093
-                die('XML-RPC server accepts POST requests only.');
-            }
-
-            global $HTTP_RAW_POST_DATA;
-            if (empty($HTTP_RAW_POST_DATA)) {
-                // workaround for a bug in PHP 5.2.2 - http://bugs.php.net/bug.php?id=41293
-                $data = file_get_contents('php://input');
-            } else {
-                $data =& $HTTP_RAW_POST_DATA;
-            }
-        }
-        $this->message = new IXR_Message($data);
-        if (!$this->message->parse()) {
-            $this->error(-32700, 'parse error. not well formed');
-        }
-        if ($this->message->messageType != 'methodCall') {
-            $this->error(-32600, 'server error. invalid xml-rpc. not conforming to spec. Request must be a methodCall');
-        }
-        $result = $this->call($this->message->methodName, $this->message->params);
-
-        // Is the result an error?
-        if (is_a($result, 'IXR_Error')) {
-            $this->error($result);
-        }
-
-        // Encode the result
-        $r = new IXR_Value($result);
-        $resultxml = $r->getXml();
-
-        // Create the XML
-        $xml = <<<EOD
-<methodResponse>
-  <params>
-    <param>
-      <value>
-      $resultxml
-      </value>
-    </param>
-  </params>
-</methodResponse>
-
-EOD;
-      // Send it
-      $this->output($xml);
-    }
-
-    function call($methodname, $args)
-    {
-        if (!$this->hasMethod($methodname)) {
-            return new IXR_Error(-32601, 'server error. requested method '.$methodname.' does not exist.');
-        }
-        $method = $this->callbacks[$methodname];
-
-        // Perform the callback and send the response
-        if (count($args) == 1) {
-            // If only one parameter just send that instead of the whole array
-            $args = $args[0];
-        }
-
-        // Are we dealing with a function or a method?
-        if (is_string($method) && substr($method, 0, 5) == 'this:') {
-            // It's a class method - check it exists
-            $method = substr($method, 5);
-            if (!method_exists($this, $method)) {
-                return new IXR_Error(-32601, 'server error. requested class method "'.$method.'" does not exist.');
-            }
-
-            //Call the method
-            $result = $this->$method($args);
-        } else {
-            // It's a function - does it exist?
-            if (is_array($method)) {
-                if (!is_callable(array($method[0], $method[1]))) {
-                    return new IXR_Error(-32601, 'server error. requested object method "'.$method[1].'" does not exist.');
-                }
-            } else if (!function_exists($method)) {
-                return new IXR_Error(-32601, 'server error. requested function "'.$method.'" does not exist.');
-            }
-
-            // Call the function
-            $result = call_user_func($method, $args);
-        }
-        return $result;
-    }
-
-    function error($error, $message = false)
-    {
-        // Accepts either an error object or an error code and message
-        if ($message && !is_object($error)) {
-            $error = new IXR_Error($error, $message);
-        }
-        $this->output($error->getXml());
-    }
-
-    function output($xml)
-    {
-        $charset = function_exists('get_option') ? get_option('blog_charset') : '';
-        if ($charset)
-            $xml = '<?xml version="1.0" encoding="'.$charset.'"?>'."\n".$xml;
-        else
-            $xml = '<?xml version="1.0"?>'."\n".$xml;
-        $length = strlen($xml);
-        header('Connection: close');
-        if ($charset)
-            header('Content-Type: text/xml; charset='.$charset);
-        else
-            header('Content-Type: text/xml');
-        header('Date: '.date('r'));
-        echo $xml;
-        exit;
-    }
-
-    function hasMethod($method)
-    {
-        return in_array($method, array_keys($this->callbacks));
-    }
-
-    function setCapabilities()
-    {
-        // Initialises capabilities array
-        $this->capabilities = array(
-            'xmlrpc' => array(
-                'specUrl' => 'http://www.xmlrpc.com/spec',
-                'specVersion' => 1
-        ),
-            'faults_interop' => array(
-                'specUrl' => 'http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php',
-                'specVersion' => 20010516
-        ),
-            'system.multicall' => array(
-                'specUrl' => 'http://www.xmlrpc.com/discuss/msgReader$1208',
-                'specVersion' => 1
-        ),
-        );
-    }
-
-    function getCapabilities($args)
-    {
-        return $this->capabilities;
-    }
-
-    function setCallbacks()
-    {
-        $this->callbacks['system.getCapabilities'] = 'this:getCapabilities';
-        $this->callbacks['system.listMethods'] = 'this:listMethods';
-        $this->callbacks['system.multicall'] = 'this:multiCall';
-    }
-
-    function listMethods($args)
-    {
-        // Returns a list of methods - uses array_reverse to ensure user defined
-        // methods are listed before server defined methods
-        return array_reverse(array_keys($this->callbacks));
-    }
-
-    function multiCall($methodcalls)
-    {
-        // See http://www.xmlrpc.com/discuss/msgReader$1208
-        $return = array();
-        foreach ($methodcalls as $call) {
-            $method = $call['methodName'];
-            $params = $call['params'];
-            if ($method == 'system.multicall') {
-                $result = new IXR_Error(-32600, 'Recursive calls to system.multicall are forbidden');
-            } else {
-                $result = $this->call($method, $params);
-            }
-            if (is_a($result, 'IXR_Error')) {
-                $return[] = array(
-                    'faultCode' => $result->code,
-                    'faultString' => $result->message
-                );
-            } else {
-                $return[] = array($result);
-            }
-        }
-        return $return;
-    }
-}
-
-/**
- * IXR_Request
- *
- * @package IXR
- * @since 1.5.0
- */
-class IXR_Request
-{
-    var $method;
-    var $args;
-    var $xml;
-
-       /**
-        * PHP5 constructor.
-        */
-    function __construct($method, $args)
-    {
-        $this->method = $method;
-        $this->args = $args;
-        $this->xml = <<<EOD
-<?xml version="1.0"?>
-<methodCall>
-<methodName>{$this->method}</methodName>
-<params>
-
-EOD;
-        foreach ($this->args as $arg) {
-            $this->xml .= '<param><value>';
-            $v = new IXR_Value($arg);
-            $this->xml .= $v->getXml();
-            $this->xml .= "</value></param>\n";
-        }
-        $this->xml .= '</params></methodCall>';
-    }
-
-       /**
-        * PHP4 constructor.
-        */
-       public function IXR_Request( $method, $args ) {
-               self::__construct( $method, $args );
-       }
-
-    function getLength()
-    {
-        return strlen($this->xml);
-    }
-
-    function getXml()
-    {
-        return $this->xml;
-    }
-}
+require_once( ABSPATH . WPINC . '/IXR/class-IXR-server.php' );
 
-/**
- * IXR_Client
- *
- * @package IXR
- * @since 1.5.0
- *
- */
-class IXR_Client
-{
-    var $server;
-    var $port;
-    var $path;
-    var $useragent;
-    var $response;
-    var $message = false;
-    var $debug = false;
-    var $timeout;
-    var $headers = array();
-
-    // Storage place for an error message
-    var $error = false;
-
-       /**
-        * PHP5 constructor.
-        */
-    function __construct( $server, $path = false, $port = 80, $timeout = 15 )
-    {
-        if (!$path) {
-            // Assume we have been given a URL instead
-            $bits = parse_url($server);
-            $this->server = $bits['host'];
-            $this->port = isset($bits['port']) ? $bits['port'] : 80;
-            $this->path = isset($bits['path']) ? $bits['path'] : '/';
-
-            // Make absolutely sure we have a path
-            if (!$this->path) {
-                $this->path = '/';
-            }
-
-            if ( ! empty( $bits['query'] ) ) {
-                $this->path .= '?' . $bits['query'];
-            }
-        } else {
-            $this->server = $server;
-            $this->path = $path;
-            $this->port = $port;
-        }
-        $this->useragent = 'The Incutio XML-RPC PHP Library';
-        $this->timeout = $timeout;
-    }
-
-       /**
-        * PHP4 constructor.
-        */
-       public function IXR_Client( $server, $path = false, $port = 80, $timeout = 15 ) {
-               self::__construct( $server, $path, $port, $timeout );
-       }
-
-    function query()
-    {
-        $args = func_get_args();
-        $method = array_shift($args);
-        $request = new IXR_Request($method, $args);
-        $length = $request->getLength();
-        $xml = $request->getXml();
-        $r = "\r\n";
-        $request  = "POST {$this->path} HTTP/1.0$r";
-
-        // Merged from WP #8145 - allow custom headers
-        $this->headers['Host']          = $this->server;
-        $this->headers['Content-Type']  = 'text/xml';
-        $this->headers['User-Agent']    = $this->useragent;
-        $this->headers['Content-Length']= $length;
-
-        foreach( $this->headers as $header => $value ) {
-            $request .= "{$header}: {$value}{$r}";
-        }
-        $request .= $r;
-
-        $request .= $xml;
-
-        // Now send the request
-        if ($this->debug) {
-            echo '<pre class="ixr_request">'.htmlspecialchars($request)."\n</pre>\n\n";
-        }
-
-        if ($this->timeout) {
-            $fp = @fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout);
-        } else {
-            $fp = @fsockopen($this->server, $this->port, $errno, $errstr);
-        }
-        if (!$fp) {
-            $this->error = new IXR_Error(-32300, 'transport error - could not open socket');
-            return false;
-        }
-        fputs($fp, $request);
-        $contents = '';
-        $debugContents = '';
-        $gotFirstLine = false;
-        $gettingHeaders = true;
-        while (!feof($fp)) {
-            $line = fgets($fp, 4096);
-            if (!$gotFirstLine) {
-                // Check line for '200'
-                if (strstr($line, '200') === false) {
-                    $this->error = new IXR_Error(-32300, 'transport error - HTTP status code was not 200');
-                    return false;
-                }
-                $gotFirstLine = true;
-            }
-            if (trim($line) == '') {
-                $gettingHeaders = false;
-            }
-            if (!$gettingHeaders) {
-               // merged from WP #12559 - remove trim
-                $contents .= $line;
-            }
-            if ($this->debug) {
-               $debugContents .= $line;
-            }
-        }
-        if ($this->debug) {
-            echo '<pre class="ixr_response">'.htmlspecialchars($debugContents)."\n</pre>\n\n";
-        }
-
-        // Now parse what we've got back
-        $this->message = new IXR_Message($contents);
-        if (!$this->message->parse()) {
-            // XML error
-            $this->error = new IXR_Error(-32700, 'parse error. not well formed');
-            return false;
-        }
-
-        // Is the message a fault?
-        if ($this->message->messageType == 'fault') {
-            $this->error = new IXR_Error($this->message->faultCode, $this->message->faultString);
-            return false;
-        }
-
-        // Message must be OK
-        return true;
-    }
-
-    function getResponse()
-    {
-        // methodResponses can only have one param - return that
-        return $this->message->params[0];
-    }
-
-    function isError()
-    {
-        return (is_object($this->error));
-    }
-
-    function getErrorCode()
-    {
-        return $this->error->code;
-    }
-
-    function getErrorMessage()
-    {
-        return $this->error->message;
-    }
-}
-
-
-/**
- * IXR_Error
- *
- * @package IXR
- * @since 1.5.0
- */
-class IXR_Error
-{
-    var $code;
-    var $message;
-
-       /**
-        * PHP5 constructor.
-        */
-    function __construct( $code, $message )
-    {
-        $this->code = $code;
-        $this->message = htmlspecialchars($message);
-    }
-
-       /**
-        * PHP4 constructor.
-        */
-       public function IXR_Error( $code, $message ) {
-               self::__construct( $code, $message );
-       }
-
-    function getXml()
-    {
-        $xml = <<<EOD
-<methodResponse>
-  <fault>
-    <value>
-      <struct>
-        <member>
-          <name>faultCode</name>
-          <value><int>{$this->code}</int></value>
-        </member>
-        <member>
-          <name>faultString</name>
-          <value><string>{$this->message}</string></value>
-        </member>
-      </struct>
-    </value>
-  </fault>
-</methodResponse>
-
-EOD;
-        return $xml;
-    }
-}
-
-/**
- * IXR_Date
- *
- * @package IXR
- * @since 1.5.0
- */
-class IXR_Date {
-    var $year;
-    var $month;
-    var $day;
-    var $hour;
-    var $minute;
-    var $second;
-    var $timezone;
-
-       /**
-        * PHP5 constructor.
-        */
-    function __construct( $time )
-    {
-        // $time can be a PHP timestamp or an ISO one
-        if (is_numeric($time)) {
-            $this->parseTimestamp($time);
-        } else {
-            $this->parseIso($time);
-        }
-    }
+require_once( ABSPATH . WPINC . '/IXR/class-IXR-base64.php' );
 
-       /**
-        * PHP4 constructor.
-        */
-       public function IXR_Date( $time ) {
-               self::__construct( $time );
-       }
+require_once( ABSPATH . WPINC . '/IXR/class-IXR-client.php' );
 
-    function parseTimestamp($timestamp)
-    {
-        $this->year = date('Y', $timestamp);
-        $this->month = date('m', $timestamp);
-        $this->day = date('d', $timestamp);
-        $this->hour = date('H', $timestamp);
-        $this->minute = date('i', $timestamp);
-        $this->second = date('s', $timestamp);
-        $this->timezone = '';
-    }
+require_once( ABSPATH . WPINC . '/IXR/class-IXR-clientmulticall.php' );
 
-    function parseIso($iso)
-    {
-        $this->year = substr($iso, 0, 4);
-        $this->month = substr($iso, 4, 2);
-        $this->day = substr($iso, 6, 2);
-        $this->hour = substr($iso, 9, 2);
-        $this->minute = substr($iso, 12, 2);
-        $this->second = substr($iso, 15, 2);
-        $this->timezone = substr($iso, 17);
-    }
+require_once( ABSPATH . WPINC . '/IXR/class-IXR-date.php' );
 
-    function getIso()
-    {
-        return $this->year.$this->month.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second.$this->timezone;
-    }
-
-    function getXml()
-    {
-        return '<dateTime.iso8601>'.$this->getIso().'</dateTime.iso8601>';
-    }
-
-    function getTimestamp()
-    {
-        return mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year);
-    }
-}
-
-/**
- * IXR_Base64
- *
- * @package IXR
- * @since 1.5.0
- */
-class IXR_Base64
-{
-    var $data;
-
-       /**
-        * PHP5 constructor.
-        */
-    function __construct( $data )
-    {
-        $this->data = $data;
-    }
-
-       /**
-        * PHP4 constructor.
-        */
-       public function IXR_Base64( $data ) {
-               self::__construct( $data );
-       }
-
-    function getXml()
-    {
-        return '<base64>'.base64_encode($this->data).'</base64>';
-    }
-}
-
-/**
- * IXR_IntrospectionServer
- *
- * @package IXR
- * @since 1.5.0
- */
-class IXR_IntrospectionServer extends IXR_Server
-{
-    var $signatures;
-    var $help;
-
-       /**
-        * PHP5 constructor.
-        */
-    function __construct()
-    {
-        $this->setCallbacks();
-        $this->setCapabilities();
-        $this->capabilities['introspection'] = array(
-            'specUrl' => 'http://xmlrpc.usefulinc.com/doc/reserved.html',
-            'specVersion' => 1
-        );
-        $this->addCallback(
-            'system.methodSignature',
-            'this:methodSignature',
-            array('array', 'string'),
-            'Returns an array describing the return type and required parameters of a method'
-        );
-        $this->addCallback(
-            'system.getCapabilities',
-            'this:getCapabilities',
-            array('struct'),
-            'Returns a struct describing the XML-RPC specifications supported by this server'
-        );
-        $this->addCallback(
-            'system.listMethods',
-            'this:listMethods',
-            array('array'),
-            'Returns an array of available methods on this server'
-        );
-        $this->addCallback(
-            'system.methodHelp',
-            'this:methodHelp',
-            array('string', 'string'),
-            'Returns a documentation string for the specified method'
-        );
-    }
-
-       /**
-        * PHP4 constructor.
-        */
-       public function IXR_IntrospectionServer() {
-               self::__construct();
-       }
-
-    function addCallback($method, $callback, $args, $help)
-    {
-        $this->callbacks[$method] = $callback;
-        $this->signatures[$method] = $args;
-        $this->help[$method] = $help;
-    }
-
-    function call($methodname, $args)
-    {
-        // Make sure it's in an array
-        if ($args && !is_array($args)) {
-            $args = array($args);
-        }
-
-        // Over-rides default call method, adds signature check
-        if (!$this->hasMethod($methodname)) {
-            return new IXR_Error(-32601, 'server error. requested method "'.$this->message->methodName.'" not specified.');
-        }
-        $method = $this->callbacks[$methodname];
-        $signature = $this->signatures[$methodname];
-        $returnType = array_shift($signature);
-
-        // Check the number of arguments
-        if (count($args) != count($signature)) {
-            return new IXR_Error(-32602, 'server error. wrong number of method parameters');
-        }
-
-        // Check the argument types
-        $ok = true;
-        $argsbackup = $args;
-        for ($i = 0, $j = count($args); $i < $j; $i++) {
-            $arg = array_shift($args);
-            $type = array_shift($signature);
-            switch ($type) {
-                case 'int':
-                case 'i4':
-                    if (is_array($arg) || !is_int($arg)) {
-                        $ok = false;
-                    }
-                    break;
-                case 'base64':
-                case 'string':
-                    if (!is_string($arg)) {
-                        $ok = false;
-                    }
-                    break;
-                case 'boolean':
-                    if ($arg !== false && $arg !== true) {
-                        $ok = false;
-                    }
-                    break;
-                case 'float':
-                case 'double':
-                    if (!is_float($arg)) {
-                        $ok = false;
-                    }
-                    break;
-                case 'date':
-                case 'dateTime.iso8601':
-                    if (!is_a($arg, 'IXR_Date')) {
-                        $ok = false;
-                    }
-                    break;
-            }
-            if (!$ok) {
-                return new IXR_Error(-32602, 'server error. invalid method parameters');
-            }
-        }
-        // It passed the test - run the "real" method call
-        return parent::call($methodname, $argsbackup);
-    }
-
-    function methodSignature($method)
-    {
-        if (!$this->hasMethod($method)) {
-            return new IXR_Error(-32601, 'server error. requested method "'.$method.'" not specified.');
-        }
-        // We should be returning an array of types
-        $types = $this->signatures[$method];
-        $return = array();
-        foreach ($types as $type) {
-            switch ($type) {
-                case 'string':
-                    $return[] = 'string';
-                    break;
-                case 'int':
-                case 'i4':
-                    $return[] = 42;
-                    break;
-                case 'double':
-                    $return[] = 3.1415;
-                    break;
-                case 'dateTime.iso8601':
-                    $return[] = new IXR_Date(time());
-                    break;
-                case 'boolean':
-                    $return[] = true;
-                    break;
-                case 'base64':
-                    $return[] = new IXR_Base64('base64');
-                    break;
-                case 'array':
-                    $return[] = array('array');
-                    break;
-                case 'struct':
-                    $return[] = array('struct' => 'struct');
-                    break;
-            }
-        }
-        return $return;
-    }
-
-    function methodHelp($method)
-    {
-        return $this->help[$method];
-    }
-}
-
-/**
- * IXR_ClientMulticall
- *
- * @package IXR
- * @since 1.5.0
- */
-class IXR_ClientMulticall extends IXR_Client
-{
-    var $calls = array();
+require_once( ABSPATH . WPINC . '/IXR/class-IXR-error.php' );
 
-       /**
-        * PHP5 constructor.
-        */
-    function __construct( $server, $path = false, $port = 80 )
-    {
-        parent::IXR_Client($server, $path, $port);
-        $this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)';
-    }
+require_once( ABSPATH . WPINC . '/IXR/class-IXR-introspectionserver.php' );
 
-       /**
-        * PHP4 constructor.
-        */
-       public function IXR_ClientMulticall( $server, $path = false, $port = 80 ) {
-               self::__construct( $server, $path, $port );
-       }
+require_once( ABSPATH . WPINC . '/IXR/class-IXR-message.php' );
 
-    function addCall()
-    {
-        $args = func_get_args();
-        $methodName = array_shift($args);
-        $struct = array(
-            'methodName' => $methodName,
-            'params' => $args
-        );
-        $this->calls[] = $struct;
-    }
+require_once( ABSPATH . WPINC . '/IXR/class-IXR-request.php' );
 
-    function query()
-    {
-        // Prepare multicall, then call the parent::query() method
-        return parent::query('system.multicall', $this->calls);
-    }
-}
+require_once( ABSPATH . WPINC . '/IXR/class-IXR-value.php' );
\ No newline at end of file
index d525fe32e6e947db095e8c8b17a8e0ccd48100f1..62dd1195df446ffd5e9ed7f2f66f85238902e974 100644 (file)
 <?php
-
-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 {
-
-       /**
-        * Creates a new SimplePie_Cache object.
-        *
-        * @since 2.8.0
-        * @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'.
-        * @return WP_Feed_Cache_Transient Feed cache handler object that uses transients.
-        */
-       public function create($location, $filename, $extension) {
-               return new WP_Feed_Cache_Transient($location, $filename, $extension);
-       }
-}
-
-/**
- * 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;
-
-       /**
-        * 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'.
-        */
-       public function __construct($location, $filename, $extension) {
-               $this->name = 'feed_' . $filename;
-               $this->mod_name = 'feed_mod_' . $filename;
-
-               $lifetime = $this->lifetime;
-               /**
-                * Filters the transient lifetime of the feed cache.
-                *
-                * @since 2.8.0
-                *
-                * @param int    $lifetime Cache duration in seconds. Default is 43200 seconds (12 hours).
-                * @param string $filename Unique identifier for the cache object.
-                */
-               $this->lifetime = apply_filters( 'wp_feed_cache_transient_lifetime', $lifetime, $filename);
-       }
-
-       /**
-        * Sets the transient.
-        *
-        * @since 2.8.0
-        * @access public
-        *
-        * @param SimplePie $data Data to save.
-        * @return true Always true.
-        */
-       public function save($data) {
-               if ( $data instanceof SimplePie ) {
-                       $data = $data->data;
-               }
-
-               set_transient($this->name, $data, $this->lifetime);
-               set_transient($this->mod_name, time(), $this->lifetime);
-               return true;
-       }
-
-       /**
-        * 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);
-               delete_transient($this->mod_name);
-               return true;
-       }
-}
-
 /**
- * Core class for fetching remote files and reading local files with SimplePie.
- *
- * @since 2.8.0
+ * Feed API
  *
- * @see SimplePie_File
+ * @package WordPress
+ * @subpackage Feed
  */
-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;
-               $this->redirects = $redirects;
-               $this->headers = $headers;
-               $this->useragent = $useragent;
-
-               $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE;
-
-               if ( preg_match('/^http(s)?:\/\//i', $url) ) {
-                       $args = array(
-                               'timeout' => $this->timeout,
-                               'redirection' => $this->redirects,
-                       );
 
-                       if ( !empty($this->headers) )
-                               $args['headers'] = $this->headers;
+_deprecated_file( basename( __FILE__ ), '4.7.0', 'fetch_feed()' );
 
-                       if ( SIMPLEPIE_USERAGENT != $this->useragent ) //Use default WP user agent unless custom has been specified
-                               $args['user-agent'] = $this->useragent;
-
-                       $res = wp_safe_remote_request($url, $args);
-
-                       if ( is_wp_error($res) ) {
-                               $this->error = 'WP HTTP Error: ' . $res->get_error_message();
-                               $this->success = false;
-                       } else {
-                               $this->headers = wp_remote_retrieve_headers( $res );
-                               $this->body = wp_remote_retrieve_body( $res );
-                               $this->status_code = wp_remote_retrieve_response_code( $res );
-                       }
-               } else {
-                       $this->error = '';
-                       $this->success = false;
-               }
-       }
+if ( ! class_exists( 'SimplePie', false ) ) {
+       require_once( ABSPATH . WPINC . '/class-simplepie.php' );
 }
 
-/**
- * Core class used to implement SimpliePie feed sanitization.
- *
- * Extends the SimplePie_Sanitize class to use KSES, because
- * we cannot universally count on DOMDocument being available.
- *
- * @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 ) {
-                       if (preg_match('/(&(#(x[0-9a-fA-F]+|[0-9]+)|[a-zA-Z0-9]+)|<\/[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>)/', $data)) {
-                               $type |= SIMPLEPIE_CONSTRUCT_HTML;
-                       }
-                       else {
-                               $type |= SIMPLEPIE_CONSTRUCT_TEXT;
-                       }
-               }
-               if ( $type & SIMPLEPIE_CONSTRUCT_BASE64 ) {
-                       $data = base64_decode( $data );
-               }
-               if ( $type & ( SIMPLEPIE_CONSTRUCT_HTML | SIMPLEPIE_CONSTRUCT_XHTML ) ) {
-                       $data = wp_kses_post( $data );
-                       if ( $this->output_encoding !== 'UTF-8' ) {
-                               $data = $this->registry->call( 'Misc', 'change_encoding', array( $data, 'UTF-8', $this->output_encoding ) );
-                       }
-                       return $data;
-               } else {
-                       return parent::sanitize( $data, $type, $base );
-               }
-       }
-}
+require_once( ABSPATH . WPINC . '/class-wp-feed-cache.php' );
+require_once( ABSPATH . WPINC . '/class-wp-feed-cache-transient.php' );
+require_once( ABSPATH . WPINC . '/class-wp-simplepie-file.php' );
+require_once( ABSPATH . WPINC . '/class-wp-simplepie-sanitize-kses.php' );
\ No newline at end of file
index 5a3075846c4a76acefd3f57c5613d04b3c007599..b9f5ab50fba6b5bd6d230871063129c2262a31c2 100644 (file)
@@ -101,8 +101,6 @@ class WP_Http {
         * @access public
         * @since 2.7.0
         *
-        * @global string $wp_version
-        *
         * @param string       $url  The request URL.
         * @param string|array $args {
         *     Optional. Array or string of HTTP request arguments.
@@ -116,7 +114,7 @@ class WP_Http {
         *     @type string       $httpversion         Version of the HTTP protocol to use. Accepts '1.0' and '1.1'.
         *                                             Default '1.0'.
         *     @type string       $user-agent          User-agent value sent.
-        *                                             Default WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ).
+        *                                             Default WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( '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.
@@ -148,8 +146,6 @@ class WP_Http {
         *                        A WP_Error instance upon error.
         */
        public function request( $url, $args = array() ) {
-               global $wp_version;
-
                $defaults = array(
                        'method' => 'GET',
                        /**
@@ -185,7 +181,7 @@ class WP_Http {
                         *
                         * @param string $user_agent WordPress user agent string.
                         */
-                       'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) ),
+                       'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) ),
                        /**
                         * Filters whether to pass URLs through wp_http_validate_url() in an HTTP request.
                         *
@@ -304,7 +300,7 @@ class WP_Http {
                        'timeout' => $r['timeout'],
                        'useragent' => $r['user-agent'],
                        'blocking' => $r['blocking'],
-                       'hooks' => new Requests_Hooks(),
+                       'hooks' => new WP_HTTP_Requests_Hooks( $url, $r ),
                );
 
                // Ensure redirects follow browser behaviour.
index 9790d266f67b6532410ac24adcb16df80f3331a2..b1b7211946e7123735802f90cb3936de4e2e4a39 100644 (file)
@@ -55,49 +55,59 @@ class WP_oEmbed {
        public function __construct() {
                $host = urlencode( home_url() );
                $providers = array(
-                       '#http://((m|www)\.)?youtube\.com/watch.*#i'          => array( 'http://www.youtube.com/oembed',                             true  ),
-                       '#https://((m|www)\.)?youtube\.com/watch.*#i'         => array( 'http://www.youtube.com/oembed?scheme=https',                true  ),
-                       '#http://((m|www)\.)?youtube\.com/playlist.*#i'       => array( 'http://www.youtube.com/oembed',                             true  ),
-                       '#https://((m|www)\.)?youtube\.com/playlist.*#i'      => array( 'http://www.youtube.com/oembed?scheme=https',                true  ),
-                       '#http://youtu\.be/.*#i'                              => array( 'http://www.youtube.com/oembed',                             true  ),
-                       '#https://youtu\.be/.*#i'                             => array( 'http://www.youtube.com/oembed?scheme=https',                true  ),
-                       '#https?://(.+\.)?vimeo\.com/.*#i'                    => array( 'http://vimeo.com/api/oembed.{format}',                      true  ),
-                       '#https?://(www\.)?dailymotion\.com/.*#i'             => array( 'https://www.dailymotion.com/services/oembed',               true  ),
-                       '#https?://dai.ly/.*#i'                               => array( 'https://www.dailymotion.com/services/oembed',               true  ),
-                       '#https?://(www\.)?flickr\.com/.*#i'                  => array( 'https://www.flickr.com/services/oembed/',                   true  ),
-                       '#https?://flic\.kr/.*#i'                             => array( 'https://www.flickr.com/services/oembed/',                   true  ),
-                       '#https?://(.+\.)?smugmug\.com/.*#i'                  => array( 'http://api.smugmug.com/services/oembed/',                   true  ),
-                       '#https?://(www\.)?hulu\.com/watch/.*#i'              => array( 'http://www.hulu.com/api/oembed.{format}',                   true  ),
-                       'http://i*.photobucket.com/albums/*'                  => array( 'http://api.photobucket.com/oembed',                         false ),
-                       'http://gi*.photobucket.com/groups/*'                 => array( 'http://api.photobucket.com/oembed',                         false ),
-                       '#https?://(www\.)?scribd\.com/doc/.*#i'              => array( 'http://www.scribd.com/services/oembed',                     true  ),
-                       '#https?://wordpress.tv/.*#i'                         => array( 'http://wordpress.tv/oembed/',                               true  ),
-                       '#https?://(.+\.)?polldaddy\.com/.*#i'                => array( 'https://polldaddy.com/oembed/',                             true  ),
-                       '#https?://poll\.fm/.*#i'                             => array( 'https://polldaddy.com/oembed/',                             true  ),
-                       '#https?://(www\.)?funnyordie\.com/videos/.*#i'       => array( 'http://www.funnyordie.com/oembed',                          true  ),
-                       '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i' => array( 'https://publish.twitter.com/oembed',                        true  ),
-                       '#https?://(www\.)?twitter\.com/.+?/timelines/.*#i'   => array( 'https://publish.twitter.com/oembed',                        true  ),
-                       '#https?://(www\.)?twitter\.com/i/moments/.*#i'       => array( 'https://publish.twitter.com/oembed',                        true  ),
-                       '#https?://vine.co/v/.*#i'                            => array( 'https://vine.co/oembed.{format}',                           true  ),
-                       '#https?://(www\.)?soundcloud\.com/.*#i'              => array( 'http://soundcloud.com/oembed',                              true  ),
-                       '#https?://(.+?\.)?slideshare\.net/.*#i'              => array( 'https://www.slideshare.net/api/oembed/2',                   true  ),
-                       '#https?://(www\.)?instagr(\.am|am\.com)/p/.*#i'      => array( 'https://api.instagram.com/oembed',                          true  ),
-                       '#https?://(open|play)\.spotify\.com/.*#i'            => array( 'https://embed.spotify.com/oembed/',                         true  ),
-                       '#https?://(.+\.)?imgur\.com/.*#i'                    => array( 'http://api.imgur.com/oembed',                               true  ),
-                       '#https?://(www\.)?meetu(\.ps|p\.com)/.*#i'           => array( 'http://api.meetup.com/oembed',                              true  ),
-                       '#https?://(www\.)?issuu\.com/.+/docs/.+#i'           => array( 'http://issuu.com/oembed_wp',                                true  ),
-                       '#https?://(www\.)?collegehumor\.com/video/.*#i'      => array( 'http://www.collegehumor.com/oembed.{format}',               true  ),
-                       '#https?://(www\.)?mixcloud\.com/.*#i'                => array( 'http://www.mixcloud.com/oembed',                            true  ),
-                       '#https?://(www\.|embed\.)?ted\.com/talks/.*#i'       => array( 'http://www.ted.com/talks/oembed.{format}',                  true  ),
-                       '#https?://(www\.)?(animoto|video214)\.com/play/.*#i' => array( 'https://animoto.com/oembeds/create',                        true  ),
-                       '#https?://(.+)\.tumblr\.com/post/.*#i'               => array( 'https://www.tumblr.com/oembed/1.0',                         true  ),
-                       '#https?://(www\.)?kickstarter\.com/projects/.*#i'    => array( 'https://www.kickstarter.com/services/oembed',               true  ),
-                       '#https?://kck\.st/.*#i'                              => array( 'https://www.kickstarter.com/services/oembed',               true  ),
-                       '#https?://cloudup\.com/.*#i'                         => array( 'https://cloudup.com/oembed',                                true  ),
-                       '#https?://(www\.)?reverbnation\.com/.*#i'            => array( 'https://www.reverbnation.com/oembed',                       true  ),
-                       '#https?://videopress.com/v/.*#'                      => array( 'https://public-api.wordpress.com/oembed/1.0/?for=' . $host, true  ),
-                       '#https?://(www\.)?reddit\.com/r/[^/]+/comments/.*#i' => array( 'https://www.reddit.com/oembed',                             true  ),
-                       '#https?://(www\.)?speakerdeck\.com/.*#i'             => array( 'https://speakerdeck.com/oembed.{format}',                   true  ),
+                       '#https?://((m|www)\.)?youtube\.com/watch.*#i'             => array( 'https://www.youtube.com/oembed',                            true  ),
+                       '#https?://((m|www)\.)?youtube\.com/playlist.*#i'          => array( 'https://www.youtube.com/oembed',                            true  ),
+                       '#https?://youtu\.be/.*#i'                                 => array( 'https://www.youtube.com/oembed',                            true  ),
+                       '#https?://(.+\.)?vimeo\.com/.*#i'                         => array( 'https://vimeo.com/api/oembed.{format}',                     true  ),
+                       '#https?://(www\.)?dailymotion\.com/.*#i'                  => array( 'https://www.dailymotion.com/services/oembed',               true  ),
+                       '#https?://dai\.ly/.*#i'                                   => array( 'https://www.dailymotion.com/services/oembed',               true  ),
+                       '#https?://(www\.)?flickr\.com/.*#i'                       => array( 'https://www.flickr.com/services/oembed/',                   true  ),
+                       '#https?://flic\.kr/.*#i'                                  => array( 'https://www.flickr.com/services/oembed/',                   true  ),
+                       '#https?://(.+\.)?smugmug\.com/.*#i'                       => array( 'https://api.smugmug.com/services/oembed/',                  true  ),
+                       '#https?://(www\.)?hulu\.com/watch/.*#i'                   => array( 'http://www.hulu.com/api/oembed.{format}',                   true  ),
+                       'http://i*.photobucket.com/albums/*'                       => array( 'http://api.photobucket.com/oembed',                         false ),
+                       'http://gi*.photobucket.com/groups/*'                      => array( 'http://api.photobucket.com/oembed',                         false ),
+                       '#https?://(www\.)?scribd\.com/doc/.*#i'                   => array( 'https://www.scribd.com/services/oembed',                    true  ),
+                       '#https?://wordpress\.tv/.*#i'                             => array( 'https://wordpress.tv/oembed/',                              true  ),
+                       '#https?://(.+\.)?polldaddy\.com/.*#i'                     => array( 'https://polldaddy.com/oembed/',                             true  ),
+                       '#https?://poll\.fm/.*#i'                                  => array( 'https://polldaddy.com/oembed/',                             true  ),
+                       '#https?://(www\.)?funnyordie\.com/videos/.*#i'            => array( 'http://www.funnyordie.com/oembed',                          true  ),
+                       '#https?://(www\.)?twitter\.com/\w{1,15}/status(es)?/.*#i' => array( 'https://publish.twitter.com/oembed',                        true  ),
+                       '#https?://(www\.)?twitter\.com/\w{1,15}$#i'               => array( 'https://publish.twitter.com/oembed',                        true  ),
+                       '#https?://(www\.)?twitter\.com/\w{1,15}/likes$#i'         => array( 'https://publish.twitter.com/oembed',                        true  ),
+                       '#https?://(www\.)?twitter\.com/\w{1,15}/lists/.*#i'       => array( 'https://publish.twitter.com/oembed',                        true  ),
+                       '#https?://(www\.)?twitter\.com/\w{1,15}/timelines/.*#i'   => array( 'https://publish.twitter.com/oembed',                        true  ),
+                       '#https?://(www\.)?twitter\.com/i/moments/.*#i'            => array( 'https://publish.twitter.com/oembed',                        true  ),
+                       '#https?://vine\.co/v/.*#i'                                => array( 'https://vine.co/oembed.{format}',                           true  ),
+                       '#https?://(www\.)?soundcloud\.com/.*#i'                   => array( 'https://soundcloud.com/oembed',                             true  ),
+                       '#https?://(.+?\.)?slideshare\.net/.*#i'                   => array( 'https://www.slideshare.net/api/oembed/2',                   true  ),
+                       '#https?://(www\.)?instagr(\.am|am\.com)/p/.*#i'           => array( 'https://api.instagram.com/oembed',                          true  ),
+                       '#https?://(open|play)\.spotify\.com/.*#i'                 => array( 'https://embed.spotify.com/oembed/',                         true  ),
+                       '#https?://(.+\.)?imgur\.com/.*#i'                         => array( 'http://api.imgur.com/oembed',                               true  ),
+                       '#https?://(www\.)?meetu(\.ps|p\.com)/.*#i'                => array( 'https://api.meetup.com/oembed',                             true  ),
+                       '#https?://(www\.)?issuu\.com/.+/docs/.+#i'                => array( 'https://issuu.com/oembed_wp',                               true  ),
+                       '#https?://(www\.)?collegehumor\.com/video/.*#i'           => array( 'http://www.collegehumor.com/oembed.{format}',               true  ),
+                       '#https?://(www\.)?mixcloud\.com/.*#i'                     => array( 'https://www.mixcloud.com/oembed',                           true  ),
+                       '#https?://(www\.|embed\.)?ted\.com/talks/.*#i'            => array( 'https://www.ted.com/services/v1/oembed.{format}',           true  ),
+                       '#https?://(www\.)?(animoto|video214)\.com/play/.*#i'      => array( 'https://animoto.com/oembeds/create',                        true  ),
+                       '#https?://(.+)\.tumblr\.com/post/.*#i'                    => array( 'https://www.tumblr.com/oembed/1.0',                         true  ),
+                       '#https?://(www\.)?kickstarter\.com/projects/.*#i'         => array( 'https://www.kickstarter.com/services/oembed',               true  ),
+                       '#https?://kck\.st/.*#i'                                   => array( 'https://www.kickstarter.com/services/oembed',               true  ),
+                       '#https?://cloudup\.com/.*#i'                              => array( 'https://cloudup.com/oembed',                                true  ),
+                       '#https?://(www\.)?reverbnation\.com/.*#i'                 => array( 'https://www.reverbnation.com/oembed',                       true  ),
+                       '#https?://videopress\.com/v/.*#'                          => array( 'https://public-api.wordpress.com/oembed/1.0/?for=' . $host, true  ),
+                       '#https?://(www\.)?reddit\.com/r/[^/]+/comments/.*#i'      => array( 'https://www.reddit.com/oembed',                             true  ),
+                       '#https?://(www\.)?speakerdeck\.com/.*#i'                  => array( 'https://speakerdeck.com/oembed.{format}',                   true  ),
+                       '#https?://www\.facebook\.com/.*/posts/.*#i'               => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ),
+                       '#https?://www\.facebook\.com/.*/activity/.*#i'            => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ),
+                       '#https?://www\.facebook\.com/.*/photos/.*#i'              => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ),
+                       '#https?://www\.facebook\.com/photo(s/|\.php).*#i'         => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ),
+                       '#https?://www\.facebook\.com/permalink\.php.*#i'          => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ),
+                       '#https?://www\.facebook\.com/media/.*#i'                  => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ),
+                       '#https?://www\.facebook\.com/questions/.*#i'              => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ),
+                       '#https?://www\.facebook\.com/notes/.*#i'                  => array( 'https://www.facebook.com/plugins/post/oembed.json/',        true  ),
+                       '#https?://www\.facebook\.com/.*/videos/.*#i'              => array( 'https://www.facebook.com/plugins/video/oembed.json/',       true  ),
+                       '#https?://www\.facebook\.com/video\.php.*#i'              => array( 'https://www.facebook.com/plugins/video/oembed.json/',       true  ),
                );
 
                if ( ! empty( self::$early_providers['add'] ) ) {
@@ -160,13 +170,17 @@ class WP_oEmbed {
                 * | Tumblr       | tumblr.com            |      Yes       | 4.2.0     |
                 * | Kickstarter  | kickstarter.com       |      Yes       | 4.2.0     |
                 * | Kickstarter  | kck.st                |      Yes       | 4.2.0     |
-                * | Cloudup      | cloudup.com           |      Yes       | 4.4.0     |
+                * | Cloudup      | cloudup.com           |      Yes       | 4.3.0     |
                 * | ReverbNation | reverbnation.com      |      Yes       | 4.4.0     |
                 * | VideoPress   | videopress.com        |      Yes       | 4.4.0     |
                 * | Reddit       | reddit.com            |      Yes       | 4.4.0     |
                 * | Speaker Deck | speakerdeck.com       |      Yes       | 4.4.0     |
                 * | Twitter      | twitter.com/timelines |      Yes       | 4.5.0     |
                 * | Twitter      | twitter.com/moments   |      Yes       | 4.5.0     |
+                * | Facebook     | facebook.com          |      Yes       | 4.7.0     |
+                * | Twitter      | twitter.com/user      |      Yes       | 4.7.0     |
+                * | Twitter      | twitter.com/likes     |      Yes       | 4.7.0     |
+                * | Twitter      | twitter.com/lists     |      Yes       | 4.7.0     |
                 *
                 * No longer supported providers:
                 *
@@ -252,7 +266,7 @@ class WP_oEmbed {
        /**
         * Adds an oEmbed provider.
         *
-        * The provider is removed just-in-time when wp_oembed_add_provider() is called before
+        * The provider is added just-in-time when wp_oembed_add_provider() is called before
         * the {@see 'plugins_loaded'} hook.
         *
         * The just-in-time addition is for the benefit of the {@see 'oembed_providers'} filter.
@@ -549,7 +563,7 @@ class WP_oEmbed {
         * @access private
         *
         * @param string $response_body
-        * @return object|false
+        * @return stdClass|false
         */
        private function _parse_xml_body( $response_body ) {
                if ( ! function_exists( 'simplexml_import_dom' ) || ! class_exists( 'DOMDocument', false ) )
@@ -677,22 +691,3 @@ class WP_oEmbed {
                return str_replace( $tokens, $pre, $stripped );
        }
 }
-
-/**
- * Returns the initialized WP_oEmbed object.
- *
- * @since 2.9.0
- * @access private
- *
- * @staticvar WP_oEmbed $wp_oembed
- *
- * @return WP_oEmbed object.
- */
-function _wp_oembed_get_object() {
-       static $wp_oembed = null;
-
-       if ( is_null( $wp_oembed ) ) {
-               $wp_oembed = new WP_oEmbed();
-       }
-       return $wp_oembed;
-}
index 0e48d7269f0d734e1d4b67430e46cb456b668d55..2c481c0da750de1ee652c6c8e25da6e511e3718c 100644 (file)
@@ -31,7 +31,7 @@ class PHPMailer
      * The PHPMailer Version number.
      * @var string
      */
-    public $Version = '5.2.22';
+    public $Version = '5.2.14';
 
     /**
      * Email priority.
@@ -201,9 +201,6 @@ class PHPMailer
     /**
      * An ID to be used in the Message-ID header.
      * If empty, a unique id will be generated.
-     * You can set your own, but it must be in the format "<id@domain>",
-     * as defined in RFC5322 section 3.6.4 or it will be ignored.
-     * @see https://tools.ietf.org/html/rfc5322#section-3.6.4
      * @var string
      */
     public $MessageID = '';
@@ -288,7 +285,7 @@ class PHPMailer
 
     /**
      * SMTP auth type.
-     * Options are CRAM-MD5, LOGIN, PLAIN, attempted in that order if not specified
+     * Options are LOGIN (default), PLAIN, NTLM, CRAM-MD5
      * @var string
      */
     public $AuthType = '';
@@ -355,7 +352,6 @@ class PHPMailer
     /**
      * Whether to split multiple to addresses into multiple messages
      * or send them all in one message.
-     * Only supported in `mail` and `sendmail` transports, not in SMTP.
      * @var boolean
      */
     public $SingleTo = false;
@@ -398,7 +394,7 @@ class PHPMailer
 
     /**
      * DKIM Identity.
-     * Usually the email address used as the source of the email.
+     * Usually the email address used as the source of the email
      * @var string
      */
     public $DKIM_identity = '';
@@ -423,13 +419,6 @@ class PHPMailer
      */
     public $DKIM_private = '';
 
-    /**
-     * DKIM private key string.
-     * If set, takes precedence over `$DKIM_private`.
-     * @var string
-     */
-    public $DKIM_private_string = '';
-
     /**
      * Callback Action function name.
      *
@@ -457,15 +446,6 @@ class PHPMailer
      */
     public $XMailer = '';
 
-    /**
-     * Which validator to use by default when validating email addresses.
-     * May be a callable to inject your own validator, but there are several built-in validators.
-     * @see PHPMailer::validateAddress()
-     * @var string|callable
-     * @static
-     */
-    public static $validator = 'auto';
-
     /**
      * An instance of the SMTP sender class.
      * @var SMTP
@@ -654,11 +634,9 @@ class PHPMailer
      * Constructor.
      * @param boolean $exceptions Should we throw external exceptions?
      */
-    public function __construct($exceptions = null)
+    public function __construct($exceptions = false)
     {
-        if ($exceptions !== null) {
-            $this->exceptions = (boolean)$exceptions;
-        }
+        $this->exceptions = (boolean)$exceptions;
     }
 
     /**
@@ -667,7 +645,9 @@ class PHPMailer
     public function __destruct()
     {
         //Close any open SMTP connection nicely
-        $this->smtpClose();
+        if ($this->Mailer == 'smtp') {
+            $this->smtpClose();
+        }
     }
 
     /**
@@ -691,16 +671,14 @@ class PHPMailer
         } else {
             $subject = $this->encodeHeader($this->secureHeader($subject));
         }
-
-        //Can't use additional_parameters in safe_mode, calling mail() with null params breaks
-        //@link http://php.net/manual/en/function.mail.php
-        if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) {
+        if (ini_get('safe_mode') || !($this->UseSendmailOptions)) {
             $result = @mail($to, $subject, $body, $header);
         } else {
             $result = @mail($to, $subject, $body, $header, $params);
         }
         return $result;
     }
+
     /**
      * Output debugging info via user-defined method.
      * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).
@@ -735,7 +713,7 @@ class PHPMailer
             case 'echo':
             default:
                 //Normalize line breaks
-                $str = preg_replace('/\r\n?/ms', "\n", $str);
+                $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str);
                 echo gmdate('Y-m-d H:i:s') . "\t" . str_replace(
                     "\n",
                     "\n                   \t                  ",
@@ -872,7 +850,7 @@ class PHPMailer
         $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
         if (($pos = strrpos($address, '@')) === false) {
             // At-sign is misssing.
-            $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address";
+            $error_message = $this->lang('invalid_address') . $address;
             $this->setError($error_message);
             $this->edebug($error_message);
             if ($this->exceptions) {
@@ -922,7 +900,7 @@ class PHPMailer
             return false;
         }
         if (!$this->validateAddress($address)) {
-            $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address";
+            $error_message = $this->lang('invalid_address') . $address;
             $this->setError($error_message);
             $this->edebug($error_message);
             if ($this->exceptions) {
@@ -945,61 +923,6 @@ class PHPMailer
         return false;
     }
 
-    /**
-     * Parse and validate a string containing one or more RFC822-style comma-separated email addresses
-     * of the form "display name <address>" into an array of name/address pairs.
-     * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available.
-     * Note that quotes in the name part are removed.
-     * @param string $addrstr The address list string
-     * @param bool $useimap Whether to use the IMAP extension to parse the list
-     * @return array
-     * @link http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation
-     */
-    public function parseAddresses($addrstr, $useimap = true)
-    {
-        $addresses = array();
-        if ($useimap and function_exists('imap_rfc822_parse_adrlist')) {
-            //Use this built-in parser if it's available
-            $list = imap_rfc822_parse_adrlist($addrstr, '');
-            foreach ($list as $address) {
-                if ($address->host != '.SYNTAX-ERROR.') {
-                    if ($this->validateAddress($address->mailbox . '@' . $address->host)) {
-                        $addresses[] = array(
-                            'name' => (property_exists($address, 'personal') ? $address->personal : ''),
-                            'address' => $address->mailbox . '@' . $address->host
-                        );
-                    }
-                }
-            }
-        } else {
-            //Use this simpler parser
-            $list = explode(',', $addrstr);
-            foreach ($list as $address) {
-                $address = trim($address);
-                //Is there a separate name part?
-                if (strpos($address, '<') === false) {
-                    //No separate name, just use the whole thing
-                    if ($this->validateAddress($address)) {
-                        $addresses[] = array(
-                            'name' => '',
-                            'address' => $address
-                        );
-                    }
-                } else {
-                    list($name, $email) = explode('<', $address);
-                    $email = trim(str_replace('>', '', $email));
-                    if ($this->validateAddress($email)) {
-                        $addresses[] = array(
-                            'name' => trim(str_replace(array('"', "'"), '', $name)),
-                            'address' => $email
-                        );
-                    }
-                }
-            }
-        }
-        return $addresses;
-    }
-
     /**
      * Set the From and FromName properties.
      * @param string $address
@@ -1016,7 +939,7 @@ class PHPMailer
         if (($pos = strrpos($address, '@')) === false or
             (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and
             !$this->validateAddress($address)) {
-            $error_message = $this->lang('invalid_address') . " (setFrom) $address";
+            $error_message = $this->lang('invalid_address') . $address;
             $this->setError($error_message);
             $this->edebug($error_message);
             if ($this->exceptions) {
@@ -1049,30 +972,19 @@ class PHPMailer
     /**
      * Check that a string looks like an email address.
      * @param string $address The email address to check
-     * @param string|callable $patternselect A selector for the validation pattern to use :
+     * @param string $patternselect A selector for the validation pattern to use :
      * * `auto` Pick best pattern automatically;
      * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14;
      * * `pcre` Use old PCRE implementation;
      * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;
      * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements.
      * * `noregex` Don't use a regex: super fast, really dumb.
-     * Alternatively you may pass in a callable to inject your own validator, for example:
-     * PHPMailer::validateAddress('user@example.com', function($address) {
-     *     return (strpos($address, '@') !== false);
-     * });
-     * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator.
      * @return boolean
      * @static
      * @access public
      */
-    public static function validateAddress($address, $patternselect = null)
+    public static function validateAddress($address, $patternselect = 'auto')
     {
-        if (is_null($patternselect)) {
-            $patternselect = self::$validator;
-        }
-        if (is_callable($patternselect)) {
-            return call_user_func($patternselect, $address);
-        }
         //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
         if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) {
             return false;
@@ -1249,7 +1161,7 @@ class PHPMailer
                 }
                 $this->$address_kind = $this->punyencodeAddress($this->$address_kind);
                 if (!$this->validateAddress($this->$address_kind)) {
-                    $error_message = $this->lang('invalid_address') . ' (punyEncode) ' . $this->$address_kind;
+                    $error_message = $this->lang('invalid_address') . $this->$address_kind;
                     $this->setError($error_message);
                     $this->edebug($error_message);
                     if ($this->exceptions) {
@@ -1260,7 +1172,7 @@ class PHPMailer
             }
 
             // Set whether the message is multipart/alternative
-            if ($this->alternativeExists()) {
+            if (!empty($this->AltBody)) {
                 $this->ContentType = 'multipart/alternative';
             }
 
@@ -1294,11 +1206,9 @@ class PHPMailer
 
             // Sign with DKIM if enabled
             if (!empty($this->DKIM_domain)
+                && !empty($this->DKIM_private)
                 && !empty($this->DKIM_selector)
-                && (!empty($this->DKIM_private_string)
-                   || (!empty($this->DKIM_private) && file_exists($this->DKIM_private))
-                )
-            ) {
+                && file_exists($this->DKIM_private)) {
                 $header_dkim = $this->DKIM_Add(
                     $this->MIMEHeader . $this->mailHeader,
                     $this->encodeHeader($this->secureHeader($this->Subject)),
@@ -1364,24 +1274,19 @@ class PHPMailer
      */
     protected function sendmailSend($header, $body)
     {
-        // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
-        if (!empty($this->Sender) and self::isShellSafe($this->Sender)) {
+        if ($this->Sender != '') {
             if ($this->Mailer == 'qmail') {
-                $sendmailFmt = '%s -f%s';
+                $sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
             } else {
-                $sendmailFmt = '%s -oi -f%s -t';
+                $sendmail = sprintf('%s -oi -f%s -t', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
             }
         } else {
             if ($this->Mailer == 'qmail') {
-                $sendmailFmt = '%s';
+                $sendmail = sprintf('%s', escapeshellcmd($this->Sendmail));
             } else {
-                $sendmailFmt = '%s -oi -t';
+                $sendmail = sprintf('%s -oi -t', escapeshellcmd($this->Sendmail));
             }
         }
-
-        // TODO: If possible, this should be changed to escapeshellarg.  Needs thorough testing.
-        $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender);
-
         if ($this->SingleTo) {
             foreach ($this->SingleToArray as $toAddr) {
                 if (!@$mail = popen($sendmail, 'w')) {
@@ -1427,40 +1332,6 @@ class PHPMailer
         return true;
     }
 
-    /**
-     * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.
-     *
-     * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows.
-     * @param string $string The string to be validated
-     * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report
-     * @access protected
-     * @return boolean
-     */
-    protected static function isShellSafe($string)
-    {
-        // Future-proof
-        if (escapeshellcmd($string) !== $string
-            or !in_array(escapeshellarg($string), array("'$string'", "\"$string\""))
-        ) {
-            return false;
-        }
-
-        $length = strlen($string);
-
-        for ($i = 0; $i < $length; $i++) {
-            $c = $string[$i];
-
-            // All other characters have a special meaning in at least one common shell, including = and +.
-            // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here.
-            // Note that this does permit non-Latin alphanumeric characters based on the current locale.
-            if (!ctype_alnum($c) && strpos('@_-.', $c) === false) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
     /**
      * Send mail using the PHP mail() function.
      * @param string $header The message headers
@@ -1478,20 +1349,17 @@ class PHPMailer
         }
         $to = implode(', ', $toArr);
 
-        $params = null;
-        //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
-        if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
-            // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
-            if (self::isShellSafe($this->Sender)) {
-                $params = sprintf('-f%s', $this->Sender);
-            }
+        if (empty($this->Sender)) {
+            $params = ' ';
+        } else {
+            $params = sprintf('-f%s', $this->Sender);
         }
-        if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) {
+        if ($this->Sender != '' and !ini_get('safe_mode')) {
             $old_from = ini_get('sendmail_from');
             ini_set('sendmail_from', $this->Sender);
         }
         $result = false;
-        if ($this->SingleTo and count($toArr) > 1) {
+        if ($this->SingleTo && count($toArr) > 1) {
             foreach ($toArr as $toAddr) {
                 $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
                 $this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From);
@@ -1517,7 +1385,7 @@ class PHPMailer
     public function getSMTPInstance()
     {
         if (!is_object($this->smtp)) {
-               require_once( 'class-smtp.php' );
+                       require_once( 'class-smtp.php' );
             $this->smtp = new SMTP;
         }
         return $this->smtp;
@@ -1541,10 +1409,10 @@ class PHPMailer
         if (!$this->smtpConnect($this->SMTPOptions)) {
             throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
         }
-        if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
-            $smtp_from = $this->Sender;
-        } else {
+        if ('' == $this->Sender) {
             $smtp_from = $this->From;
+        } else {
+            $smtp_from = $this->Sender;
         }
         if (!$this->smtp->mail($smtp_from)) {
             $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
@@ -1598,17 +1466,12 @@ class PHPMailer
      * @throws phpmailerException
      * @return boolean
      */
-    public function smtpConnect($options = null)
+    public function smtpConnect($options = array())
     {
         if (is_null($this->smtp)) {
             $this->smtp = $this->getSMTPInstance();
         }
 
-        //If no options are provided, use whatever is set in the instance
-        if (is_null($options)) {
-            $options = $this->SMTPOptions;
-        }
-
         // Already connected?
         if ($this->smtp->connected()) {
             return true;
@@ -1678,7 +1541,7 @@ class PHPMailer
                         if (!$this->smtp->startTLS()) {
                             throw new phpmailerException($this->lang('connect_host'));
                         }
-                        // We must resend EHLO after TLS negotiation
+                        // We must resend HELO after tls negotiation
                         $this->smtp->hello($hello);
                     }
                     if ($this->SMTPAuth) {
@@ -1717,7 +1580,7 @@ class PHPMailer
      */
     public function smtpClose()
     {
-        if (is_a($this->smtp, 'SMTP')) {
+        if ($this->smtp !== null) {
             if ($this->smtp->connected()) {
                 $this->smtp->quit();
                 $this->smtp->close();
@@ -1736,19 +1599,6 @@ class PHPMailer
      */
     public function setLanguage($langcode = 'en', $lang_path = '')
     {
-        // Backwards compatibility for renamed language codes
-        $renamed_langcodes = array(
-            'br' => 'pt_br',
-            'cz' => 'cs',
-            'dk' => 'da',
-            'no' => 'nb',
-            'se' => 'sv',
-        );
-
-        if (isset($renamed_langcodes[$langcode])) {
-            $langcode = $renamed_langcodes[$langcode];
-        }
-
         // Define full set of translatable strings in English
         $PHPMAILER_LANG = array(
             'authenticate' => 'SMTP Error: Could not authenticate.',
@@ -1775,10 +1625,6 @@ class PHPMailer
             // Calculate an absolute path so it can work if CWD is not here
             $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR;
         }
-        //Validate $langcode
-        if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {
-            $langcode = 'en';
-        }
         $foundlang = true;
         $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
         // There is no English translation file
@@ -2072,9 +1918,7 @@ class PHPMailer
             $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject)));
         }
 
-        // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4
-        // https://tools.ietf.org/html/rfc5322#section-3.6.4
-        if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) {
+        if ($this->MessageID != '') {
             $this->lastMessageID = $this->MessageID;
         } else {
             $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname());
@@ -2176,15 +2020,7 @@ class PHPMailer
      */
     public function getSentMIMEMessage()
     {
-        return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody;
-    }
-
-    /**
-     * Create unique ID
-     * @return string
-     */
-    protected function generateId() {
-        return md5(uniqid(time()));
+        return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody;
     }
 
     /**
@@ -2198,7 +2034,7 @@ class PHPMailer
     {
         $body = '';
         //Create unique IDs and preset boundaries
-        $this->uniqueid = $this->generateId();
+        $this->uniqueid = md5(uniqid(time()));
         $this->boundary[1] = 'b1_' . $this->uniqueid;
         $this->boundary[2] = 'b2_' . $this->uniqueid;
         $this->boundary[3] = 'b3_' . $this->uniqueid;
@@ -2214,12 +2050,11 @@ class PHPMailer
         //Can we do a 7-bit downgrade?
         if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) {
             $bodyEncoding = '7bit';
-            //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit
             $bodyCharSet = 'us-ascii';
         }
-        //If lines are too long, and we're not already using an encoding that will shorten them,
-        //change to quoted-printable transfer encoding for the body part only
-        if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) {
+        //If lines are too long, change to quoted-printable transfer encoding
+        if (self::hasLineLongerThanMax($this->Body)) {
+            $this->Encoding = 'quoted-printable';
             $bodyEncoding = 'quoted-printable';
         }
 
@@ -2228,12 +2063,10 @@ class PHPMailer
         //Can we do a 7-bit downgrade?
         if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) {
             $altBodyEncoding = '7bit';
-            //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit
             $altBodyCharSet = 'us-ascii';
         }
-        //If lines are too long, and we're not already using an encoding that will shorten them,
-        //change to quoted-printable transfer encoding for the alt body part only
-        if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) {
+        //If lines are too long, change to quoted-printable transfer encoding
+        if (self::hasLineLongerThanMax($this->AltBody)) {
             $altBodyEncoding = 'quoted-printable';
         }
         //Use this as a preamble in all multipart message types
@@ -2336,10 +2169,8 @@ class PHPMailer
                 $body .= $this->attachAll('attachment', $this->boundary[1]);
                 break;
             default:
-                // Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types
-                //Reset the `Encoding` property in case we changed it for line length reasons
-                $this->Encoding = $bodyEncoding;
-                $body .= $this->encodeString($this->Body, $this->Encoding);
+                // catch case 'plain' and case ''
+                $body .= $this->encodeString($this->Body, $bodyEncoding);
                 break;
         }
 
@@ -2445,7 +2276,8 @@ class PHPMailer
 
     /**
      * Set the message type.
-     * PHPMailer only supports some preset message types, not arbitrary MIME structures.
+     * PHPMailer only supports some preset message types,
+     * not arbitrary MIME structures.
      * @access protected
      * @return void
      */
@@ -2463,7 +2295,6 @@ class PHPMailer
         }
         $this->message_type = implode('_', $type);
         if ($this->message_type == '') {
-            //The 'plain' message_type refers to the message having a single body element, not that it is plain-text
             $this->message_type = 'plain';
         }
     }
@@ -2493,7 +2324,6 @@ class PHPMailer
 
     /**
      * Add an attachment from a path on the filesystem.
-     * Never use a user-supplied path to a file!
      * Returns false if the file could not be found or read.
      * @param string $path Path to the attachment.
      * @param string $name Overrides the attachment name.
@@ -3019,7 +2849,6 @@ class PHPMailer
      * displayed inline with the message, not just attached for download.
      * This is used in HTML messages that embed the images
      * the HTML refers to using the $cid value.
-     * Never use a user-supplied path to a file!
      * @param string $path Path to the attachment.
      * @param string $cid Content ID of the attachment; Use this to reference
      *        the content when using an embedded image in HTML.
@@ -3380,29 +3209,21 @@ class PHPMailer
     }
 
     /**
-     * Create a message body from an HTML string.
-     * Automatically inlines images and creates a plain-text version by converting the HTML,
-     * overwriting any existing values in Body and AltBody.
-     * Do not source $message content from user input!
-     * $basedir is prepended when handling relative URLs, e.g. <img src="/images/a.png"> and must not be empty
-     * will look for an image file in $basedir/images/a.png and convert it to inline.
-     * If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email)
-     * If you don't want to apply these transformations to your HTML, just set Body and AltBody directly.
+     * Create a message from an HTML string.
+     * Automatically makes modifications for inline images and backgrounds
+     * and creates a plain-text version by converting the HTML.
+     * Overwrites any existing values in $this->Body and $this->AltBody
      * @access public
      * @param string $message HTML message string
-     * @param string $basedir Absolute path to a base directory to prepend to relative paths to images
+     * @param string $basedir baseline directory for path
      * @param boolean|callable $advanced Whether to use the internal HTML to text converter
      *    or your own custom converter @see PHPMailer::html2text()
-     * @return string $message The transformed message Body
+     * @return string $message
      */
     public function msgHTML($message, $basedir = '', $advanced = false)
     {
         preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images);
         if (array_key_exists(2, $images)) {
-            if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {
-                // Ensure $basedir has a trailing /
-                $basedir .= '/';
-            }
             foreach ($images[2] as $imgindex => $url) {
                 // Convert data URIs into embedded images
                 if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) {
@@ -3420,24 +3241,18 @@ class PHPMailer
                             $message
                         );
                     }
-                    continue;
-                }
-                if (
-                    // Only process relative URLs if a basedir is provided (i.e. no absolute local paths)
-                    !empty($basedir)
-                    // Ignore URLs containing parent dir traversal (..)
-                    && (strpos($url, '..') === false)
+                } elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[A-z]+://#', $url)) {
+                    // Do not change urls for absolute images (thanks to corvuscorax)
                     // Do not change urls that are already inline images
-                    && substr($url, 0, 4) !== 'cid:'
-                    // Do not change absolute URLs, including anonymous protocol
-                    && !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url)
-                ) {
                     $filename = basename($url);
                     $directory = dirname($url);
                     if ($directory == '.') {
                         $directory = '';
                     }
                     $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2
+                    if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {
+                        $basedir .= '/';
+                    }
                     if (strlen($directory) > 1 && substr($directory, -1) != '/') {
                         $directory .= '/';
                     }
@@ -3462,7 +3277,7 @@ class PHPMailer
         // Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better
         $this->Body = $this->normalizeBreaks($message);
         $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced));
-        if (!$this->alternativeExists()) {
+        if (empty($this->AltBody)) {
             $this->AltBody = 'To view this email message, open it in a program that understands HTML!' .
                 self::CRLF . self::CRLF;
         }
@@ -3473,7 +3288,7 @@ class PHPMailer
      * Convert an HTML string into plain text.
      * This is used by msgHTML().
      * Note - older versions of this function used a bundled advanced converter
-     * which was been removed for license reasons in #232.
+     * which was been removed for license reasons in #232
      * Example usage:
      * <code>
      * // Use default conversion
@@ -3773,7 +3588,7 @@ class PHPMailer
      * @access public
      * @param string $signHeader
      * @throws phpmailerException
-     * @return string The DKIM signature value
+     * @return string
      */
     public function DKIM_Sign($signHeader)
     {
@@ -3783,35 +3598,15 @@ class PHPMailer
             }
             return '';
         }
-        $privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private);
-        if ('' != $this->DKIM_passphrase) {
+        $privKeyStr = file_get_contents($this->DKIM_private);
+        if ($this->DKIM_passphrase != '') {
             $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
         } else {
-            $privKey = openssl_pkey_get_private($privKeyStr);
+            $privKey = $privKeyStr;
         }
-        //Workaround for missing digest algorithms in old PHP & OpenSSL versions
-        //@link http://stackoverflow.com/a/11117338/333340
-        if (version_compare(PHP_VERSION, '5.3.0') >= 0 and
-            in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) {
-            if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
-                openssl_pkey_free($privKey);
-                return base64_encode($signature);
-            }
-        } else {
-            $pinfo = openssl_pkey_get_details($privKey);
-            $hash = hash('sha256', $signHeader);
-            //'Magic' constant for SHA256 from RFC3447
-            //@link https://tools.ietf.org/html/rfc3447#page-43
-            $t = '3031300d060960864801650304020105000420' . $hash;
-            $pslen = $pinfo['bits'] / 8 - (strlen($t) / 2 + 3);
-            $eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t);
-
-            if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) {
-                openssl_pkey_free($privKey);
-                return base64_encode($signature);
-            }
+        if (openssl_sign($signHeader, $signature, $privKey)) {
+            return base64_encode($signature);
         }
-        openssl_pkey_free($privKey);
         return '';
     }
 
@@ -3828,7 +3623,7 @@ class PHPMailer
         foreach ($lines as $key => $line) {
             list($heading, $value) = explode(':', $line, 2);
             $heading = strtolower($heading);
-            $value = preg_replace('/\s{2,}/', ' ', $value); // Compress useless spaces
+            $value = preg_replace('/\s+/', ' ', $value); // Compress useless spaces
             $lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value
         }
         $signHeader = implode("\r\n", $lines);
@@ -3866,7 +3661,7 @@ class PHPMailer
      */
     public function DKIM_Add($headers_line, $subject, $body)
     {
-        $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms
+        $DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms
         $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body
         $DKIMquery = 'dns/txt'; // Query method
         $DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone)
@@ -3874,7 +3669,6 @@ class PHPMailer
         $headers = explode($this->LE, $headers_line);
         $from_header = '';
         $to_header = '';
-        $date_header = '';
         $current = '';
         foreach ($headers as $header) {
             if (strpos($header, 'From:') === 0) {
@@ -3883,9 +3677,6 @@ class PHPMailer
             } elseif (strpos($header, 'To:') === 0) {
                 $to_header = $header;
                 $current = 'to_header';
-            } elseif (strpos($header, 'Date:') === 0) {
-                $date_header = $header;
-                $current = 'date_header';
             } else {
                 if (!empty($$current) && strpos($header, ' =?') === 0) {
                     $$current .= $header;
@@ -3896,7 +3687,6 @@ class PHPMailer
         }
         $from = str_replace('|', '=7C', $this->DKIM_QP($from_header));
         $to = str_replace('|', '=7C', $this->DKIM_QP($to_header));
-        $date = str_replace('|', '=7C', $this->DKIM_QP($date_header));
         $subject = str_replace(
             '|',
             '=7C',
@@ -3904,7 +3694,7 @@ class PHPMailer
         ); // Copied header fields (dkim-quoted-printable)
         $body = $this->DKIM_BodyC($body);
         $DKIMlen = strlen($body); // Length of body
-        $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body
+        $DKIMb64 = base64_encode(pack('H*', sha1($body))); // Base64 of packed binary SHA-1 hash of body
         if ('' == $this->DKIM_identity) {
             $ident = '';
         } else {
@@ -3917,18 +3707,16 @@ class PHPMailer
             $this->DKIM_selector .
             ";\r\n" .
             "\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" .
-            "\th=From:To:Date:Subject;\r\n" .
+            "\th=From:To:Subject;\r\n" .
             "\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" .
             "\tz=$from\r\n" .
             "\t|$to\r\n" .
-            "\t|$date\r\n" .
             "\t|$subject;\r\n" .
             "\tbh=" . $DKIMb64 . ";\r\n" .
             "\tb=";
         $toSign = $this->DKIM_HeaderC(
             $from_header . "\r\n" .
             $to_header . "\r\n" .
-            $date_header . "\r\n" .
             $subject_header . "\r\n" .
             $dkimhdrs
         );
index ffbc377dafbf1df95a4b5e674f290650e54313a0..7416dd70013d688aa788545bbd7cd23f5d16c803 100644 (file)
@@ -430,7 +430,7 @@ class POP3 {
         if(!$this->is_ok($reply))
         {
             //  The POP3 RSET command -never- gives a -ERR
-            //  response - if it ever does, something truely
+            //  response - if it ever does, something truly
             //  wild is going on.
 
             $this->ERROR = "POP3 reset: " . _("Error ") . "[$reply]";
index 3ad081926a51a32d12a350623d7237df7785235c..f17ca0fd9717d618a37115083781385498303b65 100644 (file)
@@ -30,7 +30,7 @@ class SMTP
      * The PHPMailer SMTP version number.
      * @var string
      */
-    const VERSION = '5.2.22';
+    const VERSION = '5.2.14';
 
     /**
      * SMTP line break constant.
@@ -81,7 +81,7 @@ class SMTP
      * @deprecated Use the `VERSION` constant instead
      * @see SMTP::VERSION
      */
-    public $Version = '5.2.22';
+    public $Version = '5.2.14';
 
     /**
      * SMTP server port number.
@@ -150,17 +150,6 @@ class SMTP
      */
     public $Timelimit = 300;
 
-       /**
-        * @var array patterns to extract smtp transaction id from smtp reply
-        * Only first capture group will be use, use non-capturing group to deal with it
-        * Extend this class to override this property to fulfil your needs.
-        */
-       protected $smtp_transaction_id_patterns = array(
-               'exim' => '/[0-9]{3} OK id=(.*)/',
-               'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/',
-               'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/'
-       );
-
     /**
      * The socket for the server connection.
      * @var resource
@@ -217,7 +206,7 @@ class SMTP
         }
         //Avoid clash with built-in function names
         if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) {
-            call_user_func($this->Debugoutput, $str, $level);
+            call_user_func($this->Debugoutput, $str, $this->do_debug);
             return;
         }
         switch ($this->Debugoutput) {
@@ -283,8 +272,8 @@ class SMTP
         $errstr = '';
         if ($streamok) {
             $socket_context = stream_context_create($options);
-            set_error_handler(array($this, 'errorHandler'));
-            $this->smtp_conn = stream_socket_client(
+            //Suppress errors; connection failures are handled at a higher level
+            $this->smtp_conn = @stream_socket_client(
                 $host . ":" . $port,
                 $errno,
                 $errstr,
@@ -292,14 +281,12 @@ class SMTP
                 STREAM_CLIENT_CONNECT,
                 $socket_context
             );
-            restore_error_handler();
         } else {
             //Fall back to fsockopen which should work in more places, but is missing some features
             $this->edebug(
                 "Connection: stream_socket_client not available, falling back to fsockopen",
                 self::DEBUG_CONNECTION
             );
-            set_error_handler(array($this, 'errorHandler'));
             $this->smtp_conn = fsockopen(
                 $host,
                 $port,
@@ -307,7 +294,6 @@ class SMTP
                 $errstr,
                 $timeout
             );
-            restore_error_handler();
         }
         // Verify we connected properly
         if (!is_resource($this->smtp_conn)) {
@@ -350,22 +336,11 @@ class SMTP
         if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) {
             return false;
         }
-
-        //Allow the best TLS version(s) we can
-        $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT;
-
-        //PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT
-        //so add them back in manually if we can
-        if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) {
-            $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
-            $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
-        }
-
         // Begin encrypted connection
         if (!stream_socket_enable_crypto(
             $this->smtp_conn,
             true,
-            $crypto_method
+            STREAM_CRYPTO_METHOD_TLS_CLIENT
         )) {
             return false;
         }
@@ -378,7 +353,7 @@ class SMTP
      * @see hello()
      * @param string $username The user name
      * @param string $password The password
-     * @param string $authtype The auth type (PLAIN, LOGIN, CRAM-MD5)
+     * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5, XOAUTH2)
      * @param string $realm The auth realm for NTLM
      * @param string $workstation The auth workstation for NTLM
      * @param null|OAuth $OAuth An optional OAuth instance (@see PHPMailerOAuth)
@@ -414,7 +389,7 @@ class SMTP
             );
 
             if (empty($authtype)) {
-                foreach (array('CRAM-MD5', 'LOGIN', 'PLAIN') as $method) {
+                foreach (array('LOGIN', 'CRAM-MD5', 'PLAIN') as $method) {
                     if (in_array($method, $this->server_caps['AUTH'])) {
                         $authtype = $method;
                         break;
@@ -698,7 +673,7 @@ class SMTP
     protected function parseHelloFields($type)
     {
         $this->server_caps = array();
-        $lines = explode("\n", $this->helo_rply);
+        $lines = explode("\n", $this->last_reply);
 
         foreach ($lines as $n => $s) {
             //First 4 chars contain response code followed by - or space
@@ -1140,47 +1115,4 @@ class SMTP
     {
         return $this->Timeout;
     }
-
-    /**
-     * Reports an error number and string.
-     * @param integer $errno The error number returned by PHP.
-     * @param string $errmsg The error message returned by PHP.
-     */
-    protected function errorHandler($errno, $errmsg)
-    {
-        $notice = 'Connection: Failed to connect to server.';
-        $this->setError(
-            $notice,
-            $errno,
-            $errmsg
-        );
-        $this->edebug(
-            $notice . ' Error number ' . $errno . '. "Error notice: ' . $errmsg,
-            self::DEBUG_CONNECTION
-        );
-    }
-
-       /**
-        * Will return the ID of the last smtp transaction based on a list of patterns provided
-        * in SMTP::$smtp_transaction_id_patterns.
-        * If no reply has been received yet, it will return null.
-        * If no pattern has been matched, it will return false.
-        * @return bool|null|string
-        */
-       public function getLastTransactionID()
-       {
-               $reply = $this->getLastReply();
-
-               if (empty($reply)) {
-                       return null;
-               }
-
-               foreach($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
-                       if(preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
-                               return $matches[1];
-                       }
-               }
-
-               return false;
-    }
 }
index 72220aaf0cc72606d2b6bb52f53ce7704623e289..8383740b4388c1d011c66abb67c1c32961a7de4d 100644 (file)
@@ -273,7 +273,12 @@ class Walker_Comment extends Walker {
                <?php endif; ?>
                <div class="comment-author vcard">
                        <?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>
-                       <?php printf( __( '<cite class="fn">%s</cite> <span class="says">says:</span>' ), get_comment_author_link( $comment ) ); ?>
+                       <?php
+                               /* translators: %s: comment author link */
+                               printf( __( '%s <span class="says">says:</span>' ),
+                                       sprintf( '<cite class="fn">%s</cite>', get_comment_author_link( $comment ) )
+                               );
+                       ?>
                </div>
                <?php if ( '0' == $comment->comment_approved ) : ?>
                <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.' ) ?></em>
@@ -325,7 +330,12 @@ class Walker_Comment extends Walker {
                                <footer class="comment-meta">
                                        <div class="comment-author vcard">
                                                <?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>
-                                               <?php printf( __( '%s <span class="says">says:</span>' ), sprintf( '<b class="fn">%s</b>', get_comment_author_link( $comment ) ) ); ?>
+                                               <?php
+                                                       /* translators: %s: comment author link */
+                                                       printf( __( '%s <span class="says">says:</span>' ),
+                                                               sprintf( '<b class="fn">%s</b>', get_comment_author_link( $comment ) )
+                                                       );
+                                               ?>
                                        </div><!-- .comment-author -->
 
                                        <div class="comment-metadata">
index 43eaa91c660b35efb55c4b8c1c1ab649270ad329..4c1a1f2c91521d4a24cbf5e49bc4932c71ecb76c 100644 (file)
@@ -45,13 +45,20 @@ class Walker_Nav_Menu extends Walker {
         *
         * @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.
+        * @param string   $output Passed by reference. Used to append additional content.
+        * @param int      $depth  Depth of menu item. Used for padding.
+        * @param stdClass $args   An object 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";
+               if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
+                       $t = '';
+                       $n = '';
+               } else {
+                       $t = "\t";
+                       $n = "\n";
+               }
+               $indent = str_repeat( $t, $depth );
+               $output .= "{$n}{$indent}<ul class=\"sub-menu\">{$n}";
        }
 
        /**
@@ -61,13 +68,20 @@ class Walker_Nav_Menu extends Walker {
         *
         * @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.
+        * @param string   $output Passed by reference. Used to append additional content.
+        * @param int      $depth  Depth of menu item. Used for padding.
+        * @param stdClass $args   An object of wp_nav_menu() arguments.
         */
        public function end_lvl( &$output, $depth = 0, $args = array() ) {
-               $indent = str_repeat("\t", $depth);
-               $output .= "$indent</ul>\n";
+               if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
+                       $t = '';
+                       $n = '';
+               } else {
+                       $t = "\t";
+                       $n = "\n";
+               }
+               $indent = str_repeat( $t, $depth );
+               $output .= "$indent</ul>{$n}";
        }
 
        /**
@@ -78,14 +92,21 @@ class Walker_Nav_Menu extends Walker {
         *
         * @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.
+        * @param string   $output Passed by reference. Used to append additional content.
+        * @param WP_Post  $item   Menu item data object.
+        * @param int      $depth  Depth of menu item. Used for padding.
+        * @param stdClass $args   An object 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 ) : '';
+               if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
+                       $t = '';
+                       $n = '';
+               } else {
+                       $t = "\t";
+                       $n = "\n";
+               }
+               $indent = ( $depth ) ? str_repeat( $t, $depth ) : '';
 
                $classes = empty( $item->classes ) ? array() : (array) $item->classes;
                $classes[] = 'menu-item-' . $item->ID;
@@ -95,9 +116,9 @@ class Walker_Nav_Menu extends Walker {
                 *
                 * @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.
+                * @param stdClass $args  An object of wp_nav_menu() arguments.
+                * @param WP_Post  $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 );
 
@@ -107,10 +128,10 @@ class Walker_Nav_Menu extends Walker {
                 * @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.
+                * @param array    $classes The CSS classes that are applied to the menu item's `<li>` element.
+                * @param WP_Post  $item    The current menu item.
+                * @param stdClass $args    An object 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 ) . '"' : '';
@@ -121,10 +142,10 @@ class Walker_Nav_Menu extends Walker {
                 * @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.
+                * @param string   $menu_id The ID that is applied to the menu item's `<li>` element.
+                * @param WP_Post  $item    The current menu item.
+                * @param stdClass $args    An object 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 ) . '"' : '';
@@ -151,9 +172,9 @@ class Walker_Nav_Menu extends Walker {
                 *     @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.
+                * @param WP_Post  $item  The current menu item.
+                * @param stdClass $args  An object 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 );
 
@@ -173,10 +194,10 @@ class Walker_Nav_Menu extends Walker {
                 *
                 * @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.
+                * @param string   $title The menu item's title.
+                * @param WP_Post  $item  The current menu item.
+                * @param stdClass $args  An object 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 );
 
@@ -195,10 +216,10 @@ class Walker_Nav_Menu extends Walker {
                 *
                 * @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.
+                * @param string   $item_output The menu item's starting HTML output.
+                * @param WP_Post  $item        Menu item data object.
+                * @param int      $depth       Depth of menu item. Used for padding.
+                * @param stdClass $args        An object of wp_nav_menu() arguments.
                 */
                $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
        }
@@ -210,13 +231,20 @@ class Walker_Nav_Menu extends Walker {
         *
         * @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.
+        * @param string   $output Passed by reference. Used to append additional content.
+        * @param WP_Post  $item   Page data object. Not used.
+        * @param int      $depth  Depth of page. Not Used.
+        * @param stdClass $args   An object of wp_nav_menu() arguments.
         */
        public function end_el( &$output, $item, $depth = 0, $args = array() ) {
-               $output .= "</li>\n";
+               if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
+                       $t = '';
+                       $n = '';
+               } else {
+                       $t = "\t";
+                       $n = "\n";
+               }
+               $output .= "</li>{$n}";
        }
 
 } // Walker_Nav_Menu
index fd55ccee4dd7c3fd4c8683273836b124a8371023..3fcaa67a86a7eee335369d693144edb26941c6f9 100644 (file)
@@ -49,12 +49,19 @@ class Walker_Page extends Walker {
         *
         * @param string $output Passed by reference. Used to append additional content.
         * @param int    $depth  Optional. Depth of page. Used for padding. Default 0.
-        * @param array  $args   Optional. Arguments for outputing the next level.
+        * @param array  $args   Optional. Arguments for outputting the next level.
         *                       Default empty array.
         */
        public function start_lvl( &$output, $depth = 0, $args = array() ) {
-               $indent = str_repeat("\t", $depth);
-               $output .= "\n$indent<ul class='children'>\n";
+               if ( 'preserve' === $args['item_spacing'] ) {
+                       $t = "\t";
+                       $n = "\n";
+               } else {
+                       $t = '';
+                       $n = '';
+               }
+               $indent = str_repeat( $t, $depth );
+               $output .= "{$n}{$indent}<ul class='children'>{$n}";
        }
 
        /**
@@ -71,8 +78,15 @@ class Walker_Page extends Walker {
         *                       Default empty array.
         */
        public function end_lvl( &$output, $depth = 0, $args = array() ) {
-               $indent = str_repeat("\t", $depth);
-               $output .= "$indent</ul>\n";
+               if ( 'preserve' === $args['item_spacing'] ) {
+                       $t = "\t";
+                       $n = "\n";
+               } else {
+                       $t = '';
+                       $n = '';
+               }
+               $indent = str_repeat( $t, $depth );
+               $output .= "{$indent}</ul>{$n}";
        }
 
        /**
@@ -89,8 +103,15 @@ class Walker_Page extends Walker {
         * @param int     $current_page Optional. Page ID. Default 0.
         */
        public function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) {
+               if ( 'preserve' === $args['item_spacing'] ) {
+                       $t = "\t";
+                       $n = "\n";
+               } else {
+                       $t = '';
+                       $n = '';
+               }
                if ( $depth ) {
-                       $indent = str_repeat( "\t", $depth );
+                       $indent = str_repeat( $t, $depth );
                } else {
                        $indent = '';
                }
@@ -175,7 +196,14 @@ class Walker_Page extends Walker {
         * @param array   $args   Optional. Array of arguments. Default empty array.
         */
        public function end_el( &$output, $page, $depth = 0, $args = array() ) {
-               $output .= "</li>\n";
+               if ( 'preserve' === $args['item_spacing'] ) {
+                       $t = "\t";
+                       $n = "\n";
+               } else {
+                       $t = '';
+                       $n = '';
+               }
+               $output .= "</li>{$n}";
        }
 
 }
index f02d24ee75cfbfa4b1be928f6b4b56cb18efa9a2..a86d8dd532a47dff2788f9cce947f1da7509950b 100644 (file)
@@ -149,7 +149,7 @@ class WP_Ajax_Response {
                foreach ( (array) $this->responses as $response )
                        echo $response;
                echo '</wp_ajax>';
-               if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
+               if ( wp_doing_ajax() )
                        wp_die();
                else
                        die();
index 0920ca229f5ae496a073de538042039a33d02820..ef8b6d545ba55751203f873011036dfb5757b0dc 100644 (file)
@@ -182,7 +182,7 @@ class WP_Comment_Query {
         *     @type array        $meta_query                Meta query clauses to limit retrieved comments by.
         *                                                   See WP_Meta_Query. Default empty.
         *     @type int          $number                    Maximum number of comments to retrieve.
-        *                                                   Default null (no limit).
+        *                                                   Default empty (no limit).
         *     @type int          $offset                    Number of comments 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.
@@ -393,11 +393,8 @@ class WP_Comment_Query {
 
                // $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', 'comment' );
-               if ( ! $last_changed ) {
-                       $last_changed = microtime();
-                       wp_cache_set( 'last_changed', $last_changed, 'comment' );
-               }
+               $last_changed = wp_cache_get_last_changed( 'comment' );
+
 
                $cache_key   = "get_comments:$key:$last_changed";
                $cache_value = wp_cache_get( $cache_key, 'comment' );
@@ -972,11 +969,7 @@ 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' );
-               }
+               $last_changed = wp_cache_get_last_changed( 'comment' );
 
                // Fetch an entire level of the descendant tree at a time.
                $level = 0;
@@ -995,8 +988,18 @@ class WP_Comment_Query {
                        }
 
                        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" );
+                               // Fetch this level of comments.
+                               $parent_query_args = $this->query_vars;
+                               foreach ( $exclude_keys as $exclude_key ) {
+                                       $parent_query_args[ $exclude_key ] = '';
+                               }
+                               $parent_query_args['parent__in']    = $uncached_parent_ids;
+                               $parent_query_args['no_found_rows'] = true;
+                               $parent_query_args['hierarchical']  = false;
+                               $parent_query_args['offset']        = 0;
+                               $parent_query_args['number']        = 0;
+
+                               $level_comments = get_comments( $parent_query_args );
 
                                // Cache parent-child relationships.
                                $parent_map = array_fill_keys( $uncached_parent_ids, array() );
@@ -1017,7 +1020,7 @@ class WP_Comment_Query {
 
                // Prime comment caches for non-top-level comments.
                $descendant_ids = array();
-               for ( $i = 1; $i < count( $levels ); $i++ ) {
+               for ( $i = 1, $c = count( $levels ); $i < $c; $i++ ) {
                        $descendant_ids = array_merge( $descendant_ids, $levels[ $i ] );
                }
 
index 0e9f88a352af3e8be7ec80373ed70b9e8b750f79..80ef9bb1d33b47e70b0f04f88693788b2989a86b 100644 (file)
@@ -191,11 +191,12 @@ final class WP_Comment {
        public static function get_instance( $id ) {
                global $wpdb;
 
-               $comment_id = (int) $id;
-               if ( ! $comment_id ) {
+               if ( ! is_numeric( $id ) || $id != floor( $id ) || ! $id ) {
                        return false;
                }
 
+               $comment_id = (int) $id;
+
                $_comment = wp_cache_get( $comment_id, 'comment' );
 
                if ( ! $_comment ) {
index 1920140ff0ccea917acbaf5e5b917a7ad87091ac..07c6dcfce1808196d9b7b1d84242c481b8e6e82e 100644 (file)
@@ -114,6 +114,15 @@ class WP_Customize_Control {
         */
        public $input_attrs = array();
 
+       /**
+        * Show UI for adding new content, currently only used for the dropdown-pages control.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool
+        */
+       public $allow_addition = false;
+
        /**
         * @deprecated It is better to just call the json() method
         * @access public
@@ -296,6 +305,10 @@ class WP_Customize_Control {
                $this->json['label'] = $this->label;
                $this->json['description'] = $this->description;
                $this->json['instanceNumber'] = $this->instance_number;
+
+               if ( 'dropdown-pages' === $this->type ) {
+                       $this->json['allow_addition'] = $this->allow_addition;
+               }
        }
 
        /**
@@ -383,7 +396,7 @@ class WP_Customize_Control {
                 *
                 * @param WP_Customize_Control $this WP_Customize_Control instance.
                 */
-               do_action( 'customize_render_control_' . $this->id, $this );
+               do_action( "customize_render_control_{$this->id}", $this );
 
                $this->render();
        }
@@ -444,7 +457,7 @@ 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 overridden 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.
@@ -519,7 +532,7 @@ class WP_Customize_Control {
                                        if ( ! empty( $this->description ) ) : ?>
                                                <span class="description customize-control-description"><?php echo $this->description; ?></span>
                                        <?php endif; ?>
-                                       <textarea rows="5" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>
+                                       <textarea rows="5" <?php $this->input_attrs(); ?> <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>
                                </label>
                                <?php
                                break;
@@ -533,22 +546,58 @@ class WP_Customize_Control {
                                        <span class="description customize-control-description"><?php echo $this->description; ?></span>
                                <?php endif; ?>
 
-                               <?php $dropdown = wp_dropdown_pages(
+                               <?php
+                               $dropdown_name = '_customize-dropdown-pages-' . $this->id;
+                               $show_option_none = __( '&mdash; Select &mdash;' );
+                               $option_none_value = '0';
+                               $dropdown = wp_dropdown_pages(
                                        array(
-                                               'name'              => '_customize-dropdown-pages-' . $this->id,
+                                               'name'              => $dropdown_name,
                                                'echo'              => 0,
-                                               'show_option_none'  => __( '&mdash; Select &mdash;' ),
-                                               'option_none_value' => '0',
+                                               'show_option_none'  => $show_option_none,
+                                               'option_none_value' => $option_none_value,
                                                'selected'          => $this->value(),
                                        )
                                );
+                               if ( empty( $dropdown ) ) {
+                                       $dropdown = sprintf( '<select id="%1$s" name="%1$s">', esc_attr( $dropdown_name ) );
+                                       $dropdown .= sprintf( '<option value="%1$s">%2$s</option>', esc_attr( $option_none_value ), esc_html( $show_option_none ) );
+                                       $dropdown .= '</select>';
+                               }
 
                                // Hackily add in the data link parameter.
                                $dropdown = str_replace( '<select', '<select ' . $this->get_link(), $dropdown );
+
+                               // Even more hacikly add auto-draft page stubs.
+                               // @todo Eventually this should be removed in favor of the pages being injected into the underlying get_pages() call. See <https://github.com/xwp/wp-customize-posts/pull/250>.
+                               $nav_menus_created_posts_setting = $this->manager->get_setting( 'nav_menus_created_posts' );
+                               if ( $nav_menus_created_posts_setting && current_user_can( 'publish_pages' ) ) {
+                                       $auto_draft_page_options = '';
+                                       foreach ( $nav_menus_created_posts_setting->value() as $auto_draft_page_id ) {
+                                               $post = get_post( $auto_draft_page_id );
+                                               if ( $post && 'page' === $post->post_type ) {
+                                                       $auto_draft_page_options .= sprintf( '<option value="%1$s">%2$s</option>', esc_attr( $post->ID ), esc_html( $post->post_title ) );
+                                               }
+                                       }
+                                       if ( $auto_draft_page_options ) {
+                                               $dropdown = str_replace( '</select>', $auto_draft_page_options . '</select>', $dropdown );
+                                       }
+                               }
+
                                echo $dropdown;
                                ?>
                                </label>
-                               <?php
+                               <?php if ( $this->allow_addition && current_user_can( 'publish_pages' ) && current_user_can( 'edit_theme_options' ) ) : // Currently tied to menus functionality. ?>
+                                       <button type="button" class="button-link add-new-toggle"><?php
+                                               /* translators: %s: add new page label */
+                                               printf( __( '+ %s' ), get_post_type_object( 'page' )->labels->add_new_item );
+                                       ?></button>
+                                       <div class="new-content-item">
+                                               <label for="create-input-<?php echo $this->id; ?>"><span class="screen-reader-text"><?php _e( 'New page title' ); ?></span></label>
+                                               <input type="text" id="create-input-<?php echo $this->id; ?>" class="create-item-input" placeholder="<?php esc_attr_e( 'New page title&hellip;' ); ?>">
+                                               <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>
+                                       </div>
+                               <?php endif;
                                break;
                        default:
                                ?>
@@ -614,6 +663,9 @@ require_once( ABSPATH . WPINC . '/customize/class-wp-customize-image-control.php
 /** WP_Customize_Background_Image_Control class */
 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-control.php' );
 
+/** WP_Customize_Background_Position_Control class */
+require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-position-control.php' );
+
 /** WP_Customize_Cropped_Image_Control class */
 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-cropped-image-control.php' );
 
index 09e48b290cc11ed7a33d51002abcf7054a78b0e0..127d572be7ecfc9fe10e4b4d85850021787e9b03 100644 (file)
@@ -129,15 +129,6 @@ final class WP_Customize_Manager {
         */
        protected $controls = array();
 
-       /**
-        * Return value of check_ajax_referer() in customize_preview_init() method.
-        *
-        * @since 3.5.0
-        * @access protected
-        * @var false|int
-        */
-       protected $nonce_tick;
-
        /**
         * Panel types that may be rendered from JS templates.
         *
@@ -192,6 +183,15 @@ final class WP_Customize_Manager {
         */
        protected $autofocus = array();
 
+       /**
+        * Messenger channel.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var string
+        */
+       protected $messenger_channel;
+
        /**
         * Unsanitized values for Customize Settings parsed from $_POST['customized'].
         *
@@ -199,12 +199,76 @@ final class WP_Customize_Manager {
         */
        private $_post_values;
 
+       /**
+        * Changeset UUID.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var string
+        */
+       private $_changeset_uuid;
+
+       /**
+        * Changeset post ID.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var int|false
+        */
+       private $_changeset_post_id;
+
+       /**
+        * Changeset data loaded from a customize_changeset post.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var array
+        */
+       private $_changeset_data;
+
        /**
         * Constructor.
         *
         * @since 3.4.0
+        * @since 4.7.0 Added $args param.
+        *
+        * @param array $args {
+        *     Args.
+        *
+        *     @type string $changeset_uuid    Changeset UUID, the post_name for the customize_changeset post containing the customized state. Defaults to new UUID.
+        *     @type string $theme             Theme to be previewed (for theme switch). Defaults to customize_theme or theme query params.
+        *     @type string $messenger_channel Messenger channel. Defaults to customize_messenger_channel query param.
+        * }
         */
-       public function __construct() {
+       public function __construct( $args = array() ) {
+
+               $args = array_merge(
+                       array_fill_keys( array( 'changeset_uuid', 'theme', 'messenger_channel' ), null ),
+                       $args
+               );
+
+               // Note that the UUID format will be validated in the setup_theme() method.
+               if ( ! isset( $args['changeset_uuid'] ) ) {
+                       $args['changeset_uuid'] = wp_generate_uuid4();
+               }
+
+               // The theme and messenger_channel should be supplied via $args, but they are also looked at in the $_REQUEST global here for back-compat.
+               if ( ! isset( $args['theme'] ) ) {
+                       if ( isset( $_REQUEST['customize_theme'] ) ) {
+                               $args['theme'] = wp_unslash( $_REQUEST['customize_theme'] );
+                       } elseif ( isset( $_REQUEST['theme'] ) ) { // Deprecated.
+                               $args['theme'] = wp_unslash( $_REQUEST['theme'] );
+                       }
+               }
+               if ( ! isset( $args['messenger_channel'] ) && isset( $_REQUEST['customize_messenger_channel'] ) ) {
+                       $args['messenger_channel'] = sanitize_key( wp_unslash( $_REQUEST['customize_messenger_channel'] ) );
+               }
+
+               $this->original_stylesheet = get_stylesheet();
+               $this->theme = wp_get_theme( $args['theme'] );
+               $this->messenger_channel = $args['messenger_channel'];
+               $this->_changeset_uuid = $args['changeset_uuid'];
+
                require_once( ABSPATH . WPINC . '/class-wp-customize-setting.php' );
                require_once( ABSPATH . WPINC . '/class-wp-customize-panel.php' );
                require_once( ABSPATH . WPINC . '/class-wp-customize-section.php' );
@@ -215,6 +279,7 @@ final class WP_Customize_Manager {
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-upload-control.php' );
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-image-control.php' );
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-control.php' );
+               require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-position-control.php' );
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-cropped-image-control.php' );
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-site-icon-control.php' );
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-control.php' );
@@ -235,6 +300,7 @@ final class WP_Customize_Manager {
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-section.php' );
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-section.php' );
 
+               require_once( ABSPATH . WPINC . '/customize/class-wp-customize-custom-css-setting.php' );
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-filter-setting.php' );
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-setting.php' );
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-setting.php' );
@@ -271,14 +337,9 @@ final class WP_Customize_Manager {
                        $this->nav_menus = new WP_Customize_Nav_Menus( $this );
                }
 
-               add_filter( 'wp_die_handler', array( $this, 'wp_die_handler' ) );
-
                add_action( 'setup_theme', array( $this, 'setup_theme' ) );
                add_action( 'wp_loaded',   array( $this, 'wp_loaded' ) );
 
-               // Run wp_redirect_status late to make sure we override the status last.
-               add_action( 'wp_redirect_status', array( $this, 'wp_redirect_status' ), 1000 );
-
                // Do not spawn cron (especially the alternate cron) while running the Customizer.
                remove_action( 'init', 'wp_cron' );
 
@@ -300,6 +361,9 @@ final class WP_Customize_Manager {
                add_action( 'customize_controls_print_footer_scripts', array( $this, 'render_section_templates' ), 1 );
                add_action( 'customize_controls_print_footer_scripts', array( $this, 'render_control_templates' ), 1 );
 
+               // Export header video settings with the partial response.
+               add_filter( 'customize_render_partials_response', array( $this, 'export_header_video_settings' ), 10, 3 );
+
                // Export the settings to JS via the _wpCustomizeSettings variable.
                add_action( 'customize_controls_print_footer_scripts', array( $this, 'customize_pane_settings' ), 1000 );
        }
@@ -315,8 +379,7 @@ final class WP_Customize_Manager {
         * @return bool True if it's an Ajax request, false otherwise.
         */
        public function doing_ajax( $action = null ) {
-               $doing_ajax = ( defined( 'DOING_AJAX' ) && DOING_AJAX );
-               if ( ! $doing_ajax ) {
+               if ( ! wp_doing_ajax() ) {
                        return false;
                }
 
@@ -341,7 +404,7 @@ final class WP_Customize_Manager {
         * @param mixed $message UI message
         */
        protected function wp_die( $ajax_message, $message = null ) {
-               if ( $this->doing_ajax() || isset( $_POST['customized'] ) ) {
+               if ( $this->doing_ajax() ) {
                        wp_die( $ajax_message );
                }
 
@@ -349,6 +412,29 @@ final class WP_Customize_Manager {
                        $message = __( 'Cheatin&#8217; uh?' );
                }
 
+               if ( $this->messenger_channel ) {
+                       ob_start();
+                       wp_enqueue_scripts();
+                       wp_print_scripts( array( 'customize-base' ) );
+
+                       $settings = array(
+                               'messengerArgs' => array(
+                                       'channel' => $this->messenger_channel,
+                                       'url' => wp_customize_url(),
+                               ),
+                               'error' => $ajax_message,
+                       );
+                       ?>
+                       <script>
+                       ( function( api, settings ) {
+                               var preview = new api.Messenger( settings.messengerArgs );
+                               preview.send( 'iframe-loading-error', settings.error );
+                       } )( wp.customize, <?php echo wp_json_encode( $settings ) ?> );
+                       </script>
+                       <?php
+                       $message .= ob_get_clean();
+               }
+
                wp_die( $message );
        }
 
@@ -356,10 +442,13 @@ final class WP_Customize_Manager {
         * Return the Ajax wp_die() handler if it's a customized request.
         *
         * @since 3.4.0
+        * @deprecated 4.7.0
         *
-        * @return string
+        * @return callable Die handler.
         */
        public function wp_die_handler() {
+               _deprecated_function( __METHOD__, '4.7.0' );
+
                if ( $this->doing_ajax() || isset( $_POST['customized'] ) ) {
                        return '_ajax_wp_die_handler';
                }
@@ -375,24 +464,43 @@ final class WP_Customize_Manager {
         * @since 3.4.0
         */
        public function setup_theme() {
-               send_origin_headers();
+               global $pagenow;
 
-               $doing_ajax_or_is_customized = ( $this->doing_ajax() || isset( $_POST['customized'] ) );
-               if ( is_admin() && ! $doing_ajax_or_is_customized ) {
-                       auth_redirect();
-               } elseif ( $doing_ajax_or_is_customized && ! is_user_logged_in() ) {
-                       $this->wp_die( 0, __( 'You must be logged in to complete this action.' ) );
+               // Check permissions for customize.php access since this method is called before customize.php can run any code,
+               if ( 'customize.php' === $pagenow && ! current_user_can( 'customize' ) ) {
+                       if ( ! is_user_logged_in() ) {
+                               auth_redirect();
+                       } else {
+                               wp_die(
+                                       '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
+                                       '<p>' . __( 'Sorry, you are not allowed to customize this site.' ) . '</p>',
+                                       403
+                               );
+                       }
+                       return;
                }
 
-               show_admin_bar( false );
+               if ( ! preg_match( '/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $this->_changeset_uuid ) ) {
+                       $this->wp_die( -1, __( 'Invalid changeset UUID' ) );
+               }
 
-               if ( ! current_user_can( 'customize' ) ) {
-                       $this->wp_die( -1, __( 'Sorry, you are not allowed to customize this site.' ) );
+               /*
+                * If unauthenticated then require a valid changeset UUID to load the preview.
+                * In this way, the UUID serves as a secret key. If the messenger channel is present,
+                * then send unauthenticated code to prompt re-auth.
+                */
+               if ( ! current_user_can( 'customize' ) && ! $this->changeset_post_id() ) {
+                       $this->wp_die( $this->messenger_channel ? 0 : -1, __( 'Non-existent changeset UUID.' ) );
                }
 
-               $this->original_stylesheet = get_stylesheet();
+               if ( ! headers_sent() ) {
+                       send_origin_headers();
+               }
 
-               $this->theme = wp_get_theme( isset( $_REQUEST['theme'] ) ? $_REQUEST['theme'] : null );
+               // Hide the admin bar if we're embedded in the customizer iframe.
+               if ( $this->messenger_channel ) {
+                       show_admin_bar( false );
+               }
 
                if ( $this->is_theme_active() ) {
                        // Once the theme is loaded, we'll validate it.
@@ -415,6 +523,15 @@ final class WP_Customize_Manager {
                        }
                }
 
+               /*
+                * Import theme starter content for fresh installs when landing in the customizer.
+                * Import starter content at after_setup_theme:100 so that any
+                * add_theme_support( 'starter-content' ) calls will have been made.
+                */
+               if ( get_option( 'fresh_site' ) && 'customize.php' === $pagenow ) {
+                       add_action( 'after_setup_theme', array( $this, 'import_theme_starter_content' ), 100 );
+               }
+
                $this->start_previewing_theme();
        }
 
@@ -507,6 +624,18 @@ final class WP_Customize_Manager {
                do_action( 'stop_previewing_theme', $this );
        }
 
+       /**
+        * Get the changeset UUID.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return string UUID.
+        */
+       public function changeset_uuid() {
+               return $this->_changeset_uuid;
+       }
+
        /**
         * Get the theme being customized.
         *
@@ -604,8 +733,23 @@ final class WP_Customize_Manager {
                 */
                do_action( 'customize_register', $this );
 
-               if ( $this->is_preview() && ! is_admin() )
+               /*
+                * Note that settings must be previewed here even outside the customizer preview
+                * and also in the customizer pane itself. This is to enable loading an existing
+                * changeset into the customizer. Previewing the settings only has to be prevented
+                * in the case of a customize_save action because then update_option()
+                * may short-circuit because it will detect that there are no changes to
+                * make.
+                */
+               if ( ! $this->doing_ajax( 'customize_save' ) ) {
+                       foreach ( $this->settings as $setting ) {
+                               $setting->preview();
+                       }
+               }
+
+               if ( $this->is_preview() && ! is_admin() ) {
                        $this->customize_preview_init();
+               }
        }
 
        /**
@@ -615,251 +759,1064 @@ final class WP_Customize_Manager {
         * Instead, the JS will sniff out the location header.
         *
         * @since 3.4.0
+        * @deprecated 4.7.0
         *
-        * @param $status
+        * @param int $status Status.
         * @return int
         */
        public function wp_redirect_status( $status ) {
-               if ( $this->is_preview() && ! is_admin() )
+               _deprecated_function( __FUNCTION__, '4.7.0' );
+
+               if ( $this->is_preview() && ! is_admin() ) {
                        return 200;
+               }
 
                return $status;
        }
 
        /**
-        * Parse the incoming $_POST['customized'] JSON data and store the unsanitized
-        * settings for subsequent post_value() lookups.
+        * Find the changeset post ID for a given changeset UUID.
         *
-        * @since 4.1.1
+        * @since 4.7.0
+        * @access public
         *
-        * @return array
+        * @param string $uuid Changeset UUID.
+        * @return int|null Returns post ID on success and null on failure.
         */
-       public function unsanitized_post_values() {
-               if ( ! isset( $this->_post_values ) ) {
-                       if ( isset( $_POST['customized'] ) ) {
-                               $this->_post_values = json_decode( wp_unslash( $_POST['customized'] ), true );
-                       }
-                       if ( empty( $this->_post_values ) ) { // if not isset or if JSON error
-                               $this->_post_values = array();
-                       }
+       public function find_changeset_post_id( $uuid ) {
+               $cache_group = 'customize_changeset_post';
+               $changeset_post_id = wp_cache_get( $uuid, $cache_group );
+               if ( $changeset_post_id && 'customize_changeset' === get_post_type( $changeset_post_id ) ) {
+                       return $changeset_post_id;
                }
-               if ( empty( $this->_post_values ) ) {
-                       return array();
-               } else {
-                       return $this->_post_values;
+
+               $changeset_post_query = new WP_Query( array(
+                       'post_type' => 'customize_changeset',
+                       'post_status' => get_post_stati(),
+                       'name' => $uuid,
+                       'posts_per_page' => 1,
+                       'no_found_rows' => true,
+                       'cache_results' => true,
+                       'update_post_meta_cache' => false,
+                       'update_term_meta_cache' => false,
+               ) );
+               if ( ! empty( $changeset_post_query->posts ) ) {
+                       // Note: 'fields'=>'ids' is not being used in order to cache the post object as it will be needed.
+                       $changeset_post_id = $changeset_post_query->posts[0]->ID;
+                       wp_cache_set( $this->_changeset_uuid, $changeset_post_id, $cache_group );
+                       return $changeset_post_id;
                }
+
+               return null;
        }
 
        /**
-        * Returns the sanitized value for a given setting from the request's POST data.
+        * Get the changeset post id for the loaded changeset.
         *
-        * @since 3.4.0
-        * @since 4.1.1 Introduced the `$default` parameter.
-        * @since 4.6.0 `$default` is now returned early when the setting post value is invalid.
+        * @since 4.7.0
         * @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)
-        *                                      or the post value is invalid (added in 4.6.0).
-        * @return string|mixed $post_value Sanitized value or the $default provided.
+        * @return int|null Post ID on success or null if there is no post yet saved.
         */
-       public function post_value( $setting, $default = null ) {
-               $post_values = $this->unsanitized_post_values();
-               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;
+       public function changeset_post_id() {
+               if ( ! isset( $this->_changeset_post_id ) ) {
+                       $post_id = $this->find_changeset_post_id( $this->_changeset_uuid );
+                       if ( ! $post_id ) {
+                               $post_id = false;
+                       }
+                       $this->_changeset_post_id = $post_id;
                }
-               $value = $setting->sanitize( $value );
-               if ( is_null( $value ) || is_wp_error( $value ) ) {
-                       return $default;
+               if ( false === $this->_changeset_post_id ) {
+                       return null;
                }
-               return $value;
+               return $this->_changeset_post_id;
        }
 
        /**
-        * Override a setting's (unsanitized) value as found in any incoming $_POST['customized'].
-        *
-        * @since 4.2.0
-        * @access public
+        * Get the data stored in a changeset post.
         *
-        * @param string $setting_id ID for the WP_Customize_Setting instance.
-        * @param mixed  $value      Post value.
-        */
-       public function set_post_value( $setting_id, $value ) {
-               $this->unsanitized_post_values();
-               $this->_post_values[ $setting_id ] = $value;
-
-               /**
-                * Announce when a specific setting's unsanitized post value has been set.
-                *
-                * 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.
-                *
-                * @since 4.4.0
-                *
-                * @param mixed                $value Unsanitized setting post value.
-                * @param WP_Customize_Manager $this  WP_Customize_Manager instance.
-                */
-               do_action( "customize_post_value_set_{$setting_id}", $value, $this );
-
-               /**
-                * Announce when any setting's unsanitized post value has been set.
-                *
-                * 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.
-                *
-                * @since 4.4.0
-                *
-                * @param string               $setting_id Setting ID.
-                * @param mixed                $value      Unsanitized setting post value.
-                * @param WP_Customize_Manager $this       WP_Customize_Manager instance.
-                */
-               do_action( 'customize_post_value_set', $setting_id, $value, $this );
-       }
-
-       /**
-        * Print JavaScript settings.
+        * @since 4.7.0
+        * @access protected
         *
-        * @since 3.4.0
+        * @param int $post_id Changeset post ID.
+        * @return array|WP_Error Changeset data or WP_Error on error.
         */
-       public function customize_preview_init() {
-               $this->nonce_tick = check_ajax_referer( 'preview-customize_' . $this->get_stylesheet(), 'nonce' );
-
-               $this->prepare_controls();
-
-               wp_enqueue_script( 'customize-preview' );
-               add_action( 'wp', array( $this, 'customize_preview_override_404_status' ) );
-               add_action( 'wp_head', array( $this, 'customize_preview_base' ) );
-               add_action( 'wp_head', array( $this, 'customize_preview_html5' ) );
-               add_action( 'wp_head', array( $this, 'customize_preview_loading_style' ) );
-               add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 );
-               add_action( 'shutdown', array( $this, 'customize_preview_signature' ), 1000 );
-               add_filter( 'wp_die_handler', array( $this, 'remove_preview_signature' ) );
-
-               foreach ( $this->settings as $setting ) {
-                       $setting->preview();
+       protected function get_changeset_post_data( $post_id ) {
+               if ( ! $post_id ) {
+                       return new WP_Error( 'empty_post_id' );
                }
-
-               /**
-                * Fires once the Customizer preview has initialized and JavaScript
-                * settings have been printed.
-                *
-                * @since 3.4.0
-                *
-                * @param WP_Customize_Manager $this WP_Customize_Manager instance.
-                */
-               do_action( 'customize_preview_init', $this );
+               $changeset_post = get_post( $post_id );
+               if ( ! $changeset_post ) {
+                       return new WP_Error( 'missing_post' );
+               }
+               if ( 'customize_changeset' !== $changeset_post->post_type ) {
+                       return new WP_Error( 'wrong_post_type' );
+               }
+               $changeset_data = json_decode( $changeset_post->post_content, true );
+               if ( function_exists( 'json_last_error' ) && json_last_error() ) {
+                       return new WP_Error( 'json_parse_error', '', json_last_error() );
+               }
+               if ( ! is_array( $changeset_data ) ) {
+                       return new WP_Error( 'expected_array' );
+               }
+               return $changeset_data;
        }
 
        /**
-        * Prevent sending a 404 status when returning the response for the customize
-        * preview, since it causes the jQuery Ajax to fail. Send 200 instead.
+        * Get changeset data.
         *
-        * @since 4.0.0
+        * @since 4.7.0
         * @access public
-        */
-       public function customize_preview_override_404_status() {
-               if ( is_404() ) {
-                       status_header( 200 );
-               }
-       }
-
-       /**
-        * Print base element for preview frame.
         *
-        * @since 3.4.0
+        * @return array Changeset data.
         */
-       public function customize_preview_base() {
-               ?><base href="<?php echo home_url( '/' ); ?>" /><?php
+       public function changeset_data() {
+               if ( isset( $this->_changeset_data ) ) {
+                       return $this->_changeset_data;
+               }
+               $changeset_post_id = $this->changeset_post_id();
+               if ( ! $changeset_post_id ) {
+                       $this->_changeset_data = array();
+               } else {
+                       $data = $this->get_changeset_post_data( $changeset_post_id );
+                       if ( ! is_wp_error( $data ) ) {
+                               $this->_changeset_data = $data;
+                       } else {
+                               $this->_changeset_data = array();
+                       }
+               }
+               return $this->_changeset_data;
        }
 
        /**
-        * Print a workaround to handle HTML5 tags in IE < 9.
+        * Starter content setting IDs.
         *
-        * @since 3.4.0
+        * @since 4.7.0
+        * @access private
+        * @var array
         */
-       public function customize_preview_html5() { ?>
-               <!--[if lt IE 9]>
-               <script type="text/javascript">
-                       var e = [ 'abbr', 'article', 'aside', 'audio', 'canvas', 'datalist', 'details',
-                               'figure', 'footer', 'header', 'hgroup', 'mark', 'menu', 'meter', 'nav',
-                               'output', 'progress', 'section', 'time', 'video' ];
-                       for ( var i = 0; i < e.length; i++ ) {
-                               document.createElement( e[i] );
-                       }
-               </script>
-               <![endif]--><?php
-       }
+       protected $pending_starter_content_settings_ids = array();
 
        /**
-        * Print CSS for loading indicators for the Customizer preview.
+        * Import theme starter content into the customized state.
         *
-        * @since 4.2.0
+        * @since 4.7.0
         * @access public
-        */
-       public function customize_preview_loading_style() {
-               ?><style>
-                       body.wp-customizer-unloading {
-                               opacity: 0.25;
-                               cursor: progress !important;
-                               -webkit-transition: opacity 0.5s;
-                               transition: opacity 0.5s;
-                       }
-                       body.wp-customizer-unloading * {
-                               pointer-events: none !important;
-                       }
-               </style><?php
-       }
-
-       /**
-        * Print JavaScript settings for preview frame.
         *
-        * @since 3.4.0
+        * @param array $starter_content Starter content. Defaults to `get_theme_starter_content()`.
         */
-       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 );
+       function import_theme_starter_content( $starter_content = array() ) {
+               if ( empty( $starter_content ) ) {
+                       $starter_content = get_theme_starter_content();
+               }
 
-               $settings = array(
-                       'theme' => array(
-                               'stylesheet' => $this->get_stylesheet(),
-                               'active'     => $this->is_theme_active(),
-                       ),
-                       'url' => array(
-                               'self' => empty( $_SERVER['REQUEST_URI'] ) ? home_url( '/' ) : esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
-                       ),
-                       'channel' => wp_unslash( $_POST['customize_messenger_channel'] ),
-                       'activePanels' => array(),
-                       'activeSections' => array(),
-                       'activeControls' => array(),
-                       'settingValidities' => $exported_setting_validities,
-                       'nonce' => $this->get_nonces(),
-                       'l10n' => array(
-                               'shiftClickToEdit' => __( 'Shift-click to edit this element.' ),
-                       ),
-                       '_dirty' => array_keys( $this->unsanitized_post_values() ),
-               );
+               $changeset_data = array();
+               if ( $this->changeset_post_id() ) {
+                       $changeset_data = $this->get_changeset_post_data( $this->changeset_post_id() );
+               }
 
-               foreach ( $this->panels as $panel_id => $panel ) {
-                       if ( $panel->check_capabilities() ) {
-                               $settings['activePanels'][ $panel_id ] = $panel->active();
-                               foreach ( $panel->sections as $section_id => $section ) {
-                                       if ( $section->check_capabilities() ) {
-                                               $settings['activeSections'][ $section_id ] = $section->active();
+               $sidebars_widgets = isset( $starter_content['widgets'] ) && ! empty( $this->widgets ) ? $starter_content['widgets'] : array();
+               $attachments = isset( $starter_content['attachments'] ) && ! empty( $this->nav_menus ) ? $starter_content['attachments'] : array();
+               $posts = isset( $starter_content['posts'] ) && ! empty( $this->nav_menus ) ? $starter_content['posts'] : array();
+               $options = isset( $starter_content['options'] ) ? $starter_content['options'] : array();
+               $nav_menus = isset( $starter_content['nav_menus'] ) && ! empty( $this->nav_menus ) ? $starter_content['nav_menus'] : array();
+               $theme_mods = isset( $starter_content['theme_mods'] ) ? $starter_content['theme_mods'] : array();
+
+               // Widgets.
+               $max_widget_numbers = array();
+               foreach ( $sidebars_widgets as $sidebar_id => $widgets ) {
+                       $sidebar_widget_ids = array();
+                       foreach ( $widgets as $widget ) {
+                               list( $id_base, $instance ) = $widget;
+
+                               if ( ! isset( $max_widget_numbers[ $id_base ] ) ) {
+
+                                       // When $settings is an array-like object, get an intrinsic array for use with array_keys().
+                                       $settings = get_option( "widget_{$id_base}", array() );
+                                       if ( $settings instanceof ArrayObject || $settings instanceof ArrayIterator ) {
+                                               $settings = $settings->getArrayCopy();
+                                       }
+
+                                       // Find the max widget number for this type.
+                                       $widget_numbers = array_keys( $settings );
+                                       if ( count( $widget_numbers ) > 0 ) {
+                                               $widget_numbers[] = 1;
+                                               $max_widget_numbers[ $id_base ] = call_user_func_array( 'max', $widget_numbers );
+                                       } else {
+                                               $max_widget_numbers[ $id_base ] = 1;
                                        }
                                }
-                       }
+                               $max_widget_numbers[ $id_base ] += 1;
+
+                               $widget_id = sprintf( '%s-%d', $id_base, $max_widget_numbers[ $id_base ] );
+                               $setting_id = sprintf( 'widget_%s[%d]', $id_base, $max_widget_numbers[ $id_base ] );
+
+                               $setting_value = $this->widgets->sanitize_widget_js_instance( $instance );
+                               if ( empty( $changeset_data[ $setting_id ] ) || ! empty( $changeset_data[ $setting_id ]['starter_content'] ) ) {
+                                       $this->set_post_value( $setting_id, $setting_value );
+                                       $this->pending_starter_content_settings_ids[] = $setting_id;
+                               }
+                               $sidebar_widget_ids[] = $widget_id;
+                       }
+
+                       $setting_id = sprintf( 'sidebars_widgets[%s]', $sidebar_id );
+                       if ( empty( $changeset_data[ $setting_id ] ) || ! empty( $changeset_data[ $setting_id ]['starter_content'] ) ) {
+                               $this->set_post_value( $setting_id, $sidebar_widget_ids );
+                               $this->pending_starter_content_settings_ids[] = $setting_id;
+                       }
+               }
+
+               $starter_content_auto_draft_post_ids = array();
+               if ( ! empty( $changeset_data['nav_menus_created_posts']['value'] ) ) {
+                       $starter_content_auto_draft_post_ids = array_merge( $starter_content_auto_draft_post_ids, $changeset_data['nav_menus_created_posts']['value'] );
+               }
+
+               // Make an index of all the posts needed and what their slugs are.
+               $needed_posts = array();
+               $attachments = $this->prepare_starter_content_attachments( $attachments );
+               foreach ( $attachments as $attachment ) {
+                       $key = 'attachment:' . $attachment['post_name'];
+                       $needed_posts[ $key ] = true;
+               }
+               foreach ( array_keys( $posts ) as $post_symbol ) {
+                       if ( empty( $posts[ $post_symbol ]['post_name'] ) && empty( $posts[ $post_symbol ]['post_title'] ) ) {
+                               unset( $posts[ $post_symbol ] );
+                               continue;
+                       }
+                       if ( empty( $posts[ $post_symbol ]['post_name'] ) ) {
+                               $posts[ $post_symbol ]['post_name'] = sanitize_title( $posts[ $post_symbol ]['post_title'] );
+                       }
+                       if ( empty( $posts[ $post_symbol ]['post_type'] ) ) {
+                               $posts[ $post_symbol ]['post_type'] = 'post';
+                       }
+                       $needed_posts[ $posts[ $post_symbol ]['post_type'] . ':' . $posts[ $post_symbol ]['post_name'] ] = true;
+               }
+               $all_post_slugs = array_merge(
+                       wp_list_pluck( $attachments, 'post_name' ),
+                       wp_list_pluck( $posts, 'post_name' )
+               );
+
+               // Re-use auto-draft starter content posts referenced in the current customized state.
+               $existing_starter_content_posts = array();
+               if ( ! empty( $starter_content_auto_draft_post_ids ) ) {
+                       $existing_posts_query = new WP_Query( array(
+                               'post__in' => $starter_content_auto_draft_post_ids,
+                               'post_status' => 'auto-draft',
+                               'post_type' => 'any',
+                               'posts_per_page' => -1,
+                       ) );
+                       foreach ( $existing_posts_query->posts as $existing_post ) {
+                               $post_name = $existing_post->post_name;
+                               if ( empty( $post_name ) ) {
+                                       $post_name = get_post_meta( $existing_post->ID, '_customize_draft_post_name', true );
+                               }
+                               $existing_starter_content_posts[ $existing_post->post_type . ':' . $post_name ] = $existing_post;
+                       }
+               }
+
+               // Re-use non-auto-draft posts.
+               if ( ! empty( $all_post_slugs ) ) {
+                       $existing_posts_query = new WP_Query( array(
+                               'post_name__in' => $all_post_slugs,
+                               'post_status' => array_diff( get_post_stati(), array( 'auto-draft' ) ),
+                               'post_type' => 'any',
+                               'posts_per_page' => -1,
+                       ) );
+                       foreach ( $existing_posts_query->posts as $existing_post ) {
+                               $key = $existing_post->post_type . ':' . $existing_post->post_name;
+                               if ( isset( $needed_posts[ $key ] ) && ! isset( $existing_starter_content_posts[ $key ] ) ) {
+                                       $existing_starter_content_posts[ $key ] = $existing_post;
+                               }
+                       }
+               }
+
+               // Attachments are technically posts but handled differently.
+               if ( ! empty( $attachments ) ) {
+
+                       $attachment_ids = array();
+
+                       foreach ( $attachments as $symbol => $attachment ) {
+                               $file_array = array(
+                                       'name' => $attachment['file_name'],
+                               );
+                               $file_path = $attachment['file_path'];
+                               $attachment_id = null;
+                               $attached_file = null;
+                               if ( isset( $existing_starter_content_posts[ 'attachment:' . $attachment['post_name'] ] ) ) {
+                                       $attachment_post = $existing_starter_content_posts[ 'attachment:' . $attachment['post_name'] ];
+                                       $attachment_id = $attachment_post->ID;
+                                       $attached_file = get_attached_file( $attachment_id );
+                                       if ( empty( $attached_file ) || ! file_exists( $attached_file ) ) {
+                                               $attachment_id = null;
+                                               $attached_file = null;
+                                       } elseif ( $this->get_stylesheet() !== get_post_meta( $attachment_post->ID, '_starter_content_theme', true ) ) {
+
+                                               // Re-generate attachment metadata since it was previously generated for a different theme.
+                                               $metadata = wp_generate_attachment_metadata( $attachment_post->ID, $attached_file );
+                                               wp_update_attachment_metadata( $attachment_id, $metadata );
+                                               update_post_meta( $attachment_id, '_starter_content_theme', $this->get_stylesheet() );
+                                       }
+                               }
+
+                               // Insert the attachment auto-draft because it doesn't yet exist or the attached file is gone.
+                               if ( ! $attachment_id ) {
+
+                                       // Copy file to temp location so that original file won't get deleted from theme after sideloading.
+                                       $temp_file_name = wp_tempnam( basename( $file_path ) );
+                                       if ( $temp_file_name && copy( $file_path, $temp_file_name ) ) {
+                                               $file_array['tmp_name'] = $temp_file_name;
+                                       }
+                                       if ( empty( $file_array['tmp_name'] ) ) {
+                                               continue;
+                                       }
+
+                                       $attachment_post_data = array_merge(
+                                               wp_array_slice_assoc( $attachment, array( 'post_title', 'post_content', 'post_excerpt' ) ),
+                                               array(
+                                                       'post_status' => 'auto-draft', // So attachment will be garbage collected in a week if changeset is never published.
+                                               )
+                                       );
+
+                                       // In PHP < 5.6 filesize() returns 0 for the temp files unless we clear the file status cache.
+                                       // Technically, PHP < 5.6.0 || < 5.5.13 || < 5.4.29 but no need to be so targeted.
+                                       // See https://bugs.php.net/bug.php?id=65701
+                                       if ( version_compare( PHP_VERSION, '5.6', '<' ) ) {
+                                               clearstatcache();
+                                       }
+
+                                       $attachment_id = media_handle_sideload( $file_array, 0, null, $attachment_post_data );
+                                       if ( is_wp_error( $attachment_id ) ) {
+                                               continue;
+                                       }
+                                       update_post_meta( $attachment_id, '_starter_content_theme', $this->get_stylesheet() );
+                                       update_post_meta( $attachment_id, '_customize_draft_post_name', $attachment['post_name'] );
+                               }
+
+                               $attachment_ids[ $symbol ] = $attachment_id;
+                       }
+                       $starter_content_auto_draft_post_ids = array_merge( $starter_content_auto_draft_post_ids, array_values( $attachment_ids ) );
+               }
+
+               // Posts & pages.
+               if ( ! empty( $posts ) ) {
+                       foreach ( array_keys( $posts ) as $post_symbol ) {
+                               if ( empty( $posts[ $post_symbol ]['post_type'] ) || empty( $posts[ $post_symbol ]['post_name'] ) ) {
+                                       continue;
+                               }
+                               $post_type = $posts[ $post_symbol ]['post_type'];
+                               if ( ! empty( $posts[ $post_symbol ]['post_name'] ) ) {
+                                       $post_name = $posts[ $post_symbol ]['post_name'];
+                               } elseif ( ! empty( $posts[ $post_symbol ]['post_title'] ) ) {
+                                       $post_name = sanitize_title( $posts[ $post_symbol ]['post_title'] );
+                               } else {
+                                       continue;
+                               }
+
+                               // Use existing auto-draft post if one already exists with the same type and name.
+                               if ( isset( $existing_starter_content_posts[ $post_type . ':' . $post_name ] ) ) {
+                                       $posts[ $post_symbol ]['ID'] = $existing_starter_content_posts[ $post_type . ':' . $post_name ]->ID;
+                                       continue;
+                               }
+
+                               // Translate the featured image symbol.
+                               if ( ! empty( $posts[ $post_symbol ]['thumbnail'] )
+                                       && preg_match( '/^{{(?P<symbol>.+)}}$/', $posts[ $post_symbol ]['thumbnail'], $matches )
+                                       && isset( $attachment_ids[ $matches['symbol'] ] ) ) {
+                                       $posts[ $post_symbol ]['meta_input']['_thumbnail_id'] = $attachment_ids[ $matches['symbol'] ];
+                               }
+
+                               if ( ! empty( $posts[ $post_symbol ]['template'] ) ) {
+                                       $posts[ $post_symbol ]['meta_input']['_wp_page_template'] = $posts[ $post_symbol ]['template'];
+                               }
+
+                               $r = $this->nav_menus->insert_auto_draft_post( $posts[ $post_symbol ] );
+                               if ( $r instanceof WP_Post ) {
+                                       $posts[ $post_symbol ]['ID'] = $r->ID;
+                               }
+                       }
+
+                       $starter_content_auto_draft_post_ids = array_merge( $starter_content_auto_draft_post_ids, wp_list_pluck( $posts, 'ID' ) );
+               }
+
+               // The nav_menus_created_posts setting is why nav_menus component is dependency for adding posts.
+               if ( ! empty( $this->nav_menus ) && ! empty( $starter_content_auto_draft_post_ids ) ) {
+                       $setting_id = 'nav_menus_created_posts';
+                       $this->set_post_value( $setting_id, array_unique( array_values( $starter_content_auto_draft_post_ids ) ) );
+                       $this->pending_starter_content_settings_ids[] = $setting_id;
+               }
+
+               // Nav menus.
+               $placeholder_id = -1;
+               $reused_nav_menu_setting_ids = array();
+               foreach ( $nav_menus as $nav_menu_location => $nav_menu ) {
+
+                       $nav_menu_term_id = null;
+                       $nav_menu_setting_id = null;
+                       $matches = array();
+
+                       // Look for an existing placeholder menu with starter content to re-use.
+                       foreach ( $changeset_data as $setting_id => $setting_params ) {
+                               $can_reuse = (
+                                       ! empty( $setting_params['starter_content'] )
+                                       &&
+                                       ! in_array( $setting_id, $reused_nav_menu_setting_ids, true )
+                                       &&
+                                       preg_match( '#^nav_menu\[(?P<nav_menu_id>-?\d+)\]$#', $setting_id, $matches )
+                               );
+                               if ( $can_reuse ) {
+                                       $nav_menu_term_id = intval( $matches['nav_menu_id'] );
+                                       $nav_menu_setting_id = $setting_id;
+                                       $reused_nav_menu_setting_ids[] = $setting_id;
+                                       break;
+                               }
+                       }
+
+                       if ( ! $nav_menu_term_id ) {
+                               while ( isset( $changeset_data[ sprintf( 'nav_menu[%d]', $placeholder_id ) ] ) ) {
+                                       $placeholder_id--;
+                               }
+                               $nav_menu_term_id = $placeholder_id;
+                               $nav_menu_setting_id = sprintf( 'nav_menu[%d]', $placeholder_id );
+                       }
+
+                       $this->set_post_value( $nav_menu_setting_id, array(
+                               'name' => isset( $nav_menu['name'] ) ? $nav_menu['name'] : $nav_menu_location,
+                       ) );
+                       $this->pending_starter_content_settings_ids[] = $nav_menu_setting_id;
+
+                       // @todo Add support for menu_item_parent.
+                       $position = 0;
+                       foreach ( $nav_menu['items'] as $nav_menu_item ) {
+                               $nav_menu_item_setting_id = sprintf( 'nav_menu_item[%d]', $placeholder_id-- );
+                               if ( ! isset( $nav_menu_item['position'] ) ) {
+                                       $nav_menu_item['position'] = $position++;
+                               }
+                               $nav_menu_item['nav_menu_term_id'] = $nav_menu_term_id;
+
+                               if ( isset( $nav_menu_item['object_id'] ) ) {
+                                       if ( 'post_type' === $nav_menu_item['type'] && preg_match( '/^{{(?P<symbol>.+)}}$/', $nav_menu_item['object_id'], $matches ) && isset( $posts[ $matches['symbol'] ] ) ) {
+                                               $nav_menu_item['object_id'] = $posts[ $matches['symbol'] ]['ID'];
+                                               if ( empty( $nav_menu_item['title'] ) ) {
+                                                       $original_object = get_post( $nav_menu_item['object_id'] );
+                                                       $nav_menu_item['title'] = $original_object->post_title;
+                                               }
+                                       } else {
+                                               continue;
+                                       }
+                               } else {
+                                       $nav_menu_item['object_id'] = 0;
+                               }
+
+                               if ( empty( $changeset_data[ $nav_menu_item_setting_id ] ) || ! empty( $changeset_data[ $nav_menu_item_setting_id ]['starter_content'] ) ) {
+                                       $this->set_post_value( $nav_menu_item_setting_id, $nav_menu_item );
+                                       $this->pending_starter_content_settings_ids[] = $nav_menu_item_setting_id;
+                               }
+                       }
+
+                       $setting_id = sprintf( 'nav_menu_locations[%s]', $nav_menu_location );
+                       if ( empty( $changeset_data[ $setting_id ] ) || ! empty( $changeset_data[ $setting_id ]['starter_content'] ) ) {
+                               $this->set_post_value( $setting_id, $nav_menu_term_id );
+                               $this->pending_starter_content_settings_ids[] = $setting_id;
+                       }
+               }
+
+               // Options.
+               foreach ( $options as $name => $value ) {
+                       if ( preg_match( '/^{{(?P<symbol>.+)}}$/', $value, $matches ) ) {
+                               if ( isset( $posts[ $matches['symbol'] ] ) ) {
+                                       $value = $posts[ $matches['symbol'] ]['ID'];
+                               } elseif ( isset( $attachment_ids[ $matches['symbol'] ] ) ) {
+                                       $value = $attachment_ids[ $matches['symbol'] ];
+                               } else {
+                                       continue;
+                               }
+                       }
+
+                       if ( empty( $changeset_data[ $name ] ) || ! empty( $changeset_data[ $name ]['starter_content'] ) ) {
+                               $this->set_post_value( $name, $value );
+                               $this->pending_starter_content_settings_ids[] = $name;
+                       }
+               }
+
+               // Theme mods.
+               foreach ( $theme_mods as $name => $value ) {
+                       if ( preg_match( '/^{{(?P<symbol>.+)}}$/', $value, $matches ) ) {
+                               if ( isset( $posts[ $matches['symbol'] ] ) ) {
+                                       $value = $posts[ $matches['symbol'] ]['ID'];
+                               } elseif ( isset( $attachment_ids[ $matches['symbol'] ] ) ) {
+                                       $value = $attachment_ids[ $matches['symbol'] ];
+                               } else {
+                                       continue;
+                               }
+                       }
+
+                       // Handle header image as special case since setting has a legacy format.
+                       if ( 'header_image' === $name ) {
+                               $name = 'header_image_data';
+                               $metadata = wp_get_attachment_metadata( $value );
+                               if ( empty( $metadata ) ) {
+                                       continue;
+                               }
+                               $value = array(
+                                       'attachment_id' => $value,
+                                       'url' => wp_get_attachment_url( $value ),
+                                       'height' => $metadata['height'],
+                                       'width' => $metadata['width'],
+                               );
+                       } elseif ( 'background_image' === $name ) {
+                               $value = wp_get_attachment_url( $value );
+                       }
+
+                       if ( empty( $changeset_data[ $name ] ) || ! empty( $changeset_data[ $name ]['starter_content'] ) ) {
+                               $this->set_post_value( $name, $value );
+                               $this->pending_starter_content_settings_ids[] = $name;
+                       }
+               }
+
+               if ( ! empty( $this->pending_starter_content_settings_ids ) ) {
+                       if ( did_action( 'customize_register' ) ) {
+                               $this->_save_starter_content_changeset();
+                       } else {
+                               add_action( 'customize_register', array( $this, '_save_starter_content_changeset' ), 1000 );
+                       }
+               }
+       }
+
+       /**
+        * Prepare starter content attachments.
+        *
+        * Ensure that the attachments are valid and that they have slugs and file name/path.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @param array $attachments Attachments.
+        * @return array Prepared attachments.
+        */
+       protected function prepare_starter_content_attachments( $attachments ) {
+               $prepared_attachments = array();
+               if ( empty( $attachments ) ) {
+                       return $prepared_attachments;
+               }
+
+               // Such is The WordPress Way.
+               require_once( ABSPATH . 'wp-admin/includes/file.php' );
+               require_once( ABSPATH . 'wp-admin/includes/media.php' );
+               require_once( ABSPATH . 'wp-admin/includes/image.php' );
+
+               foreach ( $attachments as $symbol => $attachment ) {
+
+                       // A file is required and URLs to files are not currently allowed.
+                       if ( empty( $attachment['file'] ) || preg_match( '#^https?://$#', $attachment['file'] ) ) {
+                               continue;
+                       }
+
+                       $file_path = null;
+                       if ( file_exists( $attachment['file'] ) ) {
+                               $file_path = $attachment['file']; // Could be absolute path to file in plugin.
+                       } elseif ( is_child_theme() && file_exists( get_stylesheet_directory() . '/' . $attachment['file'] ) ) {
+                               $file_path = get_stylesheet_directory() . '/' . $attachment['file'];
+                       } elseif ( file_exists( get_template_directory() . '/' . $attachment['file'] ) ) {
+                               $file_path = get_template_directory() . '/' . $attachment['file'];
+                       } else {
+                               continue;
+                       }
+                       $file_name = basename( $attachment['file'] );
+
+                       // Skip file types that are not recognized.
+                       $checked_filetype = wp_check_filetype( $file_name );
+                       if ( empty( $checked_filetype['type'] ) ) {
+                               continue;
+                       }
+
+                       // Ensure post_name is set since not automatically derived from post_title for new auto-draft posts.
+                       if ( empty( $attachment['post_name'] ) ) {
+                               if ( ! empty( $attachment['post_title'] ) ) {
+                                       $attachment['post_name'] = sanitize_title( $attachment['post_title'] );
+                               } else {
+                                       $attachment['post_name'] = sanitize_title( preg_replace( '/\.\w+$/', '', $file_name ) );
+                               }
+                       }
+
+                       $attachment['file_name'] = $file_name;
+                       $attachment['file_path'] = $file_path;
+                       $prepared_attachments[ $symbol ] = $attachment;
+               }
+               return $prepared_attachments;
+       }
+
+       /**
+        * Save starter content changeset.
+        *
+        * @since 4.7.0
+        * @access private
+        */
+       public function _save_starter_content_changeset() {
+
+               if ( empty( $this->pending_starter_content_settings_ids ) ) {
+                       return;
+               }
+
+               $this->save_changeset_post( array(
+                       'data' => array_fill_keys( $this->pending_starter_content_settings_ids, array( 'starter_content' => true ) ),
+                       'starter_content' => true,
+               ) );
+
+               $this->pending_starter_content_settings_ids = array();
+       }
+
+       /**
+        * Get dirty pre-sanitized setting values in the current customized state.
+        *
+        * The returned array consists of a merge of three sources:
+        * 1. If the theme is not currently active, then the base array is any stashed
+        *    theme mods that were modified previously but never published.
+        * 2. The values from the current changeset, if it exists.
+        * 3. If the user can customize, the values parsed from the incoming
+        *    `$_POST['customized']` JSON data.
+        * 4. Any programmatically-set post values via `WP_Customize_Manager::set_post_value()`.
+        *
+        * The name "unsanitized_post_values" is a carry-over from when the customized
+        * state was exclusively sourced from `$_POST['customized']`. Nevertheless,
+        * the value returned will come from the current changeset post and from the
+        * incoming post data.
+        *
+        * @since 4.1.1
+        * @since 4.7.0 Added $args param and merging with changeset values and stashed theme mods.
+        *
+        * @param array $args {
+        *     Args.
+        *
+        *     @type bool $exclude_changeset Whether the changeset values should also be excluded. Defaults to false.
+        *     @type bool $exclude_post_data Whether the post input values should also be excluded. Defaults to false when lacking the customize capability.
+        * }
+        * @return array
+        */
+       public function unsanitized_post_values( $args = array() ) {
+               $args = array_merge(
+                       array(
+                               'exclude_changeset' => false,
+                               'exclude_post_data' => ! current_user_can( 'customize' ),
+                       ),
+                       $args
+               );
+
+               $values = array();
+
+               // Let default values be from the stashed theme mods if doing a theme switch and if no changeset is present.
+               if ( ! $this->is_theme_active() ) {
+                       $stashed_theme_mods = get_option( 'customize_stashed_theme_mods' );
+                       $stylesheet = $this->get_stylesheet();
+                       if ( isset( $stashed_theme_mods[ $stylesheet ] ) ) {
+                               $values = array_merge( $values, wp_list_pluck( $stashed_theme_mods[ $stylesheet ], 'value' ) );
+                       }
+               }
+
+               if ( ! $args['exclude_changeset'] ) {
+                       foreach ( $this->changeset_data() as $setting_id => $setting_params ) {
+                               if ( ! array_key_exists( 'value', $setting_params ) ) {
+                                       continue;
+                               }
+                               if ( isset( $setting_params['type'] ) && 'theme_mod' === $setting_params['type'] ) {
+
+                                       // Ensure that theme mods values are only used if they were saved under the current theme.
+                                       $namespace_pattern = '/^(?P<stylesheet>.+?)::(?P<setting_id>.+)$/';
+                                       if ( preg_match( $namespace_pattern, $setting_id, $matches ) && $this->get_stylesheet() === $matches['stylesheet'] ) {
+                                               $values[ $matches['setting_id'] ] = $setting_params['value'];
+                                       }
+                               } else {
+                                       $values[ $setting_id ] = $setting_params['value'];
+                               }
+                       }
+               }
+
+               if ( ! $args['exclude_post_data'] ) {
+                       if ( ! isset( $this->_post_values ) ) {
+                               if ( isset( $_POST['customized'] ) ) {
+                                       $post_values = json_decode( wp_unslash( $_POST['customized'] ), true );
+                               } else {
+                                       $post_values = array();
+                               }
+                               if ( is_array( $post_values ) ) {
+                                       $this->_post_values = $post_values;
+                               } else {
+                                       $this->_post_values = array();
+                               }
+                       }
+                       $values = array_merge( $values, $this->_post_values );
+               }
+               return $values;
+       }
+
+       /**
+        * Returns the sanitized value for a given setting from the current customized state.
+        *
+        * The name "post_value" is a carry-over from when the customized state was exclusively
+        * sourced from `$_POST['customized']`. Nevertheless, the value returned will come
+        * from the current changeset post and from the incoming post data.
+        *
+        * @since 3.4.0
+        * @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)
+        *                                      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 $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;
+       }
+
+       /**
+        * Override a setting's value in the current customized state.
+        *
+        * The name "post_value" is a carry-over from when the customized state was
+        * exclusively sourced from `$_POST['customized']`.
+        *
+        * @since 4.2.0
+        * @access public
+        *
+        * @param string $setting_id ID for the WP_Customize_Setting instance.
+        * @param mixed  $value      Post value.
+        */
+       public function set_post_value( $setting_id, $value ) {
+               $this->unsanitized_post_values(); // Populate _post_values from $_POST['customized'].
+               $this->_post_values[ $setting_id ] = $value;
+
+               /**
+                * Announce when a specific setting's unsanitized post value has been set.
+                *
+                * 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.
+                *
+                * @since 4.4.0
+                *
+                * @param mixed                $value Unsanitized setting post value.
+                * @param WP_Customize_Manager $this  WP_Customize_Manager instance.
+                */
+               do_action( "customize_post_value_set_{$setting_id}", $value, $this );
+
+               /**
+                * Announce when any setting's unsanitized post value has been set.
+                *
+                * 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.
+                *
+                * @since 4.4.0
+                *
+                * @param string               $setting_id Setting ID.
+                * @param mixed                $value      Unsanitized setting post value.
+                * @param WP_Customize_Manager $this       WP_Customize_Manager instance.
+                */
+               do_action( 'customize_post_value_set', $setting_id, $value, $this );
+       }
+
+       /**
+        * Print JavaScript settings.
+        *
+        * @since 3.4.0
+        */
+       public function customize_preview_init() {
+
+               /*
+                * Now that Customizer previews are loaded into iframes via GET requests
+                * and natural URLs with transaction UUIDs added, we need to ensure that
+                * the responses are never cached by proxies. In practice, this will not
+                * be needed if the user is logged-in anyway. But if anonymous access is
+                * allowed then the auth cookies would not be sent and WordPress would
+                * not send no-cache headers by default.
+                */
+               if ( ! headers_sent() ) {
+                       nocache_headers();
+                       header( 'X-Robots: noindex, nofollow, noarchive' );
+               }
+               add_action( 'wp_head', 'wp_no_robots' );
+               add_filter( 'wp_headers', array( $this, 'filter_iframe_security_headers' ) );
+
+               /*
+                * If preview is being served inside the customizer preview iframe, and
+                * if the user doesn't have customize capability, then it is assumed
+                * that the user's session has expired and they need to re-authenticate.
+                */
+               if ( $this->messenger_channel && ! current_user_can( 'customize' ) ) {
+                       $this->wp_die( -1, __( 'Unauthorized. You may remove the customize_messenger_channel param to preview as frontend.' ) );
+                       return;
+               }
+
+               $this->prepare_controls();
+
+               add_filter( 'wp_redirect', array( $this, 'add_state_query_params' ) );
+
+               wp_enqueue_script( 'customize-preview' );
+               add_action( 'wp_head', array( $this, 'customize_preview_loading_style' ) );
+               add_action( 'wp_head', array( $this, 'remove_frameless_preview_messenger_channel' ) );
+               add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 );
+               add_filter( 'get_edit_post_link', '__return_empty_string' );
+
+               /**
+                * Fires once the Customizer preview has initialized and JavaScript
+                * settings have been printed.
+                *
+                * @since 3.4.0
+                *
+                * @param WP_Customize_Manager $this WP_Customize_Manager instance.
+                */
+               do_action( 'customize_preview_init', $this );
+       }
+
+       /**
+        * Filter the X-Frame-Options and Content-Security-Policy headers to ensure frontend can load in customizer.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param array $headers Headers.
+        * @return array Headers.
+        */
+       public function filter_iframe_security_headers( $headers ) {
+               $customize_url = admin_url( 'customize.php' );
+               $headers['X-Frame-Options'] = 'ALLOW-FROM ' . $customize_url;
+               $headers['Content-Security-Policy'] = 'frame-ancestors ' . preg_replace( '#^(\w+://[^/]+).+?$#', '$1', $customize_url );
+               return $headers;
+       }
+
+       /**
+        * Add customize state query params to a given URL if preview is allowed.
+        *
+        * @since 4.7.0
+        * @access public
+        * @see wp_redirect()
+        * @see WP_Customize_Manager::get_allowed_url()
+        *
+        * @param string $url URL.
+        * @return string URL.
+        */
+       public function add_state_query_params( $url ) {
+               $parsed_original_url = wp_parse_url( $url );
+               $is_allowed = false;
+               foreach ( $this->get_allowed_urls() as $allowed_url ) {
+                       $parsed_allowed_url = wp_parse_url( $allowed_url );
+                       $is_allowed = (
+                               $parsed_allowed_url['scheme'] === $parsed_original_url['scheme']
+                               &&
+                               $parsed_allowed_url['host'] === $parsed_original_url['host']
+                               &&
+                               0 === strpos( $parsed_original_url['path'], $parsed_allowed_url['path'] )
+                       );
+                       if ( $is_allowed ) {
+                               break;
+                       }
+               }
+
+               if ( $is_allowed ) {
+                       $query_params = array(
+                               'customize_changeset_uuid' => $this->changeset_uuid(),
+                       );
+                       if ( ! $this->is_theme_active() ) {
+                               $query_params['customize_theme'] = $this->get_stylesheet();
+                       }
+                       if ( $this->messenger_channel ) {
+                               $query_params['customize_messenger_channel'] = $this->messenger_channel;
+                       }
+                       $url = add_query_arg( $query_params, $url );
+               }
+
+               return $url;
+       }
+
+       /**
+        * Prevent sending a 404 status when returning the response for the customize
+        * preview, since it causes the jQuery Ajax to fail. Send 200 instead.
+        *
+        * @since 4.0.0
+        * @deprecated 4.7.0
+        * @access public
+        */
+       public function customize_preview_override_404_status() {
+               _deprecated_function( __METHOD__, '4.7.0' );
+       }
+
+       /**
+        * Print base element for preview frame.
+        *
+        * @since 3.4.0
+        * @deprecated 4.7.0
+        */
+       public function customize_preview_base() {
+               _deprecated_function( __METHOD__, '4.7.0' );
+       }
+
+       /**
+        * Print a workaround to handle HTML5 tags in IE < 9.
+        *
+        * @since 3.4.0
+        * @deprecated 4.7.0 Customizer no longer supports IE8, so all supported browsers recognize HTML5.
+        */
+       public function customize_preview_html5() {
+               _deprecated_function( __FUNCTION__, '4.7.0' );
+       }
+
+       /**
+        * Print CSS for loading indicators for the Customizer preview.
+        *
+        * @since 4.2.0
+        * @access public
+        */
+       public function customize_preview_loading_style() {
+               ?><style>
+                       body.wp-customizer-unloading {
+                               opacity: 0.25;
+                               cursor: progress !important;
+                               -webkit-transition: opacity 0.5s;
+                               transition: opacity 0.5s;
+                       }
+                       body.wp-customizer-unloading * {
+                               pointer-events: none !important;
+                       }
+                       form.customize-unpreviewable,
+                       form.customize-unpreviewable input,
+                       form.customize-unpreviewable select,
+                       form.customize-unpreviewable button,
+                       a.customize-unpreviewable,
+                       area.customize-unpreviewable {
+                               cursor: not-allowed !important;
+                       }
+               </style><?php
+       }
+
+       /**
+        * Remove customize_messenger_channel query parameter from the preview window when it is not in an iframe.
+        *
+        * This ensures that the admin bar will be shown. It also ensures that link navigation will
+        * work as expected since the parent frame is not being sent the URL to navigate to.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function remove_frameless_preview_messenger_channel() {
+               if ( ! $this->messenger_channel ) {
+                       return;
+               }
+               ?>
+               <script>
+               ( function() {
+                       var urlParser, oldQueryParams, newQueryParams, i;
+                       if ( parent !== window ) {
+                               return;
+                       }
+                       urlParser = document.createElement( 'a' );
+                       urlParser.href = location.href;
+                       oldQueryParams = urlParser.search.substr( 1 ).split( /&/ );
+                       newQueryParams = [];
+                       for ( i = 0; i < oldQueryParams.length; i += 1 ) {
+                               if ( ! /^customize_messenger_channel=/.test( oldQueryParams[ i ] ) ) {
+                                       newQueryParams.push( oldQueryParams[ i ] );
+                               }
+                       }
+                       urlParser.search = newQueryParams.join( '&' );
+                       if ( urlParser.search !== location.search ) {
+                               location.replace( urlParser.href );
+                       }
+               } )();
+               </script>
+               <?php
+       }
+
+       /**
+        * Print JavaScript settings for preview frame.
+        *
+        * @since 3.4.0
+        */
+       public function customize_preview_settings() {
+               $post_values = $this->unsanitized_post_values( array( 'exclude_changeset' => true ) );
+               $setting_validities = $this->validate_setting_values( $post_values );
+               $exported_setting_validities = array_map( array( $this, 'prepare_setting_validity_for_js' ), $setting_validities );
+
+               // Note that the REQUEST_URI is not passed into home_url() since this breaks subdirectory installs.
+               $self_url = empty( $_SERVER['REQUEST_URI'] ) ? home_url( '/' ) : esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) );
+               $state_query_params = array(
+                       'customize_theme',
+                       'customize_changeset_uuid',
+                       'customize_messenger_channel',
+               );
+               $self_url = remove_query_arg( $state_query_params, $self_url );
+
+               $allowed_urls = $this->get_allowed_urls();
+               $allowed_hosts = array();
+               foreach ( $allowed_urls as $allowed_url ) {
+                       $parsed = wp_parse_url( $allowed_url );
+                       if ( empty( $parsed['host'] ) ) {
+                               continue;
+                       }
+                       $host = $parsed['host'];
+                       if ( ! empty( $parsed['port'] ) ) {
+                               $host .= ':' . $parsed['port'];
+                       }
+                       $allowed_hosts[] = $host;
+               }
+               $settings = array(
+                       'changeset' => array(
+                               'uuid' => $this->_changeset_uuid,
+                       ),
+                       'timeouts' => array(
+                               'selectiveRefresh' => 250,
+                               'keepAliveSend' => 1000,
+                       ),
+                       'theme' => array(
+                               'stylesheet' => $this->get_stylesheet(),
+                               'active'     => $this->is_theme_active(),
+                       ),
+                       'url' => array(
+                               'self' => $self_url,
+                               'allowed' => array_map( 'esc_url_raw', $this->get_allowed_urls() ),
+                               'allowedHosts' => array_unique( $allowed_hosts ),
+                               'isCrossDomain' => $this->is_cross_domain(),
+                       ),
+                       'channel' => $this->messenger_channel,
+                       'activePanels' => array(),
+                       'activeSections' => array(),
+                       'activeControls' => array(),
+                       'settingValidities' => $exported_setting_validities,
+                       'nonce' => current_user_can( 'customize' ) ? $this->get_nonces() : array(),
+                       'l10n' => array(
+                               'shiftClickToEdit' => __( 'Shift-click to edit this element.' ),
+                               'linkUnpreviewable' => __( 'This link is not live-previewable.' ),
+                               'formUnpreviewable' => __( 'This form is not live-previewable.' ),
+                       ),
+                       '_dirty' => array_keys( $post_values ),
+               );
+
+               foreach ( $this->panels as $panel_id => $panel ) {
+                       if ( $panel->check_capabilities() ) {
+                               $settings['activePanels'][ $panel_id ] = $panel->active();
+                               foreach ( $panel->sections as $section_id => $section ) {
+                                       if ( $section->check_capabilities() ) {
+                                               $settings['activeSections'][ $section_id ] = $section->active();
+                                       }
+                               }
+                       }
                }
                foreach ( $this->sections as $id => $section ) {
                        if ( $section->check_capabilities() ) {
@@ -902,21 +1859,23 @@ final class WP_Customize_Manager {
         * Prints a signature so we can ensure the Customizer was properly executed.
         *
         * @since 3.4.0
+        * @deprecated 4.7.0
         */
        public function customize_preview_signature() {
-               echo 'WP_CUSTOMIZER_SIGNATURE';
+               _deprecated_function( __METHOD__, '4.7.0' );
        }
 
        /**
         * Removes the signature in case we experience a case where the Customizer was not properly executed.
         *
         * @since 3.4.0
+        * @deprecated 4.7.0
         *
         * @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 );
+               _deprecated_function( __METHOD__, '4.7.0' );
 
                return $return;
        }
@@ -991,9 +1950,10 @@ final class WP_Customize_Manager {
        /**
         * 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.
+        * already null since they will be skipped anyway. Sanitization is applied
+        * to values that pass validation, and values that become null or `WP_Error`
+        * after sanitizing are marked invalid.
         *
         * @since 4.6.0
         * @access public
@@ -1001,17 +1961,45 @@ final class WP_Customize_Manager {
         * @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.
+        * @param array $setting_values Mapping of setting IDs to values to validate and sanitize.
+        * @param array $options {
+        *     Options.
+        *
+        *     @type bool $validate_existence  Whether a setting's existence will be checked.
+        *     @type bool $validate_capability Whether the setting capability will be checked.
+        * }
         * @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 ) {
+       public function validate_setting_values( $setting_values, $options = array() ) {
+               $options = wp_parse_args( $options, array(
+                       'validate_capability' => false,
+                       'validate_existence' => false,
+               ) );
+
                $validities = array();
                foreach ( $setting_values as $setting_id => $unsanitized_value ) {
                        $setting = $this->get_setting( $setting_id );
-                       if ( ! $setting || is_null( $unsanitized_value ) ) {
+                       if ( ! $setting ) {
+                               if ( $options['validate_existence'] ) {
+                                       $validities[ $setting_id ] = new WP_Error( 'unrecognized', __( 'Setting does not exist or is unrecognized.' ) );
+                               }
                                continue;
                        }
-                       $validity = $setting->validate( $unsanitized_value );
+                       if ( $options['validate_capability'] && ! current_user_can( $setting->capability ) ) {
+                               $validity = new WP_Error( 'unauthorized', __( 'Unauthorized to modify setting due to capability.' ) );
+                       } else {
+                               if ( is_null( $unsanitized_value ) ) {
+                                       continue;
+                               }
+                               $validity = $setting->validate( $unsanitized_value );
+                       }
+                       if ( ! is_wp_error( $validity ) ) {
+                               /** This filter is documented in wp-includes/class-wp-customize-setting.php */
+                               $late_validity = apply_filters( "customize_validate_{$setting->id}", new WP_Error(), $unsanitized_value, $setting );
+                               if ( ! empty( $late_validity->errors ) ) {
+                                       $validity = $late_validity;
+                               }
+                       }
                        if ( ! is_wp_error( $validity ) ) {
                                $value = $setting->sanitize( $unsanitized_value );
                                if ( is_null( $value ) ) {
@@ -1046,17 +2034,9 @@ final class WP_Customize_Manager {
                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,
+                                       'data' => $validity->get_error_data( $error_code ),
                                );
                        }
                        return $notification;
@@ -1066,11 +2046,16 @@ final class WP_Customize_Manager {
        }
 
        /**
-        * Switch the theme and trigger the save() method on each setting.
+        * Handle customize_save WP Ajax request to save/update a changeset.
         *
         * @since 3.4.0
+        * @since 4.7.0 The semantics of this method have changed to update a changeset, optionally to also change the status and other attributes.
         */
        public function save() {
+               if ( ! is_user_logged_in() ) {
+                       wp_send_json_error( 'unauthenticated' );
+               }
+
                if ( ! $this->is_preview() ) {
                        wp_send_json_error( 'not_preview' );
                }
@@ -1080,6 +2065,248 @@ final class WP_Customize_Manager {
                        wp_send_json_error( 'invalid_nonce' );
                }
 
+               $changeset_post_id = $this->changeset_post_id();
+               if ( empty( $changeset_post_id ) ) {
+                       if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->create_posts ) ) {
+                               wp_send_json_error( 'cannot_create_changeset_post' );
+                       }
+               } else {
+                       if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $changeset_post_id ) ) {
+                               wp_send_json_error( 'cannot_edit_changeset_post' );
+                       }
+               }
+
+               if ( ! empty( $_POST['customize_changeset_data'] ) ) {
+                       $input_changeset_data = json_decode( wp_unslash( $_POST['customize_changeset_data'] ), true );
+                       if ( ! is_array( $input_changeset_data ) ) {
+                               wp_send_json_error( 'invalid_customize_changeset_data' );
+                       }
+               } else {
+                       $input_changeset_data = array();
+               }
+
+               // Validate title.
+               $changeset_title = null;
+               if ( isset( $_POST['customize_changeset_title'] ) ) {
+                       $changeset_title = sanitize_text_field( wp_unslash( $_POST['customize_changeset_title'] ) );
+               }
+
+               // Validate changeset status param.
+               $is_publish = null;
+               $changeset_status = null;
+               if ( isset( $_POST['customize_changeset_status'] ) ) {
+                       $changeset_status = wp_unslash( $_POST['customize_changeset_status'] );
+                       if ( ! get_post_status_object( $changeset_status ) || ! in_array( $changeset_status, array( 'draft', 'pending', 'publish', 'future' ), true ) ) {
+                               wp_send_json_error( 'bad_customize_changeset_status', 400 );
+                       }
+                       $is_publish = ( 'publish' === $changeset_status || 'future' === $changeset_status );
+                       if ( $is_publish && ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->publish_posts ) ) {
+                               wp_send_json_error( 'changeset_publish_unauthorized', 403 );
+                       }
+               }
+
+               /*
+                * Validate changeset date param. Date is assumed to be in local time for
+                * the WP if in MySQL format (YYYY-MM-DD HH:MM:SS). Otherwise, the date
+                * is parsed with strtotime() so that ISO date format may be supplied
+                * or a string like "+10 minutes".
+                */
+               $changeset_date_gmt = null;
+               if ( isset( $_POST['customize_changeset_date'] ) ) {
+                       $changeset_date = wp_unslash( $_POST['customize_changeset_date'] );
+                       if ( preg_match( '/^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d$/', $changeset_date ) ) {
+                               $mm = substr( $changeset_date, 5, 2 );
+                               $jj = substr( $changeset_date, 8, 2 );
+                               $aa = substr( $changeset_date, 0, 4 );
+                               $valid_date = wp_checkdate( $mm, $jj, $aa, $changeset_date );
+                               if ( ! $valid_date ) {
+                                       wp_send_json_error( 'bad_customize_changeset_date', 400 );
+                               }
+                               $changeset_date_gmt = get_gmt_from_date( $changeset_date );
+                       } else {
+                               $timestamp = strtotime( $changeset_date );
+                               if ( ! $timestamp ) {
+                                       wp_send_json_error( 'bad_customize_changeset_date', 400 );
+                               }
+                               $changeset_date_gmt = gmdate( 'Y-m-d H:i:s', $timestamp );
+                       }
+               }
+
+               $r = $this->save_changeset_post( array(
+                       'status' => $changeset_status,
+                       'title' => $changeset_title,
+                       'date_gmt' => $changeset_date_gmt,
+                       'data' => $input_changeset_data,
+               ) );
+               if ( is_wp_error( $r ) ) {
+                       $response = array(
+                               'message' => $r->get_error_message(),
+                               'code' => $r->get_error_code(),
+                       );
+                       if ( is_array( $r->get_error_data() ) ) {
+                               $response = array_merge( $response, $r->get_error_data() );
+                       } else {
+                               $response['data'] = $r->get_error_data();
+                       }
+               } else {
+                       $response = $r;
+
+                       // Note that if the changeset status was publish, then it will get set to trash if revisions are not supported.
+                       $response['changeset_status'] = get_post_status( $this->changeset_post_id() );
+                       if ( $is_publish && 'trash' === $response['changeset_status'] ) {
+                               $response['changeset_status'] = 'publish';
+                       }
+
+                       if ( 'publish' === $response['changeset_status'] ) {
+                               $response['next_changeset_uuid'] = wp_generate_uuid4();
+                       }
+               }
+
+               if ( isset( $response['setting_validities'] ) ) {
+                       $response['setting_validities'] = array_map( array( $this, 'prepare_setting_validity_for_js' ), $response['setting_validities'] );
+               }
+
+               /**
+                * Filters response data for a successful customize_save Ajax request.
+                *
+                * This filter does not apply if there was a nonce or authentication failure.
+                *
+                * @since 4.2.0
+                *
+                * @param array                $response Additional information passed back to the 'saved'
+                *                                       event on `wp.customize`.
+                * @param WP_Customize_Manager $this     WP_Customize_Manager instance.
+                */
+               $response = apply_filters( 'customize_save_response', $response, $this );
+
+               if ( is_wp_error( $r ) ) {
+                       wp_send_json_error( $response );
+               } else {
+                       wp_send_json_success( $response );
+               }
+       }
+
+       /**
+        * Save the post for the loaded changeset.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param array $args {
+        *     Args for changeset post.
+        *
+        *     @type array  $data            Optional additional changeset data. Values will be merged on top of any existing post values.
+        *     @type string $status          Post status. Optional. If supplied, the save will be transactional and a post revision will be allowed.
+        *     @type string $title           Post title. Optional.
+        *     @type string $date_gmt        Date in GMT. Optional.
+        *     @type int    $user_id         ID for user who is saving the changeset. Optional, defaults to the current user ID.
+        *     @type bool   $starter_content Whether the data is starter content. If false (default), then $starter_content will be cleared for any $data being saved.
+        * }
+        *
+        * @return array|WP_Error Returns array on success and WP_Error with array data on error.
+        */
+       function save_changeset_post( $args = array() ) {
+
+               $args = array_merge(
+                       array(
+                               'status' => null,
+                               'title' => null,
+                               'data' => array(),
+                               'date_gmt' => null,
+                               'user_id' => get_current_user_id(),
+                               'starter_content' => false,
+                       ),
+                       $args
+               );
+
+               $changeset_post_id = $this->changeset_post_id();
+               $existing_changeset_data = array();
+               if ( $changeset_post_id ) {
+                       $existing_status = get_post_status( $changeset_post_id );
+                       if ( 'publish' === $existing_status || 'trash' === $existing_status ) {
+                               return new WP_Error( 'changeset_already_published' );
+                       }
+
+                       $existing_changeset_data = $this->get_changeset_post_data( $changeset_post_id );
+               }
+
+               // Fail if attempting to publish but publish hook is missing.
+               if ( 'publish' === $args['status'] && false === has_action( 'transition_post_status', '_wp_customize_publish_changeset' ) ) {
+                       return new WP_Error( 'missing_publish_callback' );
+               }
+
+               // Validate date.
+               $now = gmdate( 'Y-m-d H:i:59' );
+               if ( $args['date_gmt'] ) {
+                       $is_future_dated = ( mysql2date( 'U', $args['date_gmt'], false ) > mysql2date( 'U', $now, false ) );
+                       if ( ! $is_future_dated ) {
+                               return new WP_Error( 'not_future_date' ); // Only future dates are allowed.
+                       }
+
+                       if ( ! $this->is_theme_active() && ( 'future' === $args['status'] || $is_future_dated ) ) {
+                               return new WP_Error( 'cannot_schedule_theme_switches' ); // This should be allowed in the future, when theme is a regular setting.
+                       }
+                       $will_remain_auto_draft = ( ! $args['status'] && ( ! $changeset_post_id || 'auto-draft' === get_post_status( $changeset_post_id ) ) );
+                       if ( $will_remain_auto_draft ) {
+                               return new WP_Error( 'cannot_supply_date_for_auto_draft_changeset' );
+                       }
+               } elseif ( $changeset_post_id && 'future' === $args['status'] ) {
+
+                       // Fail if the new status is future but the existing post's date is not in the future.
+                       $changeset_post = get_post( $changeset_post_id );
+                       if ( mysql2date( 'U', $changeset_post->post_date_gmt, false ) <= mysql2date( 'U', $now, false ) ) {
+                               return new WP_Error( 'not_future_date' );
+                       }
+               }
+
+               // The request was made via wp.customize.previewer.save().
+               $update_transactionally = (bool) $args['status'];
+               $allow_revision = (bool) $args['status'];
+
+               // Amend post values with any supplied data.
+               foreach ( $args['data'] as $setting_id => $setting_params ) {
+                       if ( array_key_exists( 'value', $setting_params ) ) {
+                               $this->set_post_value( $setting_id, $setting_params['value'] ); // Add to post values so that they can be validated and sanitized.
+                       }
+               }
+
+               // Note that in addition to post data, this will include any stashed theme mods.
+               $post_values = $this->unsanitized_post_values( array(
+                       'exclude_changeset' => true,
+                       'exclude_post_data' => false,
+               ) );
+               $this->add_dynamic_settings( array_keys( $post_values ) ); // Ensure settings get created even if they lack an input value.
+
+               /*
+                * Get list of IDs for settings that have values different from what is currently
+                * saved in the changeset. By skipping any values that are already the same, the
+                * subset of changed settings can be passed into validate_setting_values to prevent
+                * an underprivileged modifying a single setting for which they have the capability
+                * from being blocked from saving. This also prevents a user from touching of the
+                * previous saved settings and overriding the associated user_id if they made no change.
+                */
+               $changed_setting_ids = array();
+               foreach ( $post_values as $setting_id => $setting_value ) {
+                       $setting = $this->get_setting( $setting_id );
+
+                       if ( $setting && 'theme_mod' === $setting->type ) {
+                               $prefixed_setting_id = $this->get_stylesheet() . '::' . $setting->id;
+                       } else {
+                               $prefixed_setting_id = $setting_id;
+                       }
+
+                       $is_value_changed = (
+                               ! isset( $existing_changeset_data[ $prefixed_setting_id ] )
+                               ||
+                               ! array_key_exists( 'value', $existing_changeset_data[ $prefixed_setting_id ] )
+                               ||
+                               $existing_changeset_data[ $prefixed_setting_id ]['value'] !== $setting_value
+                       );
+                       if ( $is_value_changed ) {
+                               $changed_setting_ids[] = $setting_id;
+                       }
+               }
+
                /**
                 * Fires before save validation happens.
                 *
@@ -1094,29 +2321,316 @@ final class WP_Customize_Manager {
                do_action( 'customize_save_validation_before', $this );
 
                // Validate settings.
-               $setting_validities = $this->validate_setting_values( $this->unsanitized_post_values() );
+               $validated_values = array_merge(
+                       array_fill_keys( array_keys( $args['data'] ), null ), // Make sure existence/capability checks are done on value-less setting updates.
+                       $post_values
+               );
+               $setting_validities = $this->validate_setting_values( $validated_values, array(
+                       'validate_capability' => true,
+                       'validate_existence' => true,
+               ) );
                $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 ) {
+
+               /*
+                * Short-circuit if there are invalid settings the update is transactional.
+                * A changeset update is transactional when a status is supplied in the request.
+                */
+               if ( $update_transactionally && $invalid_setting_count > 0 ) {
                        $response = array(
-                               'setting_validities' => $exported_setting_validities,
+                               'setting_validities' => $setting_validities,
                                'message' => sprintf( _n( 'There is %s invalid setting.', 'There are %s invalid settings.', $invalid_setting_count ), number_format_i18n( $invalid_setting_count ) ),
                        );
+                       return new WP_Error( 'transaction_fail', '', $response );
+               }
+
+               // Obtain/merge data for changeset.
+               $original_changeset_data = $this->get_changeset_post_data( $changeset_post_id );
+               $data = $original_changeset_data;
+               if ( is_wp_error( $data ) ) {
+                       $data = array();
+               }
+
+               // Ensure that all post values are included in the changeset data.
+               foreach ( $post_values as $setting_id => $post_value ) {
+                       if ( ! isset( $args['data'][ $setting_id ] ) ) {
+                               $args['data'][ $setting_id ] = array();
+                       }
+                       if ( ! isset( $args['data'][ $setting_id ]['value'] ) ) {
+                               $args['data'][ $setting_id ]['value'] = $post_value;
+                       }
+               }
+
+               foreach ( $args['data'] as $setting_id => $setting_params ) {
+                       $setting = $this->get_setting( $setting_id );
+                       if ( ! $setting || ! $setting->check_capabilities() ) {
+                               continue;
+                       }
+
+                       // Skip updating changeset for invalid setting values.
+                       if ( isset( $setting_validities[ $setting_id ] ) && is_wp_error( $setting_validities[ $setting_id ] ) ) {
+                               continue;
+                       }
+
+                       $changeset_setting_id = $setting_id;
+                       if ( 'theme_mod' === $setting->type ) {
+                               $changeset_setting_id = sprintf( '%s::%s', $this->get_stylesheet(), $setting_id );
+                       }
+
+                       if ( null === $setting_params ) {
+                               // Remove setting from changeset entirely.
+                               unset( $data[ $changeset_setting_id ] );
+                       } else {
+
+                               if ( ! isset( $data[ $changeset_setting_id ] ) ) {
+                                       $data[ $changeset_setting_id ] = array();
+                               }
+
+                               // Merge any additional setting params that have been supplied with the existing params.
+                               $merged_setting_params = array_merge( $data[ $changeset_setting_id ], $setting_params );
+
+                               // Skip updating setting params if unchanged (ensuring the user_id is not overwritten).
+                               if ( $data[ $changeset_setting_id ] === $merged_setting_params ) {
+                                       continue;
+                               }
+
+                               $data[ $changeset_setting_id ] = array_merge(
+                                       $merged_setting_params,
+                                       array(
+                                               'type' => $setting->type,
+                                               'user_id' => $args['user_id'],
+                                       )
+                               );
+
+                               // Clear starter_content flag in data if changeset is not explicitly being updated for starter content.
+                               if ( empty( $args['starter_content'] ) ) {
+                                       unset( $data[ $changeset_setting_id ]['starter_content'] );
+                               }
+                       }
+               }
+
+               $filter_context = array(
+                       'uuid' => $this->changeset_uuid(),
+                       'title' => $args['title'],
+                       'status' => $args['status'],
+                       'date_gmt' => $args['date_gmt'],
+                       'post_id' => $changeset_post_id,
+                       'previous_data' => is_wp_error( $original_changeset_data ) ? array() : $original_changeset_data,
+                       'manager' => $this,
+               );
+
+               /**
+                * Filters the settings' data that will be persisted into the changeset.
+                *
+                * Plugins may amend additional data (such as additional meta for settings) into the changeset with this filter.
+                *
+                * @since 4.7.0
+                *
+                * @param array $data Updated changeset data, mapping setting IDs to arrays containing a $value item and optionally other metadata.
+                * @param array $context {
+                *     Filter context.
+                *
+                *     @type string               $uuid          Changeset UUID.
+                *     @type string               $title         Requested title for the changeset post.
+                *     @type string               $status        Requested status for the changeset post.
+                *     @type string               $date_gmt      Requested date for the changeset post in MySQL format and GMT timezone.
+                *     @type int|false            $post_id       Post ID for the changeset, or false if it doesn't exist yet.
+                *     @type array                $previous_data Previous data contained in the changeset.
+                *     @type WP_Customize_Manager $manager       Manager instance.
+                * }
+                */
+               $data = apply_filters( 'customize_changeset_save_data', $data, $filter_context );
+
+               // Switch theme if publishing changes now.
+               if ( 'publish' === $args['status'] && ! $this->is_theme_active() ) {
+                       // Temporarily stop previewing the theme to allow switch_themes() to operate properly.
+                       $this->stop_previewing_theme();
+                       switch_theme( $this->get_stylesheet() );
+                       update_option( 'theme_switched_via_customizer', true );
+                       $this->start_previewing_theme();
+               }
+
+               // Gather the data for wp_insert_post()/wp_update_post().
+               $json_options = 0;
+               if ( defined( 'JSON_UNESCAPED_SLASHES' ) ) {
+                       $json_options |= JSON_UNESCAPED_SLASHES; // Introduced in PHP 5.4. This is only to improve readability as slashes needn't be escaped in storage.
+               }
+               $json_options |= JSON_PRETTY_PRINT; // Also introduced in PHP 5.4, but WP defines constant for back compat. See WP Trac #30139.
+               $post_array = array(
+                       'post_content' => wp_json_encode( $data, $json_options ),
+               );
+               if ( $args['title'] ) {
+                       $post_array['post_title'] = $args['title'];
+               }
+               if ( $changeset_post_id ) {
+                       $post_array['ID'] = $changeset_post_id;
+               } else {
+                       $post_array['post_type'] = 'customize_changeset';
+                       $post_array['post_name'] = $this->changeset_uuid();
+                       $post_array['post_status'] = 'auto-draft';
+               }
+               if ( $args['status'] ) {
+                       $post_array['post_status'] = $args['status'];
+               }
+
+               // Reset post date to now if we are publishing, otherwise pass post_date_gmt and translate for post_date.
+               if ( 'publish' === $args['status'] ) {
+                       $post_array['post_date_gmt'] = '0000-00-00 00:00:00';
+                       $post_array['post_date'] = '0000-00-00 00:00:00';
+               } elseif ( $args['date_gmt'] ) {
+                       $post_array['post_date_gmt'] = $args['date_gmt'];
+                       $post_array['post_date'] = get_date_from_gmt( $args['date_gmt'] );
+               }
+
+               $this->store_changeset_revision = $allow_revision;
+               add_filter( 'wp_save_post_revision_post_has_changed', array( $this, '_filter_revision_post_has_changed' ), 5, 3 );
+
+               // Update the changeset post. The publish_customize_changeset action will cause the settings in the changeset to be saved via WP_Customize_Setting::save().
+               $has_kses = ( false !== has_filter( 'content_save_pre', 'wp_filter_post_kses' ) );
+               if ( $has_kses ) {
+                       kses_remove_filters(); // Prevent KSES from corrupting JSON in post_content.
+               }
+
+               // Note that updating a post with publish status will trigger WP_Customize_Manager::publish_changeset_values().
+               if ( $changeset_post_id ) {
+                       $post_array['edit_date'] = true; // Prevent date clearing.
+                       $r = wp_update_post( wp_slash( $post_array ), true );
+               } else {
+                       $r = wp_insert_post( wp_slash( $post_array ), true );
+                       if ( ! is_wp_error( $r ) ) {
+                               $this->_changeset_post_id = $r; // Update cached post ID for the loaded changeset.
+                       }
+               }
+               if ( $has_kses ) {
+                       kses_init_filters();
+               }
+               $this->_changeset_data = null; // Reset so WP_Customize_Manager::changeset_data() will re-populate with updated contents.
+
+               remove_filter( 'wp_save_post_revision_post_has_changed', array( $this, '_filter_revision_post_has_changed' ) );
+
+               $response = array(
+                       'setting_validities' => $setting_validities,
+               );
+
+               if ( is_wp_error( $r ) ) {
+                       $response['changeset_post_save_failure'] = $r->get_error_code();
+                       return new WP_Error( 'changeset_post_save_failure', '', $response );
+               }
+
+               return $response;
+       }
+
+       /**
+        * Whether a changeset revision should be made.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var bool
+        */
+       protected $store_changeset_revision;
+
+       /**
+        * Filters whether a changeset has changed to create a new revision.
+        *
+        * Note that this will not be called while a changeset post remains in auto-draft status.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @param bool    $post_has_changed Whether the post has changed.
+        * @param WP_Post $last_revision    The last revision post object.
+        * @param WP_Post $post             The post object.
+        *
+        * @return bool Whether a revision should be made.
+        */
+       public function _filter_revision_post_has_changed( $post_has_changed, $last_revision, $post ) {
+               unset( $last_revision );
+               if ( 'customize_changeset' === $post->post_type ) {
+                       $post_has_changed = $this->store_changeset_revision;
+               }
+               return $post_has_changed;
+       }
+
+       /**
+        * Publish changeset values.
+        *
+        * This will the values contained in a changeset, even changesets that do not
+        * correspond to current manager instance. This is called by
+        * `_wp_customize_publish_changeset()` when a customize_changeset post is
+        * transitioned to the `publish` status. As such, this method should not be
+        * called directly and instead `wp_publish_post()` should be used.
+        *
+        * Please note that if the settings in the changeset are for a non-activated
+        * theme, the theme must first be switched to (via `switch_theme()`) before
+        * invoking this method.
+        *
+        * @since 4.7.0
+        * @access private
+        * @see _wp_customize_publish_changeset()
+        *
+        * @param int $changeset_post_id ID for customize_changeset post. Defaults to the changeset for the current manager instance.
+        * @return true|WP_Error True or error info.
+        */
+       public function _publish_changeset_values( $changeset_post_id ) {
+               $publishing_changeset_data = $this->get_changeset_post_data( $changeset_post_id );
+               if ( is_wp_error( $publishing_changeset_data ) ) {
+                       return $publishing_changeset_data;
+               }
+
+               $changeset_post = get_post( $changeset_post_id );
+
+               /*
+                * Temporarily override the changeset context so that it will be read
+                * in calls to unsanitized_post_values() and so that it will be available
+                * on the $wp_customize object passed to hooks during the save logic.
+                */
+               $previous_changeset_post_id = $this->_changeset_post_id;
+               $this->_changeset_post_id   = $changeset_post_id;
+               $previous_changeset_uuid    = $this->_changeset_uuid;
+               $this->_changeset_uuid      = $changeset_post->post_name;
+               $previous_changeset_data    = $this->_changeset_data;
+               $this->_changeset_data      = $publishing_changeset_data;
+
+               // Parse changeset data to identify theme mod settings and user IDs associated with settings to be saved.
+               $setting_user_ids = array();
+               $theme_mod_settings = array();
+               $namespace_pattern = '/^(?P<stylesheet>.+?)::(?P<setting_id>.+)$/';
+               $matches = array();
+               foreach ( $this->_changeset_data as $raw_setting_id => $setting_params ) {
+                       $actual_setting_id = null;
+                       $is_theme_mod_setting = (
+                               isset( $setting_params['value'] )
+                               &&
+                               isset( $setting_params['type'] )
+                               &&
+                               'theme_mod' === $setting_params['type']
+                               &&
+                               preg_match( $namespace_pattern, $raw_setting_id, $matches )
+                       );
+                       if ( $is_theme_mod_setting ) {
+                               if ( ! isset( $theme_mod_settings[ $matches['stylesheet'] ] ) ) {
+                                       $theme_mod_settings[ $matches['stylesheet'] ] = array();
+                               }
+                               $theme_mod_settings[ $matches['stylesheet'] ][ $matches['setting_id'] ] = $setting_params;
+
+                               if ( $this->get_stylesheet() === $matches['stylesheet'] ) {
+                                       $actual_setting_id = $matches['setting_id'];
+                               }
+                       } else {
+                               $actual_setting_id = $raw_setting_id;
+                       }
 
-                       /** 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 );
+                       // Keep track of the user IDs for settings actually for this theme.
+                       if ( $actual_setting_id && isset( $setting_params['user_id'] ) ) {
+                               $setting_user_ids[ $actual_setting_id ] = $setting_params['user_id'];
+                       }
                }
 
-               // Do we have to switch themes?
-               if ( ! $this->is_theme_active() ) {
-                       // Temporarily stop previewing the theme to allow switch_themes()
-                       // to operate properly.
-                       $this->stop_previewing_theme();
-                       switch_theme( $this->get_stylesheet() );
-                       update_option( 'theme_switched_via_customizer', true );
-                       $this->start_previewing_theme();
-               }
+               $changeset_setting_values = $this->unsanitized_post_values( array(
+                       'exclude_post_data' => true,
+                       'exclude_changeset' => false,
+               ) );
+               $changeset_setting_ids = array_keys( $changeset_setting_values );
+               $this->add_dynamic_settings( $changeset_setting_ids );
 
                /**
                 * Fires once the theme has switched in the Customizer, but before settings
@@ -1124,12 +2638,52 @@ final class WP_Customize_Manager {
                 *
                 * @since 3.4.0
                 *
-                * @param WP_Customize_Manager $this WP_Customize_Manager instance.
+                * @param WP_Customize_Manager $manager WP_Customize_Manager instance.
                 */
                do_action( 'customize_save', $this );
 
-               foreach ( $this->settings as $setting ) {
-                       $setting->save();
+               /*
+                * Ensure that all settings will allow themselves to be saved. Note that
+                * this is safe because the setting would have checked the capability
+                * when the setting value was written into the changeset. So this is why
+                * an additional capability check is not required here.
+                */
+               $original_setting_capabilities = array();
+               foreach ( $changeset_setting_ids as $setting_id ) {
+                       $setting = $this->get_setting( $setting_id );
+                       if ( $setting && ! isset( $setting_user_ids[ $setting_id ] ) ) {
+                               $original_setting_capabilities[ $setting->id ] = $setting->capability;
+                               $setting->capability = 'exist';
+                       }
+               }
+
+               $original_user_id = get_current_user_id();
+               foreach ( $changeset_setting_ids as $setting_id ) {
+                       $setting = $this->get_setting( $setting_id );
+                       if ( $setting ) {
+                               /*
+                                * Set the current user to match the user who saved the value into
+                                * the changeset so that any filters that apply during the save
+                                * process will respect the original user's capabilities. This
+                                * will ensure, for example, that KSES won't strip unsafe HTML
+                                * when a scheduled changeset publishes via WP Cron.
+                                */
+                               if ( isset( $setting_user_ids[ $setting_id ] ) ) {
+                                       wp_set_current_user( $setting_user_ids[ $setting_id ] );
+                               } else {
+                                       wp_set_current_user( $original_user_id );
+                               }
+
+                               $setting->save();
+                       }
+               }
+               wp_set_current_user( $original_user_id );
+
+               // Update the stashed theme mod settings, removing the active theme's stashed settings, if activated.
+               if ( did_action( 'switch_theme' ) ) {
+                       $other_theme_mod_settings = $theme_mod_settings;
+                       unset( $other_theme_mod_settings[ $this->get_stylesheet() ] );
+                       $this->update_stashed_theme_mod_settings( $other_theme_mod_settings );
                }
 
                /**
@@ -1137,27 +2691,62 @@ final class WP_Customize_Manager {
                 *
                 * @since 3.6.0
                 *
-                * @param WP_Customize_Manager $this WP_Customize_Manager instance.
+                * @param WP_Customize_Manager $manager WP_Customize_Manager instance.
                 */
                do_action( 'customize_save_after', $this );
 
-               $data = array(
-                       'setting_validities' => $exported_setting_validities,
-               );
+               // Restore original capabilities.
+               foreach ( $original_setting_capabilities as $setting_id => $capability ) {
+                       $setting = $this->get_setting( $setting_id );
+                       if ( $setting ) {
+                               $setting->capability = $capability;
+                       }
+               }
 
-               /**
-                * Filters response data for a successful customize_save Ajax request.
-                *
-                * This filter does not apply if there was a nonce or authentication failure.
-                *
-                * @since 4.2.0
-                *
-                * @param array                $data Additional information passed back to the 'saved'
-                *                                   event on `wp.customize`.
-                * @param WP_Customize_Manager $this WP_Customize_Manager instance.
-                */
-               $response = apply_filters( 'customize_save_response', $data, $this );
-               wp_send_json_success( $response );
+               // Restore original changeset data.
+               $this->_changeset_data    = $previous_changeset_data;
+               $this->_changeset_post_id = $previous_changeset_post_id;
+               $this->_changeset_uuid    = $previous_changeset_uuid;
+
+               return true;
+       }
+
+       /**
+        * Update stashed theme mod settings.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @param array $inactive_theme_mod_settings Mapping of stylesheet to arrays of theme mod settings.
+        * @return array|false Returns array of updated stashed theme mods or false if the update failed or there were no changes.
+        */
+       protected function update_stashed_theme_mod_settings( $inactive_theme_mod_settings ) {
+               $stashed_theme_mod_settings = get_option( 'customize_stashed_theme_mods' );
+               if ( empty( $stashed_theme_mod_settings ) ) {
+                       $stashed_theme_mod_settings = array();
+               }
+
+               // Delete any stashed theme mods for the active theme since since they would have been loaded and saved upon activation.
+               unset( $stashed_theme_mod_settings[ $this->get_stylesheet() ] );
+
+               // Merge inactive theme mods with the stashed theme mod settings.
+               foreach ( $inactive_theme_mod_settings as $stylesheet => $theme_mod_settings ) {
+                       if ( ! isset( $stashed_theme_mod_settings[ $stylesheet ] ) ) {
+                               $stashed_theme_mod_settings[ $stylesheet ] = array();
+                       }
+
+                       $stashed_theme_mod_settings[ $stylesheet ] = array_merge(
+                               $stashed_theme_mod_settings[ $stylesheet ],
+                               $theme_mod_settings
+                       );
+               }
+
+               $autoload = false;
+               $result = update_option( 'customize_stashed_theme_mods', $stashed_theme_mod_settings, $autoload );
+               if ( ! $result ) {
+                       return false;
+               }
+               return $stashed_theme_mod_settings;
        }
 
        /**
@@ -1535,7 +3124,7 @@ final class WP_Customize_Manager {
                <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>
+                                       <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>
@@ -1546,12 +3135,15 @@ final class WP_Customize_Manager {
         * Helper function to compare two objects by priority, ensuring sort stability via instance_number.
         *
         * @since 3.4.0
+        * @deprecated 4.7.0 Use wp_list_sort()
         *
         * @param WP_Customize_Panel|WP_Customize_Section|WP_Customize_Control $a Object A.
         * @param WP_Customize_Panel|WP_Customize_Section|WP_Customize_Control $b Object B.
         * @return int
         */
        protected function _cmp_priority( $a, $b ) {
+               _deprecated_function( __METHOD__, '4.7.0', 'wp_list_sort' );
+
                if ( $a->priority === $b->priority ) {
                        return $a->instance_number - $b->instance_number;
                } else {
@@ -1571,7 +3163,10 @@ final class WP_Customize_Manager {
        public function prepare_controls() {
 
                $controls = array();
-               uasort( $this->controls, array( $this, '_cmp_priority' ) );
+               $this->controls = wp_list_sort( $this->controls, array(
+                       'priority'        => 'ASC',
+                       'instance_number' => 'ASC',
+               ), 'ASC', true );
 
                foreach ( $this->controls as $id => $control ) {
                        if ( ! isset( $this->sections[ $control->section ] ) || ! $control->check_capabilities() ) {
@@ -1584,7 +3179,10 @@ final class WP_Customize_Manager {
                $this->controls = $controls;
 
                // Prepare sections.
-               uasort( $this->sections, array( $this, '_cmp_priority' ) );
+               $this->sections = wp_list_sort( $this->sections, array(
+                       'priority'        => 'ASC',
+                       'instance_number' => 'ASC',
+               ), 'ASC', true );
                $sections = array();
 
                foreach ( $this->sections as $section ) {
@@ -1592,7 +3190,11 @@ final class WP_Customize_Manager {
                                continue;
                        }
 
-                       usort( $section->controls, array( $this, '_cmp_priority' ) );
+
+                       $section->controls = wp_list_sort( $section->controls, array(
+                               'priority'        => 'ASC',
+                               'instance_number' => 'ASC',
+                       ) );
 
                        if ( ! $section->panel ) {
                                // Top-level section.
@@ -1607,7 +3209,10 @@ final class WP_Customize_Manager {
                $this->sections = $sections;
 
                // Prepare panels.
-               uasort( $this->panels, array( $this, '_cmp_priority' ) );
+               $this->panels = wp_list_sort( $this->panels, array(
+                       'priority'        => 'ASC',
+                       'instance_number' => 'ASC',
+               ), 'ASC', true );
                $panels = array();
 
                foreach ( $this->panels as $panel ) {
@@ -1615,14 +3220,20 @@ final class WP_Customize_Manager {
                                continue;
                        }
 
-                       uasort( $panel->sections, array( $this, '_cmp_priority' ) );
+                       $panel->sections = wp_list_sort( $panel->sections, array(
+                               'priority'        => 'ASC',
+                               'instance_number' => 'ASC',
+                       ), 'ASC', true );
                        $panels[ $panel->id ] = $panel;
                }
                $this->panels = $panels;
 
                // Sort panels and top-level sections together.
                $this->containers = array_merge( $this->panels, $this->sections );
-               uasort( $this->containers, array( $this, '_cmp_priority' ) );
+               $this->containers = wp_list_sort( $this->containers, array(
+                       'priority'        => 'ASC',
+                       'instance_number' => 'ASC',
+               ), 'ASC', true );
        }
 
        /**
@@ -1700,6 +3311,67 @@ final class WP_Customize_Manager {
                return $preview_url;
        }
 
+       /**
+        * Determines whether the admin and the frontend are on different domains.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return bool Whether cross-domain.
+        */
+       public function is_cross_domain() {
+               $admin_origin = wp_parse_url( admin_url() );
+               $home_origin = wp_parse_url( home_url() );
+               $cross_domain = ( strtolower( $admin_origin['host'] ) !== strtolower( $home_origin['host'] ) );
+               return $cross_domain;
+       }
+
+       /**
+        * Get URLs allowed to be previewed.
+        *
+        * If the front end and the admin are served from the same domain, load the
+        * preview over ssl if the Customizer is being loaded over ssl. This avoids
+        * insecure content warnings. This is not attempted if the admin and front end
+        * are on different domains to avoid the case where the front end doesn't have
+        * ssl certs. Domain mapping plugins can allow other urls in these conditions
+        * using the customize_allowed_urls filter.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @returns array Allowed URLs.
+        */
+       public function get_allowed_urls() {
+               $allowed_urls = array( home_url( '/' ) );
+
+               if ( is_ssl() && ! $this->is_cross_domain() ) {
+                       $allowed_urls[] = home_url( '/', 'https' );
+               }
+
+               /**
+                * Filters the list of URLs allowed to be clicked and followed in the Customizer preview.
+                *
+                * @since 3.4.0
+                *
+                * @param array $allowed_urls An array of allowed URLs.
+                */
+               $allowed_urls = array_unique( apply_filters( 'customize_allowed_urls', $allowed_urls ) );
+
+               return $allowed_urls;
+       }
+
+       /**
+        * Get messenger channel.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return string Messenger channel.
+        */
+       public function get_messenger_channel() {
+               return $this->messenger_channel;
+       }
+
        /**
         * Set URL to link the user to when closing the Customizer.
         *
@@ -1809,40 +3481,33 @@ final class WP_Customize_Manager {
         * @since 4.4.0
         */
        public function customize_pane_settings() {
-               /*
-                * If the front end and the admin are served from the same domain, load the
-                * preview over ssl if the Customizer is being loaded over ssl. This avoids
-                * insecure content warnings. This is not attempted if the admin and front end
-                * are on different domains to avoid the case where the front end doesn't have
-                * ssl certs. Domain mapping plugins can allow other urls in these conditions
-                * using the customize_allowed_urls filter.
-                */
-
-               $allowed_urls = array( home_url( '/' ) );
-               $admin_origin = parse_url( admin_url() );
-               $home_origin  = parse_url( home_url() );
-               $cross_domain = ( strtolower( $admin_origin['host'] ) !== strtolower( $home_origin['host'] ) );
-
-               if ( is_ssl() && ! $cross_domain ) {
-                       $allowed_urls[] = home_url( '/', 'https' );
-               }
-
-               /**
-                * Filters the list of URLs allowed to be clicked and followed in the Customizer preview.
-                *
-                * @since 3.4.0
-                *
-                * @param array $allowed_urls An array of allowed URLs.
-                */
-               $allowed_urls = array_unique( apply_filters( 'customize_allowed_urls', $allowed_urls ) );
 
                $login_url = add_query_arg( array(
                        'interim-login' => 1,
                        'customize-login' => 1,
                ), wp_login_url() );
 
+               // Ensure dirty flags are set for modified settings.
+               foreach ( array_keys( $this->unsanitized_post_values() ) as $setting_id ) {
+                       $setting = $this->get_setting( $setting_id );
+                       if ( $setting ) {
+                               $setting->dirty = true;
+                       }
+               }
+
                // Prepare Customizer settings to pass to JavaScript.
                $settings = array(
+                       'changeset' => array(
+                               'uuid' => $this->changeset_uuid(),
+                               'status' => $this->changeset_post_id() ? get_post_status( $this->changeset_post_id() ) : '',
+                       ),
+                       'timeouts' => array(
+                               'windowRefresh' => 250,
+                               'changesetAutoSave' => AUTOSAVE_INTERVAL * 1000,
+                               'keepAliveCheck' => 2500,
+                               'reflowPaneContents' => 100,
+                               'previewFrameSensitivity' => 2000,
+                       ),
                        'theme'    => array(
                                'stylesheet' => $this->get_stylesheet(),
                                'active'     => $this->is_theme_active(),
@@ -1852,8 +3517,8 @@ final class WP_Customize_Manager {
                                'parent'        => esc_url_raw( admin_url() ),
                                'activated'     => esc_url_raw( home_url( '/' ) ),
                                'ajax'          => esc_url_raw( admin_url( 'admin-ajax.php', 'relative' ) ),
-                               'allowed'       => array_map( 'esc_url_raw', $allowed_urls ),
-                               'isCrossDomain' => $cross_domain,
+                               'allowed'       => array_map( 'esc_url_raw', $this->get_allowed_urls() ),
+                               'isCrossDomain' => $this->is_cross_domain(),
                                'home'          => esc_url_raw( home_url( '/' ) ),
                                'login'         => esc_url_raw( $login_url ),
                        ),
@@ -1977,6 +3642,7 @@ final class WP_Customize_Manager {
                $this->register_control_type( 'WP_Customize_Upload_Control' );
                $this->register_control_type( 'WP_Customize_Image_Control' );
                $this->register_control_type( 'WP_Customize_Background_Image_Control' );
+               $this->register_control_type( 'WP_Customize_Background_Position_Control' );
                $this->register_control_type( 'WP_Customize_Cropped_Image_Control' );
                $this->register_control_type( 'WP_Customize_Site_Icon_Control' );
                $this->register_control_type( 'WP_Customize_Theme_Control' );
@@ -2166,27 +3832,120 @@ final class WP_Customize_Manager {
                        'section' => 'colors',
                ) ) );
 
-
                /* Custom Header */
 
+               if ( current_theme_supports( 'custom-header', 'video' ) ) {
+                       $title = __( 'Header Media' );
+                       $description = '<p>' . __( 'If you add a video, the image will be used as a fallback while the video loads.' ) . '</p>';
+
+                       // @todo Customizer sections should support having notifications just like controls do. See <https://core.trac.wordpress.org/ticket/38794>.
+                       $description .= '<div class="customize-control-notifications-container header-video-not-currently-previewable" style="display: none"><ul>';
+                       $description .= '<li class="notice notice-info">' . __( 'This theme doesn\'t support video headers on this page. Navigate to the front page or another page that supports video headers.' ) . '</li>';
+                       $description .= '</ul></div>';
+                       $width = absint( get_theme_support( 'custom-header', 'width' ) );
+                       $height = absint( get_theme_support( 'custom-header', 'height' ) );
+                       if ( $width && $height ) {
+                               $control_description = sprintf(
+                                       /* translators: 1: .mp4, 2: header size in pixels */
+                                       __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends dimensions of %2$s pixels.' ),
+                                       '<code>.mp4</code>',
+                                       sprintf( '<strong>%s &times; %s</strong>', $width, $height )
+                               );
+                       } elseif ( $width ) {
+                               $control_description = sprintf(
+                                       /* translators: 1: .mp4, 2: header width in pixels */
+                                       __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends a width of %2$s pixels.' ),
+                                       '<code>.mp4</code>',
+                                       sprintf( '<strong>%s</strong>', $width )
+                               );
+                       } else {
+                               $control_description = sprintf(
+                                       /* translators: 1: .mp4, 2: header height in pixels */
+                                       __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends a height of %2$s pixels.' ),
+                                       '<code>.mp4</code>',
+                                       sprintf( '<strong>%s</strong>', $height )
+                               );
+                       }
+               } else {
+                       $title = __( 'Header Image' );
+                       $description = '';
+                       $control_description = '';
+               }
+
                $this->add_section( 'header_image', array(
-                       'title'          => __( 'Header Image' ),
+                       'title'          => $title,
+                       'description'    => $description,
                        'theme_supports' => 'custom-header',
                        'priority'       => 60,
                ) );
 
+               $this->add_setting( 'header_video', array(
+                       'theme_supports'    => array( 'custom-header', 'video' ),
+                       'transport'         => 'postMessage',
+                       'sanitize_callback' => 'absint',
+                       'validate_callback' => array( $this, '_validate_header_video' ),
+               ) );
+
+               $this->add_setting( 'external_header_video', array(
+                       'theme_supports'    => array( 'custom-header', 'video' ),
+                       'transport'         => 'postMessage',
+                       'sanitize_callback' => 'esc_url_raw',
+                       'validate_callback' => array( $this, '_validate_external_header_video' ),
+               ) );
+
                $this->add_setting( new WP_Customize_Filter_Setting( $this, 'header_image', array(
-                       'default'        => get_theme_support( 'custom-header', 'default-image' ),
+                       'default'        => sprintf( get_theme_support( 'custom-header', 'default-image' ), get_template_directory_uri(), get_stylesheet_directory_uri() ),
                        'theme_supports' => 'custom-header',
                ) ) );
 
                $this->add_setting( new WP_Customize_Header_Image_Setting( $this, 'header_image_data', array(
-                       // 'default'        => get_theme_support( 'custom-header', 'default-image' ),
                        'theme_supports' => 'custom-header',
                ) ) );
 
+               /*
+                * Switch image settings to postMessage when video support is enabled since
+                * it entails that the_custom_header_markup() will be used, and thus selective
+                * refresh can be utilized.
+                */
+               if ( current_theme_supports( 'custom-header', 'video' ) ) {
+                       $this->get_setting( 'header_image' )->transport = 'postMessage';
+                       $this->get_setting( 'header_image_data' )->transport = 'postMessage';
+               }
+
+               $this->add_control( new WP_Customize_Media_Control( $this, 'header_video', array(
+                       'theme_supports' => array( 'custom-header', 'video' ),
+                       'label'          => __( 'Header Video' ),
+                       'description'    => $control_description,
+                       'section'        => 'header_image',
+                       'mime_type'      => 'video',
+                       // @todo These button_labels can be removed once WP_Customize_Media_Control provides mime_type-specific labels automatically. See <https://core.trac.wordpress.org/ticket/38796>.
+                       'button_labels'  => array(
+                               'select'       => __( 'Select Video' ),
+                               'change'       => __( 'Change Video' ),
+                               'placeholder'  => __( 'No video selected' ),
+                               'frame_title'  => __( 'Select Video' ),
+                               'frame_button' => __( 'Choose Video' ),
+                       ),
+                       'active_callback' => 'is_header_video_active',
+               ) ) );
+
+               $this->add_control( 'external_header_video', array(
+                       'theme_supports' => array( 'custom-header', 'video' ),
+                       'type'           => 'url',
+                       'description'    => __( 'Or, enter a YouTube URL:' ),
+                       'section'        => 'header_image',
+                       'active_callback'=> 'is_front_page',
+               ) );
+
                $this->add_control( new WP_Customize_Header_Image_Control( $this ) );
 
+               $this->selective_refresh->add_partial( 'custom_header', array(
+                       'selector'            => '#wp-custom-header',
+                       'render_callback'     => 'the_custom_header_markup',
+                       'settings'            => array( 'header_video', 'external_header_video', 'header_image' ), // The image is used as a video fallback here.
+                       'container_inclusive' => true,
+               ) );
+
                /* Custom Background */
 
                $this->add_section( 'background_image', array(
@@ -2198,123 +3957,209 @@ final class WP_Customize_Manager {
                $this->add_setting( 'background_image', array(
                        'default'        => get_theme_support( 'custom-background', 'default-image' ),
                        'theme_supports' => 'custom-background',
+                       'sanitize_callback' => array( $this, '_sanitize_background_setting' ),
                ) );
 
                $this->add_setting( new WP_Customize_Background_Image_Setting( $this, 'background_image_thumb', array(
                        'theme_supports' => 'custom-background',
+                       'sanitize_callback' => array( $this, '_sanitize_background_setting' ),
                ) ) );
 
                $this->add_control( new WP_Customize_Background_Image_Control( $this ) );
 
-               $this->add_setting( 'background_repeat', array(
-                       'default'        => get_theme_support( 'custom-background', 'default-repeat' ),
+               $this->add_setting( 'background_preset', array(
+                       'default'        => get_theme_support( 'custom-background', 'default-preset' ),
                        'theme_supports' => 'custom-background',
+                       'sanitize_callback' => array( $this, '_sanitize_background_setting' ),
                ) );
 
-               $this->add_control( 'background_repeat', array(
-                       'label'      => __( 'Background Repeat' ),
+               $this->add_control( 'background_preset', array(
+                       'label'      => _x( 'Preset', 'Background Preset' ),
                        'section'    => 'background_image',
-                       'type'       => 'radio',
+                       'type'       => 'select',
                        'choices'    => array(
-                               'no-repeat'  => __('No Repeat'),
-                               'repeat'     => __('Tile'),
-                               'repeat-x'   => __('Tile Horizontally'),
-                               'repeat-y'   => __('Tile Vertically'),
+                               'default' => _x( 'Default', 'Default Preset' ),
+                               'fill'    => __( 'Fill Screen' ),
+                               'fit'     => __( 'Fit to Screen' ),
+                               'repeat'  => _x( 'Repeat', 'Repeat Image' ),
+                               'custom'  => _x( 'Custom', 'Custom Preset' ),
                        ),
                ) );
 
                $this->add_setting( 'background_position_x', array(
                        'default'        => get_theme_support( 'custom-background', 'default-position-x' ),
                        'theme_supports' => 'custom-background',
+                       'sanitize_callback' => array( $this, '_sanitize_background_setting' ),
+               ) );
+
+               $this->add_setting( 'background_position_y', array(
+                       'default'        => get_theme_support( 'custom-background', 'default-position-y' ),
+                       'theme_supports' => 'custom-background',
+                       'sanitize_callback' => array( $this, '_sanitize_background_setting' ),
+               ) );
+
+               $this->add_control( new WP_Customize_Background_Position_Control( $this, 'background_position', array(
+                       'label'    => __( 'Image Position' ),
+                       'section'  => 'background_image',
+                       'settings' => array(
+                               'x' => 'background_position_x',
+                               'y' => 'background_position_y',
+                       ),
+               ) ) );
+
+               $this->add_setting( 'background_size', array(
+                       'default'        => get_theme_support( 'custom-background', 'default-size' ),
+                       'theme_supports' => 'custom-background',
+                       'sanitize_callback' => array( $this, '_sanitize_background_setting' ),
                ) );
 
-               $this->add_control( 'background_position_x', array(
-                       'label'      => __( 'Background Position' ),
+               $this->add_control( 'background_size', array(
+                       'label'      => __( 'Image Size' ),
                        'section'    => 'background_image',
-                       'type'       => 'radio',
+                       'type'       => 'select',
                        'choices'    => array(
-                               'left'       => __('Left'),
-                               'center'     => __('Center'),
-                               'right'      => __('Right'),
+                               'auto'    => __( 'Original' ),
+                               'contain' => __( 'Fit to Screen' ),
+                               'cover'   => __( 'Fill Screen' ),
                        ),
                ) );
 
+               $this->add_setting( 'background_repeat', array(
+                       'default'           => get_theme_support( 'custom-background', 'default-repeat' ),
+                       'sanitize_callback' => array( $this, '_sanitize_background_setting' ),
+                       'theme_supports'    => 'custom-background',
+               ) );
+
+               $this->add_control( 'background_repeat', array(
+                       'label'    => __( 'Repeat Background Image' ),
+                       'section'  => 'background_image',
+                       'type'     => 'checkbox',
+               ) );
+
                $this->add_setting( 'background_attachment', array(
-                       'default'        => get_theme_support( 'custom-background', 'default-attachment' ),
-                       'theme_supports' => 'custom-background',
+                       'default'           => get_theme_support( 'custom-background', 'default-attachment' ),
+                       'sanitize_callback' => array( $this, '_sanitize_background_setting' ),
+                       'theme_supports'    => 'custom-background',
                ) );
 
                $this->add_control( 'background_attachment', array(
-                       'label'      => __( 'Background Attachment' ),
-                       'section'    => 'background_image',
-                       'type'       => 'radio',
-                       'choices'    => array(
-                               'scroll'     => __('Scroll'),
-                               'fixed'      => __('Fixed'),
-                       ),
+                       'label'    => __( 'Scroll with Page' ),
+                       'section'  => 'background_image',
+                       'type'     => 'checkbox',
                ) );
 
+
                // If the theme is using the default background callback, we can update
                // the background CSS using postMessage.
                if ( get_theme_support( 'custom-background', 'wp-head-callback' ) === '_custom_background_cb' ) {
-                       foreach ( array( 'color', 'image', 'position_x', 'repeat', 'attachment' ) as $prop ) {
+                       foreach ( array( 'color', 'image', 'preset', 'position_x', 'position_y', 'size', 'repeat', 'attachment' ) as $prop ) {
                                $this->get_setting( 'background_' . $prop )->transport = 'postMessage';
                        }
                }
 
-               /* Static Front Page */
-               // #WP19627
+               /*
+                * Static Front Page
+                * See also https://core.trac.wordpress.org/ticket/19627 which introduces the the static-front-page theme_support.
+                * The following replicates behavior from options-reading.php.
+                */
 
-               // Replicate behavior from options-reading.php and hide front page options if there are no pages
-               if ( get_pages() ) {
-                       $this->add_section( 'static_front_page', array(
-                               'title'          => __( 'Static Front Page' ),
-                       //      'theme_supports' => 'static-front-page',
-                               'priority'       => 120,
-                               'description'    => __( 'Your theme supports a static front page.' ),
-                       ) );
+               $this->add_section( 'static_front_page', array(
+                       'title' => __( 'Static Front Page' ),
+                       'priority' => 120,
+                       'description' => __( 'Your theme supports a static front page.' ),
+                       'active_callback' => array( $this, 'has_published_pages' ),
+               ) );
 
-                       $this->add_setting( 'show_on_front', array(
-                               'default'        => get_option( 'show_on_front' ),
-                               'capability'     => 'manage_options',
-                               'type'           => 'option',
-                       //      'theme_supports' => 'static-front-page',
-                       ) );
+               $this->add_setting( 'show_on_front', array(
+                       'default' => get_option( 'show_on_front' ),
+                       'capability' => 'manage_options',
+                       'type' => 'option',
+               ) );
 
-                       $this->add_control( 'show_on_front', array(
-                               'label'   => __( 'Front page displays' ),
-                               'section' => 'static_front_page',
-                               'type'    => 'radio',
-                               'choices' => array(
-                                       'posts' => __( 'Your latest posts' ),
-                                       'page'  => __( 'A static page' ),
-                               ),
-                       ) );
+               $this->add_control( 'show_on_front', array(
+                       'label' => __( 'Front page displays' ),
+                       'section' => 'static_front_page',
+                       'type' => 'radio',
+                       'choices' => array(
+                               'posts' => __( 'Your latest posts' ),
+                               'page'  => __( 'A static page' ),
+                       ),
+               ) );
 
-                       $this->add_setting( 'page_on_front', array(
-                               'type'       => 'option',
-                               'capability' => 'manage_options',
-                       //      'theme_supports' => 'static-front-page',
-                       ) );
+               $this->add_setting( 'page_on_front', array(
+                       'type'       => 'option',
+                       'capability' => 'manage_options',
+               ) );
 
-                       $this->add_control( 'page_on_front', array(
-                               'label'      => __( 'Front page' ),
-                               'section'    => 'static_front_page',
-                               'type'       => 'dropdown-pages',
-                       ) );
+               $this->add_control( 'page_on_front', array(
+                       'label' => __( 'Front page' ),
+                       'section' => 'static_front_page',
+                       'type' => 'dropdown-pages',
+                       'allow_addition' => true,
+               ) );
 
-                       $this->add_setting( 'page_for_posts', array(
-                               'type'           => 'option',
-                               'capability'     => 'manage_options',
-                       //      'theme_supports' => 'static-front-page',
-                       ) );
+               $this->add_setting( 'page_for_posts', array(
+                       'type' => 'option',
+                       'capability' => 'manage_options',
+               ) );
 
-                       $this->add_control( 'page_for_posts', array(
-                               'label'      => __( 'Posts page' ),
-                               'section'    => 'static_front_page',
-                               'type'       => 'dropdown-pages',
-                       ) );
+               $this->add_control( 'page_for_posts', array(
+                       'label' => __( 'Posts page' ),
+                       'section' => 'static_front_page',
+                       'type' => 'dropdown-pages',
+                       'allow_addition' => true,
+               ) );
+
+               /* Custom CSS */
+               $this->add_section( 'custom_css', array(
+                       'title'              => __( 'Additional CSS' ),
+                       'priority'           => 200,
+                       'description_hidden' => true,
+                       'description'        => sprintf( '%s<br /><a href="%s" class="external-link" target="_blank">%s<span class="screen-reader-text">%s</span></a>',
+                               __( 'CSS allows you to customize the appearance and layout of your site with code. Separate CSS is saved for each of your themes. 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.' ),
+                               esc_url( __( 'https://codex.wordpress.org/CSS' ) ),
+                               __( 'Learn more about CSS' ),
+                               __( '(link opens in a new window)' )
+                       ),
+               ) );
+
+               $custom_css_setting = new WP_Customize_Custom_CSS_Setting( $this, sprintf( 'custom_css[%s]', get_stylesheet() ), array(
+                       'capability' => 'edit_css',
+                       'default' => sprintf( "/*\n%s\n*/", __( "You can add your own CSS here.\n\nClick the help icon above to learn more." ) ),
+               ) );
+               $this->add_setting( $custom_css_setting );
+
+               $this->add_control( 'custom_css', array(
+                       'type'     => 'textarea',
+                       'section'  => 'custom_css',
+                       'settings' => array( 'default' => $custom_css_setting->id ),
+                       'input_attrs' => array(
+                               'class' => 'code', // Ensures contents displayed as LTR instead of RTL.
+                       ),
+               ) );
+       }
+
+       /**
+        * Return whether there are published pages.
+        *
+        * Used as active callback for static front page section and controls.
+        *
+        * @access private
+        * @since 4.7.0
+        *
+        * @returns bool Whether there are published (or to be published) pages.
+        */
+       public function has_published_pages() {
+
+               $setting = $this->get_setting( 'nav_menus_created_posts' );
+               if ( $setting ) {
+                       foreach ( $setting->value() as $post_id ) {
+                               if ( 'page' === get_post_type( $post_id ) ) {
+                                       return true;
+                               }
+                       }
                }
+               return 0 !== count( get_pages() );
        }
 
        /**
@@ -2326,7 +4171,8 @@ final class WP_Customize_Manager {
         * @see add_dynamic_settings()
         */
        public function register_dynamic_settings() {
-               $this->add_dynamic_settings( array_keys( $this->unsanitized_post_values() ) );
+               $setting_ids = array_keys( $this->unsanitized_post_values() );
+               $this->add_dynamic_settings( $setting_ids );
        }
 
        /**
@@ -2351,6 +4197,120 @@ final class WP_Customize_Manager {
                return $color;
        }
 
+       /**
+        * Callback for validating a background setting value.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @param string $value Repeat value.
+        * @param WP_Customize_Setting $setting Setting.
+        * @return string|WP_Error Background value or validation error.
+        */
+       public function _sanitize_background_setting( $value, $setting ) {
+               if ( 'background_repeat' === $setting->id ) {
+                       if ( ! in_array( $value, array( 'repeat-x', 'repeat-y', 'repeat', 'no-repeat' ) ) ) {
+                               return new WP_Error( 'invalid_value', __( 'Invalid value for background repeat.' ) );
+                       }
+               } elseif ( 'background_attachment' === $setting->id ) {
+                       if ( ! in_array( $value, array( 'fixed', 'scroll' ) ) ) {
+                               return new WP_Error( 'invalid_value', __( 'Invalid value for background attachment.' ) );
+                       }
+               } elseif ( 'background_position_x' === $setting->id ) {
+                       if ( ! in_array( $value, array( 'left', 'center', 'right' ), true ) ) {
+                               return new WP_Error( 'invalid_value', __( 'Invalid value for background position X.' ) );
+                       }
+               } elseif ( 'background_position_y' === $setting->id ) {
+                       if ( ! in_array( $value, array( 'top', 'center', 'bottom' ), true ) ) {
+                               return new WP_Error( 'invalid_value', __( 'Invalid value for background position Y.' ) );
+                       }
+               } elseif ( 'background_size' === $setting->id ) {
+                       if ( ! in_array( $value, array( 'auto', 'contain', 'cover' ), true ) ) {
+                               return new WP_Error( 'invalid_value', __( 'Invalid value for background size.' ) );
+                       }
+               } elseif ( 'background_preset' === $setting->id ) {
+                       if ( ! in_array( $value, array( 'default', 'fill', 'fit', 'repeat', 'custom' ), true ) ) {
+                               return new WP_Error( 'invalid_value', __( 'Invalid value for background size.' ) );
+                       }
+               } elseif ( 'background_image' === $setting->id || 'background_image_thumb' === $setting->id ) {
+                       $value = empty( $value ) ? '' : esc_url_raw( $value );
+               } else {
+                       return new WP_Error( 'unrecognized_setting', __( 'Unrecognized background setting.' ) );
+               }
+               return $value;
+       }
+
+       /**
+        * Export header video settings to facilitate selective refresh.
+        *
+        * @since 4.7.0
+        *
+        * @param array $response Response.
+        * @param WP_Customize_Selective_Refresh $selective_refresh Selective refresh component.
+        * @param array $partials Array of partials.
+        * @return array
+        */
+       public function export_header_video_settings( $response, $selective_refresh, $partials ) {
+               if ( isset( $partials['custom_header'] ) ) {
+                       $response['custom_header_settings'] = get_header_video_settings();
+               }
+
+               return $response;
+       }
+
+       /**
+        * Callback for validating the header_video value.
+        *
+        * Ensures that the selected video is less than 8MB and provides an error message.
+        *
+        * @since 4.7.0
+        *
+        * @param WP_Error $validity
+        * @param mixed $value
+        * @return mixed
+        */
+       public function _validate_header_video( $validity, $value ) {
+               $video = get_attached_file( absint( $value ) );
+               if ( $video ) {
+                       $size = filesize( $video );
+                       if ( 8 < $size / pow( 1024, 2 ) ) { // Check whether the size is larger than 8MB.
+                               $validity->add( 'size_too_large',
+                                       __( 'This video file is too large to use as a header video. Try a shorter video or optimize the compression settings and re-upload a file that is less than 8MB. Or, upload your video to YouTube and link it with the option below.' )
+                               );
+                       }
+                       if ( '.mp4' !== substr( $video, -4 ) && '.mov' !== substr( $video, -4 ) ) { // Check for .mp4 or .mov format, which (assuming h.264 encoding) are the only cross-browser-supported formats.
+                               $validity->add( 'invalid_file_type', sprintf(
+                                       /* translators: 1: .mp4, 2: .mov */
+                                       __( 'Only %1$s or %2$s files may be used for header video. Please convert your video file and try again, or, upload your video to YouTube and link it with the option below.' ),
+                                       '<code>.mp4</code>',
+                                       '<code>.mov</code>'
+                               ) );
+                       }
+               }
+               return $validity;
+       }
+
+       /**
+        * Callback for validating the external_header_video value.
+        *
+        * Ensures that the provided URL is supported.
+        *
+        * @since 4.7.0
+        *
+        * @param WP_Error $validity
+        * @param mixed $value
+        * @return mixed
+        */
+       public function _validate_external_header_video( $validity, $value ) {
+               $video = esc_url_raw( $value );
+               if ( $video ) {
+                       if ( ! preg_match( '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#', $video ) ) {
+                               $validity->add( 'invalid_url', __( 'Please enter a valid YouTube URL.' ) );
+                       }
+               }
+               return $validity;
+       }
+
        /**
         * Callback for rendering the custom logo, used in the custom_logo partial.
         *
index f9832a69b2f164c4713e7eaa54f0a40ec3a58666..ca1b72f7eb788aa04125466f89a1fdb201edb7ab 100644 (file)
@@ -48,7 +48,12 @@ final class WP_Customize_Nav_Menus {
                $this->previewed_menus = array();
                $this->manager         = $manager;
 
-               // Skip useless hooks when the user can't manage nav menus anyway.
+               // See https://github.com/xwp/wp-customize-snapshots/blob/962586659688a5b1fd9ae93618b7ce2d4e7a421c/php/class-customize-snapshot-manager.php#L469-L499
+               add_action( 'customize_register', array( $this, 'customize_register' ), 11 );
+               add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_dynamic_setting_args' ), 10, 2 );
+               add_filter( 'customize_dynamic_setting_class', array( $this, 'filter_dynamic_setting_class' ), 10, 3 );
+
+               // Skip remaining hooks when the user can't manage nav menus anyway.
                if ( ! current_user_can( 'edit_theme_options' ) ) {
                        return;
                }
@@ -56,16 +61,13 @@ final class WP_Customize_Nav_Menus {
                add_filter( 'customize_refresh_nonces', array( $this, 'filter_nonces' ) );
                add_action( 'wp_ajax_load-available-menu-items-customizer', array( $this, 'ajax_load_available_items' ) );
                add_action( 'wp_ajax_search-available-menu-items-customizer', array( $this, 'ajax_search_available_items' ) );
+               add_action( 'wp_ajax_customize-nav-menus-insert-auto-draft', array( $this, 'ajax_insert_auto_draft_post' ) );
                add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
-
-               // Needs to run after core Navigation section is set up.
-               add_action( 'customize_register', array( $this, 'customize_register' ), 11 );
-
-               add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_dynamic_setting_args' ), 10, 2 );
-               add_filter( 'customize_dynamic_setting_class', array( $this, 'filter_dynamic_setting_class' ), 10, 3 );
                add_action( 'customize_controls_print_footer_scripts', array( $this, 'print_templates' ) );
                add_action( 'customize_controls_print_footer_scripts', array( $this, 'available_items_template' ) );
                add_action( 'customize_preview_init', array( $this, 'customize_preview_init' ) );
+               add_action( 'customize_preview_init', array( $this, 'make_auto_draft_status_previewable' ) );
+               add_action( 'customize_save_nav_menus_created_posts', array( $this, 'save_nav_menus_created_posts' ) );
 
                // Selective Refresh partials.
                add_filter( 'customize_dynamic_partial_args', array( $this, 'customize_dynamic_partial_args' ), 10, 2 );
@@ -98,20 +100,35 @@ final class WP_Customize_Nav_Menus {
                        wp_die( -1 );
                }
 
-               if ( empty( $_POST['type'] ) || empty( $_POST['object'] ) ) {
+               $all_items = array();
+               $item_types = array();
+               if ( isset( $_POST['item_types'] ) && is_array( $_POST['item_types'] ) ) {
+                       $item_types = wp_unslash( $_POST['item_types'] );
+               } elseif ( isset( $_POST['type'] ) && isset( $_POST['object'] ) ) { // Back compat.
+                       $item_types[] = array(
+                               'type' => wp_unslash( $_POST['type'] ),
+                               'object' => wp_unslash( $_POST['object'] ),
+                               'page' => empty( $_POST['page'] ) ? 0 : absint( $_POST['page'] ),
+                       );
+               } else {
                        wp_send_json_error( 'nav_menus_missing_type_or_object_parameter' );
                }
 
-               $type = sanitize_key( $_POST['type'] );
-               $object = sanitize_key( $_POST['object'] );
-               $page = empty( $_POST['page'] ) ? 0 : absint( $_POST['page'] );
-               $items = $this->load_available_items_query( $type, $object, $page );
-
-               if ( is_wp_error( $items ) ) {
-                       wp_send_json_error( $items->get_error_code() );
-               } else {
-                       wp_send_json_success( array( 'items' => $items ) );
+               foreach ( $item_types as $item_type ) {
+                       if ( empty( $item_type['type'] ) || empty( $item_type['object'] ) ) {
+                               wp_send_json_error( 'nav_menus_missing_type_or_object_parameter' );
+                       }
+                       $type = sanitize_key( $item_type['type'] );
+                       $object = sanitize_key( $item_type['object'] );
+                       $page = empty( $item_type['page'] ) ? 0 : absint( $item_type['page'] );
+                       $items = $this->load_available_items_query( $type, $object, $page );
+                       if ( is_wp_error( $items ) ) {
+                               wp_send_json_error( $items->get_error_code() );
+                       }
+                       $all_items[ $item_type['type'] . ':' . $item_type['object'] ] = $items;
                }
+
+               wp_send_json_success( array( 'items' => $all_items ) );
        }
 
        /**
@@ -157,13 +174,25 @@ final class WP_Customize_Nav_Menus {
                                );
                        }
 
-                       $posts = get_posts( array(
+                       // Prepend posts with nav_menus_created_posts on first page.
+                       $posts = array();
+                       if ( 0 === $page && $this->manager->get_setting( 'nav_menus_created_posts' ) ) {
+                               foreach ( $this->manager->get_setting( 'nav_menus_created_posts' )->value() as $post_id ) {
+                                       $auto_draft_post = get_post( $post_id );
+                                       if ( $post_type->name === $auto_draft_post->post_type ) {
+                                               $posts[] = $auto_draft_post;
+                                       }
+                               }
+                       }
+
+                       $posts = array_merge( $posts, get_posts( array(
                                'numberposts' => 10,
                                'offset'      => 10 * $page,
                                'orderby'     => 'date',
                                'order'       => 'DESC',
                                'post_type'   => $object,
-                       ) );
+                       ) ) );
+
                        foreach ( $posts as $post ) {
                                $post_title = $post->post_title;
                                if ( '' === $post_title ) {
@@ -288,27 +317,42 @@ final class WP_Customize_Nav_Menus {
                        $query['s'] = $args['s'];
                }
 
+               $posts = array();
+
+               // Prepend list of posts with nav_menus_created_posts search results on first page.
+               $nav_menus_created_posts_setting = $this->manager->get_setting( 'nav_menus_created_posts' );
+               if ( 1 === $args['pagenum'] && $nav_menus_created_posts_setting && count( $nav_menus_created_posts_setting ) > 0 ) {
+                       $stub_post_query = new WP_Query( array_merge(
+                               $query,
+                               array(
+                                       'post_status' => 'auto-draft',
+                                       'post__in' => $nav_menus_created_posts_setting->value(),
+                                       'posts_per_page' => -1,
+                               )
+                       ) );
+                       $posts = array_merge( $posts, $stub_post_query->posts );
+               }
+
                // Query posts.
                $get_posts = new WP_Query( $query );
-
-               // Check if any posts were found.
-               if ( $get_posts->post_count ) {
-                       foreach ( $get_posts->posts as $post ) {
-                               $post_title = $post->post_title;
-                               if ( '' === $post_title ) {
-                                       /* translators: %d: ID of a post */
-                                       $post_title = sprintf( __( '#%d (no title)' ), $post->ID );
-                               }
-                               $items[] = array(
-                                       'id'         => 'post-' . $post->ID,
-                                       'title'      => html_entity_decode( $post_title, ENT_QUOTES, get_bloginfo( 'charset' ) ),
-                                       'type'       => 'post_type',
-                                       'type_label' => $post_type_objects[ $post->post_type ]->labels->singular_name,
-                                       'object'     => $post->post_type,
-                                       'object_id'  => intval( $post->ID ),
-                                       'url'        => get_permalink( intval( $post->ID ) ),
-                               );
+               $posts = array_merge( $posts, $get_posts->posts );
+
+               // Create items for posts.
+               foreach ( $posts as $post ) {
+                       $post_title = $post->post_title;
+                       if ( '' === $post_title ) {
+                               /* translators: %d: ID of a post */
+                               $post_title = sprintf( __( '#%d (no title)' ), $post->ID );
                        }
+                       $items[] = array(
+                               'id'         => 'post-' . $post->ID,
+                               'title'      => html_entity_decode( $post_title, ENT_QUOTES, get_bloginfo( 'charset' ) ),
+                               'type'       => 'post_type',
+                               'type_label' => $post_type_objects[ $post->post_type ]->labels->singular_name,
+                               'object'     => $post->post_type,
+                               'object_id'  => intval( $post->ID ),
+                               'url'        => get_permalink( intval( $post->ID ) ),
+                       );
                }
 
                // Query taxonomy terms.
@@ -368,6 +412,7 @@ final class WP_Customize_Nav_Menus {
                                'untitled'          => _x( '(no label)', 'missing menu item navigation label' ),
                                'unnamed'           => _x( '(unnamed)', 'Missing menu name.' ),
                                'custom_label'      => __( 'Custom Link' ),
+                               'page_label'        => get_post_type_object( 'page' )->labels->singular_name,
                                /* translators: %s: menu location */
                                'menuLocation'      => _x( '(Currently set to: %s)', 'menu' ),
                                'menuNameLabel'     => __( 'Menu Name' ),
@@ -486,6 +531,24 @@ final class WP_Customize_Nav_Menus {
         */
        public function customize_register() {
 
+               /*
+                * Preview settings for nav menus early so that the sections and controls will be added properly.
+                * See https://github.com/xwp/wp-customize-snapshots/blob/962586659688a5b1fd9ae93618b7ce2d4e7a421c/php/class-customize-snapshot-manager.php#L506-L543
+                */
+               $nav_menus_setting_ids = array();
+               foreach ( array_keys( $this->manager->unsanitized_post_values() ) as $setting_id ) {
+                       if ( preg_match( '/^(nav_menu_locations|nav_menu|nav_menu_item)\[/', $setting_id ) ) {
+                               $nav_menus_setting_ids[] = $setting_id;
+                       }
+               }
+               $this->manager->add_dynamic_settings( $nav_menus_setting_ids );
+               foreach ( $nav_menus_setting_ids as $setting_id ) {
+                       $setting = $this->manager->get_setting( $setting_id );
+                       if ( $setting ) {
+                               $setting->preview();
+                       }
+               }
+
                // Require JS-rendered control types.
                $this->manager->register_panel_type( 'WP_Customize_Nav_Menus_Panel' );
                $this->manager->register_control_type( 'WP_Customize_Nav_Menu_Control' );
@@ -587,6 +650,10 @@ final class WP_Customize_Nav_Menus {
                                $menu_item_setting_id = 'nav_menu_item[' . $item->ID . ']';
 
                                $value = (array) $item;
+                               if ( empty( $value['post_title'] ) ) {
+                                       $value['title'] = '';
+                               }
+
                                $value['nav_menu_term_id'] = $menu_id;
                                $this->manager->add_setting( new WP_Customize_Nav_Menu_Item_Setting( $this->manager, $menu_item_setting_id, array(
                                        'value'     => $value,
@@ -626,6 +693,13 @@ final class WP_Customize_Nav_Menus {
                        'section'  => 'add_menu',
                        'settings' => array(),
                ) ) );
+
+               $this->manager->add_setting( new WP_Customize_Filter_Setting( $this->manager, 'nav_menus_created_posts', array(
+                       'transport' => 'postMessage',
+                       'type' => 'option', // To prevent theme prefix in changeset.
+                       'default' => array(),
+                       'sanitize_callback' => array( $this, 'sanitize_nav_menus_created_posts' ),
+               ) ) );
        }
 
        /**
@@ -648,6 +722,7 @@ final class WP_Customize_Nav_Menus {
         * Return an array of all the available item types.
         *
         * @since 4.3.0
+        * @since 4.7.0  Each array item now includes a `$type_label` in in addition to `$title`, `$type`, and `$object`.
         * @access public
         *
         * @return array The available menu item types.
@@ -660,7 +735,8 @@ final class WP_Customize_Nav_Menus {
                        foreach ( $post_types as $slug => $post_type ) {
                                $item_types[] = array(
                                        'title'  => $post_type->labels->name,
-                                       'type'   => 'post_type',
+                                       'type_label' => $post_type->labels->singular_name,
+                                       'type' => 'post_type',
                                        'object' => $post_type->name,
                                );
                        }
@@ -673,8 +749,9 @@ final class WP_Customize_Nav_Menus {
                                        continue;
                                }
                                $item_types[] = array(
-                                       'title'  => $taxonomy->labels->name,
-                                       'type'   => 'taxonomy',
+                                       'title' => $taxonomy->labels->name,
+                                       'type_label' => $taxonomy->labels->singular_name,
+                                       'type' => 'taxonomy',
                                        'object' => $taxonomy->name,
                                );
                        }
@@ -684,6 +761,7 @@ final class WP_Customize_Nav_Menus {
                 * Filters the available menu item types.
                 *
                 * @since 4.3.0
+                * @since 4.7.0  Each array item now includes a `$type_label` in in addition to `$title`, `$type`, and `$object`.
                 *
                 * @param array $item_types Custom menu item types.
                 */
@@ -692,6 +770,130 @@ final class WP_Customize_Nav_Menus {
                return $item_types;
        }
 
+       /**
+        * Add a new `auto-draft` post.
+        *
+        * @access public
+        * @since 4.7.0
+        *
+        * @param array $postarr {
+        *     Post array. Note that post_status is overridden to be `auto-draft`.
+        *
+        *     @var string $post_title   Post title. Required.
+        *     @var string $post_type    Post type. Required.
+        *     @var string $post_name    Post name.
+        *     @var string $post_content Post content.
+        * }
+        * @return WP_Post|WP_Error Inserted auto-draft post object or error.
+        */
+       public function insert_auto_draft_post( $postarr ) {
+               if ( ! isset( $postarr['post_type'] ) || ! post_type_exists( $postarr['post_type'] )  ) {
+                       return new WP_Error( 'unknown_post_type', __( 'Unknown post type' ) );
+               }
+               if ( empty( $postarr['post_title'] ) ) {
+                       return new WP_Error( 'empty_title', __( 'Empty title' ) );
+               }
+               if ( ! empty( $postarr['post_status'] ) ) {
+                       return new WP_Error( 'status_forbidden', __( 'Status is forbidden' ) );
+               }
+
+               $postarr['post_status'] = 'auto-draft';
+
+               // Auto-drafts are allowed to have empty post_names, so it has to be explicitly set.
+               if ( empty( $postarr['post_name'] ) ) {
+                       $postarr['post_name'] = sanitize_title( $postarr['post_title'] );
+               }
+               if ( ! isset( $postarr['meta_input'] ) ) {
+                       $postarr['meta_input'] = array();
+               }
+               $postarr['meta_input']['_customize_draft_post_name'] = $postarr['post_name'];
+               unset( $postarr['post_name'] );
+
+               add_filter( 'wp_insert_post_empty_content', '__return_false', 1000 );
+               $r = wp_insert_post( wp_slash( $postarr ), true );
+               remove_filter( 'wp_insert_post_empty_content', '__return_false', 1000 );
+
+               if ( is_wp_error( $r ) ) {
+                       return $r;
+               } else {
+                       return get_post( $r );
+               }
+       }
+
+       /**
+        * Ajax handler for adding a new auto-draft post.
+        *
+        * @access public
+        * @since 4.7.0
+        */
+       public function ajax_insert_auto_draft_post() {
+               if ( ! check_ajax_referer( 'customize-menus', 'customize-menus-nonce', false ) ) {
+                       wp_send_json_error( 'bad_nonce', 400 );
+               }
+
+               if ( ! current_user_can( 'customize' ) ) {
+                       wp_send_json_error( 'customize_not_allowed', 403 );
+               }
+
+               if ( empty( $_POST['params'] ) || ! is_array( $_POST['params'] ) ) {
+                       wp_send_json_error( 'missing_params', 400 );
+               }
+
+               $params = wp_unslash( $_POST['params'] );
+               $illegal_params = array_diff( array_keys( $params ), array( 'post_type', 'post_title' ) );
+               if ( ! empty( $illegal_params ) ) {
+                       wp_send_json_error( 'illegal_params', 400 );
+               }
+
+               $params = array_merge(
+                       array(
+                               'post_type' => '',
+                               'post_title' => '',
+                       ),
+                       $params
+               );
+
+               if ( empty( $params['post_type'] ) || ! post_type_exists( $params['post_type'] ) ) {
+                       status_header( 400 );
+                       wp_send_json_error( 'missing_post_type_param' );
+               }
+
+               $post_type_object = get_post_type_object( $params['post_type'] );
+               if ( ! current_user_can( $post_type_object->cap->create_posts ) || ! current_user_can( $post_type_object->cap->publish_posts ) ) {
+                       status_header( 403 );
+                       wp_send_json_error( 'insufficient_post_permissions' );
+               }
+
+               $params['post_title'] = trim( $params['post_title'] );
+               if ( '' === $params['post_title'] ) {
+                       status_header( 400 );
+                       wp_send_json_error( 'missing_post_title' );
+               }
+
+               $r = $this->insert_auto_draft_post( $params );
+               if ( is_wp_error( $r ) ) {
+                       $error = $r;
+                       if ( ! empty( $post_type_object->labels->singular_name ) ) {
+                               $singular_name = $post_type_object->labels->singular_name;
+                       } else {
+                               $singular_name = __( 'Post' );
+                       }
+
+                       $data = array(
+                               /* translators: %1$s is the post type name and %2$s is the error message. */
+                               'message' => sprintf( __( '%1$s could not be created: %2$s' ), $singular_name, $error->get_error_message() ),
+                       );
+                       wp_send_json_error( $data );
+               } else {
+                       $post = $r;
+                       $data = array(
+                               'post_id' => $post->ID,
+                               'url'     => get_permalink( $post->ID ),
+                       );
+                       wp_send_json_success( $data );
+               }
+       }
+
        /**
         * Print the JavaScript templates used to render Menu Customizer components.
         *
@@ -767,61 +969,116 @@ final class WP_Customize_Nav_Menus {
                                        <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>
                                </div>
+                               <div class="search-icon" aria-hidden="true"></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">
-                               <h4 class="accordion-section-title" role="presentation">
-                                       <?php _e( 'Custom Links' ); ?>
-                                       <button type="button" class="button-link" aria-expanded="false">
-                                               <span class="screen-reader-text"><?php _e( 'Toggle section: Custom Links' ); ?></span>
-                                               <span class="toggle-indicator" aria-hidden="true"></span>
-                                       </button>
-                               </h4>
-                               <div class="accordion-section-content customlinkdiv">
-                                       <input type="hidden" value="custom" id="custom-menu-item-type" name="menu-item[-1][menu-item-type]" />
-                                       <p id="menu-item-url-wrap" class="wp-clearfix">
-                                               <label class="howto" for="custom-menu-item-url"><?php _e( 'URL' ); ?></label>
-                                               <input id="custom-menu-item-url" name="menu-item[-1][menu-item-url]" type="text" class="code menu-item-textbox" value="http://">
-                                       </p>
-                                       <p id="menu-item-name-wrap" class="wp-clearfix">
-                                               <label class="howto" for="custom-menu-item-name"><?php _e( 'Link Text' ); ?></label>
-                                               <input id="custom-menu-item-name" name="menu-item[-1][menu-item-title]" type="text" class="regular-text menu-item-textbox">
-                                       </p>
-                                       <p class="button-controls">
-                                               <span class="add-to-menu">
-                                                       <input type="submit" class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-custom-menu-item" id="custom-menu-item-submit">
-                                                       <span class="spinner"></span>
-                                               </span>
-                                       </p>
-                               </div>
+                               <ul class="accordion-section-content available-menu-items-list" data-type="search"></ul>
                        </div>
                        <?php
-                       // Containers for per-post-type item browsing; items added with JS.
-                       foreach ( $this->available_item_types() as $available_item_type ) {
-                               $id = sprintf( 'available-menu-items-%s-%s', $available_item_type['type'], $available_item_type['object'] );
-                               ?>
-                               <div id="<?php echo esc_attr( $id ); ?>" class="accordion-section">
-                                       <h4 class="accordion-section-title" role="presentation">
-                                               <?php echo esc_html( $available_item_type['title'] ); ?>
-                                               <span class="spinner"></span>
-                                               <span class="no-items"><?php _e( 'No items' ); ?></span>
-                                               <button type="button" class="button-link" aria-expanded="false">
-                                                       <span class="screen-reader-text"><?php
-                                                       /* translators: %s: Title of a section with menu items */
-                                                       printf( __( 'Toggle section: %s' ), esc_html( $available_item_type['title'] ) ); ?></span>
-                                                       <span class="toggle-indicator" aria-hidden="true"></span>
-                                               </button>
-                                       </h4>
-                                       <ul class="accordion-section-content" data-type="<?php echo esc_attr( $available_item_type['type'] ); ?>" data-object="<?php echo esc_attr( $available_item_type['object'] ); ?>"></ul>
-                               </div>
-                               <?php
+
+                       // Ensure the page post type comes first in the list.
+                       $item_types = $this->available_item_types();
+                       $page_item_type = null;
+                       foreach ( $item_types as $i => $item_type ) {
+                               if ( isset( $item_type['object'] ) && 'page' === $item_type['object'] ) {
+                                       $page_item_type = $item_type;
+                                       unset( $item_types[ $i ] );
+                               }
+                       }
+
+                       $this->print_custom_links_available_menu_item();
+                       if ( $page_item_type ) {
+                               $this->print_post_type_container( $page_item_type );
+                       }
+                       // Containers for per-post-type item browsing; items are added with JS.
+                       foreach ( $item_types as $item_type ) {
+                               $this->print_post_type_container( $item_type );
                        }
                        ?>
                </div><!-- #available-menu-items -->
        <?php
        }
 
+       /**
+        * Print the markup for new menu items.
+        *
+        * To be used in the template #available-menu-items.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @param array $available_item_type Menu item data to output, including title, type, and label.
+        * @return void
+        */
+       protected function print_post_type_container( $available_item_type ) {
+               $id = sprintf( 'available-menu-items-%s-%s', $available_item_type['type'], $available_item_type['object'] );
+               ?>
+               <div id="<?php echo esc_attr( $id ); ?>" class="accordion-section">
+                       <h4 class="accordion-section-title" role="presentation">
+                               <?php echo esc_html( $available_item_type['title'] ); ?>
+                               <span class="spinner"></span>
+                               <span class="no-items"><?php _e( 'No items' ); ?></span>
+                               <button type="button" class="button-link" aria-expanded="false">
+                                       <span class="screen-reader-text"><?php
+                                               /* translators: %s: Title of a section with menu items */
+                                               printf( __( 'Toggle section: %s' ), esc_html( $available_item_type['title'] ) ); ?></span>
+                                       <span class="toggle-indicator" aria-hidden="true"></span>
+                               </button>
+                       </h4>
+                       <div class="accordion-section-content">
+                               <?php if ( 'post_type' === $available_item_type['type'] ) : ?>
+                                       <?php $post_type_obj = get_post_type_object( $available_item_type['object'] ); ?>
+                                       <?php if ( current_user_can( $post_type_obj->cap->create_posts ) && current_user_can( $post_type_obj->cap->publish_posts ) ) : ?>
+                                               <div class="new-content-item">
+                                                       <input type="text" class="create-item-input" placeholder="<?php echo esc_attr( $post_type_obj->labels->add_new_item ); ?>">
+                                                       <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>
+                                               </div>
+                                       <?php endif; ?>
+                               <?php endif; ?>
+                               <ul class="available-menu-items-list" data-type="<?php echo esc_attr( $available_item_type['type'] ); ?>" data-object="<?php echo esc_attr( $available_item_type['object'] ); ?>" data-type_label="<?php echo esc_attr( isset( $available_item_type['type_label'] ) ? $available_item_type['type_label'] : $available_item_type['type'] ); ?>"></ul>
+                       </div>
+               </div>
+               <?php
+       }
+
+       /**
+        * Print the markup for available menu item custom links.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @return void
+        */
+       protected function print_custom_links_available_menu_item() {
+               ?>
+               <div id="new-custom-menu-item" class="accordion-section">
+                       <h4 class="accordion-section-title" role="presentation">
+                               <?php _e( 'Custom Links' ); ?>
+                               <button type="button" class="button-link" aria-expanded="false">
+                                       <span class="screen-reader-text"><?php _e( 'Toggle section: Custom Links' ); ?></span>
+                                       <span class="toggle-indicator" aria-hidden="true"></span>
+                               </button>
+                       </h4>
+                       <div class="accordion-section-content customlinkdiv">
+                               <input type="hidden" value="custom" id="custom-menu-item-type" name="menu-item[-1][menu-item-type]" />
+                               <p id="menu-item-url-wrap" class="wp-clearfix">
+                                       <label class="howto" for="custom-menu-item-url"><?php _e( 'URL' ); ?></label>
+                                       <input id="custom-menu-item-url" name="menu-item[-1][menu-item-url]" type="text" class="code menu-item-textbox" value="http://">
+                               </p>
+                               <p id="menu-item-name-wrap" class="wp-clearfix">
+                                       <label class="howto" for="custom-menu-item-name"><?php _e( 'Link Text' ); ?></label>
+                                       <input id="custom-menu-item-name" name="menu-item[-1][menu-item-title]" type="text" class="regular-text menu-item-textbox">
+                               </p>
+                               <p class="button-controls">
+                                       <span class="add-to-menu">
+                                               <input type="submit" class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-custom-menu-item" id="custom-menu-item-submit">
+                                               <span class="spinner"></span>
+                                       </span>
+                               </p>
+                       </div>
+               </div>
+               <?php
+       }
+
        //
        // Start functionality specific to partial-refresh of menu changes in Customizer preview.
        //
@@ -880,6 +1137,83 @@ final class WP_Customize_Nav_Menus {
                add_filter( 'customize_render_partials_response', array( $this, 'export_partial_rendered_nav_menu_instances' ) );
        }
 
+       /**
+        * Make the auto-draft status protected so that it can be queried.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function make_auto_draft_status_previewable() {
+               global $wp_post_statuses;
+               $wp_post_statuses['auto-draft']->protected = true;
+       }
+
+       /**
+        * Sanitize post IDs for auto-draft posts created for nav menu items to be published.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param array $value Post IDs.
+        * @returns array Post IDs.
+        */
+       public function sanitize_nav_menus_created_posts( $value ) {
+               $post_ids = array();
+               foreach ( wp_parse_id_list( $value ) as $post_id ) {
+                       if ( empty( $post_id ) ) {
+                               continue;
+                       }
+                       $post = get_post( $post_id );
+                       if ( 'auto-draft' !== $post->post_status ) {
+                               continue;
+                       }
+                       $post_type_obj = get_post_type_object( $post->post_type );
+                       if ( ! $post_type_obj ) {
+                               continue;
+                       }
+                       if ( ! current_user_can( $post_type_obj->cap->publish_posts ) || ! current_user_can( $post_type_obj->cap->edit_post, $post_id ) ) {
+                               continue;
+                       }
+                       $post_ids[] = $post->ID;
+               }
+               return $post_ids;
+       }
+
+       /**
+        * Publish the auto-draft posts that were created for nav menu items.
+        *
+        * The post IDs will have been sanitized by already by
+        * `WP_Customize_Nav_Menu_Items::sanitize_nav_menus_created_posts()` to
+        * remove any post IDs for which the user cannot publish or for which the
+        * post is not an auto-draft.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_Customize_Setting $setting Customizer setting object.
+        */
+       public function save_nav_menus_created_posts( $setting ) {
+               $post_ids = $setting->post_value();
+               if ( ! empty( $post_ids ) ) {
+                       foreach ( $post_ids as $post_id ) {
+                               $target_status = 'attachment' === get_post_type( $post_id ) ? 'inherit' : 'publish';
+                               $args = array(
+                                       'ID' => $post_id,
+                                       'post_status' => $target_status,
+                               );
+                               $post_name = get_post_meta( $post_id, '_customize_draft_post_name', true );
+                               if ( $post_name ) {
+                                       $args['post_name'] = $post_name;
+                               }
+
+                               // Note that wp_publish_post() cannot be used because unique slugs need to be assigned.
+                               wp_update_post( wp_slash( $args ) );
+
+                               delete_post_meta( $post_id, '_customize_draft_post_name' );
+                       }
+               }
+       }
+
        /**
         * Keep track of the arguments that are being passed to wp_nav_menu().
         *
index 0a916f2f543c1faf54cde88ae8e01cdcc4d23e8c..68d677133ee95bd61df26f908d2db25119e2220c 100644 (file)
@@ -145,6 +145,18 @@ class WP_Customize_Section {
         */
        public $active_callback = '';
 
+       /**
+        * Show the description or hide it behind the help icon.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @var bool Indicates whether the Section's description should be
+        *           hidden behind a help icon ("?") in the Section header,
+        *           similar to how help icons are displayed on Panels.
+        */
+       public $description_hidden = false;
+
        /**
         * Constructor.
         *
@@ -223,7 +235,7 @@ class WP_Customize_Section {
         * @return array The array to be exported to the client as JSON.
         */
        public function json() {
-               $array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'panel', 'type' ) );
+               $array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'panel', 'type', 'description_hidden' ) );
                $array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
                $array['content'] = $this->get_content();
                $array['active'] = $this->active();
@@ -324,11 +336,11 @@ class WP_Customize_Section {
         * @see WP_Customize_Manager::render_template()
         */
        public function print_template() {
-        ?>
+               ?>
                <script type="text/html" id="tmpl-customize-section-<?php echo $this->type; ?>">
                        <?php $this->render_template(); ?>
                </script>
-        <?php
+               <?php
        }
 
        /**
@@ -350,7 +362,7 @@ class WP_Customize_Section {
                                <span class="screen-reader-text"><?php _e( 'Press return or enter to open this section' ); ?></span>
                        </h3>
                        <ul class="accordion-section-content">
-                               <li class="customize-section-description-container">
+                               <li class="customize-section-description-container section-meta <# if ( data.description_hidden ) { #>customize-info<# } #>">
                                        <div class="customize-section-title">
                                                <button class="customize-section-back" tabindex="-1">
                                                        <span class="screen-reader-text"><?php _e( 'Back' ); ?></span>
@@ -361,8 +373,15 @@ class WP_Customize_Section {
                                                        </span>
                                                        {{ data.title }}
                                                </h3>
+                                               <# if ( data.description && data.description_hidden ) { #>
+                                                       <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 class="description customize-section-description">
+                                                               {{{ data.description }}}
+                                                       </div>
+                                               <# } #>
                                        </div>
-                                       <# if ( data.description ) { #>
+
+                                       <# if ( data.description && ! data.description_hidden ) { #>
                                                <div class="description customize-section-description">
                                                        {{{ data.description }}}
                                                </div>
index a0d04d383bcdd0d0b852e402c9b80bf95f2d536c..7f1f98ac3b626e910647e56f7ae0eedc833cabf0 100644 (file)
@@ -498,6 +498,8 @@ class WP_Customize_Setting {
        /**
         * Fetch and sanitize the $_POST value for the setting.
         *
+        * During a save request prior to save, post_value() provides the new value while value() does not.
+        *
         * @since 3.4.0
         *
         * @param mixed $default A default value which is used as a fallback. Default is null.
@@ -694,6 +696,15 @@ class WP_Customize_Setting {
                $is_core_type = ( 'option' === $this->type || 'theme_mod' === $this->type );
 
                if ( ! $is_core_type && ! $this->is_multidimensional_aggregated ) {
+
+                       // Use post value if previewed and a post value is present.
+                       if ( $this->is_previewed ) {
+                               $value = $this->post_value( null );
+                               if ( null !== $value ) {
+                                       return $value;
+                               }
+                       }
+
                        $value = $this->get_root_value( $this->default );
 
                        /**
index 16549ff6922623ac435a13df2a4ed1dcf5646989..74031194fd8467c9643bc4768d0b3b482ae7e734 100644 (file)
@@ -93,16 +93,18 @@ final class WP_Customize_Widgets {
        public function __construct( $manager ) {
                $this->manager = $manager;
 
-               // Skip useless hooks when the user can't manage widgets anyway.
+               // See https://github.com/xwp/wp-customize-snapshots/blob/962586659688a5b1fd9ae93618b7ce2d4e7a421c/php/class-customize-snapshot-manager.php#L420-L449
+               add_filter( 'customize_dynamic_setting_args',          array( $this, 'filter_customize_dynamic_setting_args' ), 10, 2 );
+               add_action( 'widgets_init',                            array( $this, 'register_settings' ), 95 );
+               add_action( 'customize_register',                      array( $this, 'schedule_customize_register' ), 1 );
+
+               // Skip remaining hooks when the user can't manage widgets anyway.
                if ( ! current_user_can( 'edit_theme_options' ) ) {
                        return;
                }
 
-               add_filter( 'customize_dynamic_setting_args',          array( $this, 'filter_customize_dynamic_setting_args' ), 10, 2 );
-               add_action( 'widgets_init',                            array( $this, 'register_settings' ), 95 );
                add_action( 'wp_loaded',                               array( $this, 'override_sidebars_widgets_for_theme_switch' ) );
                add_action( 'customize_controls_init',                 array( $this, 'customize_controls_init' ) );
-               add_action( 'customize_register',                      array( $this, 'schedule_customize_register' ), 1 );
                add_action( 'customize_controls_enqueue_scripts',      array( $this, 'enqueue_scripts' ) );
                add_action( 'customize_controls_print_styles',         array( $this, 'print_styles' ) );
                add_action( 'customize_controls_print_scripts',        array( $this, 'print_scripts' ) );
@@ -276,6 +278,7 @@ final class WP_Customize_Widgets {
 
                $this->old_sidebars_widgets = wp_get_sidebars_widgets();
                add_filter( 'customize_value_old_sidebars_widgets_data', array( $this, 'filter_customize_value_old_sidebars_widgets_data' ) );
+               $this->manager->set_post_value( 'old_sidebars_widgets_data', $this->old_sidebars_widgets ); // Override any value cached in changeset.
 
                // retrieve_widgets() looks at the global $sidebars_widgets
                $sidebars_widgets = $this->old_sidebars_widgets;
@@ -712,7 +715,7 @@ final class WP_Customize_Widgets {
                                        <% }); %>
                                </ul>
                                <div class="move-widget-actions">
-                                       <button class="move-widget-btn button-secondary" type="button">{btn}</button>
+                                       <button class="move-widget-btn button" type="button">{btn}</button>
                                </div>
                        </div>'
                );
@@ -729,11 +732,12 @@ final class WP_Customize_Widgets {
                                'error'            => __( 'An error has occurred. Please reload the page and try again.' ),
                                'widgetMovedUp'    => __( 'Widget moved up' ),
                                'widgetMovedDown'  => __( 'Widget moved down' ),
-                               'noAreasRendered'  => __( 'There are no widget areas currently rendered in the preview. Navigate in the preview to a template that makes use of a widget area in order to access its widgets here.' ),
+                               'noAreasRendered'  => __( 'There are no widget areas on the page shown, however other pages in this theme do have them.' ),
                                'reorderModeOn'    => __( 'Reorder mode enabled' ),
                                'reorderModeOff'   => __( 'Reorder mode closed' ),
                                'reorderLabelOn'   => esc_attr__( 'Reorder widgets' ),
-                               'reorderLabelOff'  => esc_attr__( 'Close reorder mode' ),
+                               'widgetsFound'     => __( 'Number of widgets found: %d' ),
+                               'noWidgetsFound'   => __( 'No widgets found.' ),
                        ),
                        'tpl' => array(
                                'widgetReorderNav' => $widget_reorder_nav_tpl,
@@ -777,7 +781,10 @@ final class WP_Customize_Widgets {
                        </div>
                        <div id="available-widgets-filter">
                                <label class="screen-reader-text" for="widgets-search"><?php _e( 'Search Widgets' ); ?></label>
-                               <input type="search" id="widgets-search" placeholder="<?php esc_attr_e( 'Search widgets&hellip;' ) ?>" />
+                               <input type="text" id="widgets-search" placeholder="<?php esc_attr_e( 'Search widgets&hellip;' ) ?>" aria-describedby="widgets-search-desc" />
+                               <div class="search-icon" aria-hidden="true"></div>
+                               <button type="button" class="clear-results"><span class="screen-reader-text"><?php _e( 'Clear Results' ); ?></span></button>
+                               <p class="screen-reader-text" id="widgets-search-desc"><?php _e( 'The search results will be updated as you type.' ); ?></p>
                        </div>
                        <div id="available-widgets-list">
                        <?php foreach ( $this->get_available_widgets() as $available_widget ): ?>
@@ -785,6 +792,7 @@ final class WP_Customize_Widgets {
                                        <?php echo $available_widget['control_tpl']; ?>
                                </div>
                        <?php endforeach; ?>
+                       <p class="no-widgets-found-message"><?php _e( 'No widgets found.' ); ?></p>
                        </div><!-- #available-widgets-list -->
                </div><!-- #available-widgets -->
                </div><!-- #widgets-left -->
diff --git a/wp-includes/class-wp-dependency.php b/wp-includes/class-wp-dependency.php
new file mode 100644 (file)
index 0000000..92c5456
--- /dev/null
@@ -0,0 +1,104 @@
+<?php
+/**
+ * Dependencies API: _WP_Dependency class
+ *
+ * @since 4.7.0
+ *
+ * @package WordPress
+ * @subpackage Dependencies
+ */
+
+/**
+ * Class _WP_Dependency
+ *
+ * Helper class to register a handle and associated data.
+ *
+ * @access private
+ * @since 2.6.0
+ */
+class _WP_Dependency {
+       /**
+        * The handle name.
+        *
+        * @access public
+        * @since 2.6.0
+        * @var null
+        */
+       public $handle;
+
+       /**
+        * The handle source.
+        *
+        * @access public
+        * @since 2.6.0
+        * @var null
+        */
+       public $src;
+
+       /**
+        * An array of handle dependencies.
+        *
+        * @access public
+        * @since 2.6.0
+        * @var array
+        */
+       public $deps = array();
+
+       /**
+        * The handle version.
+        *
+        * Used for cache-busting.
+        *
+        * @access public
+        * @since 2.6.0
+        * @var bool|string
+        */
+       public $ver = false;
+
+       /**
+        * Additional arguments for the handle.
+        *
+        * @access public
+        * @since 2.6.0
+        * @var null
+        */
+       public $args = null;  // Custom property, such as $in_footer or $media.
+
+       /**
+        * Extra data to supply to the handle.
+        *
+        * @access public
+        * @since 2.6.0
+        * @var array
+        */
+       public $extra = array();
+
+       /**
+        * Setup dependencies.
+        *
+        * @since 2.6.0
+        */
+       public function __construct() {
+               @list( $this->handle, $this->src, $this->deps, $this->ver, $this->args ) = func_get_args();
+               if ( ! is_array($this->deps) )
+                       $this->deps = array();
+       }
+
+       /**
+        * Add handle data.
+        *
+        * @access public
+        * @since 2.6.0
+        *
+        * @param string $name The data key to add.
+        * @param mixed  $data The data value to add.
+        * @return bool False if not scalar, true otherwise.
+        */
+       public function add_data( $name, $data ) {
+               if ( !is_scalar($name) )
+                       return false;
+               $this->extra[$name] = $data;
+               return true;
+       }
+
+}
index f7137f83ed805d4095d6b640918dd68165ce8388..916be4d9d4b73fae6fbd779f67bd3f8c796dcd7e 100644 (file)
@@ -26,6 +26,7 @@ final class _WP_Editors {
        private static $editor_buttons_css = true;
        private static $drag_drop_upload = false;
        private static $old_dfw_compat = false;
+       private static $translation;
 
        private function __construct() {}
 
@@ -296,14 +297,13 @@ final class _WP_Editors {
        /**
         * @static
         *
-        * @global string $wp_version
         * @global string $tinymce_version
         *
         * @param string $editor_id
         * @param array  $set
         */
        public static function editor_settings($editor_id, $set) {
-               global $wp_version, $tinymce_version;
+               global $tinymce_version;
 
                if ( empty(self::$first_init) ) {
                        if ( is_admin() ) {
@@ -352,12 +352,19 @@ final class _WP_Editors {
                        if ( empty( self::$first_init ) ) {
                                self::$baseurl = includes_url( 'js/tinymce' );
 
-                               $mce_locale = get_locale();
+                               $mce_locale = get_user_locale();
                                self::$mce_locale = $mce_locale = empty( $mce_locale ) ? 'en' : strtolower( substr( $mce_locale, 0, 2 ) ); // ISO 639-1
 
                                /** This filter is documented in wp-admin/includes/media.php */
                                $no_captions = (bool) apply_filters( 'disable_captions', '' );
                                $ext_plugins = '';
+                               $shortcut_labels = array();
+
+                               foreach ( self::get_translation() as $name => $value ) {
+                                       if ( is_array( $value ) ) {
+                                               $shortcut_labels[$name] = $value[1];
+                                       }
+                               }
 
                                if ( $set['teeny'] ) {
 
@@ -551,7 +558,8 @@ final class _WP_Editors {
                                        'wpeditimage_disable_captions' => $no_captions,
                                        'wpeditimage_html5_captions' => current_theme_supports( 'html5', 'caption' ),
                                        'plugins' => implode( ',', $plugins ),
-                                       'wp_lang_attr' => get_bloginfo( 'language' )
+                                       'wp_lang_attr' => get_bloginfo( 'language' ),
+                                       'wp_shortcut_labels' => wp_json_encode( $shortcut_labels ),
                                );
 
                                if ( ! empty( $mce_external_plugins ) ) {
@@ -559,7 +567,7 @@ final class _WP_Editors {
                                }
 
                                $suffix = SCRIPT_DEBUG ? '' : '.min';
-                               $version = 'ver=' . $wp_version;
+                               $version = 'ver=' . get_bloginfo( 'version' );
                                $dashicons = includes_url( "css/dashicons$suffix.css?$version" );
 
                                // WordPress default stylesheet and dashicons
@@ -601,7 +609,7 @@ final class _WP_Editors {
                                $mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'unlink', 'fullscreen'), $editor_id );
                                $mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array();
                        } else {
-                               $mce_buttons = array( 'bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'hr', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker' );
+                               $mce_buttons = array( 'formatselect', 'bold', 'italic', 'bullist', 'numlist', 'blockquote', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker' );
 
                                if ( ! wp_is_mobile() ) {
                                        if ( $set['_content_editor_dfw'] ) {
@@ -623,7 +631,7 @@ final class _WP_Editors {
                                 */
                                $mce_buttons = apply_filters( 'mce_buttons', $mce_buttons, $editor_id );
 
-                               $mce_buttons_2 = array( 'formatselect', 'underline', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo' );
+                               $mce_buttons_2 = array( 'strikethrough', 'hr', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo' );
 
                                if ( ! wp_is_mobile() ) {
                                        $mce_buttons_2[] = 'wp_help';
@@ -664,6 +672,7 @@ final class _WP_Editors {
 
                        if ( $post = get_post() ) {
                                $body_class .= ' post-type-' . sanitize_html_class( $post->post_type ) . ' post-status-' . sanitize_html_class( $post->post_status );
+
                                if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
                                        $post_format = get_post_format( $post );
                                        if ( $post_format && ! is_wp_error( $post_format ) )
@@ -671,9 +680,14 @@ final class _WP_Editors {
                                        else
                                                $body_class .= ' post-format-standard';
                                }
+
+                               if ( $page_template = get_page_template_slug( $post ) ) {
+                                       $page_template = str_replace( '.', '-', basename( $page_template, '.php' ) );
+                                       $body_class .= ' page-template-' . sanitize_html_class( $page_template );
+                               }
                        }
 
-                       $body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
+                       $body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
 
                        if ( !empty($set['tinymce']['body_class']) ) {
                                $body_class .= ' ' . $set['tinymce']['body_class'];
@@ -807,73 +821,64 @@ final class _WP_Editors {
                ) );
        }
 
-       /**
-        * Translates the default TinyMCE strings and returns them as JSON encoded object ready to be loaded with tinymce.addI18n().
-        * Can be used directly (_WP_Editors::wp_mce_translation()) by passing the same locale as set in the TinyMCE init object.
-        *
-        * @static
-        * @param string $mce_locale The locale used for the editor.
-        * @param bool $json_only optional Whether to include the JavaScript calls to tinymce.addI18n() and tinymce.ScriptLoader.markDone().
-        * @return string Translation object, JSON encoded.
-        */
-       public static function wp_mce_translation( $mce_locale = '', $json_only = false ) {
-
-               $mce_translation = array(
+       private static function get_translation() {
+               if ( empty( self::$translation ) ) {
+                       self::$translation = array(
                        // Default TinyMCE strings
                        'New document' => __( 'New document' ),
                        'Formats' => _x( 'Formats', 'TinyMCE' ),
 
                        'Headings' => _x( 'Headings', 'TinyMCE' ),
-                       'Heading 1' => __( 'Heading 1' ),
-                       'Heading 2' => __( 'Heading 2' ),
-                       'Heading 3' => __( 'Heading 3' ),
-                       'Heading 4' => __( 'Heading 4' ),
-                       'Heading 5' => __( 'Heading 5' ),
-                       'Heading 6' => __( 'Heading 6' ),
+                       'Heading 1' => array( __( 'Heading 1' ), 'access1' ),
+                       'Heading 2' => array( __( 'Heading 2' ), 'access2' ),
+                       'Heading 3' => array( __( 'Heading 3' ), 'access3' ),
+                       'Heading 4' => array( __( 'Heading 4' ), 'access4' ),
+                       'Heading 5' => array( __( 'Heading 5' ), 'access5' ),
+                       'Heading 6' => array( __( 'Heading 6' ), 'access6' ),
 
                        /* translators: block tags */
                        'Blocks' => _x( 'Blocks', 'TinyMCE' ),
-                       'Paragraph' => __( 'Paragraph' ),
-                       'Blockquote' => __( 'Blockquote' ),
+                       'Paragraph' => array( __( 'Paragraph' ), 'access7' ),
+                       'Blockquote' => array( __( 'Blockquote' ), 'accessQ' ),
                        'Div' => _x( 'Div', 'HTML tag' ),
                        'Pre' => _x( 'Pre', 'HTML tag' ),
                        'Preformatted' => _x( 'Preformatted', 'HTML tag' ),
                        'Address' => _x( 'Address', 'HTML tag' ),
 
                        'Inline' => _x( 'Inline', 'HTML elements' ),
-                       'Underline' => __( 'Underline' ),
-                       'Strikethrough' => __( 'Strikethrough' ),
+                       'Underline' => array( __( 'Underline' ), 'metaU' ),
+                       'Strikethrough' => array( __( 'Strikethrough' ), 'accessD' ),
                        'Subscript' => __( 'Subscript' ),
                        'Superscript' => __( 'Superscript' ),
                        'Clear formatting' => __( 'Clear formatting' ),
-                       'Bold' => __( 'Bold' ),
-                       'Italic' => __( 'Italic' ),
-                       'Code' => __( 'Code' ),
+                       'Bold' => array( __( 'Bold' ), 'metaB' ),
+                       'Italic' => array( __( 'Italic' ), 'metaI' ),
+                       'Code' => array( __( 'Code' ), 'accessX' ),
                        'Source code' => __( 'Source code' ),
                        'Font Family' => __( 'Font Family' ),
                        'Font Sizes' => __( 'Font Sizes' ),
 
-                       'Align center' => __( 'Align center' ),
-                       'Align right' => __( 'Align right' ),
-                       'Align left' => __( 'Align left' ),
-                       'Justify' => __( 'Justify' ),
+                       'Align center' => array( __( 'Align center' ), 'accessC' ),
+                       'Align right' => array( __( 'Align right' ), 'accessR' ),
+                       'Align left' => array( __( 'Align left' ), 'accessL' ),
+                       'Justify' => array( __( 'Justify' ), 'accessJ' ),
                        'Increase indent' => __( 'Increase indent' ),
                        'Decrease indent' => __( 'Decrease indent' ),
 
-                       'Cut' => __( 'Cut' ),
-                       'Copy' => __( 'Copy' ),
-                       'Paste' => __( 'Paste' ),
-                       'Select all' => __( 'Select all' ),
-                       'Undo' => __( 'Undo' ),
-                       'Redo' => __( 'Redo' ),
+                       'Cut' => array( __( 'Cut' ), 'metaX' ),
+                       'Copy' => array( __( 'Copy' ), 'metaC' ),
+                       'Paste' => array( __( 'Paste' ), 'metaV' ),
+                       'Select all' => array( __( 'Select all' ), 'metaA' ),
+                       'Undo' => array( __( 'Undo' ), 'metaZ' ),
+                       'Redo' => array( __( 'Redo' ), 'metaY' ),
 
                        'Ok' => __( 'OK' ),
                        'Cancel' => __( 'Cancel' ),
                        'Close' => __( 'Close' ),
                        'Visual aids' => __( 'Visual aids' ),
 
-                       'Bullet list' => __( 'Bulleted list' ),
-                       'Numbered list' => __( 'Numbered list' ),
+                       'Bullet list' => array( __( 'Bulleted list' ), 'accessU' ),
+                       'Numbered list' => array( __( 'Numbered list' ), 'accessO' ),
                        'Square' => _x( 'Square', 'list style' ),
                        'Default' => _x( 'Default', 'list style' ),
                        'Circle' => _x( 'Circle', 'list style' ),
@@ -899,7 +904,7 @@ final class _WP_Editors {
                        'Author' => __( 'Author' ),
 
                        // Media, image plugins
-                       'Insert/edit image' => __( 'Insert/edit image' ),
+                       'Insert/edit image' => array( __( 'Insert/edit image' ), 'accessM' ),
                        'General' => __( 'General' ),
                        'Advanced' => __( 'Advanced' ),
                        'Source' => __( 'Source' ),
@@ -933,8 +938,8 @@ final class _WP_Editors {
                        'Horizontal line' => __( 'Horizontal line' ),
                        'Horizontal space' => __( 'Horizontal space' ),
                        'Restore last draft' => __( 'Restore last draft' ),
-                       'Insert/edit link' => __( 'Insert/edit link' ),
-                       'Remove link' => __( 'Remove link' ),
+                       'Insert/edit link' => array( __( 'Insert/edit link' ), 'metaK' ),
+                       'Remove link' => array( __( 'Remove link' ), 'accessS' ),
 
                        'Color' => __( 'Color' ),
                        'Custom color' => __( 'Custom color' ),
@@ -1038,11 +1043,11 @@ final class _WP_Editors {
                        'Format' => _x( 'Format', 'TinyMCE menu' ),
 
                        // WordPress strings
-                       'Toolbar Toggle' => __( 'Toolbar Toggle' ),
-                       'Insert Read More tag' => __( 'Insert Read More tag' ),
-                       'Insert Page Break tag' => __( 'Insert Page Break tag' ),
+                       'Toolbar Toggle' => array( __( 'Toolbar Toggle' ), 'accessZ' ),
+                       'Insert Read More tag' => array( __( 'Insert Read More tag' ), 'accessT' ),
+                       'Insert Page Break tag' => array( __( 'Insert Page Break tag' ), 'accessP' ),
                        'Read more...' => __( 'Read more...' ), // Title on the placeholder inside the editor (no ellipsis)
-                       'Distraction-free writing mode' => __( 'Distraction-free writing mode' ),
+                       'Distraction-free writing mode' => array( __( 'Distraction-free writing mode' ), 'accessW' ),
                        'No alignment' => __( 'No alignment' ), // Tooltip for the 'alignnone' button in the image toolbar
                        'Remove' => __( 'Remove' ), // Tooltip for the 'remove' button in the image toolbar
                        'Edit ' => __( 'Edit' ), // Tooltip for the 'edit' button in the image toolbar
@@ -1051,7 +1056,7 @@ final class _WP_Editors {
                        'Link options'  => __( 'Link options' ), // Tooltip for the 'link options' button in the inline link dialog
 
                        // Shortcuts help modal
-                       'Keyboard Shortcuts' => __( 'Keyboard Shortcuts' ),
+                       'Keyboard Shortcuts' => array( __( 'Keyboard Shortcuts' ), 'accessH' ),
                        'Default shortcuts,' => __( 'Default shortcuts,' ),
                        'Additional shortcuts,' => __( 'Additional shortcuts,' ),
                        'Focus shortcuts:' => __( 'Focus shortcuts:' ),
@@ -1074,7 +1079,8 @@ final class _WP_Editors {
                                __( 'The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.' ),
                        'The next group of formatting shortcuts are applied as you type or when you insert them around plain text in the same paragraph. Press Escape or the Undo button to undo.' =>
                                __( 'The next group of formatting shortcuts are applied as you type or when you insert them around plain text in the same paragraph. Press Escape or the Undo button to undo.' ),
-               );
+                       );
+               }
 
                /**
                 * Link plugin (not included):
@@ -1087,10 +1093,31 @@ final class _WP_Editors {
                 *      Url
                 */
 
+               return self::$translation;
+       }
+
+       /**
+        * Translates the default TinyMCE strings and returns them as JSON encoded object ready to be loaded with tinymce.addI18n().
+        * Can be used directly (_WP_Editors::wp_mce_translation()) by passing the same locale as set in the TinyMCE init object.
+        *
+        * @static
+        * @param string $mce_locale The locale used for the editor.
+        * @param bool $json_only optional Whether to include the JavaScript calls to tinymce.addI18n() and tinymce.ScriptLoader.markDone().
+        * @return string Translation object, JSON encoded.
+        */
+       public static function wp_mce_translation( $mce_locale = '', $json_only = false ) {
                if ( ! $mce_locale ) {
                        $mce_locale = self::$mce_locale;
                }
 
+               $mce_translation = self::get_translation();
+               
+               foreach ( $mce_translation as $name => $value ) {
+                       if ( is_array( $value ) ) {
+                               $mce_translation[$name] = $value[0];
+                       }
+               }
+
                /**
                 * Filters translated strings prepared for TinyMCE.
                 *
@@ -1131,13 +1158,12 @@ final class _WP_Editors {
        /**
         *
         * @static
-        * @global string $wp_version
         * @global string $tinymce_version
         * @global bool   $concatenate_scripts
         * @global bool   $compress_scripts
         */
        public static function editor_js() {
-               global $wp_version, $tinymce_version, $concatenate_scripts, $compress_scripts;
+               global $tinymce_version, $concatenate_scripts, $compress_scripts;
 
                /**
                 * Filters "tiny_mce_version" is deprecated
@@ -1215,7 +1241,7 @@ final class _WP_Editors {
 
                $baseurl = self::$baseurl;
                // Load tinymce.js when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG)
-               $mce_suffix = false !== strpos( $wp_version, '-src' ) ? '' : '.min';
+               $mce_suffix = false !== strpos( get_bloginfo( 'version' ), '-src' ) ? '' : '.min';
 
                if ( $tmce_on ) {
                        if ( $compressed ) {
@@ -1259,14 +1285,6 @@ final class _WP_Editors {
                        var init, id, $wrap;
 
                        if ( typeof tinymce !== 'undefined' ) {
-                               // Fix RTL
-                               tinymce.on( 'addeditor', function( event ) {
-                                       event.editor.rtl = event.editor.settings.rtl_ui ||
-                                               ( event.editor.editorManager &&
-                                               event.editor.editorManager.i18n &&
-                                               event.editor.editorManager.i18n.rtl );
-                               }, true );
-
                                for ( id in tinyMCEPreInit.mceInit ) {
                                        init = tinyMCEPreInit.mceInit[id];
                                        $wrap = tinymce.$( '#wp-' + id + '-wrap' );
index 17a976f2e6f32662a19988a3a42c4819b434dbd4..a8ce4d6c783b4d6fd013b65eb5094b2d0730d90b 100644 (file)
@@ -384,4 +384,3 @@ class WP_Embed {
                return apply_filters( 'embed_maybe_make_link', $output, $url );
        }
 }
-$GLOBALS['wp_embed'] = new WP_Embed();
index 1010adb047e6ac4bf8770befbee5e957ad3033b4..22273f89b23fd649604d5166914187c49e37246b 100644 (file)
@@ -202,17 +202,3 @@ class WP_Error {
                unset( $this->error_data[ $code ] );
        }
 }
-
-/**
- * Check whether variable is a WordPress Error.
- *
- * Returns true if $thing is an object of the WP_Error class.
- *
- * @since 2.1.0
- *
- * @param mixed $thing Check if unknown variable is a WP_Error object.
- * @return bool True, if WP_Error. False, if not WP_Error.
- */
-function is_wp_error( $thing ) {
-       return ( $thing instanceof WP_Error );
-}
diff --git a/wp-includes/class-wp-feed-cache-transient.php b/wp-includes/class-wp-feed-cache-transient.php
new file mode 100644 (file)
index 0000000..1b5be47
--- /dev/null
@@ -0,0 +1,141 @@
+<?php
+/**
+ * Feed API: WP_Feed_Cache_Transient class
+ *
+ * @package WordPress
+ * @subpackage Feed
+ * @since 4.7.0
+ */
+
+/**
+ * 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;
+
+       /**
+        * 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'.
+        */
+       public function __construct($location, $filename, $extension) {
+               $this->name = 'feed_' . $filename;
+               $this->mod_name = 'feed_mod_' . $filename;
+
+               $lifetime = $this->lifetime;
+               /**
+                * Filters the transient lifetime of the feed cache.
+                *
+                * @since 2.8.0
+                *
+                * @param int    $lifetime Cache duration in seconds. Default is 43200 seconds (12 hours).
+                * @param string $filename Unique identifier for the cache object.
+                */
+               $this->lifetime = apply_filters( 'wp_feed_cache_transient_lifetime', $lifetime, $filename);
+       }
+
+       /**
+        * Sets the transient.
+        *
+        * @since 2.8.0
+        * @access public
+        *
+        * @param SimplePie $data Data to save.
+        * @return true Always true.
+        */
+       public function save($data) {
+               if ( $data instanceof SimplePie ) {
+                       $data = $data->data;
+               }
+
+               set_transient($this->name, $data, $this->lifetime);
+               set_transient($this->mod_name, time(), $this->lifetime);
+               return true;
+       }
+
+       /**
+        * 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);
+               delete_transient($this->mod_name);
+               return true;
+       }
+}
diff --git a/wp-includes/class-wp-feed-cache.php b/wp-includes/class-wp-feed-cache.php
new file mode 100644 (file)
index 0000000..337d3f3
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Feed API: WP_Feed_Cache class
+ *
+ * @package WordPress
+ * @subpackage Feed
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to implement a feed cache.
+ *
+ * @since 2.8.0
+ *
+ * @see SimplePie_Cache
+ */
+class WP_Feed_Cache extends SimplePie_Cache {
+
+       /**
+        * Creates a new SimplePie_Cache object.
+        *
+        * @since 2.8.0
+        * @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'.
+        * @return WP_Feed_Cache_Transient Feed cache handler object that uses transients.
+        */
+       public function create($location, $filename, $extension) {
+               return new WP_Feed_Cache_Transient($location, $filename, $extension);
+       }
+}
diff --git a/wp-includes/class-wp-hook.php b/wp-includes/class-wp-hook.php
new file mode 100644 (file)
index 0000000..80b93ef
--- /dev/null
@@ -0,0 +1,535 @@
+<?php
+/**
+ * Plugin API: WP_Hook class
+ *
+ * @package WordPress
+ * @subpackage Plugin
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to implement action and filter hook functionality.
+ *
+ * @since 4.7.0
+ *
+ * @see Iterator
+ * @see ArrayAccess
+ */
+final class WP_Hook implements Iterator, ArrayAccess {
+
+       /**
+        * Hook callbacks.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var array
+        */
+       public $callbacks = array();
+
+       /**
+        * The priority keys of actively running iterations of a hook.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var array
+        */
+       private $iterations = array();
+
+       /**
+        * The current priority of actively running iterations of a hook.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var array
+        */
+       private $current_priority = array();
+
+       /**
+        * Number of levels this hook can be recursively called.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var int
+        */
+       private $nesting_level = 0;
+
+       /**
+        * Flag for if we're current doing an action, rather than a filter.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var bool
+        */
+       private $doing_action = false;
+
+       /**
+        * Hooks a function or method to a specific filter action.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param string   $tag             The name of the filter to hook the $function_to_add callback to.
+        * @param callable $function_to_add The callback to be run when the filter is applied.
+        * @param int      $priority        The order in which the functions associated with a
+        *                                  particular action are executed. Lower numbers correspond with
+        *                                  earlier execution, and functions with the same priority are executed
+        *                                  in the order in which they were added to the action.
+        * @param int      $accepted_args   The number of arguments the function accepts.
+        */
+       public function add_filter( $tag, $function_to_add, $priority, $accepted_args ) {
+               $idx = _wp_filter_build_unique_id( $tag, $function_to_add, $priority );
+               $priority_existed = isset( $this->callbacks[ $priority ] );
+
+               $this->callbacks[ $priority ][ $idx ] = array(
+                       'function' => $function_to_add,
+                       'accepted_args' => $accepted_args
+               );
+
+               // if we're adding a new priority to the list, put them back in sorted order
+               if ( ! $priority_existed && count( $this->callbacks ) > 1 ) {
+                       ksort( $this->callbacks, SORT_NUMERIC );
+               }
+
+               if ( $this->nesting_level > 0 ) {
+                       $this->resort_active_iterations( $priority, $priority_existed );
+               }
+       }
+
+       /**
+        * Handles reseting callback priority keys mid-iteration.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @param bool|int $new_priority     Optional. The priority of the new filter being added. Default false,
+        *                                   for no priority being added.
+        * @param bool     $priority_existed Optional. Flag for whether the priority already existed before the new
+        *                                   filter was added. Default false.
+        */
+       private function resort_active_iterations( $new_priority = false, $priority_existed = false ) {
+               $new_priorities = array_keys( $this->callbacks );
+
+               // If there are no remaining hooks, clear out all running iterations.
+               if ( ! $new_priorities ) {
+                       foreach ( $this->iterations as $index => $iteration ) {
+                               $this->iterations[ $index ] = $new_priorities;
+                       }
+                       return;
+               }
+
+               $min = min( $new_priorities );
+               foreach ( $this->iterations as $index => &$iteration ) {
+                       $current = current( $iteration );
+                       // If we're already at the end of this iteration, just leave the array pointer where it is.
+                       if ( false === $current ) {
+                               continue;
+                       }
+
+                       $iteration = $new_priorities;
+
+                       if ( $current < $min ) {
+                               array_unshift( $iteration, $current );
+                               continue;
+                       }
+
+                       while ( current( $iteration ) < $current ) {
+                               if ( false === next( $iteration ) ) {
+                                       break;
+                               }
+                       }
+
+                       // If we have a new priority that didn't exist, but ::apply_filters() or ::do_action() thinks it's the current priority...
+                       if ( $new_priority === $this->current_priority[ $index ] && ! $priority_existed ) {
+                               /*
+                                * ... and the new priority is the same as what $this->iterations thinks is the previous
+                                * priority, we need to move back to it.
+                                */
+
+                               if ( false === current( $iteration ) ) {
+                                       // If we've already moved off the end of the array, go back to the last element.
+                                       $prev = end( $iteration );
+                               } else {
+                                       // Otherwise, just go back to the previous element.
+                                       $prev = prev( $iteration );
+                               }
+                               if ( false === $prev ) {
+                                       // Start of the array. Reset, and go about our day.
+                                       reset( $iteration );
+                               } elseif ( $new_priority !== $prev ) {
+                                       // Previous wasn't the same. Move forward again.
+                                       next( $iteration );
+                               }
+                       }
+               }
+               unset( $iteration );
+       }
+
+       /**
+        * Unhooks a function or method from a specific filter action.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param string   $tag                The filter hook to which the function to be removed is hooked. Used
+        *                                     for building the callback ID when SPL is not available.
+        * @param callable $function_to_remove The callback to be removed from running when the filter is applied.
+        * @param int      $priority           The exact priority used when adding the original filter callback.
+        * @return bool Whether the callback existed before it was removed.
+        */
+       public function remove_filter( $tag, $function_to_remove, $priority ) {
+               $function_key = _wp_filter_build_unique_id( $tag, $function_to_remove, $priority );
+
+               $exists = isset( $this->callbacks[ $priority ][ $function_key ] );
+               if ( $exists ) {
+                       unset( $this->callbacks[ $priority ][ $function_key ] );
+                       if ( ! $this->callbacks[ $priority ] ) {
+                               unset( $this->callbacks[ $priority ] );
+                               if ( $this->nesting_level > 0 ) {
+                                       $this->resort_active_iterations();
+                               }
+                       }
+               }
+               return $exists;
+       }
+
+       /**
+        * Checks if a specific action has been registered for this hook.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param callable|bool $function_to_check Optional. The callback to check for. Default false.
+        * @param string        $tag               Optional. The name of the filter hook. Used for building
+        *                                         the callback ID when SPL is not available. Default empty.
+        * @return bool|int The priority of that hook is returned, or false if the function is not attached.
+        */
+       public function has_filter( $tag = '', $function_to_check = false ) {
+               if ( false === $function_to_check ) {
+                       return $this->has_filters();
+               }
+
+               $function_key = _wp_filter_build_unique_id( $tag, $function_to_check, false );
+               if ( ! $function_key ) {
+                       return false;
+               }
+
+               foreach ( $this->callbacks as $priority => $callbacks ) {
+                       if ( isset( $callbacks[ $function_key ] ) ) {
+                               return $priority;
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Checks if any callbacks have been registered for this hook.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return bool True if callbacks have been registered for the current hook, otherwise false.
+        */
+       public function has_filters() {
+               foreach ( $this->callbacks as $callbacks ) {
+                       if ( $callbacks ) {
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+       /**
+        * Removes all callbacks from the current filter.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param int|bool $priority Optional. The priority number to remove. Default false.
+        */
+       public function remove_all_filters( $priority = false ) {
+               if ( ! $this->callbacks ) {
+                       return;
+               }
+
+               if ( false === $priority ) {
+                       $this->callbacks = array();
+               } else if ( isset( $this->callbacks[ $priority ] ) ) {
+                       unset( $this->callbacks[ $priority ] );
+               }
+
+               if ( $this->nesting_level > 0 ) {
+                       $this->resort_active_iterations();
+               }
+       }
+
+       /**
+        * Calls the callback functions added to a filter hook.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param mixed $value The value to filter.
+        * @param array $args  Arguments to pass to callbacks.
+        * @return mixed The filtered value after all hooked functions are applied to it.
+        */
+       public function apply_filters( $value, $args ) {
+               if ( ! $this->callbacks ) {
+                       return $value;
+               }
+
+               $nesting_level = $this->nesting_level++;
+
+               $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
+               $num_args = count( $args );
+
+               do {
+                       $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
+
+                       foreach ( $this->callbacks[ $priority ] as $the_ ) {
+                               if( ! $this->doing_action ) {
+                                       $args[ 0 ] = $value;
+                               }
+
+                               // Avoid the array_slice if possible.
+                               if ( $the_['accepted_args'] == 0 ) {
+                                       $value = call_user_func_array( $the_['function'], array() );
+                               } elseif ( $the_['accepted_args'] >= $num_args ) {
+                                       $value = call_user_func_array( $the_['function'], $args );
+                               } else {
+                                       $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
+                               }
+                       }
+               } while ( false !== next( $this->iterations[ $nesting_level ] ) );
+
+               unset( $this->iterations[ $nesting_level ] );
+               unset( $this->current_priority[ $nesting_level ] );
+
+               $this->nesting_level--;
+
+               return $value;
+       }
+
+       /**
+        * Executes the callback functions hooked on a specific action hook.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param mixed $args Arguments to pass to the hook callbacks.
+        */
+       public function do_action( $args ) {
+               $this->doing_action = true;
+               $this->apply_filters( '', $args );
+
+               // If there are recursive calls to the current action, we haven't finished it until we get to the last one.
+               if ( ! $this->nesting_level ) {
+                       $this->doing_action = false;
+               }
+       }
+
+       /**
+        * Processes the functions hooked into the 'all' hook.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param array $args Arguments to pass to the hook callbacks. Passed by reference.
+        */
+       public function do_all_hook( &$args ) {
+               $nesting_level = $this->nesting_level++;
+               $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
+
+               do {
+                       $priority = current( $this->iterations[ $nesting_level ] );
+                       foreach ( $this->callbacks[ $priority ] as $the_ ) {
+                               call_user_func_array( $the_['function'], $args );
+                       }
+               } while ( false !== next( $this->iterations[ $nesting_level ] ) );
+
+               unset( $this->iterations[ $nesting_level ] );
+               $this->nesting_level--;
+       }
+
+       /**
+        * Return the current priority level of the currently running iteration of the hook.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return int|false If the hook is running, return the current priority level. If it isn't running, return false.
+        */
+       public function current_priority() {
+               if ( false === current( $this->iterations ) ) {
+                       return false;
+               }
+
+               return current( current( $this->iterations ) );
+       }
+
+       /**
+        * Normalizes filters set up before WordPress has initialized to WP_Hook objects.
+        *
+        * @since 4.7.0
+        * @access public
+        * @static
+        *
+        * @param array $filters Filters to normalize.
+        * @return WP_Hook[] Array of normalized filters.
+        */
+       public static function build_preinitialized_hooks( $filters ) {
+               /** @var WP_Hook[] $normalized */
+               $normalized = array();
+
+               foreach ( $filters as $tag => $callback_groups ) {
+                       if ( is_object( $callback_groups ) && $callback_groups instanceof WP_Hook ) {
+                               $normalized[ $tag ] = $callback_groups;
+                               continue;
+                       }
+                       $hook = new WP_Hook();
+
+                       // Loop through callback groups.
+                       foreach ( $callback_groups as $priority => $callbacks ) {
+
+                               // Loop through callbacks.
+                               foreach ( $callbacks as $cb ) {
+                                       $hook->add_filter( $tag, $cb['function'], $priority, $cb['accepted_args'] );
+                               }
+                       }
+                       $normalized[ $tag ] = $hook;
+               }
+               return $normalized;
+       }
+
+       /**
+        * Determines whether an offset value exists.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @link http://php.net/manual/en/arrayaccess.offsetexists.php
+        *
+        * @param mixed $offset An offset to check for.
+        * @return bool True if the offset exists, false otherwise.
+        */
+       public function offsetExists( $offset ) {
+               return isset( $this->callbacks[ $offset ] );
+       }
+
+       /**
+        * Retrieves a value at a specified offset.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @link http://php.net/manual/en/arrayaccess.offsetget.php
+        *
+        * @param mixed $offset The offset to retrieve.
+        * @return mixed If set, the value at the specified offset, null otherwise.
+        */
+       public function offsetGet( $offset ) {
+               return isset( $this->callbacks[ $offset ] ) ? $this->callbacks[ $offset ] : null;
+       }
+
+       /**
+        * Sets a value at a specified offset.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @link http://php.net/manual/en/arrayaccess.offsetset.php
+        *
+        * @param mixed $offset The offset to assign the value to.
+        * @param mixed $value The value to set.
+        */
+       public function offsetSet( $offset, $value ) {
+               if ( is_null( $offset ) ) {
+                       $this->callbacks[] = $value;
+               } else {
+                       $this->callbacks[ $offset ] = $value;
+               }
+       }
+
+       /**
+        * Unsets a specified offset.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @link http://php.net/manual/en/arrayaccess.offsetunset.php
+        *
+        * @param mixed $offset The offset to unset.
+        */
+       public function offsetUnset( $offset ) {
+               unset( $this->callbacks[ $offset ] );
+       }
+
+       /**
+        * Returns the current element.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @link http://php.net/manual/en/iterator.current.php
+        *
+        * @return array Of callbacks at current priority.
+        */
+       public function current() {
+               return current( $this->callbacks );
+       }
+
+       /**
+        * Moves forward to the next element.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @link http://php.net/manual/en/iterator.next.php
+        *
+        * @return array Of callbacks at next priority.
+        */
+       public function next() {
+               return next( $this->callbacks );
+       }
+
+       /**
+        * Returns the key of the current element.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @link http://php.net/manual/en/iterator.key.php
+        *
+        * @return mixed Returns current priority on success, or NULL on failure
+        */
+       public function key() {
+               return key( $this->callbacks );
+       }
+
+       /**
+        * Checks if current position is valid.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @link http://php.net/manual/en/iterator.valid.php
+        *
+        * @return boolean
+        */
+       public function valid() {
+               return key( $this->callbacks ) !== null;
+       }
+
+       /**
+        * Rewinds the Iterator to the first element.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @link http://php.net/manual/en/iterator.rewind.php
+        */
+       public function rewind() {
+               reset( $this->callbacks );
+       }
+
+}
diff --git a/wp-includes/class-wp-http-requests-hooks.php b/wp-includes/class-wp-http-requests-hooks.php
new file mode 100644 (file)
index 0000000..108fae8
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+/**
+ * HTTP API: Requests hook bridge class
+ *
+ * @package WordPress
+ * @subpackage HTTP
+ * @since 4.7.0
+ */
+
+/**
+ * Bridge to connect Requests internal hooks to WordPress actions.
+ *
+ * @package WordPress
+ * @subpackage HTTP
+ * @since 4.7.0
+ */
+class WP_HTTP_Requests_Hooks extends Requests_Hooks {
+       /**
+        * Requested URL.
+        *
+        * @var string Requested URL.
+        */
+       protected $url;
+
+       /**
+        * WordPress WP_HTTP request data.
+        *
+        * @var array Request data in WP_Http format.
+        */
+       protected $request = array();
+
+       /**
+        * Constructor.
+        *
+        * @param string $url URL to request.
+        * @param array $request Request data in WP_Http format.
+        */
+       public function __construct( $url, $request ) {
+               $this->url = $url;
+               $this->request = $request;
+       }
+
+       /**
+        * Dispatch a Requests hook to a native WordPress action.
+        *
+        * @param string $hook Hook name.
+        * @param array $parameters Parameters to pass to callbacks.
+        * @return boolean True if hooks were run, false if nothing was hooked.
+        */
+       public function dispatch( $hook, $parameters = array() ) {
+               $result = parent::dispatch( $hook, $parameters );
+
+               // Handle back-compat actions
+               switch ( $hook ) {
+                       case 'curl.before_send':
+                               /** This action is documented in wp-includes/class-wp-http-curl.php */
+                               do_action_ref_array( 'http_api_curl', array( $parameters[0], $this->request, $this->url ) );
+                               break;
+               }
+
+               /**
+                * Transforms a native Request hook to a WordPress actions.
+                *
+                * This action maps Requests internal hook to a native WordPress action.
+                *
+                * @see https://github.com/rmccue/Requests/blob/master/docs/hooks.md
+                *
+                * @param array $parameters Parameters from Requests internal hook.
+                * @param array $request Request data in WP_Http format.
+                * @param string $url URL to request.
+                */
+               do_action_ref_array( "requests-{$hook}", $parameters, $this->request, $this->url );
+
+               return $result;
+       }
+}
index ab0a5cc056e11a5a28b1455a071ab39217bb5a2c..660831919eed0bdcd17c60319de1701fbc88d66f 100644 (file)
@@ -65,17 +65,18 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response {
         * @since 4.6.0
         * @access public
         *
-        * @return array Map of header name to header value.
+        * @see \Requests_Utility_CaseInsensitiveDictionary
+        *
+        * @return \Requests_Utility_CaseInsensitiveDictionary Map of header name to header value.
         */
        public function get_headers() {
-               // Ensure headers remain case-insensitive
+               // 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 {
+                       } else {
                                $converted[ $key ] = $value;
                        }
                }
index e46b01e08036d9688679d33d7128d0467e06dcb9..da83de1d5866d58faf2bed84b771b5150452de9a 100644 (file)
@@ -28,7 +28,7 @@ class WP_HTTP_Response {
         *
         * @since 4.4.0
         * @access public
-        * @var int
+        * @var array
         */
        public $headers;
 
@@ -37,7 +37,7 @@ class WP_HTTP_Response {
         *
         * @since 4.4.0
         * @access public
-        * @var array
+        * @var int
         */
        public $status;
 
index 82b872d7321406b1921e910aee210fac717c6d39..fc6fc933ae383bcd6e10c1b498a003dd0255f4bd 100644 (file)
@@ -73,6 +73,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
                        'rotateimage',
                        'flipimage',
                        'flopimage',
+                       'readimage',
                );
 
                // Now, test for deep requirements within Imagick.
@@ -144,7 +145,17 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
                wp_raise_memory_limit( 'image' );
 
                try {
-                       $this->image = new Imagick( $this->file );
+                       $this->image = new Imagick();
+                       $file_parts = pathinfo( $this->file );
+                       $filename = $this->file;
+
+                       if ( 'pdf' == strtolower( $file_parts['extension'] ) ) {
+                               $filename = $this->pdf_setup();
+                       }
+
+                       // Reading image after Imagick instantiation because `setResolution`
+                       // only applies correctly before the image is read.
+                       $this->image->readImage( $filename );
 
                        if ( ! $this->image->valid() )
                                return new WP_Error( 'invalid_image', __('File is not an image.'), $this->file);
@@ -727,4 +738,27 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
                return true;
        }
 
+       /**
+        * Sets up Imagick for PDF processing.
+        * Increases rendering DPI and only loads first page.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return string|WP_Error File to load or WP_Error on failure.
+        */
+       protected function pdf_setup() {
+               try {
+                       // By default, PDFs are rendered in a very low resolution.
+                       // We want the thumbnail to be readable, so increase the rendering DPI.
+                       $this->image->setResolution( 128, 128 );
+
+                       // Only load the first page.
+                       return $this->file . '[0]';
+               }
+               catch ( Exception $e ) {
+                       return new WP_Error( 'pdf_setup_failed', $e->getMessage(), $this->file );
+               }
+       }
+
 }
index c046823e9fc73652da7bd298f9b05f019723d622..cc991eb8a9cb9e059a20728c31fc476944b18161 100644 (file)
@@ -346,12 +346,8 @@ abstract class WP_Image_Editor {
                }
 
                if ( $filename ) {
-                       $ext = '';
-                       $info = pathinfo( $filename );
-                       $dir  = $info['dirname'];
-
-                       if ( isset( $info['extension'] ) )
-                               $ext = $info['extension'];
+                       $dir = pathinfo( $filename, PATHINFO_DIRNAME );
+                       $ext = pathinfo( $filename, PATHINFO_EXTENSION );
 
                        $filename = trailingslashit( $dir ) . wp_basename( $filename, ".$ext" ) . ".{$new_ext}";
                }
@@ -375,9 +371,8 @@ abstract class WP_Image_Editor {
                if ( ! $suffix )
                        $suffix = $this->get_suffix();
 
-               $info = pathinfo( $this->file );
-               $dir  = $info['dirname'];
-               $ext  = $info['extension'];
+               $dir  = pathinfo( $this->file, PATHINFO_DIRNAME );
+               $ext  = pathinfo( $this->file, PATHINFO_EXTENSION );
 
                $name = wp_basename( $this->file, ".$ext" );
                $new_ext = strtolower( $extension ? $extension : $ext );
diff --git a/wp-includes/class-wp-list-util.php b/wp-includes/class-wp-list-util.php
new file mode 100644 (file)
index 0000000..4af814d
--- /dev/null
@@ -0,0 +1,267 @@
+<?php
+/**
+ * WordPress List utility class
+ *
+ * @package WordPress
+ * @since 4.7.0
+ */
+
+/**
+ * List utility.
+ *
+ * Utility class to handle operations on an array of objects.
+ *
+ * @since 4.7.0
+ */
+class WP_List_Util {
+       /**
+        * The input array.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var array
+        */
+       private $input = array();
+
+       /**
+        * The output array.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var array
+        */
+       private $output = array();
+
+       /**
+        * Temporary arguments for sorting.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var array
+        */
+       private $orderby = array();
+
+       /**
+        * Constructor.
+        *
+        * Sets the input array.
+        *
+        * @since 4.7.0
+        *
+        * @param array $input Array to perform operations on.
+        */
+       public function __construct( $input ) {
+               $this->output = $this->input = $input;
+       }
+
+       /**
+        * Returns the original input array.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array The input array.
+        */
+       public function get_input() {
+               return $this->input;
+       }
+
+       /**
+        * Returns the output array.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array The output array.
+        */
+       public function get_output() {
+               return $this->output;
+       }
+
+       /**
+        * Filters the list, based on a set of key => value arguments.
+        *
+        * @since 4.7.0
+        *
+        * @param array  $args     Optional. An array of key => value arguments to match
+        *                         against each object. Default empty array.
+        * @param string $operator Optional. The logical operation to perform. 'AND' means
+        *                         all elements from the array must match. 'OR' means only
+        *                         one element needs to match. 'NOT' means no elements may
+        *                         match. Default 'AND'.
+        * @return array Array of found values.
+        */
+       public function filter( $args = array(), $operator = 'AND' ) {
+               if ( empty( $args ) ) {
+                       return $this->output;
+               }
+
+               $operator = strtoupper( $operator );
+
+               if ( ! in_array( $operator, array( 'AND', 'OR', 'NOT' ), true ) ) {
+                       return array();
+               }
+
+               $count = count( $args );
+               $filtered = array();
+
+               foreach ( $this->output as $key => $obj ) {
+                       $to_match = (array) $obj;
+
+                       $matched = 0;
+                       foreach ( $args as $m_key => $m_value ) {
+                               if ( array_key_exists( $m_key, $to_match ) && $m_value == $to_match[ $m_key ] ) {
+                                       $matched++;
+                               }
+                       }
+
+                       if (
+                               ( 'AND' == $operator && $matched == $count ) ||
+                               ( 'OR' == $operator && $matched > 0 ) ||
+                               ( 'NOT' == $operator && 0 == $matched )
+                       ) {
+                               $filtered[$key] = $obj;
+                       }
+               }
+
+               $this->output = $filtered;
+
+               return $this->output;
+       }
+
+       /**
+        * Plucks a certain field out of each object in the list.
+        *
+        * This has the same functionality and prototype of
+        * array_column() (PHP 5.5) but also supports objects.
+        *
+        * @since 4.7.0
+        *
+        * @param int|string $field     Field from the object to place instead of the entire object
+        * @param int|string $index_key Optional. Field from the object to use as keys for the new array.
+        *                              Default null.
+        * @return array Array of found values. If `$index_key` is set, an array of found values with keys
+        *               corresponding to `$index_key`. If `$index_key` is null, array keys from the original
+        *               `$list` will be preserved in the results.
+        */
+       public function pluck( $field, $index_key = null ) {
+               if ( ! $index_key ) {
+                       /*
+                        * This is simple. Could at some point wrap array_column()
+                        * if we knew we had an array of arrays.
+                        */
+                       foreach ( $this->output as $key => $value ) {
+                               if ( is_object( $value ) ) {
+                                       $this->output[ $key ] = $value->$field;
+                               } else {
+                                       $this->output[ $key ] = $value[ $field ];
+                               }
+                       }
+                       return $this->output;
+               }
+
+               /*
+                * When index_key is not set for a particular item, push the value
+                * to the end of the stack. This is how array_column() behaves.
+                */
+               $newlist = array();
+               foreach ( $this->output as $value ) {
+                       if ( is_object( $value ) ) {
+                               if ( isset( $value->$index_key ) ) {
+                                       $newlist[ $value->$index_key ] = $value->$field;
+                               } else {
+                                       $newlist[] = $value->$field;
+                               }
+                       } else {
+                               if ( isset( $value[ $index_key ] ) ) {
+                                       $newlist[ $value[ $index_key ] ] = $value[ $field ];
+                               } else {
+                                       $newlist[] = $value[ $field ];
+                               }
+                       }
+               }
+
+               $this->output = $newlist;
+
+               return $this->output;
+       }
+
+       /**
+        * Sorts the list, based on one or more orderby arguments.
+        *
+        * @since 4.7.0
+        *
+        * @param string|array $orderby       Optional. Either the field name to order by or an array
+        *                                    of multiple orderby fields as $orderby => $order.
+        * @param string       $order         Optional. Either 'ASC' or 'DESC'. Only used if $orderby
+        *                                    is a string.
+        * @param bool         $preserve_keys Optional. Whether to preserve keys. Default false.
+        * @return array The sorted array.
+        */
+       public function sort( $orderby = array(), $order = 'ASC', $preserve_keys = false ) {
+               if ( empty( $orderby ) ) {
+                       return $this->output;
+               }
+
+               if ( is_string( $orderby ) ) {
+                       $orderby = array( $orderby => $order );
+               }
+
+               foreach ( $orderby as $field => $direction ) {
+                       $orderby[ $field ] = 'DESC' === strtoupper( $direction ) ? 'DESC' : 'ASC';
+               }
+
+               $this->orderby = $orderby;
+
+               if ( $preserve_keys ) {
+                       uasort( $this->output, array( $this, 'sort_callback' ) );
+               } else {
+                       usort( $this->output, array( $this, 'sort_callback' ) );
+               }
+
+               $this->orderby = array();
+
+               return $this->output;
+       }
+
+       /**
+        * Callback to sort the list by specific fields.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @see WP_List_Util::sort()
+        *
+        * @param object|array $a One object to compare.
+        * @param object|array $b The other object to compare.
+        * @return int 0 if both objects equal. -1 if second object should come first, 1 otherwise.
+        */
+       private function sort_callback( $a, $b ) {
+               if ( empty( $this->orderby ) ) {
+                       return 0;
+               }
+
+               $a = (array) $a;
+               $b = (array) $b;
+
+               foreach ( $this->orderby as $field => $direction ) {
+                       if ( ! isset( $a[ $field ] ) || ! isset( $b[ $field ] ) ) {
+                               continue;
+                       }
+
+                       if ( $a[ $field ] == $b[ $field ] ) {
+                               continue;
+                       }
+
+                       $results = 'DESC' === $direction ? array( 1, -1 ) : array( -1, 1 );
+
+                       if ( is_numeric( $a[ $field ] ) && is_numeric( $b[ $field ] ) ) {
+                               return ( $a[ $field ] < $b[ $field ] ) ? $results[0] : $results[1];
+                       }
+
+                       return 0 > strcmp( $a[ $field ], $b[ $field ] ) ? $results[0] : $results[1];
+               }
+
+               return 0;
+       }
+}
diff --git a/wp-includes/class-wp-locale-switcher.php b/wp-includes/class-wp-locale-switcher.php
new file mode 100644 (file)
index 0000000..2b0638d
--- /dev/null
@@ -0,0 +1,240 @@
+<?php
+/**
+ * Locale API: WP_Locale_Switcher class
+ *
+ * @package WordPress
+ * @subpackage i18n
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used for switching locales.
+ *
+ * @since 4.7.0
+ */
+class WP_Locale_Switcher {
+       /**
+        * Locale stack.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var string[]
+        */
+       private $locales = array();
+
+       /**
+        * Original locale.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var string
+        */
+       private $original_locale;
+
+       /**
+        * Holds all available languages.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var array An array of language codes (file names without the .mo extension).
+        */
+       private $available_languages = array();
+
+       /**
+        * Constructor.
+        *
+        * Stores the original locale as well as a list of all available languages.
+        *
+        * @since 4.7.0
+        */
+       public function __construct() {
+               $this->original_locale     = is_admin() ? get_user_locale() : get_locale();
+               $this->available_languages = array_merge( array( 'en_US' ), get_available_languages() );
+       }
+
+       /**
+        * Initializes the locale switcher.
+        *
+        * Hooks into the {@see 'locale'} filter to change the locale on the fly.
+        */
+       public function init() {
+               add_filter( 'locale', array( $this, 'filter_locale' ) );
+       }
+
+       /**
+        * Switches the translations according to the given locale.
+        *
+        * @since 4.7.0
+        *
+        * @param string $locale The locale to switch to.
+        * @return bool True on success, false on failure.
+        */
+       public function switch_to_locale( $locale ) {
+               $current_locale = is_admin() ? get_user_locale() : get_locale();
+               if ( $current_locale === $locale ) {
+                       return false;
+               }
+
+               if ( ! in_array( $locale, $this->available_languages, true ) ) {
+                       return false;
+               }
+
+               $this->locales[] = $locale;
+
+               $this->change_locale( $locale );
+
+               /**
+                * Fires when the locale is switched.
+                *
+                * @since 4.7.0
+                *
+                * @param string $locale The new locale.
+                */
+               do_action( 'switch_locale', $locale );
+
+               return true;
+       }
+
+       /**
+        * Restores the translations according to the previous locale.
+        *
+        * @since 4.7.0
+        *
+        * @return string|false Locale on success, false on failure.
+        */
+       public function restore_previous_locale() {
+               $previous_locale = array_pop( $this->locales );
+
+               if ( null === $previous_locale ) {
+                       // The stack is empty, bail.
+                       return false;
+               }
+
+               $locale = end( $this->locales );
+
+               if ( ! $locale ) {
+                       // There's nothing left in the stack: go back to the original locale.
+                       $locale = $this->original_locale;
+               }
+
+               $this->change_locale( $locale );
+
+               /**
+                * Fires when the locale is restored to the previous one.
+                *
+                * @since 4.7.0
+                *
+                * @param string $locale          The new locale.
+                * @param string $previous_locale The previous locale.
+                */
+               do_action( 'restore_previous_locale', $locale, $previous_locale );
+
+               return $locale;
+       }
+
+       /**
+        * Restores the translations according to the original locale.
+        *
+        * @since 4.7.0
+        *
+        * @return string|false Locale on success, false on failure.
+        */
+       public function restore_current_locale() {
+               if ( empty( $this->locales ) ) {
+                       return false;
+               }
+
+               $this->locales = array( $this->original_locale );
+
+               return $this->restore_previous_locale();
+       }
+
+       /**
+        * Whether switch_to_locale() is in effect.
+        *
+        * @since 4.7.0
+        *
+        * @return bool True if the locale has been switched, false otherwise.
+        */
+       public function is_switched() {
+               return ! empty( $this->locales );
+       }
+
+       /**
+        * Filters the WordPress install's locale.
+        *
+        * @since 4.7.0
+        *
+        * @param string $locale The WordPress install's locale.
+        * @return string The locale currently being switched to.
+        */
+       public function filter_locale( $locale ) {
+               $switched_locale = end( $this->locales );
+
+               if ( $switched_locale ) {
+                       return $switched_locale;
+               }
+
+               return $locale;
+       }
+
+       /**
+        * Load translations for a given locale.
+        *
+        * When switching to a locale, translations for this locale must be loaded from scratch.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @global Mo[] $l10n An array of all currently loaded text domains.
+        *
+        * @param string $locale The locale to load translations for.
+        */
+       private function load_translations( $locale ) {
+               global $l10n;
+
+               $domains = $l10n ? array_keys( $l10n ) : array();
+
+               load_default_textdomain( $locale );
+
+               foreach ( $domains as $domain ) {
+                       if ( 'default' === $domain ) {
+                               continue;
+                       }
+
+                       unload_textdomain( $domain );
+                       get_translations_for_domain( $domain );
+               }
+       }
+
+       /**
+        * Changes the site's locale to the given one.
+        *
+        * Loads the translations, changes the global `$wp_locale` object and updates
+        * all post type labels.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @global WP_Locale $wp_locale The WordPress date and time locale object.
+        *
+        * @param string $locale The locale to change to.
+        */
+       private function change_locale( $locale ) {
+               // Reset translation availability information.
+               _get_path_to_translation( null, true );
+
+               $this->load_translations( $locale );
+
+               $GLOBALS['wp_locale'] = new WP_Locale();
+
+               /**
+                * Fires when the locale is switched to or restored.
+                *
+                * @since 4.7.0
+                *
+                * @param string $locale The new locale.
+                */
+               do_action( 'change_locale', $locale );
+       }
+}
index e8dcfc64882a333e5aba4dbaac823bb5cdb04413..2cc6afaa00d79710ba98889813c0f4c75bb52266 100644 (file)
@@ -59,6 +59,14 @@ class WP_Locale {
         */
        public $month;
 
+       /**
+        * Stores the translated strings for the month names in genitive case, if the locale specifies.
+        *
+        * @since 4.4.0
+        * @var array
+        */
+       public $month_genitive;
+
        /**
         * Stores the translated strings for the abbreviated month names.
         *
@@ -117,7 +125,6 @@ class WP_Locale {
         * @access private
         *
         * @global string $text_direction
-        * @global string $wp_version
         */
        public function init() {
                // The Weekdays
@@ -223,7 +230,7 @@ class WP_Locale {
                elseif ( 'rtl' == _x( 'ltr', 'text direction' ) )
                        $this->text_direction = 'rtl';
 
-               if ( 'rtl' === $this->text_direction && strpos( $GLOBALS['wp_version'], '-src' ) ) {
+               if ( 'rtl' === $this->text_direction && strpos( get_bloginfo( 'version' ), '-src' ) ) {
                        $this->text_direction = 'ltr';
                        add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) );
                }
diff --git a/wp-includes/class-wp-matchesmapregex.php b/wp-includes/class-wp-matchesmapregex.php
new file mode 100644 (file)
index 0000000..86ebb25
--- /dev/null
@@ -0,0 +1,97 @@
+<?php
+/**
+ * WP_MatchesMapRegex helper class
+ *
+ * @package WordPress
+ * @since 4.7.0
+ */
+
+/**
+ * Helper class to remove the need to use eval to replace $matches[] in query strings.
+ *
+ * @since 2.9.0
+ */
+class WP_MatchesMapRegex {
+       /**
+        * store for matches
+        *
+        * @access private
+        * @var array
+        */
+       private $_matches;
+
+       /**
+        * store for mapping result
+        *
+        * @access public
+        * @var string
+        */
+       public $output;
+
+       /**
+        * subject to perform mapping on (query string containing $matches[] references
+        *
+        * @access private
+        * @var string
+        */
+       private $_subject;
+
+       /**
+        * regexp pattern to match $matches[] references
+        *
+        * @var string
+        */
+       public $_pattern = '(\$matches\[[1-9]+[0-9]*\])'; // magic number
+
+       /**
+        * constructor
+        *
+        * @param string $subject subject if regex
+        * @param array  $matches data to use in map
+        */
+       public function __construct($subject, $matches) {
+               $this->_subject = $subject;
+               $this->_matches = $matches;
+               $this->output = $this->_map();
+       }
+
+       /**
+        * Substitute substring matches in subject.
+        *
+        * static helper function to ease use
+        *
+        * @static
+        * @access public
+        *
+        * @param string $subject subject
+        * @param array  $matches data used for substitution
+        * @return string
+        */
+       public static function apply($subject, $matches) {
+               $oSelf = new WP_MatchesMapRegex($subject, $matches);
+               return $oSelf->output;
+       }
+
+       /**
+        * do the actual mapping
+        *
+        * @access private
+        * @return string
+        */
+       private function _map() {
+               $callback = array($this, 'callback');
+               return preg_replace_callback($this->_pattern, $callback, $this->_subject);
+       }
+
+       /**
+        * preg_replace_callback hook
+        *
+        * @access public
+        * @param  array $matches preg_replace regexp matches
+        * @return string
+        */
+       public function callback($matches) {
+               $index = intval(substr($matches[0], 9, -1));
+               return ( isset( $this->_matches[$index] ) ? urlencode($this->_matches[$index]) : '' );
+       }
+}
index 7f8954ca40ea132959fa32013de79996b17c32e9..1bf38ad7e2e5706cd093b44acaf0ddc69b4a73c8 100644 (file)
@@ -103,7 +103,7 @@ class WP_Network_Query {
         *                                              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          $number               Maximum number of networks to retrieve. Default empty (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.
@@ -111,12 +111,10 @@ class WP_Network_Query {
         *                                              '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 string       $domain               Limit results to those affiliated with a given domain. Default empty.
         *     @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 string       $path                 Limit results to those affiliated with a given path. Default empty.
         *     @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.
@@ -211,11 +209,7 @@ class WP_Network_Query {
 
                // $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' );
-               }
+               $last_changed = wp_cache_get_last_changed( 'networks' );
 
                $cache_key = "get_network_ids:$key:$last_changed";
                $cache_value = wp_cache_get( $cache_key, 'networks' );
index c08ca5e5bc994a7b333726b454f05dff8c15b4a1..0b1d3c00e9d780761c139d4f0590fe6586cd5ab6 100644 (file)
@@ -366,7 +366,7 @@ final class WP_Post_Type {
                $args = wp_parse_args( $args );
 
                /**
-                * Filter the arguments for registering a post type.
+                * Filters the arguments for registering a post type.
                 *
                 * @since 4.4.0
                 *
index 5904e588d04cf127b7ea087a31b8f3f13db823b4..c966934899b110507819c9818d102e9dddece9da 100644 (file)
@@ -210,9 +210,11 @@ final class WP_Post {
        public static function get_instance( $post_id ) {
                global $wpdb;
 
-               $post_id = (int) $post_id;
-               if ( ! $post_id )
+               if ( ! is_numeric( $post_id ) || $post_id != floor( $post_id ) || ! $post_id ) {
                        return false;
+               }
+
+               $post_id = (int) $post_id;
 
                $_post = wp_cache_get( $post_id, 'posts' );
 
@@ -252,7 +254,7 @@ final class WP_Post {
                        return true;
 
                if ( 'page_template' == $key )
-                       return ( 'page' == $this->post_type );
+                       return true;
 
                if ( 'post_category' == $key )
                   return true;
diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php
new file mode 100644 (file)
index 0000000..7f3c22a
--- /dev/null
@@ -0,0 +1,4107 @@
+<?php
+/**
+ * Query API: WP_Query class
+ *
+ * @package WordPress
+ * @subpackage Query
+ * @since 4.7.0
+ */
+
+/**
+ * The WordPress Query class.
+ *
+ * @link https://codex.wordpress.org/Function_Reference/WP_Query Codex page.
+ *
+ * @since 1.5.0
+ * @since 4.5.0 Removed the `$comments_popup` property.
+ */
+class WP_Query {
+
+       /**
+        * Query vars set by the user
+        *
+        * @since 1.5.0
+        * @access public
+        * @var array
+        */
+       public $query;
+
+       /**
+        * Query vars, after parsing
+        *
+        * @since 1.5.0
+        * @access public
+        * @var array
+        */
+       public $query_vars = array();
+
+       /**
+        * Taxonomy query, as passed to get_tax_sql()
+        *
+        * @since 3.1.0
+        * @access public
+        * @var object WP_Tax_Query
+        */
+       public $tax_query;
+
+       /**
+        * Metadata query container
+        *
+        * @since 3.2.0
+        * @access public
+        * @var object WP_Meta_Query
+        */
+       public $meta_query = false;
+
+       /**
+        * Date query container
+        *
+        * @since 3.7.0
+        * @access public
+        * @var object WP_Date_Query
+        */
+       public $date_query = false;
+
+       /**
+        * Holds the data for a single object that is queried.
+        *
+        * Holds the contents of a post, page, category, attachment.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var object|array
+        */
+       public $queried_object;
+
+       /**
+        * The ID of the queried object.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var int
+        */
+       public $queried_object_id;
+
+       /**
+        * Get post database query.
+        *
+        * @since 2.0.1
+        * @access public
+        * @var string
+        */
+       public $request;
+
+       /**
+        * List of posts.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var array
+        */
+       public $posts;
+
+       /**
+        * The amount of posts for the current query.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var int
+        */
+       public $post_count = 0;
+
+       /**
+        * Index of the current item in the loop.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var int
+        */
+       public $current_post = -1;
+
+       /**
+        * Whether the loop has started and the caller is in the loop.
+        *
+        * @since 2.0.0
+        * @access public
+        * @var bool
+        */
+       public $in_the_loop = false;
+
+       /**
+        * The current post.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var WP_Post
+        */
+       public $post;
+
+       /**
+        * The list of comments for current post.
+        *
+        * @since 2.2.0
+        * @access public
+        * @var array
+        */
+       public $comments;
+
+       /**
+        * The amount of comments for the posts.
+        *
+        * @since 2.2.0
+        * @access public
+        * @var int
+        */
+       public $comment_count = 0;
+
+       /**
+        * The index of the comment in the comment loop.
+        *
+        * @since 2.2.0
+        * @access public
+        * @var int
+        */
+       public $current_comment = -1;
+
+       /**
+        * Current comment ID.
+        *
+        * @since 2.2.0
+        * @access public
+        * @var int
+        */
+       public $comment;
+
+       /**
+        * The amount of found posts for the current query.
+        *
+        * If limit clause was not used, equals $post_count.
+        *
+        * @since 2.1.0
+        * @access public
+        * @var int
+        */
+       public $found_posts = 0;
+
+       /**
+        * The amount of pages.
+        *
+        * @since 2.1.0
+        * @access public
+        * @var int
+        */
+       public $max_num_pages = 0;
+
+       /**
+        * The amount of comment pages.
+        *
+        * @since 2.7.0
+        * @access public
+        * @var int
+        */
+       public $max_num_comment_pages = 0;
+
+       /**
+        * Set if query is single post.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_single = false;
+
+       /**
+        * Set if query is preview of blog.
+        *
+        * @since 2.0.0
+        * @access public
+        * @var bool
+        */
+       public $is_preview = false;
+
+       /**
+        * Set if query returns a page.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_page = false;
+
+       /**
+        * Set if query is an archive list.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_archive = false;
+
+       /**
+        * Set if query is part of a date.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_date = false;
+
+       /**
+        * Set if query contains a year.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_year = false;
+
+       /**
+        * Set if query contains a month.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_month = false;
+
+       /**
+        * Set if query contains a day.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_day = false;
+
+       /**
+        * Set if query contains time.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_time = false;
+
+       /**
+        * Set if query contains an author.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_author = false;
+
+       /**
+        * Set if query contains category.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_category = false;
+
+       /**
+        * Set if query contains tag.
+        *
+        * @since 2.3.0
+        * @access public
+        * @var bool
+        */
+       public $is_tag = false;
+
+       /**
+        * Set if query contains taxonomy.
+        *
+        * @since 2.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_tax = false;
+
+       /**
+        * Set if query was part of a search result.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_search = false;
+
+       /**
+        * Set if query is feed display.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_feed = false;
+
+       /**
+        * Set if query is comment feed display.
+        *
+        * @since 2.2.0
+        * @access public
+        * @var bool
+        */
+       public $is_comment_feed = false;
+
+       /**
+        * Set if query is trackback.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_trackback = false;
+
+       /**
+        * Set if query is blog homepage.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_home = false;
+
+       /**
+        * Set if query couldn't found anything.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_404 = false;
+
+       /**
+        * Set if query is embed.
+        *
+        * @since 4.4.0
+        * @access public
+        * @var bool
+        */
+       public $is_embed = false;
+
+       /**
+        * Set if query is paged
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_paged = false;
+
+       /**
+        * Set if query is part of administration page.
+        *
+        * @since 1.5.0
+        * @access public
+        * @var bool
+        */
+       public $is_admin = false;
+
+       /**
+        * Set if query is an attachment.
+        *
+        * @since 2.0.0
+        * @access public
+        * @var bool
+        */
+       public $is_attachment = false;
+
+       /**
+        * Set if is single, is a page, or is an attachment.
+        *
+        * @since 2.1.0
+        * @access public
+        * @var bool
+        */
+       public $is_singular = false;
+
+       /**
+        * Set if query is for robots.
+        *
+        * @since 2.1.0
+        * @access public
+        * @var bool
+        */
+       public $is_robots = false;
+
+       /**
+        * Set if query contains posts.
+        *
+        * Basically, the homepage if the option isn't set for the static homepage.
+        *
+        * @since 2.1.0
+        * @access public
+        * @var bool
+        */
+       public $is_posts_page = false;
+
+       /**
+        * Set if query is for a post type archive.
+        *
+        * @since 3.1.0
+        * @access public
+        * @var bool
+        */
+       public $is_post_type_archive = false;
+
+       /**
+        * Stores the ->query_vars state like md5(serialize( $this->query_vars ) ) so we know
+        * whether we have to re-parse because something has changed
+        *
+        * @since 3.1.0
+        * @access private
+        * @var bool|string
+        */
+       private $query_vars_hash = false;
+
+       /**
+        * Whether query vars have changed since the initial parse_query() call. Used to catch modifications to query vars made
+        * via pre_get_posts hooks.
+        *
+        * @since 3.1.1
+        * @access private
+        */
+       private $query_vars_changed = true;
+
+       /**
+        * Set if post thumbnails are cached
+        *
+        * @since 3.2.0
+        * @access public
+        * @var bool
+        */
+        public $thumbnails_cached = false;
+
+       /**
+        * Cached list of search stopwords.
+        *
+        * @since 3.7.0
+        * @var array
+        */
+       private $stopwords;
+
+       private $compat_fields = array( 'query_vars_hash', 'query_vars_changed' );
+
+       private $compat_methods = array( 'init_query_flags', 'parse_tax_query' );
+
+       /**
+        * Resets query flags to false.
+        *
+        * The query flags are what page info WordPress was able to figure out.
+        *
+        * @since 2.0.0
+        * @access private
+        */
+       private function init_query_flags() {
+               $this->is_single = false;
+               $this->is_preview = false;
+               $this->is_page = false;
+               $this->is_archive = false;
+               $this->is_date = false;
+               $this->is_year = false;
+               $this->is_month = false;
+               $this->is_day = false;
+               $this->is_time = false;
+               $this->is_author = false;
+               $this->is_category = false;
+               $this->is_tag = false;
+               $this->is_tax = false;
+               $this->is_search = false;
+               $this->is_feed = false;
+               $this->is_comment_feed = false;
+               $this->is_trackback = false;
+               $this->is_home = false;
+               $this->is_404 = false;
+               $this->is_paged = false;
+               $this->is_admin = false;
+               $this->is_attachment = false;
+               $this->is_singular = false;
+               $this->is_robots = false;
+               $this->is_posts_page = false;
+               $this->is_post_type_archive = false;
+       }
+
+       /**
+        * Initiates object properties and sets default values.
+        *
+        * @since 1.5.0
+        * @access public
+        */
+       public function init() {
+               unset($this->posts);
+               unset($this->query);
+               $this->query_vars = array();
+               unset($this->queried_object);
+               unset($this->queried_object_id);
+               $this->post_count = 0;
+               $this->current_post = -1;
+               $this->in_the_loop = false;
+               unset( $this->request );
+               unset( $this->post );
+               unset( $this->comments );
+               unset( $this->comment );
+               $this->comment_count = 0;
+               $this->current_comment = -1;
+               $this->found_posts = 0;
+               $this->max_num_pages = 0;
+               $this->max_num_comment_pages = 0;
+
+               $this->init_query_flags();
+       }
+
+       /**
+        * Reparse the query vars.
+        *
+        * @since 1.5.0
+        * @access public
+        */
+       public function parse_query_vars() {
+               $this->parse_query();
+       }
+
+       /**
+        * Fills in the query variables, which do not exist within the parameter.
+        *
+        * @since 2.1.0
+        * @since 4.4.0 Removed the `comments_popup` public query variable.
+        * @access public
+        *
+        * @param array $array Defined query variables.
+        * @return array Complete query variables with undefined ones filled in empty.
+        */
+       public function fill_query_vars($array) {
+               $keys = array(
+                       'error'
+                       , 'm'
+                       , 'p'
+                       , 'post_parent'
+                       , 'subpost'
+                       , 'subpost_id'
+                       , 'attachment'
+                       , 'attachment_id'
+                       , 'name'
+                       , 'static'
+                       , 'pagename'
+                       , 'page_id'
+                       , 'second'
+                       , 'minute'
+                       , 'hour'
+                       , 'day'
+                       , 'monthnum'
+                       , 'year'
+                       , 'w'
+                       , 'category_name'
+                       , 'tag'
+                       , 'cat'
+                       , 'tag_id'
+                       , 'author'
+                       , 'author_name'
+                       , 'feed'
+                       , 'tb'
+                       , 'paged'
+                       , 'meta_key'
+                       , 'meta_value'
+                       , 'preview'
+                       , 's'
+                       , 'sentence'
+                       , 'title'
+                       , 'fields'
+                       , 'menu_order'
+                       , 'embed'
+               );
+
+               foreach ( $keys as $key ) {
+                       if ( !isset($array[$key]) )
+                               $array[$key] = '';
+               }
+
+               $array_keys = array( 'category__in', 'category__not_in', 'category__and', 'post__in', 'post__not_in', 'post_name__in',
+                       'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'post_parent__in', 'post_parent__not_in',
+                       'author__in', 'author__not_in' );
+
+               foreach ( $array_keys as $key ) {
+                       if ( !isset($array[$key]) )
+                               $array[$key] = array();
+               }
+               return $array;
+       }
+
+       /**
+        * Parse a query string and set query type booleans.
+        *
+        * @since 1.5.0
+        * @since 4.2.0 Introduced the ability to order by specific clauses of a `$meta_query`, by passing the clause's
+        *              array key to `$orderby`.
+        * @since 4.4.0 Introduced `$post_name__in` and `$title` parameters. `$s` was updated to support excluded
+        *              search terms, by prepending a hyphen.
+        * @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 {
+        *     Optional. Array or string of Query parameters.
+        *
+        *     @type int          $attachment_id           Attachment post ID. Used for 'attachment' post_type.
+        *     @type int|string   $author                  Author ID, or comma-separated list of IDs.
+        *     @type string       $author_name             User 'user_nicename'.
+        *     @type array        $author__in              An array of author IDs to query from.
+        *     @type array        $author__not_in          An array of author IDs not to query from.
+        *     @type bool         $cache_results           Whether to cache post information. Default true.
+        *     @type int|string   $cat                     Category ID or comma-separated list of IDs (this or any children).
+        *     @type array        $category__and           An array of category IDs (AND in).
+        *     @type array        $category__in            An array of category IDs (OR in, no children).
+        *     @type array        $category__not_in        An array of category IDs (NOT in).
+        *     @type string       $category_name           Use category slug (not name, this or any children).
+        *     @type string       $comment_status          Comment status.
+        *     @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().
+        *     @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),
+        *                                                 or array of fields. 'id=>parent' uses 'id' and 'post_parent'.
+        *                                                 Default all fields. Accepts 'ids', 'id=>parent'.
+        *     @type int          $hour                    Hour of the day. Default empty. Accepts numbers 0-23.
+        *     @type int|bool     $ignore_sticky_posts     Whether to ignore sticky posts or not. Setting this to false
+        *                                                 excludes stickies from 'post__in'. Accepts 1|true, 0|false.
+        *                                                 Default 0|false.
+        *     @type int          $m                       Combination YearMonth. Accepts any four-digit year and month
+        *                                                 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 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.
+        *     @type int          $monthnum                The two-digit month. Default empty. Accepts numbers 1-12.
+        *     @type string       $name                    Post slug.
+        *     @type bool         $nopaging                Show all posts (true) or paginate (false). Default false.
+        *     @type bool         $no_found_rows           Whether to skip counting the total rows found. Enabling can improve
+        *                                                 performance. Default false.
+        *     @type int          $offset                  The number of posts to offset before retrieval.
+        *     @type string       $order                   Designates ascending or descending order of posts. Default 'DESC'.
+        *                                                 Accepts 'ASC', 'DESC'.
+        *     @type string|array $orderby                 Sort retrieved posts by parameter. One or more options may be
+        *                                                 passed. To use 'meta_value', or 'meta_value_num',
+        *                                                 'meta_key=keyname' must be also be defined. To sort by a
+        *                                                 specific `$meta_query` clause, use that clause's array key.
+        *                                                 Default 'date'. Accepts 'none', 'name', 'author', 'date',
+        *                                                 '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',
+        *                                                 '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.
+        *     @type int          $paged                   The number of the current page.
+        *     @type int          $page_id                 Page ID.
+        *     @type string       $pagename                Page slug.
+        *     @type string       $perm                    Show posts if user has the appropriate capability.
+        *     @type string       $ping_status             Ping status.
+        *     @type array        $post__in                An array of post IDs to retrieve, sticky posts will be included
+        *     @type string       $post_mime_type          The mime type of the post. Used for 'attachment' post_type.
+        *     @type array        $post__not_in            An array of post IDs not to retrieve. Note: a string of comma-
+        *                                                 separated IDs will NOT work.
+        *     @type int          $post_parent             Page ID to retrieve child pages for. Use 0 to only retrieve
+        *                                                 top-level pages.
+        *     @type array        $post_parent__in         An array containing parent page IDs to query child pages from.
+        *     @type array        $post_parent__not_in     An array containing parent page IDs not to query child pages from.
+        *     @type string|array $post_type               A post type slug (string) or array of post type slugs.
+        *                                                 Default 'any' if using 'tax_query'.
+        *     @type string|array $post_status             A post status (string) or array of post statuses.
+        *     @type int          $posts_per_page          The number of posts to query for. Use -1 to request all posts.
+        *     @type int          $posts_per_archive_page  The number of posts to query for by archive page. Overrides
+        *                                                 'posts_per_page' when is_archive(), or is_search() are true.
+        *     @type array        $post_name__in           An array of post slugs that results must match.
+        *     @type string       $s                       Search keyword(s). Prepending a term with a hyphen will
+        *                                                 exclude posts matching that term. Eg, 'pillow -sofa' will
+        *                                                 return posts containing 'pillow' but not 'sofa'. The
+        *                                                 character used for exclusion can be modified using the
+        *                                                 the 'wp_query_search_exclusion_prefix' filter.
+        *     @type int          $second                  Second of the minute. Default empty. Accepts numbers 0-60.
+        *     @type bool         $sentence                Whether to search by phrase. Default false.
+        *     @type bool         $suppress_filters        Whether to suppress filters. Default false.
+        *     @type string       $tag                     Tag slug. Comma-separated (either), Plus-separated (all).
+        *     @type array        $tag__and                An array of tag ids (AND in).
+        *     @type array        $tag__in                 An array of tag ids (OR in).
+        *     @type array        $tag__not_in             An array of tag ids (NOT in).
+        *     @type int          $tag_id                  Tag id or comma-separated list of IDs.
+        *     @type array        $tag_slug__and           An array of tag slugs (AND in).
+        *     @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.
+        *     @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.
+        * }
+        */
+       public function parse_query( $query =  '' ) {
+               if ( ! empty( $query ) ) {
+                       $this->init();
+                       $this->query = $this->query_vars = wp_parse_args( $query );
+               } elseif ( ! isset( $this->query ) ) {
+                       $this->query = $this->query_vars;
+               }
+
+               $this->query_vars = $this->fill_query_vars($this->query_vars);
+               $qv = &$this->query_vars;
+               $this->query_vars_changed = true;
+
+               if ( ! empty($qv['robots']) )
+                       $this->is_robots = true;
+
+               if ( ! is_scalar( $qv['p'] ) || $qv['p'] < 0 ) {
+                       $qv['p'] = 0;
+                       $qv['error'] = '404';
+               } else {
+                       $qv['p'] = intval( $qv['p'] );
+               }
+
+               $qv['page_id'] =  absint($qv['page_id']);
+               $qv['year'] = absint($qv['year']);
+               $qv['monthnum'] = absint($qv['monthnum']);
+               $qv['day'] = absint($qv['day']);
+               $qv['w'] = absint($qv['w']);
+               $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
+               $qv['pagename'] = trim( $qv['pagename'] );
+               $qv['name'] = trim( $qv['name'] );
+               $qv['title'] = trim( $qv['title'] );
+               if ( '' !== $qv['hour'] ) $qv['hour'] = absint($qv['hour']);
+               if ( '' !== $qv['minute'] ) $qv['minute'] = absint($qv['minute']);
+               if ( '' !== $qv['second'] ) $qv['second'] = absint($qv['second']);
+               if ( '' !== $qv['menu_order'] ) $qv['menu_order'] = absint($qv['menu_order']);
+
+               // Fairly insane upper bound for search string lengths.
+               if ( ! is_scalar( $qv['s'] ) || ( ! empty( $qv['s'] ) && strlen( $qv['s'] ) > 1600 ) ) {
+                       $qv['s'] = '';
+               }
+
+               // Compat. Map subpost to attachment.
+               if ( '' != $qv['subpost'] )
+                       $qv['attachment'] = $qv['subpost'];
+               if ( '' != $qv['subpost_id'] )
+                       $qv['attachment_id'] = $qv['subpost_id'];
+
+               $qv['attachment_id'] = absint($qv['attachment_id']);
+
+               if ( ('' != $qv['attachment']) || !empty($qv['attachment_id']) ) {
+                       $this->is_single = true;
+                       $this->is_attachment = true;
+               } elseif ( '' != $qv['name'] ) {
+                       $this->is_single = true;
+               } elseif ( $qv['p'] ) {
+                       $this->is_single = true;
+               } elseif ( ('' !== $qv['hour']) && ('' !== $qv['minute']) &&('' !== $qv['second']) && ('' != $qv['year']) && ('' != $qv['monthnum']) && ('' != $qv['day']) ) {
+                       // If year, month, day, hour, minute, and second are set, a single
+                       // post is being queried.
+                       $this->is_single = true;
+               } elseif ( '' != $qv['static'] || '' != $qv['pagename'] || !empty($qv['page_id']) ) {
+                       $this->is_page = true;
+                       $this->is_single = false;
+               } else {
+                       // Look for archive queries. Dates, categories, authors, search, post type archives.
+
+                       if ( isset( $this->query['s'] ) ) {
+                               $this->is_search = true;
+                       }
+
+                       if ( '' !== $qv['second'] ) {
+                               $this->is_time = true;
+                               $this->is_date = true;
+                       }
+
+                       if ( '' !== $qv['minute'] ) {
+                               $this->is_time = true;
+                               $this->is_date = true;
+                       }
+
+                       if ( '' !== $qv['hour'] ) {
+                               $this->is_time = true;
+                               $this->is_date = true;
+                       }
+
+                       if ( $qv['day'] ) {
+                               if ( ! $this->is_date ) {
+                                       $date = sprintf( '%04d-%02d-%02d', $qv['year'], $qv['monthnum'], $qv['day'] );
+                                       if ( $qv['monthnum'] && $qv['year'] && ! wp_checkdate( $qv['monthnum'], $qv['day'], $qv['year'], $date ) ) {
+                                               $qv['error'] = '404';
+                                       } else {
+                                               $this->is_day = true;
+                                               $this->is_date = true;
+                                       }
+                               }
+                       }
+
+                       if ( $qv['monthnum'] ) {
+                               if ( ! $this->is_date ) {
+                                       if ( 12 < $qv['monthnum'] ) {
+                                               $qv['error'] = '404';
+                                       } else {
+                                               $this->is_month = true;
+                                               $this->is_date = true;
+                                       }
+                               }
+                       }
+
+                       if ( $qv['year'] ) {
+                               if ( ! $this->is_date ) {
+                                       $this->is_year = true;
+                                       $this->is_date = true;
+                               }
+                       }
+
+                       if ( $qv['m'] ) {
+                               $this->is_date = true;
+                               if ( strlen($qv['m']) > 9 ) {
+                                       $this->is_time = true;
+                               } elseif ( strlen( $qv['m'] ) > 7 ) {
+                                       $this->is_day = true;
+                               } elseif ( strlen( $qv['m'] ) > 5 ) {
+                                       $this->is_month = true;
+                               } else {
+                                       $this->is_year = true;
+                               }
+                       }
+
+                       if ( '' != $qv['w'] ) {
+                               $this->is_date = true;
+                       }
+
+                       $this->query_vars_hash = false;
+                       $this->parse_tax_query( $qv );
+
+                       foreach ( $this->tax_query->queries as $tax_query ) {
+                               if ( ! is_array( $tax_query ) ) {
+                                       continue;
+                               }
+
+                               if ( isset( $tax_query['operator'] ) && 'NOT IN' != $tax_query['operator'] ) {
+                                       switch ( $tax_query['taxonomy'] ) {
+                                               case 'category':
+                                                       $this->is_category = true;
+                                                       break;
+                                               case 'post_tag':
+                                                       $this->is_tag = true;
+                                                       break;
+                                               default:
+                                                       $this->is_tax = true;
+                                       }
+                               }
+                       }
+                       unset( $tax_query );
+
+                       if ( empty($qv['author']) || ($qv['author'] == '0') ) {
+                               $this->is_author = false;
+                       } else {
+                               $this->is_author = true;
+                       }
+
+                       if ( '' != $qv['author_name'] )
+                               $this->is_author = true;
+
+                       if ( !empty( $qv['post_type'] ) && ! is_array( $qv['post_type'] ) ) {
+                               $post_type_obj = get_post_type_object( $qv['post_type'] );
+                               if ( ! empty( $post_type_obj->has_archive ) )
+                                       $this->is_post_type_archive = true;
+                       }
+
+                       if ( $this->is_post_type_archive || $this->is_date || $this->is_author || $this->is_category || $this->is_tag || $this->is_tax )
+                               $this->is_archive = true;
+               }
+
+               if ( '' != $qv['feed'] )
+                       $this->is_feed = true;
+
+               if ( '' != $qv['embed'] ) {
+                       $this->is_embed = true;
+               }
+
+               if ( '' != $qv['tb'] )
+                       $this->is_trackback = true;
+
+               if ( '' != $qv['paged'] && ( intval($qv['paged']) > 1 ) )
+                       $this->is_paged = true;
+
+               // if we're previewing inside the write screen
+               if ( '' != $qv['preview'] )
+                       $this->is_preview = true;
+
+               if ( is_admin() )
+                       $this->is_admin = true;
+
+               if ( false !== strpos($qv['feed'], 'comments-') ) {
+                       $qv['feed'] = str_replace('comments-', '', $qv['feed']);
+                       $qv['withcomments'] = 1;
+               }
+
+               $this->is_singular = $this->is_single || $this->is_page || $this->is_attachment;
+
+               if ( $this->is_feed && ( !empty($qv['withcomments']) || ( empty($qv['withoutcomments']) && $this->is_singular ) ) )
+                       $this->is_comment_feed = true;
+
+               if ( !( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_robots ) )
+                       $this->is_home = true;
+
+               // Correct is_* for page_on_front and page_for_posts
+               if ( $this->is_home && 'page' == get_option('show_on_front') && get_option('page_on_front') ) {
+                       $_query = wp_parse_args($this->query);
+                       // pagename can be set and empty depending on matched rewrite rules. Ignore an empty pagename.
+                       if ( isset($_query['pagename']) && '' == $_query['pagename'] )
+                               unset($_query['pagename']);
+
+                       unset( $_query['embed'] );
+
+                       if ( empty($_query) || !array_diff( array_keys($_query), array('preview', 'page', 'paged', 'cpage') ) ) {
+                               $this->is_page = true;
+                               $this->is_home = false;
+                               $qv['page_id'] = get_option('page_on_front');
+                               // Correct <!--nextpage--> for page_on_front
+                               if ( !empty($qv['paged']) ) {
+                                       $qv['page'] = $qv['paged'];
+                                       unset($qv['paged']);
+                               }
+                       }
+               }
+
+               if ( '' != $qv['pagename'] ) {
+                       $this->queried_object = get_page_by_path( $qv['pagename'] );
+
+                       if ( $this->queried_object && 'attachment' == $this->queried_object->post_type ) {
+                               if ( preg_match( "/^[^%]*%(?:postname)%/", get_option( 'permalink_structure' ) ) ) {
+                                       // See if we also have a post with the same slug
+                                       $post = get_page_by_path( $qv['pagename'], OBJECT, 'post' );
+                                       if ( $post ) {
+                                               $this->queried_object = $post;
+                                               $this->is_page = false;
+                                               $this->is_single = true;
+                                       }
+                               }
+                       }
+
+                       if ( ! empty( $this->queried_object ) ) {
+                               $this->queried_object_id = (int) $this->queried_object->ID;
+                       } else {
+                               unset( $this->queried_object );
+                       }
+
+                       if  ( 'page' == get_option('show_on_front') && isset($this->queried_object_id) && $this->queried_object_id == get_option('page_for_posts') ) {
+                               $this->is_page = false;
+                               $this->is_home = true;
+                               $this->is_posts_page = true;
+                       }
+               }
+
+               if ( $qv['page_id'] ) {
+                       if  ( 'page' == get_option('show_on_front') && $qv['page_id'] == get_option('page_for_posts') ) {
+                               $this->is_page = false;
+                               $this->is_home = true;
+                               $this->is_posts_page = true;
+                       }
+               }
+
+               if ( !empty($qv['post_type']) ) {
+                       if ( is_array($qv['post_type']) )
+                               $qv['post_type'] = array_map('sanitize_key', $qv['post_type']);
+                       else
+                               $qv['post_type'] = sanitize_key($qv['post_type']);
+               }
+
+               if ( ! empty( $qv['post_status'] ) ) {
+                       if ( is_array( $qv['post_status'] ) )
+                               $qv['post_status'] = array_map('sanitize_key', $qv['post_status']);
+                       else
+                               $qv['post_status'] = preg_replace('|[^a-z0-9_,-]|', '', $qv['post_status']);
+               }
+
+               if ( $this->is_posts_page && ( ! isset($qv['withcomments']) || ! $qv['withcomments'] ) )
+                       $this->is_comment_feed = false;
+
+               $this->is_singular = $this->is_single || $this->is_page || $this->is_attachment;
+               // Done correcting is_* for page_on_front and page_for_posts
+
+               if ( '404' == $qv['error'] )
+                       $this->set_404();
+
+               $this->is_embed = $this->is_embed && ( $this->is_singular || $this->is_404 );
+
+               $this->query_vars_hash = md5( serialize( $this->query_vars ) );
+               $this->query_vars_changed = false;
+
+               /**
+                * Fires after the main query vars have been parsed.
+                *
+                * @since 1.5.0
+                *
+                * @param WP_Query &$this The WP_Query instance (passed by reference).
+                */
+               do_action_ref_array( 'parse_query', array( &$this ) );
+       }
+
+       /**
+        * Parses various taxonomy related query vars.
+        *
+        * For BC, this method is not marked as protected. See [28987].
+        *
+        * @access protected
+        * @since 3.1.0
+        *
+        * @param array $q The query variables. Passed by reference.
+        */
+       public function parse_tax_query( &$q ) {
+               if ( ! empty( $q['tax_query'] ) && is_array( $q['tax_query'] ) ) {
+                       $tax_query = $q['tax_query'];
+               } else {
+                       $tax_query = array();
+               }
+
+               if ( !empty($q['taxonomy']) && !empty($q['term']) ) {
+                       $tax_query[] = array(
+                               'taxonomy' => $q['taxonomy'],
+                               'terms' => array( $q['term'] ),
+                               'field' => 'slug',
+                       );
+               }
+
+               foreach ( get_taxonomies( array() , 'objects' ) as $taxonomy => $t ) {
+                       if ( 'post_tag' == $taxonomy )
+                               continue;       // Handled further down in the $q['tag'] block
+
+                       if ( $t->query_var && !empty( $q[$t->query_var] ) ) {
+                               $tax_query_defaults = array(
+                                       'taxonomy' => $taxonomy,
+                                       'field' => 'slug',
+                               );
+
+                               if ( isset( $t->rewrite['hierarchical'] ) && $t->rewrite['hierarchical'] ) {
+                                       $q[$t->query_var] = wp_basename( $q[$t->query_var] );
+                               }
+
+                               $term = $q[$t->query_var];
+
+                               if ( is_array( $term ) ) {
+                                       $term = implode( ',', $term );
+                               }
+
+                               if ( strpos($term, '+') !== false ) {
+                                       $terms = preg_split( '/[+]+/', $term );
+                                       foreach ( $terms as $term ) {
+                                               $tax_query[] = array_merge( $tax_query_defaults, array(
+                                                       'terms' => array( $term )
+                                               ) );
+                                       }
+                               } else {
+                                       $tax_query[] = array_merge( $tax_query_defaults, array(
+                                               'terms' => preg_split( '/[,]+/', $term )
+                                       ) );
+                               }
+                       }
+               }
+
+               // If querystring 'cat' is an array, implode it.
+               if ( is_array( $q['cat'] ) ) {
+                       $q['cat'] = implode( ',', $q['cat'] );
+               }
+
+               // Category stuff
+               if ( ! empty( $q['cat'] ) && ! $this->is_singular ) {
+                       $cat_in = $cat_not_in = array();
+
+                       $cat_array = preg_split( '/[,\s]+/', urldecode( $q['cat'] ) );
+                       $cat_array = array_map( 'intval', $cat_array );
+                       $q['cat'] = implode( ',', $cat_array );
+
+                       foreach ( $cat_array as $cat ) {
+                               if ( $cat > 0 )
+                                       $cat_in[] = $cat;
+                               elseif ( $cat < 0 )
+                                       $cat_not_in[] = abs( $cat );
+                       }
+
+                       if ( ! empty( $cat_in ) ) {
+                               $tax_query[] = array(
+                                       'taxonomy' => 'category',
+                                       'terms' => $cat_in,
+                                       'field' => 'term_id',
+                                       'include_children' => true
+                               );
+                       }
+
+                       if ( ! empty( $cat_not_in ) ) {
+                               $tax_query[] = array(
+                                       'taxonomy' => 'category',
+                                       'terms' => $cat_not_in,
+                                       'field' => 'term_id',
+                                       'operator' => 'NOT IN',
+                                       'include_children' => true
+                               );
+                       }
+                       unset( $cat_array, $cat_in, $cat_not_in );
+               }
+
+               if ( ! empty( $q['category__and'] ) && 1 === count( (array) $q['category__and'] ) ) {
+                       $q['category__and'] = (array) $q['category__and'];
+                       if ( ! isset( $q['category__in'] ) )
+                               $q['category__in'] = array();
+                       $q['category__in'][] = absint( reset( $q['category__and'] ) );
+                       unset( $q['category__and'] );
+               }
+
+               if ( ! empty( $q['category__in'] ) ) {
+                       $q['category__in'] = array_map( 'absint', array_unique( (array) $q['category__in'] ) );
+                       $tax_query[] = array(
+                               'taxonomy' => 'category',
+                               'terms' => $q['category__in'],
+                               'field' => 'term_id',
+                               'include_children' => false
+                       );
+               }
+
+               if ( ! empty($q['category__not_in']) ) {
+                       $q['category__not_in'] = array_map( 'absint', array_unique( (array) $q['category__not_in'] ) );
+                       $tax_query[] = array(
+                               'taxonomy' => 'category',
+                               'terms' => $q['category__not_in'],
+                               'operator' => 'NOT IN',
+                               'include_children' => false
+                       );
+               }
+
+               if ( ! empty($q['category__and']) ) {
+                       $q['category__and'] = array_map( 'absint', array_unique( (array) $q['category__and'] ) );
+                       $tax_query[] = array(
+                               'taxonomy' => 'category',
+                               'terms' => $q['category__and'],
+                               'field' => 'term_id',
+                               'operator' => 'AND',
+                               'include_children' => false
+                       );
+               }
+
+               // If querystring 'tag' is array, implode it.
+               if ( is_array( $q['tag'] ) ) {
+                       $q['tag'] = implode( ',', $q['tag'] );
+               }
+
+               // Tag stuff
+               if ( '' != $q['tag'] && !$this->is_singular && $this->query_vars_changed ) {
+                       if ( strpos($q['tag'], ',') !== false ) {
+                               $tags = preg_split('/[,\r\n\t ]+/', $q['tag']);
+                               foreach ( (array) $tags as $tag ) {
+                                       $tag = sanitize_term_field('slug', $tag, 0, 'post_tag', 'db');
+                                       $q['tag_slug__in'][] = $tag;
+                               }
+                       } elseif ( preg_match('/[+\r\n\t ]+/', $q['tag'] ) || ! empty( $q['cat'] ) ) {
+                               $tags = preg_split('/[+\r\n\t ]+/', $q['tag']);
+                               foreach ( (array) $tags as $tag ) {
+                                       $tag = sanitize_term_field('slug', $tag, 0, 'post_tag', 'db');
+                                       $q['tag_slug__and'][] = $tag;
+                               }
+                       } else {
+                               $q['tag'] = sanitize_term_field('slug', $q['tag'], 0, 'post_tag', 'db');
+                               $q['tag_slug__in'][] = $q['tag'];
+                       }
+               }
+
+               if ( !empty($q['tag_id']) ) {
+                       $q['tag_id'] = absint( $q['tag_id'] );
+                       $tax_query[] = array(
+                               'taxonomy' => 'post_tag',
+                               'terms' => $q['tag_id']
+                       );
+               }
+
+               if ( !empty($q['tag__in']) ) {
+                       $q['tag__in'] = array_map('absint', array_unique( (array) $q['tag__in'] ) );
+                       $tax_query[] = array(
+                               'taxonomy' => 'post_tag',
+                               'terms' => $q['tag__in']
+                       );
+               }
+
+               if ( !empty($q['tag__not_in']) ) {
+                       $q['tag__not_in'] = array_map('absint', array_unique( (array) $q['tag__not_in'] ) );
+                       $tax_query[] = array(
+                               'taxonomy' => 'post_tag',
+                               'terms' => $q['tag__not_in'],
+                               'operator' => 'NOT IN'
+                       );
+               }
+
+               if ( !empty($q['tag__and']) ) {
+                       $q['tag__and'] = array_map('absint', array_unique( (array) $q['tag__and'] ) );
+                       $tax_query[] = array(
+                               'taxonomy' => 'post_tag',
+                               'terms' => $q['tag__and'],
+                               'operator' => 'AND'
+                       );
+               }
+
+               if ( !empty($q['tag_slug__in']) ) {
+                       $q['tag_slug__in'] = array_map('sanitize_title_for_query', array_unique( (array) $q['tag_slug__in'] ) );
+                       $tax_query[] = array(
+                               'taxonomy' => 'post_tag',
+                               'terms' => $q['tag_slug__in'],
+                               'field' => 'slug'
+                       );
+               }
+
+               if ( !empty($q['tag_slug__and']) ) {
+                       $q['tag_slug__and'] = array_map('sanitize_title_for_query', array_unique( (array) $q['tag_slug__and'] ) );
+                       $tax_query[] = array(
+                               'taxonomy' => 'post_tag',
+                               'terms' => $q['tag_slug__and'],
+                               'field' => 'slug',
+                               'operator' => 'AND'
+                       );
+               }
+
+               $this->tax_query = new WP_Tax_Query( $tax_query );
+
+               /**
+                * Fires after taxonomy-related query vars have been parsed.
+                *
+                * @since 3.7.0
+                *
+                * @param WP_Query $this The WP_Query instance.
+                */
+               do_action( 'parse_tax_query', $this );
+       }
+
+       /**
+        * Generate SQL for the WHERE clause based on passed search terms.
+        *
+        * @since 3.7.0
+        *
+        * @param array $q Query variables.
+        * @return string WHERE clause.
+        */
+       protected function parse_search( &$q ) {
+               global $wpdb;
+
+               $search = '';
+
+               // added slashes screw with quote grouping when done early, so done later
+               $q['s'] = stripslashes( $q['s'] );
+               if ( empty( $_GET['s'] ) && $this->is_main_query() )
+                       $q['s'] = urldecode( $q['s'] );
+               // there are no line breaks in <input /> fields
+               $q['s'] = str_replace( array( "\r", "\n" ), '', $q['s'] );
+               $q['search_terms_count'] = 1;
+               if ( ! empty( $q['sentence'] ) ) {
+                       $q['search_terms'] = array( $q['s'] );
+               } else {
+                       if ( preg_match_all( '/".*?("|$)|((?<=[\t ",+])|^)[^\t ",+]+/', $q['s'], $matches ) ) {
+                               $q['search_terms_count'] = count( $matches[0] );
+                               $q['search_terms'] = $this->parse_search_terms( $matches[0] );
+                               // if the search string has only short terms or stopwords, or is 10+ terms long, match it as sentence
+                               if ( empty( $q['search_terms'] ) || count( $q['search_terms'] ) > 9 )
+                                       $q['search_terms'] = array( $q['s'] );
+                       } else {
+                               $q['search_terms'] = array( $q['s'] );
+                       }
+               }
+
+               $n = ! empty( $q['exact'] ) ? '' : '%';
+               $searchand = '';
+               $q['search_orderby_title'] = array();
+
+               /**
+                * Filters the prefix that indicates that a search term should be excluded from results.
+                *
+                * @since 4.7.0
+                *
+                * @param string $exclusion_prefix The prefix. Default '-'. Returning
+                *                                 an empty value disables exclusions.
+                */
+               $exclusion_prefix = apply_filters( 'wp_query_search_exclusion_prefix', '-' );
+
+               foreach ( $q['search_terms'] as $term ) {
+                       // If there is an $exclusion_prefix, terms prefixed with it should be excluded.
+                       $exclude = $exclusion_prefix && ( $exclusion_prefix === substr( $term, 0, 1 ) );
+                       if ( $exclude ) {
+                               $like_op  = 'NOT LIKE';
+                               $andor_op = 'AND';
+                               $term     = substr( $term, 1 );
+                       } else {
+                               $like_op  = 'LIKE';
+                               $andor_op = 'OR';
+                       }
+
+                       if ( $n && ! $exclude ) {
+                               $like = '%' . $wpdb->esc_like( $term ) . '%';
+                               $q['search_orderby_title'][] = $wpdb->prepare( "{$wpdb->posts}.post_title LIKE %s", $like );
+                       }
+
+                       $like = $n . $wpdb->esc_like( $term ) . $n;
+                       $search .= $wpdb->prepare( "{$searchand}(({$wpdb->posts}.post_title $like_op %s) $andor_op ({$wpdb->posts}.post_excerpt $like_op %s) $andor_op ({$wpdb->posts}.post_content $like_op %s))", $like, $like, $like );
+                       $searchand = ' AND ';
+               }
+
+               if ( ! empty( $search ) ) {
+                       $search = " AND ({$search}) ";
+                       if ( ! is_user_logged_in() ) {
+                               $search .= " AND ({$wpdb->posts}.post_password = '') ";
+                       }
+               }
+
+               return $search;
+       }
+
+       /**
+        * Check if the terms are suitable for searching.
+        *
+        * Uses an array of stopwords (terms) that are excluded from the separate
+        * term matching when searching for posts. The list of English stopwords is
+        * the approximate search engines list, and is translatable.
+        *
+        * @since 3.7.0
+        *
+        * @param array $terms Terms to check.
+        * @return array Terms that are not stopwords.
+        */
+       protected function parse_search_terms( $terms ) {
+               $strtolower = function_exists( 'mb_strtolower' ) ? 'mb_strtolower' : 'strtolower';
+               $checked = array();
+
+               $stopwords = $this->get_search_stopwords();
+
+               foreach ( $terms as $term ) {
+                       // keep before/after spaces when term is for exact match
+                       if ( preg_match( '/^".+"$/', $term ) )
+                               $term = trim( $term, "\"'" );
+                       else
+                               $term = trim( $term, "\"' " );
+
+                       // Avoid single A-Z and single dashes.
+                       if ( ! $term || ( 1 === strlen( $term ) && preg_match( '/^[a-z\-]$/i', $term ) ) )
+                               continue;
+
+                       if ( in_array( call_user_func( $strtolower, $term ), $stopwords, true ) )
+                               continue;
+
+                       $checked[] = $term;
+               }
+
+               return $checked;
+       }
+
+       /**
+        * Retrieve stopwords used when parsing search terms.
+        *
+        * @since 3.7.0
+        *
+        * @return array Stopwords.
+        */
+       protected function get_search_stopwords() {
+               if ( isset( $this->stopwords ) )
+                       return $this->stopwords;
+
+               /* translators: This is a comma-separated list of very common words that should be excluded from a search,
+                * like a, an, and the. These are usually called "stopwords". You should not simply translate these individual
+                * words into your language. Instead, look for and provide commonly accepted stopwords in your language.
+                */
+               $words = explode( ',', _x( 'about,an,are,as,at,be,by,com,for,from,how,in,is,it,of,on,or,that,the,this,to,was,what,when,where,who,will,with,www',
+                       'Comma-separated list of search stopwords in your language' ) );
+
+               $stopwords = array();
+               foreach ( $words as $word ) {
+                       $word = trim( $word, "\r\n\t " );
+                       if ( $word )
+                               $stopwords[] = $word;
+               }
+
+               /**
+                * Filters stopwords used when parsing search terms.
+                *
+                * @since 3.7.0
+                *
+                * @param array $stopwords Stopwords.
+                */
+               $this->stopwords = apply_filters( 'wp_search_stopwords', $stopwords );
+               return $this->stopwords;
+       }
+
+       /**
+        * Generate SQL for the ORDER BY condition based on passed search terms.
+        *
+        * @param array $q Query variables.
+        * @return string ORDER BY clause.
+        */
+       protected function parse_search_order( &$q ) {
+               global $wpdb;
+
+               if ( $q['search_terms_count'] > 1 ) {
+                       $num_terms = count( $q['search_orderby_title'] );
+
+                       // If the search terms contain negative queries, don't bother ordering by sentence matches.
+                       $like = '';
+                       if ( ! preg_match( '/(?:\s|^)\-/', $q['s'] ) ) {
+                               $like = '%' . $wpdb->esc_like( $q['s'] ) . '%';
+                       }
+
+                       $search_orderby = '';
+
+                       // sentence match in 'post_title'
+                       if ( $like ) {
+                               $search_orderby .= $wpdb->prepare( "WHEN {$wpdb->posts}.post_title LIKE %s THEN 1 ", $like );
+                       }
+
+                       // sanity limit, sort as sentence when more than 6 terms
+                       // (few searches are longer than 6 terms and most titles are not)
+                       if ( $num_terms < 7 ) {
+                               // all words in title
+                               $search_orderby .= 'WHEN ' . implode( ' AND ', $q['search_orderby_title'] ) . ' THEN 2 ';
+                               // any word in title, not needed when $num_terms == 1
+                               if ( $num_terms > 1 )
+                                       $search_orderby .= 'WHEN ' . implode( ' OR ', $q['search_orderby_title'] ) . ' THEN 3 ';
+                       }
+
+                       // Sentence match in 'post_content' and 'post_excerpt'.
+                       if ( $like ) {
+                               $search_orderby .= $wpdb->prepare( "WHEN {$wpdb->posts}.post_excerpt LIKE %s THEN 4 ", $like );
+                               $search_orderby .= $wpdb->prepare( "WHEN {$wpdb->posts}.post_content LIKE %s THEN 5 ", $like );
+                       }
+
+                       if ( $search_orderby ) {
+                               $search_orderby = '(CASE ' . $search_orderby . 'ELSE 6 END)';
+                       }
+               } else {
+                       // single word or sentence search
+                       $search_orderby = reset( $q['search_orderby_title'] ) . ' DESC';
+               }
+
+               return $search_orderby;
+       }
+
+       /**
+        * If the passed orderby value is allowed, convert the alias to a
+        * properly-prefixed orderby value.
+        *
+        * @since 4.0.0
+        * @access protected
+        *
+        * @param string $orderby Alias for the field to order by.
+        * @return string|false Table-prefixed value to used in the ORDER clause. False otherwise.
+        */
+       protected function parse_orderby( $orderby ) {
+               global $wpdb;
+
+               // Used to filter values.
+               $allowed_keys = array(
+                       'post_name', 'post_author', 'post_date', 'post_title', 'post_modified',
+                       'post_parent', 'post_type', 'name', 'author', 'date', 'title', 'modified',
+                       'parent', 'type', 'ID', 'menu_order', 'comment_count', 'rand',
+               );
+
+               $primary_meta_key = '';
+               $primary_meta_query = false;
+               $meta_clauses = $this->meta_query->get_clauses();
+               if ( ! empty( $meta_clauses ) ) {
+                       $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 RAND() contains a seed value, sanitize and add to allowed keys.
+               $rand_with_seed = false;
+               if ( preg_match( '/RAND\(([0-9]+)\)/i', $orderby, $matches ) ) {
+                       $orderby = sprintf( 'RAND(%s)', intval( $matches[1] ) );
+                       $allowed_keys[] = $orderby;
+                       $rand_with_seed = true;
+               }
+
+               if ( ! in_array( $orderby, $allowed_keys, true ) ) {
+                       return false;
+               }
+
+               switch ( $orderby ) {
+                       case 'post_name':
+                       case 'post_author':
+                       case 'post_date':
+                       case 'post_title':
+                       case 'post_modified':
+                       case 'post_parent':
+                       case 'post_type':
+                       case 'ID':
+                       case 'menu_order':
+                       case 'comment_count':
+                               $orderby_clause = "{$wpdb->posts}.{$orderby}";
+                               break;
+                       case 'rand':
+                               $orderby_clause = 'RAND()';
+                               break;
+                       case $primary_meta_key:
+                       case 'meta_value':
+                               if ( ! empty( $primary_meta_query['type'] ) ) {
+                                       $orderby_clause = "CAST({$primary_meta_query['alias']}.meta_value AS {$primary_meta_query['cast']})";
+                               } else {
+                                       $orderby_clause = "{$primary_meta_query['alias']}.meta_value";
+                               }
+                               break;
+                       case 'meta_value_num':
+                               $orderby_clause = "{$primary_meta_query['alias']}.meta_value+0";
+                               break;
+                       default:
+                               if ( array_key_exists( $orderby, $meta_clauses ) ) {
+                                       // $orderby corresponds to a meta_query clause.
+                                       $meta_clause = $meta_clauses[ $orderby ];
+                                       $orderby_clause = "CAST({$meta_clause['alias']}.meta_value AS {$meta_clause['cast']})";
+                               } elseif ( $rand_with_seed ) {
+                                       $orderby_clause = $orderby;
+                               } else {
+                                       // Default: order by post field.
+                                       $orderby_clause = "{$wpdb->posts}.post_" . sanitize_key( $orderby );
+                               }
+
+                               break;
+               }
+
+               return $orderby_clause;
+       }
+
+       /**
+        * Parse an 'order' query variable and cast it to ASC or DESC as necessary.
+        *
+        * @since 4.0.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';
+               }
+       }
+
+       /**
+        * Sets the 404 property and saves whether query is feed.
+        *
+        * @since 2.0.0
+        * @access public
+        */
+       public function set_404() {
+               $is_feed = $this->is_feed;
+
+               $this->init_query_flags();
+               $this->is_404 = true;
+
+               $this->is_feed = $is_feed;
+       }
+
+       /**
+        * Retrieve query variable.
+        *
+        * @since 1.5.0
+        * @since 3.9.0 The `$default` argument was introduced.
+        *
+        * @access public
+        *
+        * @param string $query_var Query variable key.
+        * @param mixed  $default   Optional. Value to return if the query variable is not set. Default empty.
+        * @return mixed Contents of the query variable.
+        */
+       public function get( $query_var, $default = '' ) {
+               if ( isset( $this->query_vars[ $query_var ] ) ) {
+                       return $this->query_vars[ $query_var ];
+               }
+
+               return $default;
+       }
+
+       /**
+        * Set query variable.
+        *
+        * @since 1.5.0
+        * @access public
+        *
+        * @param string $query_var Query variable key.
+        * @param mixed  $value     Query variable value.
+        */
+       public function set($query_var, $value) {
+               $this->query_vars[$query_var] = $value;
+       }
+
+       /**
+        * Retrieve the posts based on query variables.
+        *
+        * There are a few filters and actions that can be used to modify the post
+        * database query.
+        *
+        * @since 1.5.0
+        * @access public
+        *
+        * @return array List of posts.
+        */
+       public function get_posts() {
+               global $wpdb;
+
+               $this->parse_query();
+
+               /**
+                * Fires after the query variable object is created, but before the actual query is run.
+                *
+                * Note: If using conditional tags, use the method versions within the passed instance
+                * (e.g. $this->is_main_query() instead of is_main_query()). This is because the functions
+                * like is_main_query() test against the global $wp_query instance, not the passed one.
+                *
+                * @since 2.0.0
+                *
+                * @param WP_Query &$this The WP_Query instance (passed by reference).
+                */
+               do_action_ref_array( 'pre_get_posts', array( &$this ) );
+
+               // Shorthand.
+               $q = &$this->query_vars;
+
+               // Fill again in case pre_get_posts unset some vars.
+               $q = $this->fill_query_vars($q);
+
+               // Parse meta query
+               $this->meta_query = new WP_Meta_Query();
+               $this->meta_query->parse_query_vars( $q );
+
+               // Set a flag if a pre_get_posts hook changed the query vars.
+               $hash = md5( serialize( $this->query_vars ) );
+               if ( $hash != $this->query_vars_hash ) {
+                       $this->query_vars_changed = true;
+                       $this->query_vars_hash = $hash;
+               }
+               unset($hash);
+
+               // First let's clear some variables
+               $distinct = '';
+               $whichauthor = '';
+               $whichmimetype = '';
+               $where = '';
+               $limits = '';
+               $join = '';
+               $search = '';
+               $groupby = '';
+               $post_status_join = false;
+               $page = 1;
+
+               if ( isset( $q['caller_get_posts'] ) ) {
+                       _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'];
+               }
+
+               if ( !isset( $q['ignore_sticky_posts'] ) )
+                       $q['ignore_sticky_posts'] = false;
+
+               if ( !isset($q['suppress_filters']) )
+                       $q['suppress_filters'] = false;
+
+               if ( !isset($q['cache_results']) ) {
+                       if ( wp_using_ext_object_cache() )
+                               $q['cache_results'] = false;
+                       else
+                               $q['cache_results'] = true;
+               }
+
+               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;
+
+               if ( !isset($q['post_type']) ) {
+                       if ( $this->is_search )
+                               $q['post_type'] = 'any';
+                       else
+                               $q['post_type'] = '';
+               }
+               $post_type = $q['post_type'];
+               if ( empty( $q['posts_per_page'] ) ) {
+                       $q['posts_per_page'] = get_option( 'posts_per_page' );
+               }
+               if ( isset($q['showposts']) && $q['showposts'] ) {
+                       $q['showposts'] = (int) $q['showposts'];
+                       $q['posts_per_page'] = $q['showposts'];
+               }
+               if ( (isset($q['posts_per_archive_page']) && $q['posts_per_archive_page'] != 0) && ($this->is_archive || $this->is_search) )
+                       $q['posts_per_page'] = $q['posts_per_archive_page'];
+               if ( !isset($q['nopaging']) ) {
+                       if ( $q['posts_per_page'] == -1 ) {
+                               $q['nopaging'] = true;
+                       } else {
+                               $q['nopaging'] = false;
+                       }
+               }
+
+               if ( $this->is_feed ) {
+                       // This overrides posts_per_page.
+                       if ( ! empty( $q['posts_per_rss'] ) ) {
+                               $q['posts_per_page'] = $q['posts_per_rss'];
+                       } else {
+                               $q['posts_per_page'] = get_option( 'posts_per_rss' );
+                       }
+                       $q['nopaging'] = false;
+               }
+               $q['posts_per_page'] = (int) $q['posts_per_page'];
+               if ( $q['posts_per_page'] < -1 )
+                       $q['posts_per_page'] = abs($q['posts_per_page']);
+               elseif ( $q['posts_per_page'] == 0 )
+                       $q['posts_per_page'] = 1;
+
+               if ( !isset($q['comments_per_page']) || $q['comments_per_page'] == 0 )
+                       $q['comments_per_page'] = get_option('comments_per_page');
+
+               if ( $this->is_home && (empty($this->query) || $q['preview'] == 'true') && ( 'page' == get_option('show_on_front') ) && get_option('page_on_front') ) {
+                       $this->is_page = true;
+                       $this->is_home = false;
+                       $q['page_id'] = get_option('page_on_front');
+               }
+
+               if ( isset($q['page']) ) {
+                       $q['page'] = trim($q['page'], '/');
+                       $q['page'] = absint($q['page']);
+               }
+
+               // If true, forcibly turns off SQL_CALC_FOUND_ROWS even when limits are present.
+               if ( isset($q['no_found_rows']) )
+                       $q['no_found_rows'] = (bool) $q['no_found_rows'];
+               else
+                       $q['no_found_rows'] = false;
+
+               switch ( $q['fields'] ) {
+                       case 'ids':
+                               $fields = "{$wpdb->posts}.ID";
+                               break;
+                       case 'id=>parent':
+                               $fields = "{$wpdb->posts}.ID, {$wpdb->posts}.post_parent";
+                               break;
+                       default:
+                               $fields = "{$wpdb->posts}.*";
+               }
+
+               if ( '' !== $q['menu_order'] ) {
+                       $where .= " AND {$wpdb->posts}.menu_order = " . $q['menu_order'];
+               }
+               // The "m" parameter is meant for months but accepts datetimes of varying specificity
+               if ( $q['m'] ) {
+                       $where .= " AND YEAR({$wpdb->posts}.post_date)=" . substr($q['m'], 0, 4);
+                       if ( strlen($q['m']) > 5 ) {
+                               $where .= " AND MONTH({$wpdb->posts}.post_date)=" . substr($q['m'], 4, 2);
+                       }
+                       if ( strlen($q['m']) > 7 ) {
+                               $where .= " AND DAYOFMONTH({$wpdb->posts}.post_date)=" . substr($q['m'], 6, 2);
+                       }
+                       if ( strlen($q['m']) > 9 ) {
+                               $where .= " AND HOUR({$wpdb->posts}.post_date)=" . substr($q['m'], 8, 2);
+                       }
+                       if ( strlen($q['m']) > 11 ) {
+                               $where .= " AND MINUTE({$wpdb->posts}.post_date)=" . substr($q['m'], 10, 2);
+                       }
+                       if ( strlen($q['m']) > 13 ) {
+                               $where .= " AND SECOND({$wpdb->posts}.post_date)=" . substr($q['m'], 12, 2);
+                       }
+               }
+
+               // Handle the other individual date parameters
+               $date_parameters = array();
+
+               if ( '' !== $q['hour'] )
+                       $date_parameters['hour'] = $q['hour'];
+
+               if ( '' !== $q['minute'] )
+                       $date_parameters['minute'] = $q['minute'];
+
+               if ( '' !== $q['second'] )
+                       $date_parameters['second'] = $q['second'];
+
+               if ( $q['year'] )
+                       $date_parameters['year'] = $q['year'];
+
+               if ( $q['monthnum'] )
+                       $date_parameters['monthnum'] = $q['monthnum'];
+
+               if ( $q['w'] )
+                       $date_parameters['week'] = $q['w'];
+
+               if ( $q['day'] )
+                       $date_parameters['day'] = $q['day'];
+
+               if ( $date_parameters ) {
+                       $date_query = new WP_Date_Query( array( $date_parameters ) );
+                       $where .= $date_query->get_sql();
+               }
+               unset( $date_parameters, $date_query );
+
+               // Handle complex date queries
+               if ( ! empty( $q['date_query'] ) ) {
+                       $this->date_query = new WP_Date_Query( $q['date_query'] );
+                       $where .= $this->date_query->get_sql();
+               }
+
+
+               // If we've got a post_type AND it's not "any" post_type.
+               if ( !empty($q['post_type']) && 'any' != $q['post_type'] ) {
+                       foreach ( (array)$q['post_type'] as $_post_type ) {
+                               $ptype_obj = get_post_type_object($_post_type);
+                               if ( !$ptype_obj || !$ptype_obj->query_var || empty($q[ $ptype_obj->query_var ]) )
+                                       continue;
+
+                               if ( ! $ptype_obj->hierarchical ) {
+                                       // Non-hierarchical post types can directly use 'name'.
+                                       $q['name'] = $q[ $ptype_obj->query_var ];
+                               } else {
+                                       // Hierarchical post types will operate through 'pagename'.
+                                       $q['pagename'] = $q[ $ptype_obj->query_var ];
+                                       $q['name'] = '';
+                               }
+
+                               // Only one request for a slug is possible, this is why name & pagename are overwritten above.
+                               break;
+                       } //end foreach
+                       unset($ptype_obj);
+               }
+
+               if ( '' !== $q['title'] ) {
+                       $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_title = %s", stripslashes( $q['title'] ) );
+               }
+
+               // Parameters related to 'post_name'.
+               if ( '' != $q['name'] ) {
+                       $q['name'] = sanitize_title_for_query( $q['name'] );
+                       $where .= " AND {$wpdb->posts}.post_name = '" . $q['name'] . "'";
+               } elseif ( '' != $q['pagename'] ) {
+                       if ( isset($this->queried_object_id) ) {
+                               $reqpage = $this->queried_object_id;
+                       } else {
+                               if ( 'page' != $q['post_type'] ) {
+                                       foreach ( (array)$q['post_type'] as $_post_type ) {
+                                               $ptype_obj = get_post_type_object($_post_type);
+                                               if ( !$ptype_obj || !$ptype_obj->hierarchical )
+                                                       continue;
+
+                                               $reqpage = get_page_by_path($q['pagename'], OBJECT, $_post_type);
+                                               if ( $reqpage )
+                                                       break;
+                                       }
+                                       unset($ptype_obj);
+                               } else {
+                                       $reqpage = get_page_by_path($q['pagename']);
+                               }
+                               if ( !empty($reqpage) )
+                                       $reqpage = $reqpage->ID;
+                               else
+                                       $reqpage = 0;
+                       }
+
+                       $page_for_posts = get_option('page_for_posts');
+                       if  ( ('page' != get_option('show_on_front') ) || empty($page_for_posts) || ( $reqpage != $page_for_posts ) ) {
+                               $q['pagename'] = sanitize_title_for_query( wp_basename( $q['pagename'] ) );
+                               $q['name'] = $q['pagename'];
+                               $where .= " AND ({$wpdb->posts}.ID = '$reqpage')";
+                               $reqpage_obj = get_post( $reqpage );
+                               if ( is_object($reqpage_obj) && 'attachment' == $reqpage_obj->post_type ) {
+                                       $this->is_attachment = true;
+                                       $post_type = $q['post_type'] = 'attachment';
+                                       $this->is_page = true;
+                                       $q['attachment_id'] = $reqpage;
+                               }
+                       }
+               } elseif ( '' != $q['attachment'] ) {
+                       $q['attachment'] = sanitize_title_for_query( wp_basename( $q['attachment'] ) );
+                       $q['name'] = $q['attachment'];
+                       $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'] );
+                       $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.
+               if ( $q['attachment_id'] )
+                       $q['p'] = absint($q['attachment_id']);
+
+               // If a post number is specified, load that post
+               if ( $q['p'] ) {
+                       $where .= " AND {$wpdb->posts}.ID = " . $q['p'];
+               } elseif ( $q['post__in'] ) {
+                       $post__in = implode(',', array_map( 'absint', $q['post__in'] ));
+                       $where .= " AND {$wpdb->posts}.ID IN ($post__in)";
+               } elseif ( $q['post__not_in'] ) {
+                       $post__not_in = implode(',',  array_map( 'absint', $q['post__not_in'] ));
+                       $where .= " AND {$wpdb->posts}.ID NOT IN ($post__not_in)";
+               }
+
+               if ( is_numeric( $q['post_parent'] ) ) {
+                       $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_parent = %d ", $q['post_parent'] );
+               } elseif ( $q['post_parent__in'] ) {
+                       $post_parent__in = implode( ',', array_map( 'absint', $q['post_parent__in'] ) );
+                       $where .= " AND {$wpdb->posts}.post_parent IN ($post_parent__in)";
+               } elseif ( $q['post_parent__not_in'] ) {
+                       $post_parent__not_in = implode( ',',  array_map( 'absint', $q['post_parent__not_in'] ) );
+                       $where .= " AND {$wpdb->posts}.post_parent NOT IN ($post_parent__not_in)";
+               }
+
+               if ( $q['page_id'] ) {
+                       if  ( ('page' != get_option('show_on_front') ) || ( $q['page_id'] != get_option('page_for_posts') ) ) {
+                               $q['p'] = $q['page_id'];
+                               $where = " AND {$wpdb->posts}.ID = " . $q['page_id'];
+                       }
+               }
+
+               // If a search pattern is specified, load the posts that match.
+               if ( strlen( $q['s'] ) ) {
+                       $search = $this->parse_search( $q );
+               }
+
+               if ( ! $q['suppress_filters'] ) {
+                       /**
+                        * Filters the search SQL that is used in the WHERE clause of WP_Query.
+                        *
+                        * @since 3.0.0
+                        *
+                        * @param string   $search Search SQL for WHERE clause.
+                        * @param WP_Query $this   The current WP_Query object.
+                        */
+                       $search = apply_filters_ref_array( 'posts_search', array( $search, &$this ) );
+               }
+
+               // Taxonomies
+               if ( !$this->is_singular ) {
+                       $this->parse_tax_query( $q );
+
+                       $clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
+
+                       $join .= $clauses['join'];
+                       $where .= $clauses['where'];
+               }
+
+               if ( $this->is_tax ) {
+                       if ( empty($post_type) ) {
+                               // Do a fully inclusive search for currently registered post types of queried taxonomies
+                               $post_type = array();
+                               $taxonomies = array_keys( $this->tax_query->queried_terms );
+                               foreach ( get_post_types( array( 'exclude_from_search' => false ) ) as $pt ) {
+                                       $object_taxonomies = $pt === 'attachment' ? get_taxonomies_for_attachments() : get_object_taxonomies( $pt );
+                                       if ( array_intersect( $taxonomies, $object_taxonomies ) )
+                                               $post_type[] = $pt;
+                               }
+                               if ( ! $post_type )
+                                       $post_type = 'any';
+                               elseif ( count( $post_type ) == 1 )
+                                       $post_type = $post_type[0];
+
+                               $post_status_join = true;
+                       } elseif ( in_array('attachment', (array) $post_type) ) {
+                               $post_status_join = true;
+                       }
+               }
+
+               /*
+                * Ensure that 'taxonomy', 'term', 'term_id', 'cat', and
+                * 'category_name' vars are set for backward compatibility.
+                */
+               if ( ! empty( $this->tax_query->queried_terms ) ) {
+
+                       /*
+                        * Set 'taxonomy', 'term', and 'term_id' to the
+                        * first taxonomy other than 'post_tag' or 'category'.
+                        */
+                       if ( ! isset( $q['taxonomy'] ) ) {
+                               foreach ( $this->tax_query->queried_terms as $queried_taxonomy => $queried_items ) {
+                                       if ( empty( $queried_items['terms'][0] ) ) {
+                                               continue;
+                                       }
+
+                                       if ( ! in_array( $queried_taxonomy, array( 'category', 'post_tag' ) ) ) {
+                                               $q['taxonomy'] = $queried_taxonomy;
+
+                                               if ( 'slug' === $queried_items['field'] ) {
+                                                       $q['term'] = $queried_items['terms'][0];
+                                               } else {
+                                                       $q['term_id'] = $queried_items['terms'][0];
+                                               }
+
+                                               // Take the first one we find.
+                                               break;
+                                       }
+                               }
+                       }
+
+                       // 'cat', 'category_name', 'tag_id'
+                       foreach ( $this->tax_query->queried_terms as $queried_taxonomy => $queried_items ) {
+                               if ( empty( $queried_items['terms'][0] ) ) {
+                                       continue;
+                               }
+
+                               if ( 'category' === $queried_taxonomy ) {
+                                       $the_cat = get_term_by( $queried_items['field'], $queried_items['terms'][0], 'category' );
+                                       if ( $the_cat ) {
+                                               $this->set( 'cat', $the_cat->term_id );
+                                               $this->set( 'category_name', $the_cat->slug );
+                                       }
+                                       unset( $the_cat );
+                               }
+
+                               if ( 'post_tag' === $queried_taxonomy ) {
+                                       $the_tag = get_term_by( $queried_items['field'], $queried_items['terms'][0], 'post_tag' );
+                                       if ( $the_tag ) {
+                                               $this->set( 'tag_id', $the_tag->term_id );
+                                       }
+                                       unset( $the_tag );
+                               }
+                       }
+               }
+
+               if ( !empty( $this->tax_query->queries ) || !empty( $this->meta_query->queries ) ) {
+                       $groupby = "{$wpdb->posts}.ID";
+               }
+
+               // Author/user stuff
+
+               if ( ! empty( $q['author'] ) && $q['author'] != '0' ) {
+                       $q['author'] = addslashes_gpc( '' . urldecode( $q['author'] ) );
+                       $authors = array_unique( array_map( 'intval', preg_split( '/[,\s]+/', $q['author'] ) ) );
+                       foreach ( $authors as $author ) {
+                               $key = $author > 0 ? 'author__in' : 'author__not_in';
+                               $q[$key][] = abs( $author );
+                       }
+                       $q['author'] = implode( ',', $authors );
+               }
+
+               if ( ! empty( $q['author__not_in'] ) ) {
+                       $author__not_in = implode( ',', array_map( 'absint', array_unique( (array) $q['author__not_in'] ) ) );
+                       $where .= " AND {$wpdb->posts}.post_author NOT IN ($author__not_in) ";
+               } elseif ( ! empty( $q['author__in'] ) ) {
+                       $author__in = implode( ',', array_map( 'absint', array_unique( (array) $q['author__in'] ) ) );
+                       $where .= " AND {$wpdb->posts}.post_author IN ($author__in) ";
+               }
+
+               // Author stuff for nice URLs
+
+               if ( '' != $q['author_name'] ) {
+                       if ( strpos($q['author_name'], '/') !== false ) {
+                               $q['author_name'] = explode('/', $q['author_name']);
+                               if ( $q['author_name'][ count($q['author_name'])-1 ] ) {
+                                       $q['author_name'] = $q['author_name'][count($q['author_name'])-1]; // no trailing slash
+                               } else {
+                                       $q['author_name'] = $q['author_name'][count($q['author_name'])-2]; // there was a trailing slash
+                               }
+                       }
+                       $q['author_name'] = sanitize_title_for_query( $q['author_name'] );
+                       $q['author'] = get_user_by('slug', $q['author_name']);
+                       if ( $q['author'] )
+                               $q['author'] = $q['author']->ID;
+                       $whichauthor .= " AND ({$wpdb->posts}.post_author = " . absint($q['author']) . ')';
+               }
+
+               // MIME-Type stuff for attachment browsing
+
+               if ( isset( $q['post_mime_type'] ) && '' != $q['post_mime_type'] ) {
+                       $whichmimetype = wp_post_mime_type_where( $q['post_mime_type'], $wpdb->posts );
+               }
+               $where .= $search . $whichauthor . $whichmimetype;
+
+               if ( ! empty( $this->meta_query->queries ) ) {
+                       $clauses = $this->meta_query->get_sql( 'post', $wpdb->posts, 'ID', $this );
+                       $join   .= $clauses['join'];
+                       $where  .= $clauses['where'];
+               }
+
+               $rand = ( isset( $q['orderby'] ) && 'rand' === $q['orderby'] );
+               if ( ! isset( $q['order'] ) ) {
+                       $q['order'] = $rand ? '' : 'DESC';
+               } else {
+                       $q['order'] = $rand ? '' : $this->parse_order( $q['order'] );
+               }
+
+               // Order by.
+               if ( empty( $q['orderby'] ) ) {
+                       /*
+                        * Boolean false or empty array blanks out ORDER BY,
+                        * while leaving the value unset or otherwise empty sets the default.
+                        */
+                       if ( isset( $q['orderby'] ) && ( is_array( $q['orderby'] ) || false === $q['orderby'] ) ) {
+                               $orderby = '';
+                       } else {
+                               $orderby = "{$wpdb->posts}.post_date " . $q['order'];
+                       }
+               } elseif ( 'none' == $q['orderby'] ) {
+                       $orderby = '';
+               } elseif ( $q['orderby'] == 'post__in' && ! empty( $post__in ) ) {
+                       $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'] ) ) {
+                               foreach ( $q['orderby'] as $_orderby => $order ) {
+                                       $orderby = addslashes_gpc( urldecode( $_orderby ) );
+                                       $parsed  = $this->parse_orderby( $orderby );
+
+                                       if ( ! $parsed ) {
+                                               continue;
+                                       }
+
+                                       $orderby_array[] = $parsed . ' ' . $this->parse_order( $order );
+                               }
+                               $orderby = implode( ', ', $orderby_array );
+
+                       } else {
+                               $q['orderby'] = urldecode( $q['orderby'] );
+                               $q['orderby'] = addslashes_gpc( $q['orderby'] );
+
+                               foreach ( explode( ' ', $q['orderby'] ) as $i => $orderby ) {
+                                       $parsed = $this->parse_orderby( $orderby );
+                                       // Only allow certain values for safety.
+                                       if ( ! $parsed ) {
+                                               continue;
+                                       }
+
+                                       $orderby_array[] = $parsed;
+                               }
+                               $orderby = implode( ' ' . $q['order'] . ', ', $orderby_array );
+
+                               if ( empty( $orderby ) ) {
+                                       $orderby = "{$wpdb->posts}.post_date " . $q['order'];
+                               } elseif ( ! empty( $q['order'] ) ) {
+                                       $orderby .= " {$q['order']}";
+                               }
+                       }
+               }
+
+               // Order search results by relevance only when another "orderby" is not specified in the query.
+               if ( ! empty( $q['s'] ) ) {
+                       $search_orderby = '';
+                       if ( ! empty( $q['search_orderby_title'] ) && ( empty( $q['orderby'] ) && ! $this->is_feed ) || ( isset( $q['orderby'] ) && 'relevance' === $q['orderby'] ) )
+                               $search_orderby = $this->parse_search_order( $q );
+
+                       if ( ! $q['suppress_filters'] ) {
+                               /**
+                                * Filters the ORDER BY used when ordering search results.
+                                *
+                                * @since 3.7.0
+                                *
+                                * @param string   $search_orderby The ORDER BY clause.
+                                * @param WP_Query $this           The current WP_Query instance.
+                                */
+                               $search_orderby = apply_filters( 'posts_search_orderby', $search_orderby, $this );
+                       }
+
+                       if ( $search_orderby )
+                               $orderby = $orderby ? $search_orderby . ', ' . $orderby : $search_orderby;
+               }
+
+               if ( is_array( $post_type ) && count( $post_type ) > 1 ) {
+                       $post_type_cap = 'multiple_post_type';
+               } else {
+                       if ( is_array( $post_type ) )
+                               $post_type = reset( $post_type );
+                       $post_type_object = get_post_type_object( $post_type );
+                       if ( empty( $post_type_object ) )
+                               $post_type_cap = $post_type;
+               }
+
+               if ( isset( $q['post_password'] ) ) {
+                       $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_password = %s", $q['post_password'] );
+                       if ( empty( $q['perm'] ) ) {
+                               $q['perm'] = 'readable';
+                       }
+               } elseif ( isset( $q['has_password'] ) ) {
+                       $where .= sprintf( " AND {$wpdb->posts}.post_password %s ''", $q['has_password'] ? '!=' : '=' );
+               }
+
+               if ( ! empty( $q['comment_status'] ) ) {
+                       $where .= $wpdb->prepare( " AND {$wpdb->posts}.comment_status = %s ", $q['comment_status'] );
+               }
+
+               if ( ! empty( $q['ping_status'] ) )  {
+                       $where .= $wpdb->prepare( " AND {$wpdb->posts}.ping_status = %s ", $q['ping_status'] );
+               }
+
+               if ( 'any' == $post_type ) {
+                       $in_search_post_types = get_post_types( array('exclude_from_search' => false) );
+                       if ( empty( $in_search_post_types ) ) {
+                               $where .= ' AND 1=0 ';
+                       } else {
+                               $where .= " AND {$wpdb->posts}.post_type IN ('" . join("', '", $in_search_post_types ) . "')";
+                       }
+               } elseif ( !empty( $post_type ) && is_array( $post_type ) ) {
+                       $where .= " AND {$wpdb->posts}.post_type IN ('" . join("', '", $post_type) . "')";
+               } elseif ( ! empty( $post_type ) ) {
+                       $where .= " AND {$wpdb->posts}.post_type = '$post_type'";
+                       $post_type_object = get_post_type_object ( $post_type );
+               } elseif ( $this->is_attachment ) {
+                       $where .= " AND {$wpdb->posts}.post_type = 'attachment'";
+                       $post_type_object = get_post_type_object ( 'attachment' );
+               } elseif ( $this->is_page ) {
+                       $where .= " AND {$wpdb->posts}.post_type = 'page'";
+                       $post_type_object = get_post_type_object ( 'page' );
+               } else {
+                       $where .= " AND {$wpdb->posts}.post_type = 'post'";
+                       $post_type_object = get_post_type_object ( 'post' );
+               }
+
+               $edit_cap = 'edit_post';
+               $read_cap = 'read_post';
+
+               if ( ! empty( $post_type_object ) ) {
+                       $edit_others_cap = $post_type_object->cap->edit_others_posts;
+                       $read_private_cap = $post_type_object->cap->read_private_posts;
+               } else {
+                       $edit_others_cap = 'edit_others_' . $post_type_cap . 's';
+                       $read_private_cap = 'read_private_' . $post_type_cap . 's';
+               }
+
+               $user_id = get_current_user_id();
+
+               $q_status = array();
+               if ( ! empty( $q['post_status'] ) ) {
+                       $statuswheres = array();
+                       $q_status = $q['post_status'];
+                       if ( ! is_array( $q_status ) )
+                               $q_status = explode(',', $q_status);
+                       $r_status = array();
+                       $p_status = array();
+                       $e_status = array();
+                       if ( in_array( 'any', $q_status ) ) {
+                               foreach ( get_post_stati( array( 'exclude_from_search' => true ) ) as $status ) {
+                                       if ( ! in_array( $status, $q_status ) ) {
+                                               $e_status[] = "{$wpdb->posts}.post_status <> '$status'";
+                                       }
+                               }
+                       } else {
+                               foreach ( get_post_stati() as $status ) {
+                                       if ( in_array( $status, $q_status ) ) {
+                                               if ( 'private' == $status ) {
+                                                       $p_status[] = "{$wpdb->posts}.post_status = '$status'";
+                                               } else {
+                                                       $r_status[] = "{$wpdb->posts}.post_status = '$status'";
+                                               }
+                                       }
+                               }
+                       }
+
+                       if ( empty($q['perm'] ) || 'readable' != $q['perm'] ) {
+                               $r_status = array_merge($r_status, $p_status);
+                               unset($p_status);
+                       }
+
+                       if ( !empty($e_status) ) {
+                               $statuswheres[] = "(" . join( ' AND ', $e_status ) . ")";
+                       }
+                       if ( !empty($r_status) ) {
+                               if ( !empty($q['perm'] ) && 'editable' == $q['perm'] && !current_user_can($edit_others_cap) ) {
+                                       $statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . "AND (" . join( ' OR ', $r_status ) . "))";
+                               } else {
+                                       $statuswheres[] = "(" . join( ' OR ', $r_status ) . ")";
+                               }
+                       }
+                       if ( !empty($p_status) ) {
+                               if ( !empty($q['perm'] ) && 'readable' == $q['perm'] && !current_user_can($read_private_cap) ) {
+                                       $statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . "AND (" . join( ' OR ', $p_status ) . "))";
+                               } else {
+                                       $statuswheres[] = "(" . join( ' OR ', $p_status ) . ")";
+                               }
+                       }
+                       if ( $post_status_join ) {
+                               $join .= " LEFT JOIN {$wpdb->posts} AS p2 ON ({$wpdb->posts}.post_parent = p2.ID) ";
+                               foreach ( $statuswheres as $index => $statuswhere ) {
+                                       $statuswheres[$index] = "($statuswhere OR ({$wpdb->posts}.post_status = 'inherit' AND " . str_replace( $wpdb->posts, 'p2', $statuswhere ) . "))";
+                               }
+                       }
+                       $where_status = implode( ' OR ', $statuswheres );
+                       if ( ! empty( $where_status ) ) {
+                               $where .= " AND ($where_status)";
+                       }
+               } elseif ( !$this->is_singular ) {
+                       $where .= " AND ({$wpdb->posts}.post_status = 'publish'";
+
+                       // Add public states.
+                       $public_states = get_post_stati( array('public' => true) );
+                       foreach ( (array) $public_states as $state ) {
+                               if ( 'publish' == $state ) // Publish is hard-coded above.
+                                       continue;
+                               $where .= " OR {$wpdb->posts}.post_status = '$state'";
+                       }
+
+                       if ( $this->is_admin ) {
+                               // Add protected states that should show in the admin all list.
+                               $admin_all_states = get_post_stati( array('protected' => true, 'show_in_admin_all_list' => true) );
+                               foreach ( (array) $admin_all_states as $state ) {
+                                       $where .= " OR {$wpdb->posts}.post_status = '$state'";
+                               }
+                       }
+
+                       if ( is_user_logged_in() ) {
+                               // Add private states that are limited to viewing by the author of a post or someone who has caps to read private states.
+                               $private_states = get_post_stati( array('private' => true) );
+                               foreach ( (array) $private_states as $state ) {
+                                       $where .= current_user_can( $read_private_cap ) ? " OR {$wpdb->posts}.post_status = '$state'" : " OR {$wpdb->posts}.post_author = $user_id AND {$wpdb->posts}.post_status = '$state'";
+                               }
+                       }
+
+                       $where .= ')';
+               }
+
+               /*
+                * Apply filters on where and join prior to paging so that any
+                * manipulations to them are reflected in the paging by day queries.
+                */
+               if ( !$q['suppress_filters'] ) {
+                       /**
+                        * Filters the WHERE clause of the query.
+                        *
+                        * @since 1.5.0
+                        *
+                        * @param string   $where The WHERE clause of the query.
+                        * @param WP_Query &$this The WP_Query instance (passed by reference).
+                        */
+                       $where = apply_filters_ref_array( 'posts_where', array( $where, &$this ) );
+
+                       /**
+                        * Filters the JOIN clause of the query.
+                        *
+                        * @since 1.5.0
+                        *
+                        * @param string   $where The JOIN clause of the query.
+                        * @param WP_Query &$this The WP_Query instance (passed by reference).
+                        */
+                       $join = apply_filters_ref_array( 'posts_join', array( $join, &$this ) );
+               }
+
+               // Paging
+               if ( empty($q['nopaging']) && !$this->is_singular ) {
+                       $page = absint($q['paged']);
+                       if ( !$page )
+                               $page = 1;
+
+                       // If 'offset' is provided, it takes precedence over 'paged'.
+                       if ( isset( $q['offset'] ) && is_numeric( $q['offset'] ) ) {
+                               $q['offset'] = absint( $q['offset'] );
+                               $pgstrt = $q['offset'] . ', ';
+                       } else {
+                               $pgstrt = absint( ( $page - 1 ) * $q['posts_per_page'] ) . ', ';
+                       }
+                       $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page'];
+               }
+
+               // Comments feeds
+               if ( $this->is_comment_feed && ! $this->is_singular ) {
+                       if ( $this->is_archive || $this->is_search ) {
+                               $cjoin = "JOIN {$wpdb->posts} ON ({$wpdb->comments}.comment_post_ID = {$wpdb->posts}.ID) $join ";
+                               $cwhere = "WHERE comment_approved = '1' $where";
+                               $cgroupby = "{$wpdb->comments}.comment_id";
+                       } else { // Other non singular e.g. front
+                               $cjoin = "JOIN {$wpdb->posts} ON ( {$wpdb->comments}.comment_post_ID = {$wpdb->posts}.ID )";
+                               $cwhere = "WHERE ( post_status = 'publish' OR ( post_status = 'inherit' AND post_type = 'attachment' ) ) AND comment_approved = '1'";
+                               $cgroupby = '';
+                       }
+
+                       if ( !$q['suppress_filters'] ) {
+                               /**
+                                * Filters the JOIN clause of the comments feed query before sending.
+                                *
+                                * @since 2.2.0
+                                *
+                                * @param string   $cjoin The JOIN clause of the query.
+                                * @param WP_Query &$this The WP_Query instance (passed by reference).
+                                */
+                               $cjoin = apply_filters_ref_array( 'comment_feed_join', array( $cjoin, &$this ) );
+
+                               /**
+                                * Filters the WHERE clause of the comments feed query before sending.
+                                *
+                                * @since 2.2.0
+                                *
+                                * @param string   $cwhere The WHERE clause of the query.
+                                * @param WP_Query &$this  The WP_Query instance (passed by reference).
+                                */
+                               $cwhere = apply_filters_ref_array( 'comment_feed_where', array( $cwhere, &$this ) );
+
+                               /**
+                                * Filters the GROUP BY clause of the comments feed query before sending.
+                                *
+                                * @since 2.2.0
+                                *
+                                * @param string   $cgroupby The GROUP BY clause of the query.
+                                * @param WP_Query &$this    The WP_Query instance (passed by reference).
+                                */
+                               $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( $cgroupby, &$this ) );
+
+                               /**
+                                * Filters the ORDER BY clause of the comments feed query before sending.
+                                *
+                                * @since 2.8.0
+                                *
+                                * @param string   $corderby The ORDER BY clause of the query.
+                                * @param WP_Query &$this    The WP_Query instance (passed by reference).
+                                */
+                               $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
+
+                               /**
+                                * Filters the LIMIT clause of the comments feed query before sending.
+                                *
+                                * @since 2.8.0
+                                *
+                                * @param string   $climits The JOIN clause of the query.
+                                * @param WP_Query &$this   The WP_Query instance (passed by reference).
+                                */
+                               $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );
+                       }
+                       $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
+                       $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';
+
+                       $comments = (array) $wpdb->get_results("SELECT $distinct {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits");
+                       // Convert to WP_Comment
+                       $this->comments = array_map( 'get_comment', $comments );
+                       $this->comment_count = count($this->comments);
+
+                       $post_ids = array();
+
+                       foreach ( $this->comments as $comment )
+                               $post_ids[] = (int) $comment->comment_post_ID;
+
+                       $post_ids = join(',', $post_ids);
+                       $join = '';
+                       if ( $post_ids ) {
+                               $where = "AND {$wpdb->posts}.ID IN ($post_ids) ";
+                       } else {
+                               $where = "AND 0";
+                       }
+               }
+
+               $pieces = array( 'where', 'groupby', 'join', 'orderby', 'distinct', 'fields', 'limits' );
+
+               /*
+                * Apply post-paging filters on where and join. Only plugins that
+                * manipulate paging queries should use these hooks.
+                */
+               if ( !$q['suppress_filters'] ) {
+                       /**
+                        * Filters the WHERE clause of the query.
+                        *
+                        * Specifically for manipulating paging queries.
+                        *
+                        * @since 1.5.0
+                        *
+                        * @param string   $where The WHERE clause of the query.
+                        * @param WP_Query &$this The WP_Query instance (passed by reference).
+                        */
+                       $where = apply_filters_ref_array( 'posts_where_paged', array( $where, &$this ) );
+
+                       /**
+                        * Filters the GROUP BY clause of the query.
+                        *
+                        * @since 2.0.0
+                        *
+                        * @param string   $groupby The GROUP BY clause of the query.
+                        * @param WP_Query &$this   The WP_Query instance (passed by reference).
+                        */
+                       $groupby = apply_filters_ref_array( 'posts_groupby', array( $groupby, &$this ) );
+
+                       /**
+                        * Filters the JOIN clause of the query.
+                        *
+                        * Specifically for manipulating paging queries.
+                        *
+                        * @since 1.5.0
+                        *
+                        * @param string   $join  The JOIN clause of the query.
+                        * @param WP_Query &$this The WP_Query instance (passed by reference).
+                        */
+                       $join = apply_filters_ref_array( 'posts_join_paged', array( $join, &$this ) );
+
+                       /**
+                        * Filters the ORDER BY clause of the query.
+                        *
+                        * @since 1.5.1
+                        *
+                        * @param string   $orderby The ORDER BY clause of the query.
+                        * @param WP_Query &$this   The WP_Query instance (passed by reference).
+                        */
+                       $orderby = apply_filters_ref_array( 'posts_orderby', array( $orderby, &$this ) );
+
+                       /**
+                        * Filters the DISTINCT clause of the query.
+                        *
+                        * @since 2.1.0
+                        *
+                        * @param string   $distinct The DISTINCT clause of the query.
+                        * @param WP_Query &$this    The WP_Query instance (passed by reference).
+                        */
+                       $distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, &$this ) );
+
+                       /**
+                        * Filters the LIMIT clause of the query.
+                        *
+                        * @since 2.1.0
+                        *
+                        * @param string   $limits The LIMIT clause of the query.
+                        * @param WP_Query &$this  The WP_Query instance (passed by reference).
+                        */
+                       $limits = apply_filters_ref_array( 'post_limits', array( $limits, &$this ) );
+
+                       /**
+                        * Filters the SELECT clause of the query.
+                        *
+                        * @since 2.1.0
+                        *
+                        * @param string   $fields The SELECT clause of the query.
+                        * @param WP_Query &$this  The WP_Query instance (passed by reference).
+                        */
+                       $fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) );
+
+                       /**
+                        * Filters all query clauses at once, for convenience.
+                        *
+                        * Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT,
+                        * fields (SELECT), and LIMITS clauses.
+                        *
+                        * @since 3.1.0
+                        *
+                        * @param array    $clauses The list of clauses for the query.
+                        * @param WP_Query &$this   The WP_Query instance (passed by reference).
+                        */
+                       $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
+
+                       $where = isset( $clauses[ 'where' ] ) ? $clauses[ 'where' ] : '';
+                       $groupby = isset( $clauses[ 'groupby' ] ) ? $clauses[ 'groupby' ] : '';
+                       $join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : '';
+                       $orderby = isset( $clauses[ 'orderby' ] ) ? $clauses[ 'orderby' ] : '';
+                       $distinct = isset( $clauses[ 'distinct' ] ) ? $clauses[ 'distinct' ] : '';
+                       $fields = isset( $clauses[ 'fields' ] ) ? $clauses[ 'fields' ] : '';
+                       $limits = isset( $clauses[ 'limits' ] ) ? $clauses[ 'limits' ] : '';
+               }
+
+               /**
+                * Fires to announce the query's current selection parameters.
+                *
+                * For use by caching plugins.
+                *
+                * @since 2.3.0
+                *
+                * @param string $selection The assembled selection query.
+                */
+               do_action( 'posts_selection', $where . $groupby . $orderby . $limits . $join );
+
+               /*
+                * Filters again for the benefit of caching plugins.
+                * Regular plugins should use the hooks above.
+                */
+               if ( !$q['suppress_filters'] ) {
+                       /**
+                        * Filters the WHERE clause of the query.
+                        *
+                        * For use by caching plugins.
+                        *
+                        * @since 2.5.0
+                        *
+                        * @param string   $where The WHERE clause of the query.
+                        * @param WP_Query &$this The WP_Query instance (passed by reference).
+                        */
+                       $where = apply_filters_ref_array( 'posts_where_request', array( $where, &$this ) );
+
+                       /**
+                        * Filters the GROUP BY clause of the query.
+                        *
+                        * For use by caching plugins.
+                        *
+                        * @since 2.5.0
+                        *
+                        * @param string   $groupby The GROUP BY clause of the query.
+                        * @param WP_Query &$this   The WP_Query instance (passed by reference).
+                        */
+                       $groupby = apply_filters_ref_array( 'posts_groupby_request', array( $groupby, &$this ) );
+
+                       /**
+                        * Filters the JOIN clause of the query.
+                        *
+                        * For use by caching plugins.
+                        *
+                        * @since 2.5.0
+                        *
+                        * @param string   $join  The JOIN clause of the query.
+                        * @param WP_Query &$this The WP_Query instance (passed by reference).
+                        */
+                       $join = apply_filters_ref_array( 'posts_join_request', array( $join, &$this ) );
+
+                       /**
+                        * Filters the ORDER BY clause of the query.
+                        *
+                        * For use by caching plugins.
+                        *
+                        * @since 2.5.0
+                        *
+                        * @param string   $orderby The ORDER BY clause of the query.
+                        * @param WP_Query &$this   The WP_Query instance (passed by reference).
+                        */
+                       $orderby = apply_filters_ref_array( 'posts_orderby_request', array( $orderby, &$this ) );
+
+                       /**
+                        * Filters the DISTINCT clause of the query.
+                        *
+                        * For use by caching plugins.
+                        *
+                        * @since 2.5.0
+                        *
+                        * @param string   $distinct The DISTINCT clause of the query.
+                        * @param WP_Query &$this    The WP_Query instance (passed by reference).
+                        */
+                       $distinct = apply_filters_ref_array( 'posts_distinct_request', array( $distinct, &$this ) );
+
+                       /**
+                        * Filters the SELECT clause of the query.
+                        *
+                        * For use by caching plugins.
+                        *
+                        * @since 2.5.0
+                        *
+                        * @param string   $fields The SELECT clause of the query.
+                        * @param WP_Query &$this  The WP_Query instance (passed by reference).
+                        */
+                       $fields = apply_filters_ref_array( 'posts_fields_request', array( $fields, &$this ) );
+
+                       /**
+                        * Filters the LIMIT clause of the query.
+                        *
+                        * For use by caching plugins.
+                        *
+                        * @since 2.5.0
+                        *
+                        * @param string   $limits The LIMIT clause of the query.
+                        * @param WP_Query &$this  The WP_Query instance (passed by reference).
+                        */
+                       $limits = apply_filters_ref_array( 'post_limits_request', array( $limits, &$this ) );
+
+                       /**
+                        * Filters all query clauses at once, for convenience.
+                        *
+                        * For use by caching plugins.
+                        *
+                        * Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT,
+                        * fields (SELECT), and LIMITS clauses.
+                        *
+                        * @since 3.1.0
+                        *
+                        * @param array    $pieces The pieces of the query.
+                        * @param WP_Query &$this  The WP_Query instance (passed by reference).
+                        */
+                       $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
+
+                       $where = isset( $clauses[ 'where' ] ) ? $clauses[ 'where' ] : '';
+                       $groupby = isset( $clauses[ 'groupby' ] ) ? $clauses[ 'groupby' ] : '';
+                       $join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : '';
+                       $orderby = isset( $clauses[ 'orderby' ] ) ? $clauses[ 'orderby' ] : '';
+                       $distinct = isset( $clauses[ 'distinct' ] ) ? $clauses[ 'distinct' ] : '';
+                       $fields = isset( $clauses[ 'fields' ] ) ? $clauses[ 'fields' ] : '';
+                       $limits = isset( $clauses[ 'limits' ] ) ? $clauses[ 'limits' ] : '';
+               }
+
+               if ( ! empty($groupby) )
+                       $groupby = 'GROUP BY ' . $groupby;
+               if ( !empty( $orderby ) )
+                       $orderby = 'ORDER BY ' . $orderby;
+
+               $found_rows = '';
+               if ( !$q['no_found_rows'] && !empty($limits) )
+                       $found_rows = 'SQL_CALC_FOUND_ROWS';
+
+               $this->request = $old_request = "SELECT $found_rows $distinct $fields FROM {$wpdb->posts} $join WHERE 1=1 $where $groupby $orderby $limits";
+
+               if ( !$q['suppress_filters'] ) {
+                       /**
+                        * Filters the completed SQL query before sending.
+                        *
+                        * @since 2.0.0
+                        *
+                        * @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'] ) {
+                       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 );
+
+                       return $this->posts;
+               }
+
+               if ( 'id=>parent' == $q['fields'] ) {
+                       if ( null === $this->posts ) {
+                               $this->posts = $wpdb->get_results( $this->request );
+                       }
+
+                       $this->post_count = count( $this->posts );
+                       $this->set_found_posts( $q, $limits );
+
+                       $r = array();
+                       foreach ( $this->posts as $key => $post ) {
+                               $this->posts[ $key ]->ID = (int) $post->ID;
+                               $this->posts[ $key ]->post_parent = (int) $post->post_parent;
+
+                               $r[ (int) $post->ID ] = (int) $post->post_parent;
+                       }
+
+                       return $r;
+               }
+
+               if ( null === $this->posts ) {
+                       $split_the_query = ( $old_request == $this->request && "{$wpdb->posts}.*" == $fields && !empty( $limits ) && $q['posts_per_page'] < 500 );
+
+                       /**
+                        * 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 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";
+
+                               /**
+                                * 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 = $wpdb->get_results( $this->request );
+                               $this->set_found_posts( $q, $limits );
+                       }
+               }
+
+               // Convert to WP_Post objects.
+               if ( $this->posts ) {
+                       $this->posts = array_map( 'get_post', $this->posts );
+               }
+
+               if ( ! $q['suppress_filters'] ) {
+                       /**
+                        * Filters the raw post results array, prior to status checks.
+                        *
+                        * @since 2.3.0
+                        *
+                        * @param array    $posts The post results array.
+                        * @param WP_Query &$this The WP_Query instance (passed by reference).
+                        */
+                       $this->posts = apply_filters_ref_array( 'posts_results', array( $this->posts, &$this ) );
+               }
+
+               if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) {
+                       /** This filter is documented in wp-includes/query.php */
+                       $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) );
+
+                       /** This filter is documented in wp-includes/query.php */
+                       $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) );
+
+                       /** This filter is documented in wp-includes/query.php */
+                       $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) );
+                       $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
+
+                       /** This filter is documented in wp-includes/query.php */
+                       $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
+                       $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';
+
+                       /** This filter is documented in wp-includes/query.php */
+                       $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );
+
+                       $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits";
+                       $comments = $wpdb->get_results($comments_request);
+                       // Convert to WP_Comment
+                       $this->comments = array_map( 'get_comment', $comments );
+                       $this->comment_count = count($this->comments);
+               }
+
+               // Check post status to determine if post should be displayed.
+               if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) {
+                       $status = get_post_status($this->posts[0]);
+                       if ( 'attachment' === $this->posts[0]->post_type && 0 === (int) $this->posts[0]->post_parent ) {
+                               $this->is_page = false;
+                               $this->is_single = true;
+                               $this->is_attachment = true;
+                       }
+                       $post_status_obj = get_post_status_object($status);
+
+                       // If the post_status was specifically requested, let it pass through.
+                       if ( !$post_status_obj->public && ! in_array( $status, $q_status ) ) {
+
+                               if ( ! is_user_logged_in() ) {
+                                       // User must be logged in to view unpublished posts.
+                                       $this->posts = array();
+                               } else {
+                                       if  ( $post_status_obj->protected ) {
+                                               // User must have edit permissions on the draft to preview.
+                                               if ( ! current_user_can($edit_cap, $this->posts[0]->ID) ) {
+                                                       $this->posts = array();
+                                               } else {
+                                                       $this->is_preview = true;
+                                                       if ( 'future' != $status )
+                                                               $this->posts[0]->post_date = current_time('mysql');
+                                               }
+                                       } elseif ( $post_status_obj->private ) {
+                                               if ( ! current_user_can($read_cap, $this->posts[0]->ID) )
+                                                       $this->posts = array();
+                                       } else {
+                                               $this->posts = array();
+                                       }
+                               }
+                       }
+
+                       if ( $this->is_preview && $this->posts && current_user_can( $edit_cap, $this->posts[0]->ID ) ) {
+                               /**
+                                * Filters the single post for preview mode.
+                                *
+                                * @since 2.7.0
+                                *
+                                * @param WP_Post  $post_preview  The Post object.
+                                * @param WP_Query &$this         The WP_Query instance (passed by reference).
+                                */
+                               $this->posts[0] = get_post( apply_filters_ref_array( 'the_preview', array( $this->posts[0], &$this ) ) );
+                       }
+               }
+
+               // Put sticky posts at the top of the posts array
+               $sticky_posts = get_option('sticky_posts');
+               if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['ignore_sticky_posts'] ) {
+                       $num_posts = count($this->posts);
+                       $sticky_offset = 0;
+                       // Loop over posts and relocate stickies to the front.
+                       for ( $i = 0; $i < $num_posts; $i++ ) {
+                               if ( in_array($this->posts[$i]->ID, $sticky_posts) ) {
+                                       $sticky_post = $this->posts[$i];
+                                       // Remove sticky from current position
+                                       array_splice($this->posts, $i, 1);
+                                       // Move to front, after other stickies
+                                       array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
+                                       // Increment the sticky offset. The next sticky will be placed at this offset.
+                                       $sticky_offset++;
+                                       // Remove post from sticky posts array
+                                       $offset = array_search($sticky_post->ID, $sticky_posts);
+                                       unset( $sticky_posts[$offset] );
+                               }
+                       }
+
+                       // If any posts have been excluded specifically, Ignore those that are sticky.
+                       if ( !empty($sticky_posts) && !empty($q['post__not_in']) )
+                               $sticky_posts = array_diff($sticky_posts, $q['post__not_in']);
+
+                       // Fetch sticky posts that weren't in the query results
+                       if ( !empty($sticky_posts) ) {
+                               $stickies = get_posts( array(
+                                       'post__in' => $sticky_posts,
+                                       'post_type' => $post_type,
+                                       'post_status' => 'publish',
+                                       'nopaging' => true
+                               ) );
+
+                               foreach ( $stickies as $sticky_post ) {
+                                       array_splice( $this->posts, $sticky_offset, 0, array( $sticky_post ) );
+                                       $sticky_offset++;
+                               }
+                       }
+               }
+
+               // If comments have been fetched as part of the query, make sure comment meta lazy-loading is set up.
+               if ( ! empty( $this->comments ) ) {
+                       wp_queue_comments_for_comment_meta_lazyload( $this->comments );
+               }
+
+               if ( ! $q['suppress_filters'] ) {
+                       /**
+                        * Filters the array of retrieved posts after they've been fetched and
+                        * internally processed.
+                        *
+                        * @since 1.5.0
+                        *
+                        * @param array    $posts The array of retrieved posts.
+                        * @param WP_Query &$this The WP_Query instance (passed by reference).
+                        */
+                       $this->posts = apply_filters_ref_array( 'the_posts', array( $this->posts, &$this ) );
+               }
+
+               // Ensure that any posts added/modified via one of the filters above are
+               // of the type WP_Post and are filtered.
+               if ( $this->posts ) {
+                       $this->post_count = count( $this->posts );
+
+                       $this->posts = array_map( 'get_post', $this->posts );
+
+                       if ( $q['cache_results'] )
+                               update_post_caches($this->posts, $post_type, $q['update_post_term_cache'], $q['update_post_meta_cache']);
+
+                       $this->post = reset( $this->posts );
+               } else {
+                       $this->post_count = 0;
+                       $this->posts = array();
+               }
+
+               if ( $q['lazy_load_term_meta'] ) {
+                       wp_queue_posts_for_term_meta_lazyload( $this->posts );
+               }
+
+               return $this->posts;
+       }
+
+       /**
+        * Set up the amount of found posts and the number of pages (if limit clause was used)
+        * for the current query.
+        *
+        * @since 3.5.0
+        * @access private
+        *
+        * @param array  $q      Query variables.
+        * @param string $limits LIMIT clauses of the query.
+        */
+       private function set_found_posts( $q, $limits ) {
+               global $wpdb;
+               // Bail if posts is an empty array. Continue if posts is an empty string,
+               // null, or false to accommodate caching plugins that fill posts later.
+               if ( $q['no_found_rows'] || ( is_array( $this->posts ) && ! $this->posts ) )
+                       return;
+
+               if ( ! empty( $limits ) ) {
+                       /**
+                        * Filters the query to run for retrieving the found posts.
+                        *
+                        * @since 2.1.0
+                        *
+                        * @param string   $found_posts The query to run to find the found posts.
+                        * @param WP_Query &$this       The WP_Query instance (passed by reference).
+                        */
+                       $this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ) );
+               } else {
+                       $this->found_posts = count( $this->posts );
+               }
+
+               /**
+                * Filters the number of found posts for the query.
+                *
+                * @since 2.1.0
+                *
+                * @param int      $found_posts The number of posts found.
+                * @param WP_Query &$this       The WP_Query instance (passed by reference).
+                */
+               $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) );
+
+               if ( ! empty( $limits ) )
+                       $this->max_num_pages = ceil( $this->found_posts / $q['posts_per_page'] );
+       }
+
+       /**
+        * Set up the next post and iterate current post index.
+        *
+        * @since 1.5.0
+        * @access public
+        *
+        * @return WP_Post Next post.
+        */
+       public function next_post() {
+
+               $this->current_post++;
+
+               $this->post = $this->posts[$this->current_post];
+               return $this->post;
+       }
+
+       /**
+        * Sets up the current post.
+        *
+        * Retrieves the next post, sets up the post, sets the 'in the loop'
+        * property to true.
+        *
+        * @since 1.5.0
+        * @access public
+        *
+        * @global WP_Post $post
+        */
+       public function the_post() {
+               global $post;
+               $this->in_the_loop = true;
+
+               if ( $this->current_post == -1 ) // loop has just started
+                       /**
+                        * Fires once the loop is started.
+                        *
+                        * @since 2.0.0
+                        *
+                        * @param WP_Query &$this The WP_Query instance (passed by reference).
+                        */
+                       do_action_ref_array( 'loop_start', array( &$this ) );
+
+               $post = $this->next_post();
+               $this->setup_postdata( $post );
+       }
+
+       /**
+        * Determines whether there are more posts available in the loop.
+        *
+        * Calls the {@see 'loop_end'} action when the loop is complete.
+        *
+        * @since 1.5.0
+        * @access public
+        *
+        * @return bool True if posts are available, false if end of loop.
+        */
+       public function have_posts() {
+               if ( $this->current_post + 1 < $this->post_count ) {
+                       return true;
+               } elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) {
+                       /**
+                        * Fires once the loop has ended.
+                        *
+                        * @since 2.0.0
+                        *
+                        * @param WP_Query &$this The WP_Query instance (passed by reference).
+                        */
+                       do_action_ref_array( 'loop_end', array( &$this ) );
+                       // Do some cleaning up after the loop
+                       $this->rewind_posts();
+               }
+
+               $this->in_the_loop = false;
+               return false;
+       }
+
+       /**
+        * Rewind the posts and reset post index.
+        *
+        * @since 1.5.0
+        * @access public
+        */
+       public function rewind_posts() {
+               $this->current_post = -1;
+               if ( $this->post_count > 0 ) {
+                       $this->post = $this->posts[0];
+               }
+       }
+
+       /**
+        * Iterate current comment index and return WP_Comment object.
+        *
+        * @since 2.2.0
+        * @access public
+        *
+        * @return WP_Comment Comment object.
+        */
+       public function next_comment() {
+               $this->current_comment++;
+
+               $this->comment = $this->comments[$this->current_comment];
+               return $this->comment;
+       }
+
+       /**
+        * Sets up the current comment.
+        *
+        * @since 2.2.0
+        * @access public
+        * @global WP_Comment $comment Current comment.
+        */
+       public function the_comment() {
+               global $comment;
+
+               $comment = $this->next_comment();
+
+               if ( $this->current_comment == 0 ) {
+                       /**
+                        * Fires once the comment loop is started.
+                        *
+                        * @since 2.2.0
+                        */
+                       do_action( 'comment_loop_start' );
+               }
+       }
+
+       /**
+        * Whether there are more comments available.
+        *
+        * Automatically rewinds comments when finished.
+        *
+        * @since 2.2.0
+        * @access public
+        *
+        * @return bool True, if more comments. False, if no more posts.
+        */
+       public function have_comments() {
+               if ( $this->current_comment + 1 < $this->comment_count ) {
+                       return true;
+               } elseif ( $this->current_comment + 1 == $this->comment_count ) {
+                       $this->rewind_comments();
+               }
+
+               return false;
+       }
+
+       /**
+        * Rewind the comments, resets the comment index and comment to first.
+        *
+        * @since 2.2.0
+        * @access public
+        */
+       public function rewind_comments() {
+               $this->current_comment = -1;
+               if ( $this->comment_count > 0 ) {
+                       $this->comment = $this->comments[0];
+               }
+       }
+
+       /**
+        * Sets up the WordPress query by parsing query string.
+        *
+        * @since 1.5.0
+        * @access public
+        *
+        * @param string $query URL query string.
+        * @return array List of posts.
+        */
+       public function query( $query ) {
+               $this->init();
+               $this->query = $this->query_vars = wp_parse_args( $query );
+               return $this->get_posts();
+       }
+
+       /**
+        * Retrieve queried object.
+        *
+        * If queried object is not set, then the queried object will be set from
+        * the category, tag, taxonomy, posts page, single post, page, or author
+        * query variable. After it is set up, it will be returned.
+        *
+        * @since 1.5.0
+        * @access public
+        *
+        * @return object
+        */
+       public function get_queried_object() {
+               if ( isset($this->queried_object) )
+                       return $this->queried_object;
+
+               $this->queried_object = null;
+               $this->queried_object_id = null;
+
+               if ( $this->is_category || $this->is_tag || $this->is_tax ) {
+                       if ( $this->is_category ) {
+                               if ( $this->get( 'cat' ) ) {
+                                       $term = get_term( $this->get( 'cat' ), 'category' );
+                               } elseif ( $this->get( 'category_name' ) ) {
+                                       $term = get_term_by( 'slug', $this->get( 'category_name' ), 'category' );
+                               }
+                       } elseif ( $this->is_tag ) {
+                               if ( $this->get( 'tag_id' ) ) {
+                                       $term = get_term( $this->get( 'tag_id' ), 'post_tag' );
+                               } elseif ( $this->get( 'tag' ) ) {
+                                       $term = get_term_by( 'slug', $this->get( 'tag' ), 'post_tag' );
+                               }
+                       } else {
+                               // For other tax queries, grab the first term from the first clause.
+                               if ( ! empty( $this->tax_query->queried_terms ) ) {
+                                       $queried_taxonomies = array_keys( $this->tax_query->queried_terms );
+                                       $matched_taxonomy = reset( $queried_taxonomies );
+                                       $query = $this->tax_query->queried_terms[ $matched_taxonomy ];
+
+                                       if ( ! empty( $query['terms'] ) ) {
+                                               if ( 'term_id' == $query['field'] ) {
+                                                       $term = get_term( reset( $query['terms'] ), $matched_taxonomy );
+                                               } else {
+                                                       $term = get_term_by( $query['field'], reset( $query['terms'] ), $matched_taxonomy );
+                                               }
+                                       }
+                               }
+                       }
+
+                       if ( ! empty( $term ) && ! is_wp_error( $term ) )  {
+                               $this->queried_object = $term;
+                               $this->queried_object_id = (int) $term->term_id;
+
+                               if ( $this->is_category && 'category' === $this->queried_object->taxonomy )
+                                       _make_cat_compat( $this->queried_object );
+                       }
+               } elseif ( $this->is_post_type_archive ) {
+                       $post_type = $this->get( 'post_type' );
+                       if ( is_array( $post_type ) )
+                               $post_type = reset( $post_type );
+                       $this->queried_object = get_post_type_object( $post_type );
+               } elseif ( $this->is_posts_page ) {
+                       $page_for_posts = get_option('page_for_posts');
+                       $this->queried_object = get_post( $page_for_posts );
+                       $this->queried_object_id = (int) $this->queried_object->ID;
+               } elseif ( $this->is_singular && ! empty( $this->post ) ) {
+                       $this->queried_object = $this->post;
+                       $this->queried_object_id = (int) $this->post->ID;
+               } elseif ( $this->is_author ) {
+                       $this->queried_object_id = (int) $this->get('author');
+                       $this->queried_object = get_userdata( $this->queried_object_id );
+               }
+
+               return $this->queried_object;
+       }
+
+       /**
+        * Retrieve ID of the current queried object.
+        *
+        * @since 1.5.0
+        * @access public
+        *
+        * @return int
+        */
+       public function get_queried_object_id() {
+               $this->get_queried_object();
+
+               if ( isset($this->queried_object_id) ) {
+                       return $this->queried_object_id;
+               }
+
+               return 0;
+       }
+
+       /**
+        * Constructor.
+        *
+        * Sets up the WordPress query, if parameter is not empty.
+        *
+        * @since 1.5.0
+        * @access public
+        *
+        * @param string|array $query URL query string or array of vars.
+        */
+       public function __construct( $query = '' ) {
+               if ( ! empty( $query ) ) {
+                       $this->query( $query );
+               }
+       }
+
+       /**
+        * Make private properties readable for backward compatibility.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param string $name Property to get.
+        * @return mixed Property.
+        */
+       public function __get( $name ) {
+               if ( in_array( $name, $this->compat_fields ) ) {
+                       return $this->$name;
+               }
+       }
+
+       /**
+        * Make private properties checkable for backward compatibility.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param string $name Property to check if set.
+        * @return bool Whether the property is set.
+        */
+       public function __isset( $name ) {
+               if ( in_array( $name, $this->compat_fields ) ) {
+                       return isset( $this->$name );
+               }
+       }
+
+       /**
+        * Make private/protected methods readable for backward compatibility.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param callable $name      Method to call.
+        * @param array    $arguments Arguments to pass when calling.
+        * @return mixed|false Return value of the callback, false otherwise.
+        */
+       public function __call( $name, $arguments ) {
+               if ( in_array( $name, $this->compat_methods ) ) {
+                       return call_user_func_array( array( $this, $name ), $arguments );
+               }
+               return false;
+       }
+
+       /**
+        * Is the query for an existing archive page?
+        *
+        * Month, Year, Category, Author, Post Type archive...
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_archive() {
+               return (bool) $this->is_archive;
+       }
+
+       /**
+        * Is the query for an existing post type archive page?
+        *
+        * @since 3.1.0
+        *
+        * @param mixed $post_types Optional. Post type or array of posts types to check against.
+        * @return bool
+        */
+       public function is_post_type_archive( $post_types = '' ) {
+               if ( empty( $post_types ) || ! $this->is_post_type_archive )
+                       return (bool) $this->is_post_type_archive;
+
+               $post_type = $this->get( 'post_type' );
+               if ( is_array( $post_type ) )
+                       $post_type = reset( $post_type );
+               $post_type_object = get_post_type_object( $post_type );
+
+               return in_array( $post_type_object->name, (array) $post_types );
+       }
+
+       /**
+        * Is the query for an existing attachment page?
+        *
+        * @since 3.1.0
+        *
+        * @param mixed $attachment Attachment ID, title, slug, or array of such.
+        * @return bool
+        */
+       public function is_attachment( $attachment = '' ) {
+               if ( ! $this->is_attachment ) {
+                       return false;
+               }
+
+               if ( empty( $attachment ) ) {
+                       return true;
+               }
+
+               $attachment = array_map( 'strval', (array) $attachment );
+
+               $post_obj = $this->get_queried_object();
+
+               if ( in_array( (string) $post_obj->ID, $attachment ) ) {
+                       return true;
+               } elseif ( in_array( $post_obj->post_title, $attachment ) ) {
+                       return true;
+               } elseif ( in_array( $post_obj->post_name, $attachment ) ) {
+                       return true;
+               }
+               return false;
+       }
+
+       /**
+        * Is the query for an existing author archive page?
+        *
+        * If the $author parameter is specified, this function will additionally
+        * check if the query is for one of the authors specified.
+        *
+        * @since 3.1.0
+        *
+        * @param mixed $author Optional. User ID, nickname, nicename, or array of User IDs, nicknames, and nicenames
+        * @return bool
+        */
+       public function is_author( $author = '' ) {
+               if ( !$this->is_author )
+                       return false;
+
+               if ( empty($author) )
+                       return true;
+
+               $author_obj = $this->get_queried_object();
+
+               $author = array_map( 'strval', (array) $author );
+
+               if ( in_array( (string) $author_obj->ID, $author ) )
+                       return true;
+               elseif ( in_array( $author_obj->nickname, $author ) )
+                       return true;
+               elseif ( in_array( $author_obj->user_nicename, $author ) )
+                       return true;
+
+               return false;
+       }
+
+       /**
+        * Is the query for an existing category archive page?
+        *
+        * If the $category parameter is specified, this function will additionally
+        * check if the query is for one of the categories specified.
+        *
+        * @since 3.1.0
+        *
+        * @param mixed $category Optional. Category ID, name, slug, or array of Category IDs, names, and slugs.
+        * @return bool
+        */
+       public function is_category( $category = '' ) {
+               if ( !$this->is_category )
+                       return false;
+
+               if ( empty($category) )
+                       return true;
+
+               $cat_obj = $this->get_queried_object();
+
+               $category = array_map( 'strval', (array) $category );
+
+               if ( in_array( (string) $cat_obj->term_id, $category ) )
+                       return true;
+               elseif ( in_array( $cat_obj->name, $category ) )
+                       return true;
+               elseif ( in_array( $cat_obj->slug, $category ) )
+                       return true;
+
+               return false;
+       }
+
+       /**
+        * Is the query for an existing tag archive page?
+        *
+        * If the $tag parameter is specified, this function will additionally
+        * check if the query is for one of the tags specified.
+        *
+        * @since 3.1.0
+        *
+        * @param mixed $tag Optional. Tag ID, name, slug, or array of Tag IDs, names, and slugs.
+        * @return bool
+        */
+       public function is_tag( $tag = '' ) {
+               if ( ! $this->is_tag )
+                       return false;
+
+               if ( empty( $tag ) )
+                       return true;
+
+               $tag_obj = $this->get_queried_object();
+
+               $tag = array_map( 'strval', (array) $tag );
+
+               if ( in_array( (string) $tag_obj->term_id, $tag ) )
+                       return true;
+               elseif ( in_array( $tag_obj->name, $tag ) )
+                       return true;
+               elseif ( in_array( $tag_obj->slug, $tag ) )
+                       return true;
+
+               return false;
+       }
+
+       /**
+        * 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.
+        *
+        * If the $term parameter is specified in addition to the $taxonomy parameter,
+        * this function will additionally check if the query is for one of the terms
+        * specified.
+        *
+        * @since 3.1.0
+        *
+        * @global array $wp_taxonomies
+        *
+        * @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 True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives).
+        */
+       public function is_tax( $taxonomy = '', $term = '' ) {
+               global $wp_taxonomies;
+
+               if ( !$this->is_tax )
+                       return false;
+
+               if ( empty( $taxonomy ) )
+                       return true;
+
+               $queried_object = $this->get_queried_object();
+               $tax_array = array_intersect( array_keys( $wp_taxonomies ), (array) $taxonomy );
+               $term_array = (array) $term;
+
+               // Check that the taxonomy matches.
+               if ( ! ( isset( $queried_object->taxonomy ) && count( $tax_array ) && in_array( $queried_object->taxonomy, $tax_array ) ) )
+                       return false;
+
+               // Only a Taxonomy provided.
+               if ( empty( $term ) )
+                       return true;
+
+               return isset( $queried_object->term_id ) &&
+                       count( array_intersect(
+                               array( $queried_object->term_id, $queried_object->name, $queried_object->slug ),
+                               $term_array
+                       ) );
+       }
+
+       /**
+        * Whether the current URL is within the comments popup window.
+        *
+        * @since 3.1.0
+        * @deprecated 4.5.0
+        *
+        * @return bool
+        */
+       public function is_comments_popup() {
+               _deprecated_function( __FUNCTION__, '4.5.0' );
+
+               return false;
+       }
+
+       /**
+        * Is the query for an existing date archive?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_date() {
+               return (bool) $this->is_date;
+       }
+
+       /**
+        * Is the query for an existing day archive?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_day() {
+               return (bool) $this->is_day;
+       }
+
+       /**
+        * Is the query for a feed?
+        *
+        * @since 3.1.0
+        *
+        * @param string|array $feeds Optional feed types to check.
+        * @return bool
+        */
+       public function is_feed( $feeds = '' ) {
+               if ( empty( $feeds ) || ! $this->is_feed )
+                       return (bool) $this->is_feed;
+               $qv = $this->get( 'feed' );
+               if ( 'feed' == $qv )
+                       $qv = get_default_feed();
+               return in_array( $qv, (array) $feeds );
+       }
+
+       /**
+        * Is the query for a comments feed?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_comment_feed() {
+               return (bool) $this->is_comment_feed;
+       }
+
+       /**
+        * Is the query for the front page of the site?
+        *
+        * This is for what is displayed at your site's main URL.
+        *
+        * Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_on_front'.
+        *
+        * If you set a static page for the front page of your site, this function will return
+        * true when viewing that page.
+        *
+        * Otherwise the same as @see WP_Query::is_home()
+        *
+        * @since 3.1.0
+        *
+        * @return bool True, if front of site.
+        */
+       public function is_front_page() {
+               // most likely case
+               if ( 'posts' == get_option( 'show_on_front') && $this->is_home() )
+                       return true;
+               elseif ( 'page' == get_option( 'show_on_front') && get_option( 'page_on_front' ) && $this->is_page( get_option( 'page_on_front' ) ) )
+                       return true;
+               else
+                       return false;
+       }
+
+       /**
+        * Is the query for the blog homepage?
+        *
+        * This is the page which shows the time based blog content of your site.
+        *
+        * Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_for_posts'.
+        *
+        * 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".
+        *
+        * @see WP_Query::is_front_page()
+        *
+        * @since 3.1.0
+        *
+        * @return bool True if blog view homepage.
+        */
+       public function is_home() {
+               return (bool) $this->is_home;
+       }
+
+       /**
+        * Is the query for an existing month archive?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_month() {
+               return (bool) $this->is_month;
+       }
+
+       /**
+        * Is the query for an existing single page?
+        *
+        * If the $page parameter is specified, this function will additionally
+        * check if the query is for one of the pages specified.
+        *
+        * @see WP_Query::is_single()
+        * @see WP_Query::is_singular()
+        *
+        * @since 3.1.0
+        *
+        * @param int|string|array $page Optional. Page ID, title, slug, path, or array of such. Default empty.
+        * @return bool Whether the query is for an existing single page.
+        */
+       public function is_page( $page = '' ) {
+               if ( !$this->is_page )
+                       return false;
+
+               if ( empty( $page ) )
+                       return true;
+
+               $page_obj = $this->get_queried_object();
+
+               $page = array_map( 'strval', (array) $page );
+
+               if ( in_array( (string) $page_obj->ID, $page ) ) {
+                       return true;
+               } elseif ( in_array( $page_obj->post_title, $page ) ) {
+                       return true;
+               } elseif ( in_array( $page_obj->post_name, $page ) ) {
+                       return true;
+               } else {
+                       foreach ( $page as $pagepath ) {
+                               if ( ! strpos( $pagepath, '/' ) ) {
+                                       continue;
+                               }
+                               $pagepath_obj = get_page_by_path( $pagepath );
+
+                               if ( $pagepath_obj && ( $pagepath_obj->ID == $page_obj->ID ) ) {
+                                       return true;
+                               }
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Is the query for paged result and not for the first page?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_paged() {
+               return (bool) $this->is_paged;
+       }
+
+       /**
+        * Is the query for a post or page preview?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_preview() {
+               return (bool) $this->is_preview;
+       }
+
+       /**
+        * Is the query for the robots file?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_robots() {
+               return (bool) $this->is_robots;
+       }
+
+       /**
+        * Is the query for a search?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_search() {
+               return (bool) $this->is_search;
+       }
+
+       /**
+        * Is the query for an existing single post?
+        *
+        * Works for any post type excluding pages.
+        *
+        * If the $post parameter is specified, this function will additionally
+        * check if the query is for one of the Posts specified.
+        *
+        * @see WP_Query::is_page()
+        * @see WP_Query::is_singular()
+        *
+        * @since 3.1.0
+        *
+        * @param int|string|array $post Optional. Post ID, title, slug, path, or array of such. Default empty.
+        * @return bool Whether the query is for an existing single post.
+        */
+       public function is_single( $post = '' ) {
+               if ( !$this->is_single )
+                       return false;
+
+               if ( empty($post) )
+                       return true;
+
+               $post_obj = $this->get_queried_object();
+
+               $post = array_map( 'strval', (array) $post );
+
+               if ( in_array( (string) $post_obj->ID, $post ) ) {
+                       return true;
+               } elseif ( in_array( $post_obj->post_title, $post ) ) {
+                       return true;
+               } elseif ( in_array( $post_obj->post_name, $post ) ) {
+                       return true;
+               } else {
+                       foreach ( $post as $postpath ) {
+                               if ( ! strpos( $postpath, '/' ) ) {
+                                       continue;
+                               }
+                               $postpath_obj = get_page_by_path( $postpath, OBJECT, $post_obj->post_type );
+
+                               if ( $postpath_obj && ( $postpath_obj->ID == $post_obj->ID ) ) {
+                                       return true;
+                               }
+                       }
+               }
+               return false;
+       }
+
+       /**
+        * Is the query for an existing single post of any post type (post, attachment, page, ... )?
+        *
+        * If the $post_types parameter is specified, this function will additionally
+        * check if the query is for one of the Posts Types specified.
+        *
+        * @see WP_Query::is_page()
+        * @see WP_Query::is_single()
+        *
+        * @since 3.1.0
+        *
+        * @param string|array $post_types Optional. Post type or array of post types. Default empty.
+        * @return bool Whether the query is for an existing single post of any of the given post types.
+        */
+       public function is_singular( $post_types = '' ) {
+               if ( empty( $post_types ) || !$this->is_singular )
+                       return (bool) $this->is_singular;
+
+               $post_obj = $this->get_queried_object();
+
+               return in_array( $post_obj->post_type, (array) $post_types );
+       }
+
+       /**
+        * Is the query for a specific time?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_time() {
+               return (bool) $this->is_time;
+       }
+
+       /**
+        * Is the query for a trackback endpoint call?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_trackback() {
+               return (bool) $this->is_trackback;
+       }
+
+       /**
+        * Is the query for an existing year archive?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_year() {
+               return (bool) $this->is_year;
+       }
+
+       /**
+        * Is the query a 404 (returns no results)?
+        *
+        * @since 3.1.0
+        *
+        * @return bool
+        */
+       public function is_404() {
+               return (bool) $this->is_404;
+       }
+
+       /**
+        * Is the query for an embedded post?
+        *
+        * @since 4.4.0
+        *
+        * @return bool
+        */
+       public function is_embed() {
+               return (bool) $this->is_embed;
+       }
+
+       /**
+        * Is the query the main query?
+        *
+        * @since 3.3.0
+        *
+        * @global WP_Query $wp_query Global WP_Query instance.
+        *
+        * @return bool
+        */
+       public function is_main_query() {
+               global $wp_the_query;
+               return $wp_the_query === $this;
+       }
+
+       /**
+        * Set up global post data.
+        *
+        * @since 4.1.0
+        * @since 4.4.0 Added the ability to pass a post ID to `$post`.
+        *
+        * @global int             $id
+        * @global WP_User         $authordata
+        * @global string|int|bool $currentday
+        * @global string|int|bool $currentmonth
+        * @global int             $page
+        * @global array           $pages
+        * @global int             $multipage
+        * @global int             $more
+        * @global int             $numpages
+        *
+        * @param WP_Post|object|int $post WP_Post instance or Post ID/object.
+        * @return true True when finished.
+        */
+       public function setup_postdata( $post ) {
+               global $id, $authordata, $currentday, $currentmonth, $page, $pages, $multipage, $more, $numpages;
+
+               if ( ! ( $post instanceof WP_Post ) ) {
+                       $post = get_post( $post );
+               }
+
+               if ( ! $post ) {
+                       return;
+               }
+
+               $id = (int) $post->ID;
+
+               $authordata = get_userdata($post->post_author);
+
+               $currentday = mysql2date('d.m.y', $post->post_date, false);
+               $currentmonth = mysql2date('m', $post->post_date, false);
+               $numpages = 1;
+               $multipage = 0;
+               $page = $this->get( 'page' );
+               if ( ! $page )
+                       $page = 1;
+
+               /*
+                * Force full post content when viewing the permalink for the $post,
+                * or when on an RSS feed. Otherwise respect the 'more' tag.
+                */
+               if ( $post->ID === get_queried_object_id() && ( $this->is_page() || $this->is_single() ) ) {
+                       $more = 1;
+               } elseif ( $this->is_feed() ) {
+                       $more = 1;
+               } else {
+                       $more = 0;
+               }
+
+               $content = $post->post_content;
+               if ( false !== strpos( $content, '<!--nextpage-->' ) ) {
+                       $content = str_replace( "\n<!--nextpage-->\n", '<!--nextpage-->', $content );
+                       $content = str_replace( "\n<!--nextpage-->", '<!--nextpage-->', $content );
+                       $content = str_replace( "<!--nextpage-->\n", '<!--nextpage-->', $content );
+
+                       // Ignore nextpage at the beginning of the content.
+                       if ( 0 === strpos( $content, '<!--nextpage-->' ) )
+                               $content = substr( $content, 15 );
+
+                       $pages = explode('<!--nextpage-->', $content);
+               } else {
+                       $pages = array( $post->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.
+                *
+                * @since 4.4.0
+                *
+                * @param array   $pages Array of "pages" derived from the post content.
+                *                       of `<!-- nextpage -->` tags..
+                * @param WP_Post $post  Current post object.
+                */
+               $pages = apply_filters( 'content_pagination', $pages, $post );
+
+               $numpages = count( $pages );
+
+               if ( $numpages > 1 ) {
+                       if ( $page > 1 ) {
+                               $more = 1;
+                       }
+                       $multipage = 1;
+               } else {
+                       $multipage = 0;
+               }
+
+               /**
+                * Fires once the post data has been setup.
+                *
+                * @since 2.8.0
+                * @since 4.1.0 Introduced `$this` parameter.
+                *
+                * @param WP_Post  &$post The Post object (passed by reference).
+                * @param WP_Query &$this The current Query object (passed by reference).
+                */
+               do_action_ref_array( 'the_post', array( &$post, &$this ) );
+
+               return true;
+       }
+       /**
+        * After looping through a nested query, this function
+        * restores the $post global to the current post in this query.
+        *
+        * @since 3.7.0
+        *
+        * @global WP_Post $post
+        */
+       public function reset_postdata() {
+               if ( ! empty( $this->post ) ) {
+                       $GLOBALS['post'] = $this->post;
+                       $this->setup_postdata( $this->post );
+               }
+       }
+
+       /**
+        * Lazyload term meta for posts in the loop.
+        *
+        * @since 4.4.0
+        * @deprecated 4.5.0 See wp_queue_posts_for_term_meta_lazyload().
+        *
+        * @param mixed $check
+        * @param int   $term_id
+        * @return mixed
+        */
+       public function lazyload_term_meta( $check, $term_id ) {
+               _deprecated_function( __METHOD__, '4.5.0' );
+               return $check;
+       }
+
+       /**
+        * Lazyload comment meta for comments in the loop.
+        *
+        * @since 4.4.0
+        * @deprecated 4.5.0 See wp_queue_comments_for_comment_meta_lazyload().
+        *
+        * @param mixed $check
+        * @param int   $comment_id
+        * @return mixed
+        */
+       public function lazyload_comment_meta( $check, $comment_id ) {
+               _deprecated_function( __METHOD__, '4.5.0' );
+               return $check;
+       }
+}
index 2c5761566d2c3ac17985b5ea5d6242554ee44abc..17c58b90a878805535a18c27acbfeab04aacbb78 100644 (file)
@@ -1413,7 +1413,7 @@ class WP_Rewrite {
                         *
                         * @param array $rules The rewrite rules generated for the current permastruct.
                         */
-                       $rules = apply_filters( $permastructname . '_rewrite_rules', $rules );
+                       $rules = apply_filters( "{$permastructname}_rewrite_rules", $rules );
                        if ( 'post_tag' == $permastructname ) {
 
                                /**
@@ -1475,6 +1475,10 @@ class WP_Rewrite {
                if ( empty($this->rules) ) {
                        $this->matches = 'matches';
                        $this->rewrite_rules();
+                       if ( ! did_action( 'wp_loaded' ) ) {
+                               add_action( 'wp_loaded', array( $this, 'flush_rules' ) );
+                               return $this->rules;
+                       }
                        update_option('rewrite_rules', $this->rules);
                }
 
index ff733e2206b3cb99bbd78e232e1249acbd0dfbec..23e05d7b1bb62db7df7ac9a5c91b2ded6d33fc9a 100644 (file)
@@ -105,11 +105,11 @@ class WP_Roles {
         * @since 2.1.0
         * @access protected
         *
-        * @global wpdb  $wpdb          WordPress database abstraction object.
         * @global array $wp_user_roles Used to set the 'roles' property value.
         */
        protected function _init() {
-               global $wpdb, $wp_user_roles;
+               global $wp_user_roles, $wpdb;
+
                $this->role_key = $wpdb->get_blog_prefix() . 'user_roles';
                if ( ! empty( $wp_user_roles ) ) {
                        $this->roles = $wp_user_roles;
@@ -127,6 +127,15 @@ class WP_Roles {
                        $this->role_objects[$role] = new WP_Role( $role, $this->roles[$role]['capabilities'] );
                        $this->role_names[$role] = $this->roles[$role]['name'];
                }
+
+               /**
+                * After the roles have been initialized, allow plugins to add their own roles.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_Roles $this A reference to the WP_Roles object.
+                */
+               do_action( 'wp_roles_init', $this );
        }
 
        /**
@@ -136,29 +145,12 @@ class WP_Roles {
         * after switching wpdb to a new site ID.
         *
         * @since 3.5.0
+        * @deprecated 4.7.0 Use new WP_Roles()
         * @access public
-        *
-        * @global wpdb $wpdb WordPress database abstraction object.
         */
        public function reinit() {
-               // There is no need to reinit if using the wp_user_roles global.
-               if ( ! $this->use_db )
-                       return;
-
-               global $wpdb;
-
-               // Duplicated from _init() to avoid an extra function call.
-               $this->role_key = $wpdb->get_blog_prefix() . 'user_roles';
-               $this->roles = get_option( $this->role_key );
-               if ( empty( $this->roles ) )
-                       return;
-
-               $this->role_objects = array();
-               $this->role_names =  array();
-               foreach ( array_keys( $this->roles ) as $role ) {
-                       $this->role_objects[$role] = new WP_Role( $role, $this->roles[$role]['capabilities'] );
-                       $this->role_names[$role] = $this->roles[$role]['name'];
-               }
+               _deprecated_function( __METHOD__, '4.7.0', 'new WP_Roles()' );
+               $this->_init();
        }
 
        /**
diff --git a/wp-includes/class-wp-session-tokens.php b/wp-includes/class-wp-session-tokens.php
new file mode 100644 (file)
index 0000000..2f498b8
--- /dev/null
@@ -0,0 +1,317 @@
+<?php
+/**
+ * Session API: WP_Session_Tokens class
+ *
+ * @package WordPress
+ * @subpackage Session
+ * @since 4.7.0
+ */
+
+/**
+ * Abstract class for managing user session tokens.
+ *
+ * @since 4.0.0
+ */
+abstract class WP_Session_Tokens {
+
+       /**
+        * User ID.
+        *
+        * @since 4.0.0
+        * @access protected
+        * @var int User ID.
+        */
+       protected $user_id;
+
+       /**
+        * Protected constructor.
+        *
+        * @since 4.0.0
+        *
+        * @param int $user_id User whose session to manage.
+        */
+       protected function __construct( $user_id ) {
+               $this->user_id = $user_id;
+       }
+
+       /**
+        * Get a session token manager instance for a user.
+        *
+        * This method contains a filter that allows a plugin to swap out
+        * the session manager for a subclass of WP_Session_Tokens.
+        *
+        * @since 4.0.0
+        * @access public
+        * @static
+        *
+        * @param int $user_id User whose session to manage.
+        */
+       final public static function get_instance( $user_id ) {
+               /**
+                * Filters the session token manager used.
+                *
+                * @since 4.0.0
+                *
+                * @param string $session Name of class to use as the manager.
+                *                        Default 'WP_User_Meta_Session_Tokens'.
+                */
+               $manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' );
+               return new $manager( $user_id );
+       }
+
+       /**
+        * Hashes a session token for storage.
+        *
+        * @since 4.0.0
+        * @access private
+        *
+        * @param string $token Session token to hash.
+        * @return string A hash of the session token (a verifier).
+        */
+       final private function hash_token( $token ) {
+               // If ext/hash is not present, use sha1() instead.
+               if ( function_exists( 'hash' ) ) {
+                       return hash( 'sha256', $token );
+               } else {
+                       return sha1( $token );
+               }
+       }
+
+       /**
+        * Get a user's session.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param string $token Session token
+        * @return array User session
+        */
+       final public function get( $token ) {
+               $verifier = $this->hash_token( $token );
+               return $this->get_session( $verifier );
+       }
+
+       /**
+        * Validate a user's session token as authentic.
+        *
+        * Checks that the given token is present and hasn't expired.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param string $token Token to verify.
+        * @return bool Whether the token is valid for the user.
+        */
+       final public function verify( $token ) {
+               $verifier = $this->hash_token( $token );
+               return (bool) $this->get_session( $verifier );
+       }
+
+       /**
+        * Generate a session token and attach session information to it.
+        *
+        * A session token is a long, random string. It is used in a cookie
+        * link that cookie to an expiration time and to ensure the cookie
+        * becomes invalidated upon logout.
+        *
+        * This function generates a token and stores it with the associated
+        * expiration time (and potentially other session information via the
+        * {@see 'attach_session_information'} filter).
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param int $expiration Session expiration timestamp.
+        * @return string Session token.
+        */
+       final public function create( $expiration ) {
+               /**
+                * 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.
+                *
+                * @since 4.0.0
+                *
+                * @param array $session Array of extra data.
+                * @param int   $user_id User ID.
+                */
+               $session = apply_filters( 'attach_session_information', array(), $this->user_id );
+               $session['expiration'] = $expiration;
+
+               // IP address.
+               if ( !empty( $_SERVER['REMOTE_ADDR'] ) ) {
+                       $session['ip'] = $_SERVER['REMOTE_ADDR'];
+               }
+
+               // User-agent.
+               if ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
+                       $session['ua'] = wp_unslash( $_SERVER['HTTP_USER_AGENT'] );
+               }
+
+               // Timestamp
+               $session['login'] = time();
+
+               $token = wp_generate_password( 43, false, false );
+
+               $this->update( $token, $session );
+
+               return $token;
+       }
+
+       /**
+        * Update a session token.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param string $token Session token to update.
+        * @param array  $session Session information.
+        */
+       final public function update( $token, $session ) {
+               $verifier = $this->hash_token( $token );
+               $this->update_session( $verifier, $session );
+       }
+
+       /**
+        * Destroy a session token.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param string $token Session token to destroy.
+        */
+       final public function destroy( $token ) {
+               $verifier = $this->hash_token( $token );
+               $this->update_session( $verifier, null );
+       }
+
+       /**
+        * Destroy all session tokens for this user,
+        * except a single token, presumably the one in use.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param string $token_to_keep Session token to keep.
+        */
+       final public function destroy_others( $token_to_keep ) {
+               $verifier = $this->hash_token( $token_to_keep );
+               $session = $this->get_session( $verifier );
+               if ( $session ) {
+                       $this->destroy_other_sessions( $verifier );
+               } else {
+                       $this->destroy_all_sessions();
+               }
+       }
+
+       /**
+        * Determine whether a session token is still valid,
+        * based on expiration.
+        *
+        * @since 4.0.0
+        * @access protected
+        *
+        * @param array $session Session to check.
+        * @return bool Whether session is valid.
+        */
+       final protected function is_still_valid( $session ) {
+               return $session['expiration'] >= time();
+       }
+
+       /**
+        * Destroy all session tokens for a user.
+        *
+        * @since 4.0.0
+        * @access public
+        */
+       final public function destroy_all() {
+               $this->destroy_all_sessions();
+       }
+
+       /**
+        * Destroy all session tokens for all users.
+        *
+        * @since 4.0.0
+        * @access public
+        * @static
+        */
+       final public static function destroy_all_for_all_users() {
+               $manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' );
+               call_user_func( array( $manager, 'drop_sessions' ) );
+       }
+
+       /**
+        * Retrieve all sessions of a user.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @return array Sessions of a user.
+        */
+       final public function get_all() {
+               return array_values( $this->get_sessions() );
+       }
+
+       /**
+        * This method should retrieve all sessions of a user, keyed by verifier.
+        *
+        * @since 4.0.0
+        * @access protected
+        *
+        * @return array Sessions of a user, keyed by verifier.
+        */
+       abstract protected function get_sessions();
+
+       /**
+        * This method should look up a session by its verifier (token hash).
+        *
+        * @since 4.0.0
+        * @access protected
+        *
+        * @param string $verifier Verifier of the session to retrieve.
+        * @return array|null The session, or null if it does not exist.
+        */
+       abstract protected function get_session( $verifier );
+
+       /**
+        * This method should update a session by its verifier.
+        *
+        * Omitting the second argument should destroy the session.
+        *
+        * @since 4.0.0
+        * @access protected
+        *
+        * @param string $verifier Verifier of the session to update.
+        * @param array  $session  Optional. Session. Omitting this argument destroys the session.
+        */
+       abstract protected function update_session( $verifier, $session = null );
+
+       /**
+        * This method should destroy all session tokens for this user,
+        * except a single session passed.
+        *
+        * @since 4.0.0
+        * @access protected
+        *
+        * @param string $verifier Verifier of the session to keep.
+        */
+       abstract protected function destroy_other_sessions( $verifier );
+
+       /**
+        * This method should destroy all sessions for a user.
+        *
+        * @since 4.0.0
+        * @access protected
+        */
+       abstract protected function destroy_all_sessions();
+
+       /**
+        * This static method should destroy all session tokens for all users.
+        *
+        * @since 4.0.0
+        * @access public
+        * @static
+        */
+       public static function drop_sessions() {}
+}
diff --git a/wp-includes/class-wp-simplepie-file.php b/wp-includes/class-wp-simplepie-file.php
new file mode 100644 (file)
index 0000000..b87df7d
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Feed API: WP_SimplePie_File class
+ *
+ * @package WordPress
+ * @subpackage Feed
+ * @since 4.7.0
+ */
+
+/**
+ * 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;
+               $this->redirects = $redirects;
+               $this->headers = $headers;
+               $this->useragent = $useragent;
+
+               $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE;
+
+               if ( preg_match('/^http(s)?:\/\//i', $url) ) {
+                       $args = array(
+                               'timeout' => $this->timeout,
+                               'redirection' => $this->redirects,
+                       );
+
+                       if ( !empty($this->headers) )
+                               $args['headers'] = $this->headers;
+
+                       if ( SIMPLEPIE_USERAGENT != $this->useragent ) //Use default WP user agent unless custom has been specified
+                               $args['user-agent'] = $this->useragent;
+
+                       $res = wp_safe_remote_request($url, $args);
+
+                       if ( is_wp_error($res) ) {
+                               $this->error = 'WP HTTP Error: ' . $res->get_error_message();
+                               $this->success = false;
+                       } else {
+                               $this->headers = wp_remote_retrieve_headers( $res );
+                               $this->body = wp_remote_retrieve_body( $res );
+                               $this->status_code = wp_remote_retrieve_response_code( $res );
+                       }
+               } else {
+                       $this->error = '';
+                       $this->success = false;
+               }
+       }
+}
diff --git a/wp-includes/class-wp-simplepie-sanitize-kses.php b/wp-includes/class-wp-simplepie-sanitize-kses.php
new file mode 100644 (file)
index 0000000..dce5edc
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Feed API: WP_SimplePie_Sanitize_KSES class
+ *
+ * @package WordPress
+ * @subpackage Feed
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to implement SimpliePie feed sanitization.
+ *
+ * Extends the SimplePie_Sanitize class to use KSES, because
+ * we cannot universally count on DOMDocument being available.
+ *
+ * @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 ) {
+                       if (preg_match('/(&(#(x[0-9a-fA-F]+|[0-9]+)|[a-zA-Z0-9]+)|<\/[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>)/', $data)) {
+                               $type |= SIMPLEPIE_CONSTRUCT_HTML;
+                       }
+                       else {
+                               $type |= SIMPLEPIE_CONSTRUCT_TEXT;
+                       }
+               }
+               if ( $type & SIMPLEPIE_CONSTRUCT_BASE64 ) {
+                       $data = base64_decode( $data );
+               }
+               if ( $type & ( SIMPLEPIE_CONSTRUCT_HTML | SIMPLEPIE_CONSTRUCT_XHTML ) ) {
+                       $data = wp_kses_post( $data );
+                       if ( $this->output_encoding !== 'UTF-8' ) {
+                               $data = $this->registry->call( 'Misc', 'change_encoding', array( $data, 'UTF-8', $this->output_encoding ) );
+                       }
+                       return $data;
+               } else {
+                       return parent::sanitize( $data, $type, $base );
+               }
+       }
+}
index cbffd66493e3bd0cc4284ea27c838cc2878b1956..8f52372d3b740697c7f4e555a28b1b899ccd0aeb 100644 (file)
@@ -113,7 +113,7 @@ class WP_Site_Query {
         *     @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          $number            Maximum number of sites to retrieve. Default 100.
         *     @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.
@@ -127,12 +127,10 @@ class WP_Site_Query {
         *                                           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 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 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.
@@ -247,11 +245,7 @@ class WP_Site_Query {
 
                // $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' );
-               }
+               $last_changed = wp_cache_get_last_changed( 'sites' );
 
                $cache_key = "get_sites:$key:$last_changed";
                $cache_value = wp_cache_get( $cache_key, 'sites' );
@@ -511,6 +505,8 @@ class WP_Site_Query {
                        $this->sql_clauses['where']['date_query'] = preg_replace( '/^\s*AND\s*/', '', $this->date_query->get_sql() );
                }
 
+               $join = '';
+
                $where = implode( ' AND ', $this->sql_clauses['where'] );
 
                $pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
index a250c8d0496e4230ca6969f652e78997a40cac52..53529fe94655385eba570a48e5e036daf4021eb6 100644 (file)
  *
  * @since 4.5.0
  *
- * @property int $id
- * @property int $network_id
+ * @property int    $id
+ * @property int    $network_id
+ * @property string $blogname
+ * @property string $siteurl
+ * @property int    $post_count
+ * @property string $home
  */
 final class WP_Site {
 
@@ -310,7 +314,7 @@ final class WP_Site {
         *
         * @see WP_Site::__get()
         *
-        * @return object A raw site object with all details included.
+        * @return stdClass A raw site object with all details included.
         */
        private function get_details() {
                $details = wp_cache_get( $this->blog_id, 'site-details' );
@@ -342,12 +346,15 @@ final class WP_Site {
                        }
                }
 
+               /** This filter is documented in wp-includes/ms-blogs.php */
+               $details = apply_filters_deprecated( 'blog_details', array( $details ), '4.7.0', 'site_details' );
+
                /**
                 * Filters a site's extended properties.
                 *
                 * @since 4.6.0
                 *
-                * @param object $details The site details.
+                * @param stdClass $details The site details.
                 */
                $details = apply_filters( 'site_details', $details );
 
diff --git a/wp-includes/class-wp-taxonomy.php b/wp-includes/class-wp-taxonomy.php
new file mode 100644 (file)
index 0000000..4611ce9
--- /dev/null
@@ -0,0 +1,416 @@
+<?php
+/**
+ * Taxonomy API: WP_Taxonomy class
+ *
+ * @package WordPress
+ * @subpackage Taxonomy
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used for interacting with taxonomies.
+ *
+ * @since 4.7.0
+ */
+final class WP_Taxonomy {
+       /**
+        * Taxonomy key.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var string
+        */
+       public $name;
+
+       /**
+        * Name of the taxonomy shown in the menu. Usually plural.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var string
+        */
+       public $label;
+
+       /**
+        * An array of labels for this taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var object
+        */
+       public $labels = array();
+
+       /**
+        * A short descriptive summary of what the taxonomy is for.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var string
+        */
+       public $description = '';
+
+       /**
+        * Whether a taxonomy is intended for use publicly either via the admin interface or by front-end users.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool
+        */
+       public $public = true;
+
+       /**
+        * Whether the taxonomy is publicly queryable.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool
+        */
+       public $publicly_queryable = true;
+
+       /**
+        * Whether the taxonomy is hierarchical.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool
+        */
+       public $hierarchical = false;
+
+       /**
+        * Whether to generate and allow a UI for managing terms in this taxonomy in the admin.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool
+        */
+       public $show_ui = true;
+
+       /**
+        * Whether to show the taxonomy in the admin menu.
+        *
+        * If true, the taxonomy is shown as a submenu of the object type menu. If false, no menu is shown.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool
+        */
+       public $show_in_menu = true;
+
+       /**
+        * Whether the taxonomy is available for selection in navigation menus.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool
+        */
+       public $show_in_nav_menus = true;
+
+       /**
+        * Whether to list the taxonomy in the tag cloud widget controls.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool
+        */
+       public $show_tagcloud = true;
+
+       /**
+        * Whether to show the taxonomy in the quick/bulk edit panel.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool
+        */
+       public $show_in_quick_edit = true;
+
+       /**
+        * Whether to display a column for the taxonomy on its post type listing screens.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool
+        */
+       public $show_admin_column = false;
+
+       /**
+        * The callback function for the meta box display.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool|callable
+        */
+       public $meta_box_cb = null;
+
+       /**
+        * An array of object types this taxonomy is registered for.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var array
+        */
+       public $object_type = null;
+
+       /**
+        * Capabilities for this taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var array
+        */
+       public $cap;
+
+       /**
+        * Rewrites information for this taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var array|false
+        */
+       public $rewrite;
+
+       /**
+        * Query var string for this taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var string|false
+        */
+       public $query_var;
+
+       /**
+        * Function that will be called when the count is updated.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var callable
+        */
+       public $update_count_callback;
+
+       /**
+        * Whether it is a built-in taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var bool
+        */
+       public $_builtin;
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @global WP $wp WP instance.
+        *
+        * @param string       $taxonomy    Taxonomy key, must not exceed 32 characters.
+        * @param array|string $object_type Name of the object type for the taxonomy object.
+        * @param array|string $args        Optional. Array or query string of arguments for registering a taxonomy.
+        *                                  Default empty array.
+        */
+       public function __construct( $taxonomy, $object_type, $args = array() ) {
+               $this->name = $taxonomy;
+
+               $this->set_props( $object_type, $args );
+       }
+
+       /**
+        * Sets taxonomy properties.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param array|string $object_type Name of the object type for the taxonomy object.
+        * @param array|string $args        Array or query string of arguments for registering a taxonomy.
+        */
+       public function set_props( $object_type, $args ) {
+               $args = wp_parse_args( $args );
+
+               /**
+                * Filters the arguments for registering a taxonomy.
+                *
+                * @since 4.4.0
+                *
+                * @param array  $args        Array of arguments for registering a taxonomy.
+                * @param string $taxonomy    Taxonomy key.
+                * @param array  $object_type Array of names of object types for the taxonomy.
+                */
+               $args = apply_filters( 'register_taxonomy_args', $args, $this->name, (array) $object_type );
+
+               $defaults = array(
+                       'labels'                => array(),
+                       'description'           => '',
+                       'public'                => true,
+                       'publicly_queryable'    => null,
+                       'hierarchical'          => false,
+                       'show_ui'               => null,
+                       'show_in_menu'          => null,
+                       'show_in_nav_menus'     => null,
+                       'show_tagcloud'         => null,
+                       'show_in_quick_edit'    => null,
+                       'show_admin_column'     => false,
+                       'meta_box_cb'           => null,
+                       'capabilities'          => array(),
+                       'rewrite'               => true,
+                       'query_var'             => $this->name,
+                       'update_count_callback' => '',
+                       '_builtin'              => false,
+               );
+
+               $args = array_merge( $defaults, $args );
+
+               // If not set, default to the setting for public.
+               if ( null === $args['publicly_queryable'] ) {
+                       $args['publicly_queryable'] = $args['public'];
+               }
+
+               if ( false !== $args['query_var'] && ( is_admin() || false !== $args['publicly_queryable'] ) ) {
+                       if ( true === $args['query_var'] ) {
+                               $args['query_var'] = $this->name;
+                       } else {
+                               $args['query_var'] = sanitize_title_with_dashes( $args['query_var'] );
+                       }
+               } else {
+                       // Force query_var to false for non-public taxonomies.
+                       $args['query_var'] = false;
+               }
+
+               if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {
+                       $args['rewrite'] = wp_parse_args( $args['rewrite'], array(
+                               'with_front'   => true,
+                               'hierarchical' => false,
+                               'ep_mask'      => EP_NONE,
+                       ) );
+
+                       if ( empty( $args['rewrite']['slug'] ) ) {
+                               $args['rewrite']['slug'] = sanitize_title_with_dashes( $this->name );
+                       }
+               }
+
+               // 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 setting for public.
+               if ( null === $args['show_in_nav_menus'] ) {
+                       $args['show_in_nav_menus'] = $args['public'];
+               }
+
+               // If not set, default to the setting for show_ui.
+               if ( null === $args['show_tagcloud'] ) {
+                       $args['show_tagcloud'] = $args['show_ui'];
+               }
+
+               // If not set, default to the setting for show_ui.
+               if ( null === $args['show_in_quick_edit'] ) {
+                       $args['show_in_quick_edit'] = $args['show_ui'];
+               }
+
+               $default_caps = array(
+                       'manage_terms' => 'manage_categories',
+                       'edit_terms'   => 'manage_categories',
+                       'delete_terms' => 'manage_categories',
+                       'assign_terms' => 'edit_posts',
+               );
+
+               $args['cap'] = (object) array_merge( $default_caps, $args['capabilities'] );
+               unset( $args['capabilities'] );
+
+               $args['object_type'] = array_unique( (array) $object_type );
+
+               // If not set, use the default meta box
+               if ( null === $args['meta_box_cb'] ) {
+                       if ( $args['hierarchical'] ) {
+                               $args['meta_box_cb'] = 'post_categories_meta_box';
+                       } else {
+                               $args['meta_box_cb'] = 'post_tags_meta_box';
+                       }
+               }
+
+               foreach ( $args as $property_name => $property_value ) {
+                       $this->$property_name = $property_value;
+               }
+
+               $this->labels = get_taxonomy_labels( $this );
+               $this->label = $this->labels->name;
+       }
+
+       /**
+        * Adds the necessary rewrite rules for the taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @global WP $wp Current WordPress environment instance.
+        */
+       public function add_rewrite_rules() {
+               /* @var WP $wp */
+               global $wp;
+
+               // Non-publicly queryable taxonomies should not register query vars, except in the admin.
+               if ( false !== $this->query_var && $wp ) {
+                       $wp->add_query_var( $this->query_var );
+               }
+
+               if ( false !== $this->rewrite && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {
+                       if ( $this->hierarchical && $this->rewrite['hierarchical'] ) {
+                               $tag = '(.+?)';
+                       } else {
+                               $tag = '([^/]+)';
+                       }
+
+                       add_rewrite_tag( "%$this->name%", $tag, $this->query_var ? "{$this->query_var}=" : "taxonomy=$this->name&term=" );
+                       add_permastruct( $this->name, "{$this->rewrite['slug']}/%$this->name%", $this->rewrite );
+               }
+       }
+
+       /**
+        * Removes any rewrite rules, permastructs, and rules for the taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @global WP $wp Current WordPress environment instance.
+        */
+       public function remove_rewrite_rules() {
+               /* @var WP $wp */
+               global $wp;
+
+               // Remove query var.
+               if ( false !== $this->query_var ) {
+                       $wp->remove_query_var( $this->query_var );
+               }
+
+               // Remove rewrite tags and permastructs.
+               if ( false !== $this->rewrite ) {
+                       remove_rewrite_tag( "%$this->name%" );
+                       remove_permastruct( $this->name );
+               }
+       }
+
+       /**
+        * Registers the ajax callback for the meta box.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function add_hooks() {
+               add_filter( 'wp_ajax_add-' . $this->name, '_wp_ajax_add_hierarchical_term' );
+       }
+
+       /**
+        * Removes the ajax callback for the meta box.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function remove_hooks() {
+               remove_filter( 'wp_ajax_add-' . $this->name, '_wp_ajax_add_hierarchical_term' );
+       }
+}
index 38977f451c8e4dc6089d8cb2fa5fa927dbfe847c..434d810db021742318cf13edda770115ff18bed0 100644 (file)
@@ -93,6 +93,7 @@ class WP_Term_Query {
         *
         * @since 4.6.0
         * @since 4.6.0 Introduced 'term_taxonomy_id' parameter.
+        * @since 4.7.0 Introduced 'object_ids' parameter.
         * @access public
         *
         * @param string|array $query {
@@ -100,6 +101,8 @@ class WP_Term_Query {
         *
         *     @type string|array $taxonomy               Taxonomy name, or array of taxonomies, to which results should
         *                                                be limited.
+        *     @type int|array    $object_ids             Optional. Object ID, or array of object IDs. Results will be
+        *                                                limited to terms associated with these objects.
         *     @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
@@ -123,13 +126,17 @@ class WP_Term_Query {
         *                                                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'.
+        *                                                complete term objects), 'all_with_object_id' (returns an
+        *                                                array of term objects with the 'object_id' param; only works
+        *                                                when the `$fields` parameter is 'object_ids' ), 'ids'
+        *                                                (returns an array of ids), 'tt_ids' (returns an array of
+        *                                                term taxonomy 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.
@@ -174,6 +181,7 @@ class WP_Term_Query {
        public function __construct( $query = '' ) {
                $this->query_var_defaults = array(
                        'taxonomy'               => null,
+                       'object_ids'             => null,
                        'orderby'                => 'name',
                        'order'                  => 'ASC',
                        'hide_empty'             => true,
@@ -199,6 +207,10 @@ class WP_Term_Query {
                        'cache_domain'           => 'core',
                        'update_term_meta_cache' => true,
                        'meta_query'             => '',
+                       'meta_key'               => '',
+                       'meta_value'             => '',
+                       'meta_type'              => '',
+                       'meta_compare'           => '',
                );
 
                if ( ! empty( $query ) ) {
@@ -253,15 +265,7 @@ class WP_Term_Query {
 
                $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 );
+               $this->query_vars = $query;
 
                /**
                 * Fires after term query vars have been parsed.
@@ -383,7 +387,13 @@ class WP_Term_Query {
                        }
                }
 
-               $orderby = $this->parse_orderby( $this->query_vars['orderby'] );
+               // 'term_order' is a legal sort order only when joining the relationship table.
+               $_orderby = $this->query_vars['orderby'];
+               if ( 'term_order' === $_orderby && empty( $this->query_vars['object_ids'] ) ) {
+                       $_orderby = 'term_id';
+               }
+               $orderby = $this->parse_orderby( $_orderby );
+
                if ( $orderby ) {
                        $orderby = "ORDER BY $orderby";
                }
@@ -498,6 +508,24 @@ class WP_Term_Query {
                        $this->sql_clauses['where']['description__like'] = $wpdb->prepare( "tt.description LIKE %s", '%' . $wpdb->esc_like( $args['description__like'] ) . '%' );
                }
 
+               if ( ! empty( $args['object_ids'] ) ) {
+                       $object_ids = $args['object_ids'];
+                       if ( ! is_array( $object_ids ) ) {
+                               $object_ids = array( $object_ids );
+                       }
+
+                       $object_ids = implode( ', ', array_map( 'intval', $object_ids ) );
+                       $this->sql_clauses['where']['object_ids'] = "tr.object_id IN ($object_ids)";
+               }
+
+               /*
+                * When querying for object relationships, the 'count > 0' check
+                * added by 'hide_empty' is superfluous.
+                */
+               if ( ! empty( $args['object_ids'] ) ) {
+                       $args['hide_empty'] = false;
+               }
+
                if ( '' !== $parent ) {
                        $parent = (int) $parent;
                        $this->sql_clauses['where']['parent'] = "tt.parent = '$parent'";
@@ -549,7 +577,13 @@ class WP_Term_Query {
                $selects = array();
                switch ( $args['fields'] ) {
                        case 'all':
+                       case 'all_with_object_id' :
+                       case 'tt_ids' :
+                       case 'slugs' :
                                $selects = array( 't.*', 'tt.*' );
+                               if ( 'all_with_object_id' === $args['fields'] && ! empty( $args['object_ids'] ) ) {
+                                       $selects[] = 'tr.object_id';
+                               }
                                break;
                        case 'ids':
                        case 'id=>parent':
@@ -593,9 +627,11 @@ class WP_Term_Query {
 
                $join .= " INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id";
 
-               $where = implode( ' AND ', $this->sql_clauses['where'] );
+               if ( ! empty( $this->query_vars['object_ids'] ) ) {
+                       $join .= " INNER JOIN {$wpdb->term_relationships} AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id";
+               }
 
-               $pieces = array( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' );
+               $where = implode( ' AND ', $this->sql_clauses['where'] );
 
                /**
                 * Filters the terms query SQL clauses.
@@ -606,7 +642,7 @@ class WP_Term_Query {
                 * @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 );
+               $clauses = apply_filters( 'terms_clauses', compact( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' ), $taxonomies, $args );
 
                $fields = isset( $clauses[ 'fields' ] ) ? $clauses[ 'fields' ] : '';
                $join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : '';
@@ -629,11 +665,7 @@ class WP_Term_Query {
 
                // $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' );
-               }
+               $last_changed = wp_cache_get_last_changed( 'terms' );
                $cache_key = "get_terms:$key:$last_changed";
                $cache = wp_cache_get( $cache_key, 'terms' );
                if ( false !== $cache ) {
@@ -646,11 +678,13 @@ class WP_Term_Query {
                }
 
                if ( 'count' == $_fields ) {
-                       return $wpdb->get_var( $this->request );
+                       $count = $wpdb->get_var( $this->request );
+                       wp_cache_set( $cache_key, $count, 'terms' );
+                       return $count;
                }
 
                $terms = $wpdb->get_results( $this->request );
-               if ( 'all' == $_fields ) {
+               if ( 'all' == $_fields || 'all_with_object_id' === $_fields ) {
                        update_term_cache( $terms );
                }
 
@@ -701,6 +735,26 @@ class WP_Term_Query {
                        }
                }
 
+               /*
+                * When querying for terms connected to objects, we may get
+                * duplicate results. The duplicates should be preserved if
+                * `$fields` is 'all_with_object_id', but should otherwise be
+                * removed.
+                */
+               if ( ! empty( $args['object_ids'] ) && 'all_with_object_id' != $_fields ) {
+                       $_tt_ids = $_terms = array();
+                       foreach ( $terms as $term ) {
+                               if ( isset( $_tt_ids[ $term->term_id ] ) ) {
+                                       continue;
+                               }
+
+                               $_tt_ids[ $term->term_id ] = 1;
+                               $_terms[] = $term;
+                       }
+
+                       $terms = $_terms;
+               }
+
                $_terms = array();
                if ( 'id=>parent' == $_fields ) {
                        foreach ( $terms as $term ) {
@@ -708,12 +762,20 @@ class WP_Term_Query {
                        }
                } elseif ( 'ids' == $_fields ) {
                        foreach ( $terms as $term ) {
-                               $_terms[] = $term->term_id;
+                               $_terms[] = (int) $term->term_id;
+                       }
+               } elseif ( 'tt_ids' == $_fields ) {
+                       foreach ( $terms as $term ) {
+                               $_terms[] = (int) $term->term_taxonomy_id;
                        }
                } elseif ( 'names' == $_fields ) {
                        foreach ( $terms as $term ) {
                                $_terms[] = $term->name;
                        }
+               } elseif ( 'slugs' == $_fields ) {
+                       foreach ( $terms as $term ) {
+                               $_terms[] = $term->slug;
+                       }
                } elseif ( 'id=>name' == $_fields ) {
                        foreach ( $terms as $term ) {
                                $_terms[ $term->term_id ] = $term->name;
@@ -739,7 +801,7 @@ class WP_Term_Query {
 
                wp_cache_add( $cache_key, $terms, 'terms', DAY_IN_SECONDS );
 
-               if ( 'all' === $_fields ) {
+               if ( 'all' === $_fields || 'all_with_object_id' === $_fields ) {
                        $terms = array_map( 'get_term', $terms );
                }
 
@@ -761,19 +823,16 @@ class WP_Term_Query {
        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';
+
+               if ( in_array( $_orderby, array( 'term_id', 'name', 'slug', 'term_group' ), true ) ) {
+                       $orderby = "t.$_orderby";
+               } elseif ( in_array( $_orderby, array( 'count', 'parent', 'taxonomy', 'term_taxonomy_id', 'description' ), true ) ) {
+                       $orderby = "tt.$_orderby";
+               } elseif ( 'term_order' === $_orderby ) {
+                       $orderby = 'tr.term_order';
                } elseif ( 'include' == $_orderby && ! empty( $this->query_vars['include'] ) ) {
-                       $include = implode( ',', array_map( 'absint', $this->query_vars['include'] ) );
+                       $include = implode( ',', wp_parse_id_list( $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 ) {
index 3b4931a0412ab79d54b7cd7080c5a4d1d602eade..6cb4a15bd85c9d521cb83ded1e52d894d166e9ca 100644 (file)
@@ -125,11 +125,12 @@ final class WP_Term {
        public static function get_instance( $term_id, $taxonomy = null ) {
                global $wpdb;
 
-               $term_id = (int) $term_id;
-               if ( ! $term_id ) {
+               if ( ! is_numeric( $term_id ) || $term_id != floor( $term_id ) || ! $term_id ) {
                        return false;
                }
 
+               $term_id = (int) $term_id;
+
                $_term = wp_cache_get( $term_id, 'terms' );
 
                // If there isn't a cached version, hit the database.
@@ -250,7 +251,6 @@ final class WP_Term {
                                }
 
                                return sanitize_term( $data, $data->taxonomy, 'raw' );
-                               break;
                }
        }
 }
diff --git a/wp-includes/class-wp-text-diff-renderer-inline.php b/wp-includes/class-wp-text-diff-renderer-inline.php
new file mode 100644 (file)
index 0000000..236e388
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Diff API: WP_Text_Diff_Renderer_inline class
+ *
+ * @package WordPress
+ * @subpackage Diff
+ * @since 4.7.0
+ */
+
+/**
+ * Better word splitting than the PEAR package provides.
+ *
+ * @since 2.6.0
+ * @uses Text_Diff_Renderer_inline Extends
+ */
+class WP_Text_Diff_Renderer_inline extends Text_Diff_Renderer_inline {
+
+       /**
+        * @ignore
+        * @since 2.6.0
+        *
+        * @param string $string
+        * @param string $newlineEscape
+        * @return string
+        */
+       public function _splitOnWords($string, $newlineEscape = "\n") {
+               $string = str_replace("\0", '', $string);
+               $words  = preg_split( '/([^\w])/u', $string, -1, PREG_SPLIT_DELIM_CAPTURE );
+               $words  = str_replace( "\n", $newlineEscape, $words );
+               return $words;
+       }
+
+}
diff --git a/wp-includes/class-wp-text-diff-renderer-table.php b/wp-includes/class-wp-text-diff-renderer-table.php
new file mode 100644 (file)
index 0000000..82131cf
--- /dev/null
@@ -0,0 +1,509 @@
+<?php
+/**
+ * Diff API: WP_Text_Diff_Renderer_Table class
+ *
+ * @package WordPress
+ * @subpackage Diff
+ * @since 4.7.0
+ */
+
+/**
+ * Table renderer to display the diff lines.
+ *
+ * @since 2.6.0
+ * @uses Text_Diff_Renderer Extends
+ */
+class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
+
+       /**
+        * @see Text_Diff_Renderer::_leading_context_lines
+        * @var int
+        * @access public
+        * @since 2.6.0
+        */
+       public $_leading_context_lines  = 10000;
+
+       /**
+        * @see Text_Diff_Renderer::_trailing_context_lines
+        * @var int
+        * @access public
+        * @since 2.6.0
+        */
+       public $_trailing_context_lines = 10000;
+
+       /**
+        * Threshold for when a diff should be saved or omitted.
+        *
+        * @var float
+        * @access protected
+        * @since 2.6.0
+        */
+       protected $_diff_threshold = 0.6;
+
+       /**
+        * Inline display helper object name.
+        *
+        * @var string
+        * @access protected
+        * @since 2.6.0
+        */
+       protected $inline_diff_renderer = 'WP_Text_Diff_Renderer_inline';
+
+       /**
+        * Should we show the split view or not
+        *
+        * @var string
+        * @access protected
+        * @since 3.6.0
+        */
+       protected $_show_split_view = true;
+
+       protected $compat_fields = array( '_show_split_view', 'inline_diff_renderer', '_diff_threshold' );
+
+       /**
+        * Constructor - Call parent constructor with params array.
+        *
+        * This will set class properties based on the key value pairs in the array.
+        *
+        * @since 2.6.0
+        *
+        * @param array $params
+        */
+       public function __construct( $params = array() ) {
+               parent::__construct( $params );
+               if ( isset( $params[ 'show_split_view' ] ) )
+                       $this->_show_split_view = $params[ 'show_split_view' ];
+       }
+
+       /**
+        * @ignore
+        *
+        * @param string $header
+        * @return string
+        */
+       public function _startBlock( $header ) {
+               return '';
+       }
+
+       /**
+        * @ignore
+        *
+        * @param array $lines
+        * @param string $prefix
+        */
+       public function _lines( $lines, $prefix=' ' ) {
+       }
+
+       /**
+        * @ignore
+        *
+        * @param string $line HTML-escape the value.
+        * @return string
+        */
+       public function addedLine( $line ) {
+               return "<td class='diff-addedline'>{$line}</td>";
+
+       }
+
+       /**
+        * @ignore
+        *
+        * @param string $line HTML-escape the value.
+        * @return string
+        */
+       public function deletedLine( $line ) {
+               return "<td class='diff-deletedline'>{$line}</td>";
+       }
+
+       /**
+        * @ignore
+        *
+        * @param string $line HTML-escape the value.
+        * @return string
+        */
+       public function contextLine( $line ) {
+               return "<td class='diff-context'>{$line}</td>";
+       }
+
+       /**
+        * @ignore
+        *
+        * @return string
+        */
+       public function emptyLine() {
+               return '<td>&nbsp;</td>';
+       }
+
+       /**
+        * @ignore
+        * @access public
+        *
+        * @param array $lines
+        * @param bool $encode
+        * @return string
+        */
+       public function _added( $lines, $encode = true ) {
+               $r = '';
+               foreach ($lines as $line) {
+                       if ( $encode ) {
+                               $processed_line = htmlspecialchars( $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
+                                * indicating if the line is added, deleted or unchanged.
+                                *
+                                * @since 4.1.0
+                                *
+                                * @param String $processed_line The processed diffed line.
+                                * @param String $line           The unprocessed diffed line.
+                                * @param string null            The line context. Values are 'added', 'deleted' or 'unchanged'.
+                                */
+                               $line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'added' );
+                       }
+
+                       if ( $this->_show_split_view ) {
+                               $r .= '<tr>' . $this->emptyLine() . $this->emptyLine() . $this->addedLine( $line ) . "</tr>\n";
+                       } else {
+                               $r .= '<tr>' . $this->addedLine( $line ) . "</tr>\n";
+                       }
+               }
+               return $r;
+       }
+
+       /**
+        * @ignore
+        * @access public
+        *
+        * @param array $lines
+        * @param bool $encode
+        * @return string
+        */
+       public function _deleted( $lines, $encode = true ) {
+               $r = '';
+               foreach ($lines as $line) {
+                       if ( $encode ) {
+                               $processed_line = htmlspecialchars( $line );
+
+                               /** This filter is documented in wp-includes/wp-diff.php */
+                               $line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'deleted' );
+                       }
+                       if ( $this->_show_split_view ) {
+                               $r .= '<tr>' . $this->deletedLine( $line ) . $this->emptyLine() . $this->emptyLine() . "</tr>\n";
+                       } else {
+                               $r .= '<tr>' . $this->deletedLine( $line ) . "</tr>\n";
+                       }
+
+               }
+               return $r;
+       }
+
+       /**
+        * @ignore
+        * @access public
+        *
+        * @param array $lines
+        * @param bool $encode
+        * @return string
+        */
+       public function _context( $lines, $encode = true ) {
+               $r = '';
+               foreach ($lines as $line) {
+                       if ( $encode ) {
+                               $processed_line = htmlspecialchars( $line );
+
+                               /** This filter is documented in wp-includes/wp-diff.php */
+                               $line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'unchanged' );
+                       }
+                       if (  $this->_show_split_view ) {
+                               $r .= '<tr>' . $this->contextLine( $line ) . $this->emptyLine() . $this->contextLine( $line )  . "</tr>\n";
+                       } else {
+                               $r .= '<tr>' . $this->contextLine( $line ) . "</tr>\n";
+                       }
+               }
+               return $r;
+       }
+
+       /**
+        * Process changed lines to do word-by-word diffs for extra highlighting.
+        *
+        * (TRAC style) sometimes these lines can actually be deleted or added rows.
+        * We do additional processing to figure that out
+        *
+        * @access public
+        * @since 2.6.0
+        *
+        * @param array $orig
+        * @param array $final
+        * @return string
+        */
+       public function _changed( $orig, $final ) {
+               $r = '';
+
+               // Does the aforementioned additional processing
+               // *_matches tell what rows are "the same" in orig and final. Those pairs will be diffed to get word changes
+               //      match is numeric: an index in other column
+               //      match is 'X': no match. It is a new row
+               // *_rows are column vectors for the orig column and the final column.
+               //      row >= 0: an indix of the $orig or $final array
+               //      row  < 0: a blank row for that column
+               list($orig_matches, $final_matches, $orig_rows, $final_rows) = $this->interleave_changed_lines( $orig, $final );
+
+               // These will hold the word changes as determined by an inline diff
+               $orig_diffs  = array();
+               $final_diffs = array();
+
+               // Compute word diffs for each matched pair using the inline diff
+               foreach ( $orig_matches as $o => $f ) {
+                       if ( is_numeric($o) && is_numeric($f) ) {
+                               $text_diff = new Text_Diff( 'auto', array( array($orig[$o]), array($final[$f]) ) );
+                               $renderer = new $this->inline_diff_renderer;
+                               $diff = $renderer->render( $text_diff );
+
+                               // If they're too different, don't include any <ins> or <dels>
+                               if ( preg_match_all( '!(<ins>.*?</ins>|<del>.*?</del>)!', $diff, $diff_matches ) ) {
+                                       // length of all text between <ins> or <del>
+                                       $stripped_matches = strlen(strip_tags( join(' ', $diff_matches[0]) ));
+                                       // since we count lengith of text between <ins> or <del> (instead of picking just one),
+                                       //      we double the length of chars not in those tags.
+                                       $stripped_diff = strlen(strip_tags( $diff )) * 2 - $stripped_matches;
+                                       $diff_ratio = $stripped_matches / $stripped_diff;
+                                       if ( $diff_ratio > $this->_diff_threshold )
+                                               continue; // Too different. Don't save diffs.
+                               }
+
+                               // Un-inline the diffs by removing del or ins
+                               $orig_diffs[$o]  = preg_replace( '|<ins>.*?</ins>|', '', $diff );
+                               $final_diffs[$f] = preg_replace( '|<del>.*?</del>|', '', $diff );
+                       }
+               }
+
+               foreach ( array_keys($orig_rows) as $row ) {
+                       // Both columns have blanks. Ignore them.
+                       if ( $orig_rows[$row] < 0 && $final_rows[$row] < 0 )
+                               continue;
+
+                       // If we have a word based diff, use it. Otherwise, use the normal line.
+                       if ( isset( $orig_diffs[$orig_rows[$row]] ) )
+                               $orig_line = $orig_diffs[$orig_rows[$row]];
+                       elseif ( isset( $orig[$orig_rows[$row]] ) )
+                               $orig_line = htmlspecialchars($orig[$orig_rows[$row]]);
+                       else
+                               $orig_line = '';
+
+                       if ( isset( $final_diffs[$final_rows[$row]] ) )
+                               $final_line = $final_diffs[$final_rows[$row]];
+                       elseif ( isset( $final[$final_rows[$row]] ) )
+                               $final_line = htmlspecialchars($final[$final_rows[$row]]);
+                       else
+                               $final_line = '';
+
+                       if ( $orig_rows[$row] < 0 ) { // Orig is blank. This is really an added row.
+                               $r .= $this->_added( array($final_line), false );
+                       } elseif ( $final_rows[$row] < 0 ) { // Final is blank. This is really a deleted row.
+                               $r .= $this->_deleted( array($orig_line), false );
+                       } else { // A true changed row.
+                               if ( $this->_show_split_view ) {
+                                       $r .= '<tr>' . $this->deletedLine( $orig_line ) . $this->emptyLine() . $this->addedLine( $final_line ) . "</tr>\n";
+                               } else {
+                                       $r .= '<tr>' . $this->deletedLine( $orig_line ) . "</tr><tr>" . $this->addedLine( $final_line ) . "</tr>\n";
+                               }
+                       }
+               }
+
+               return $r;
+       }
+
+       /**
+        * Takes changed blocks and matches which rows in orig turned into which rows in final.
+        *
+        * Returns
+        *      *_matches ( which rows match with which )
+        *      *_rows ( order of rows in each column interleaved with blank rows as
+        *              necessary )
+        *
+        * @since 2.6.0
+        *
+        * @param array $orig
+        * @param array $final
+        * @return array
+        */
+       public function interleave_changed_lines( $orig, $final ) {
+
+               // Contains all pairwise string comparisons. Keys are such that this need only be a one dimensional array.
+               $matches = array();
+               foreach ( array_keys($orig) as $o ) {
+                       foreach ( array_keys($final) as $f ) {
+                               $matches["$o,$f"] = $this->compute_string_distance( $orig[$o], $final[$f] );
+                       }
+               }
+               asort($matches); // Order by string distance.
+
+               $orig_matches  = array();
+               $final_matches = array();
+
+               foreach ( $matches as $keys => $difference ) {
+                       list($o, $f) = explode(',', $keys);
+                       $o = (int) $o;
+                       $f = (int) $f;
+
+                       // Already have better matches for these guys
+                       if ( isset($orig_matches[$o]) && isset($final_matches[$f]) )
+                               continue;
+
+                       // First match for these guys. Must be best match
+                       if ( !isset($orig_matches[$o]) && !isset($final_matches[$f]) ) {
+                               $orig_matches[$o] = $f;
+                               $final_matches[$f] = $o;
+                               continue;
+                       }
+
+                       // Best match of this final is already taken?  Must mean this final is a new row.
+                       if ( isset($orig_matches[$o]) )
+                               $final_matches[$f] = 'x';
+
+                       // Best match of this orig is already taken?  Must mean this orig is a deleted row.
+                       elseif ( isset($final_matches[$f]) )
+                               $orig_matches[$o] = 'x';
+               }
+
+               // We read the text in this order
+               ksort($orig_matches);
+               ksort($final_matches);
+
+               // Stores rows and blanks for each column.
+               $orig_rows = $orig_rows_copy = array_keys($orig_matches);
+               $final_rows = array_keys($final_matches);
+
+               // Interleaves rows with blanks to keep matches aligned.
+               // We may end up with some extraneous blank rows, but we'll just ignore them later.
+               foreach ( $orig_rows_copy as $orig_row ) {
+                       $final_pos = array_search($orig_matches[$orig_row], $final_rows, true);
+                       $orig_pos = (int) array_search($orig_row, $orig_rows, true);
+
+                       if ( false === $final_pos ) { // This orig is paired with a blank final.
+                               array_splice( $final_rows, $orig_pos, 0, -1 );
+                       } elseif ( $final_pos < $orig_pos ) { // This orig's match is up a ways. Pad final with blank rows.
+                               $diff_pos = $final_pos - $orig_pos;
+                               while ( $diff_pos < 0 )
+                                       array_splice( $final_rows, $orig_pos, 0, $diff_pos++ );
+                       } elseif ( $final_pos > $orig_pos ) { // This orig's match is down a ways. Pad orig with blank rows.
+                               $diff_pos = $orig_pos - $final_pos;
+                               while ( $diff_pos < 0 )
+                                       array_splice( $orig_rows, $orig_pos, 0, $diff_pos++ );
+                       }
+               }
+
+               // Pad the ends with blank rows if the columns aren't the same length
+               $diff_count = count($orig_rows) - count($final_rows);
+               if ( $diff_count < 0 ) {
+                       while ( $diff_count < 0 )
+                               array_push($orig_rows, $diff_count++);
+               } elseif ( $diff_count > 0 ) {
+                       $diff_count = -1 * $diff_count;
+                       while ( $diff_count < 0 )
+                               array_push($final_rows, $diff_count++);
+               }
+
+               return array($orig_matches, $final_matches, $orig_rows, $final_rows);
+       }
+
+       /**
+        * Computes a number that is intended to reflect the "distance" between two strings.
+        *
+        * @since 2.6.0
+        *
+        * @param string $string1
+        * @param string $string2
+        * @return int
+        */
+       public function compute_string_distance( $string1, $string2 ) {
+               // Vectors containing character frequency for all chars in each string
+               $chars1 = count_chars($string1);
+               $chars2 = count_chars($string2);
+
+               // L1-norm of difference vector.
+               $difference = array_sum( array_map( array($this, 'difference'), $chars1, $chars2 ) );
+
+               // $string1 has zero length? Odd. Give huge penalty by not dividing.
+               if ( !$string1 )
+                       return $difference;
+
+               // Return distance per character (of string1).
+               return $difference / strlen($string1);
+       }
+
+       /**
+        * @ignore
+        * @since 2.6.0
+        *
+        * @param int $a
+        * @param int $b
+        * @return int
+        */
+       public function difference( $a, $b ) {
+               return abs( $a - $b );
+       }
+
+       /**
+        * Make private properties readable for backward compatibility.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param string $name Property to get.
+        * @return mixed Property.
+        */
+       public function __get( $name ) {
+               if ( in_array( $name, $this->compat_fields ) ) {
+                       return $this->$name;
+               }
+       }
+
+       /**
+        * Make private properties settable for backward compatibility.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param string $name  Property to check if set.
+        * @param mixed  $value Property value.
+        * @return mixed Newly-set property.
+        */
+       public function __set( $name, $value ) {
+               if ( in_array( $name, $this->compat_fields ) ) {
+                       return $this->$name = $value;
+               }
+       }
+
+       /**
+        * Make private properties checkable for backward compatibility.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param string $name Property to check if set.
+        * @return bool Whether the property is set.
+        */
+       public function __isset( $name ) {
+               if ( in_array( $name, $this->compat_fields ) ) {
+                       return isset( $this->$name );
+               }
+       }
+
+       /**
+        * Make private properties un-settable for backward compatibility.
+        *
+        * @since 4.0.0
+        * @access public
+        *
+        * @param string $name Property to unset.
+        */
+       public function __unset( $name ) {
+               if ( in_array( $name, $this->compat_fields ) ) {
+                       unset( $this->$name );
+               }
+       }
+}
index 35c5650339e687c7b5f3a74619d7da9c44b08f19..f161a63186b8558aab35b18790c476e4f4422f46 100644 (file)
@@ -48,15 +48,16 @@ final class WP_Theme implements ArrayAccess {
         * @var array
         */
        private static $default_themes = array(
-               'classic'        => 'WordPress Classic',
-               'default'        => 'WordPress Default',
-               'twentyten'      => 'Twenty Ten',
-               'twentyeleven'   => 'Twenty Eleven',
-               'twentytwelve'   => 'Twenty Twelve',
-               'twentythirteen' => 'Twenty Thirteen',
-               'twentyfourteen' => 'Twenty Fourteen',
-               'twentyfifteen'  => 'Twenty Fifteen',
-               'twentysixteen'  => 'Twenty Sixteen',
+               'classic'         => 'WordPress Classic',
+               'default'         => 'WordPress Default',
+               'twentyten'       => 'Twenty Ten',
+               'twentyeleven'    => 'Twenty Eleven',
+               'twentytwelve'    => 'Twenty Twelve',
+               'twentythirteen'  => 'Twenty Thirteen',
+               'twentyfourteen'  => 'Twenty Fourteen',
+               'twentyfifteen'   => 'Twenty Fifteen',
+               'twentysixteen'   => 'Twenty Sixteen',
+               'twentyseventeen' => 'Twenty Seventeen',
        );
 
        /**
@@ -537,7 +538,7 @@ final class WP_Theme implements ArrayAccess {
         * @since 3.4.0
         * @access private
         *
-        * @param string $key Type of data to store (theme, screenshot, headers, page_templates)
+        * @param string $key Type of data to store (theme, screenshot, headers, post_templates)
         * @param string $data Data to store
         * @return bool Return value from wp_cache_add()
         */
@@ -553,7 +554,7 @@ final class WP_Theme implements ArrayAccess {
         * @since 3.4.0
         * @access private
         *
-        * @param string $key Type of data to retrieve (theme, screenshot, headers, page_templates)
+        * @param string $key Type of data to retrieve (theme, screenshot, headers, post_templates)
         * @return mixed Retrieved data
         */
        private function cache_get( $key ) {
@@ -567,7 +568,7 @@ final class WP_Theme implements ArrayAccess {
         * @access public
         */
        public function cache_delete() {
-               foreach ( array( 'theme', 'screenshot', 'headers', 'page_templates' ) as $key )
+               foreach ( array( 'theme', 'screenshot', 'headers', 'post_templates' ) as $key )
                        wp_cache_delete( $key . '-' . $this->cache_hash, 'themes' );
                $this->template = $this->textdomain_loaded = $this->theme_root_uri = $this->parent = $this->errors = $this->headers_sanitized = $this->name_translated = null;
                $this->headers = array();
@@ -720,9 +721,8 @@ final class WP_Theme implements ArrayAccess {
        private function markup_header( $header, $value, $translate ) {
                switch ( $header ) {
                        case 'Name' :
-                               if ( empty( $value ) ) {
-                                       $value = esc_html( $this->get_stylesheet() );
-                               }
+                               if ( empty( $value ) )
+                                       $value = $this->get_stylesheet();
                                break;
                        case 'Description' :
                                $value = wptexturize( $value );
@@ -1006,56 +1006,101 @@ final class WP_Theme implements ArrayAccess {
        }
 
        /**
-        * Returns the theme's page templates.
+        * Returns the theme's post templates.
         *
-        * @since 3.4.0
+        * @since 4.7.0
         * @access public
         *
-        * @param WP_Post|null $post Optional. The post being edited, provided for context.
-        * @return array Array of page templates, keyed by filename, with the value of the translated header name.
+        * @return array Array of page templates, keyed by filename and post type,
+        *               with the value of the translated header name.
         */
-       public function get_page_templates( $post = null ) {
+       public function get_post_templates() {
                // If you screw up your current theme and we invalidate your parent, most things still work. Let it slide.
-               if ( $this->errors() && $this->errors()->get_error_codes() !== array( 'theme_parent_invalid' ) )
+               if ( $this->errors() && $this->errors()->get_error_codes() !== array( 'theme_parent_invalid' ) ) {
                        return array();
+               }
 
-               $page_templates = $this->cache_get( 'page_templates' );
+               $post_templates = $this->cache_get( 'post_templates' );
 
-               if ( ! is_array( $page_templates ) ) {
-                       $page_templates = array();
+               if ( ! is_array( $post_templates ) ) {
+                       $post_templates = array();
 
                        $files = (array) $this->get_files( 'php', 1 );
 
                        foreach ( $files as $file => $full_path ) {
-                               if ( ! preg_match( '|Template Name:(.*)$|mi', file_get_contents( $full_path ), $header ) )
+                               if ( ! preg_match( '|Template Name:(.*)$|mi', file_get_contents( $full_path ), $header ) ) {
                                        continue;
-                               $page_templates[ $file ] = _cleanup_header_comment( $header[1] );
+                               }
+
+                               $types = array( 'page' );
+                               if ( preg_match( '|Template Post Type:(.*)$|mi', file_get_contents( $full_path ), $type ) ) {
+                                       $types = explode( ',', _cleanup_header_comment( $type[1] ) );
+                               }
+
+                               foreach ( $types as $type ) {
+                                       $type = sanitize_key( $type );
+                                       if ( ! isset( $post_templates[ $type ] ) ) {
+                                               $post_templates[ $type ] = array();
+                                       }
+
+                                       $post_templates[ $type ][ $file ] = _cleanup_header_comment( $header[1] );
+                               }
                        }
 
-                       $this->cache_add( 'page_templates', $page_templates );
+                       $this->cache_add( 'post_templates', $post_templates );
                }
 
                if ( $this->load_textdomain() ) {
-                       foreach ( $page_templates as &$page_template ) {
-                               $page_template = $this->translate_header( 'Template Name', $page_template );
+                       foreach ( $post_templates as &$post_type ) {
+                               foreach ( $post_type as &$post_template ) {
+                                       $post_template = $this->translate_header( 'Template Name', $post_template );
+                               }
                        }
                }
 
-               if ( $this->parent() )
-                       $page_templates += $this->parent()->get_page_templates( $post );
+               return $post_templates;
+       }
+
+       /**
+        * Returns the theme's post templates for a given post type.
+        *
+        * @since 3.4.0
+        * @since 4.7.0 Added the `$post_type` parameter.
+        * @access public
+        *
+        * @param WP_Post|null $post      Optional. The post being edited, provided for context.
+        * @param string       $post_type Optional. Post type to get the templates for. Default 'page'.
+        *                                If a post is provided, its post type is used.
+        * @return array Array of page templates, keyed by filename, with the value of the translated header name.
+        */
+       public function get_page_templates( $post = null, $post_type = 'page' ) {
+               if ( $post ) {
+                       $post_type = get_post_type( $post );
+               }
+
+               $post_templates = $this->get_post_templates();
+               $post_templates = isset( $post_templates[ $post_type ] ) ? $post_templates[ $post_type ] : array();
+
+               if ( $this->parent() ) {
+                       $post_templates += $this->parent()->get_page_templates( $post, $post_type );
+               }
 
                /**
                 * Filters list of page templates for a theme.
                 *
+                * The dynamic portion of the hook name, `$post_type`, refers to the post type.
+                *
                 * @since 3.9.0
                 * @since 4.4.0 Converted to allow complete control over the `$page_templates` array.
+                * @since 4.7.0 Added the `$post_type` parameter.
                 *
-                * @param array        $page_templates Array of page templates. Keys are filenames,
+                * @param array        $post_templates Array of page templates. Keys are filenames,
                 *                                     values are translated names.
                 * @param WP_Theme     $this           The theme object.
                 * @param WP_Post|null $post           The post being edited, provided for context, or null.
+                * @param string       $post_type      Post type to get the templates for.
                 */
-               return (array) apply_filters( 'theme_page_templates', $page_templates, $this, $post );
+               return (array) apply_filters( "theme_{$post_type}_templates", $post_templates, $this, $post, $post_type );
        }
 
        /**
@@ -1396,7 +1441,7 @@ final class WP_Theme implements ArrayAccess {
         * @param array $themes Array of themes to sort, passed by reference.
         */
        public static function sort_by_name( &$themes ) {
-               if ( 0 === strpos( get_locale(), 'en_' ) ) {
+               if ( 0 === strpos( get_user_locale(), 'en_' ) ) {
                        uasort( $themes, array( 'WP_Theme', '_name_sort' ) );
                } else {
                        uasort( $themes, array( 'WP_Theme', '_name_sort_i18n' ) );
diff --git a/wp-includes/class-wp-user-meta-session-tokens.php b/wp-includes/class-wp-user-meta-session-tokens.php
new file mode 100644 (file)
index 0000000..a01ebff
--- /dev/null
@@ -0,0 +1,139 @@
+<?php
+/**
+ * Session API: WP_User_Meta_Session_Tokens class
+ *
+ * @package WordPress
+ * @subpackage Session
+ * @since 4.7.0
+ */
+
+/**
+ * Meta-based user sessions token manager.
+ *
+ * @since 4.0.0
+ */
+class WP_User_Meta_Session_Tokens extends WP_Session_Tokens {
+
+       /**
+        * Get all sessions of a user.
+        *
+        * @since 4.0.0
+        * @access protected
+        *
+        * @return array Sessions of a user.
+        */
+       protected function get_sessions() {
+               $sessions = get_user_meta( $this->user_id, 'session_tokens', true );
+
+               if ( ! is_array( $sessions ) ) {
+                       return array();
+               }
+
+               $sessions = array_map( array( $this, 'prepare_session' ), $sessions );
+               return array_filter( $sessions, array( $this, 'is_still_valid' ) );
+       }
+
+       /**
+        * Converts an expiration to an array of session information.
+        *
+        * @param mixed $session Session or expiration.
+        * @return array Session.
+        */
+       protected function prepare_session( $session ) {
+               if ( is_int( $session ) ) {
+                       return array( 'expiration' => $session );
+               }
+
+               return $session;
+       }
+
+       /**
+        * Retrieve a session by its verifier (token hash).
+        *
+        * @since 4.0.0
+        * @access protected
+        *
+        * @param string $verifier Verifier of the session to retrieve.
+        * @return array|null The session, or null if it does not exist
+        */
+       protected function get_session( $verifier ) {
+               $sessions = $this->get_sessions();
+
+               if ( isset( $sessions[ $verifier ] ) ) {
+                       return $sessions[ $verifier ];
+               }
+
+               return null;
+       }
+
+       /**
+        * Update a session by its verifier.
+        *
+        * @since 4.0.0
+        * @access protected
+        *
+        * @param string $verifier Verifier of the session to update.
+        * @param array  $session  Optional. Session. Omitting this argument destroys the session.
+        */
+       protected function update_session( $verifier, $session = null ) {
+               $sessions = $this->get_sessions();
+
+               if ( $session ) {
+                       $sessions[ $verifier ] = $session;
+               } else {
+                       unset( $sessions[ $verifier ] );
+               }
+
+               $this->update_sessions( $sessions );
+       }
+
+       /**
+        * Update a user's sessions in the usermeta table.
+        *
+        * @since 4.0.0
+        * @access protected
+        *
+        * @param array $sessions Sessions.
+        */
+       protected function update_sessions( $sessions ) {
+               if ( $sessions ) {
+                       update_user_meta( $this->user_id, 'session_tokens', $sessions );
+               } else {
+                       delete_user_meta( $this->user_id, 'session_tokens' );
+               }
+       }
+
+       /**
+        * Destroy all session tokens for a user, except a single session passed.
+        *
+        * @since 4.0.0
+        * @access protected
+        *
+        * @param string $verifier Verifier of the session to keep.
+        */
+       protected function destroy_other_sessions( $verifier ) {
+               $session = $this->get_session( $verifier );
+               $this->update_sessions( array( $verifier => $session ) );
+       }
+
+       /**
+        * Destroy all session tokens for a user.
+        *
+        * @since 4.0.0
+        * @access protected
+        */
+       protected function destroy_all_sessions() {
+               $this->update_sessions( array() );
+       }
+
+       /**
+        * Destroy all session tokens for all users.
+        *
+        * @since 4.0.0
+        * @access public
+        * @static
+        */
+       public static function drop_sessions() {
+               delete_metadata( 'user', 0, 'session_tokens', false, true );
+       }
+}
index 84cdcf6b294ce7ca1becf225c5aee88458a61569..0c3e1052737f3c8a6ee6b93180d238ac553dc910 100644 (file)
@@ -95,7 +95,7 @@ class WP_User_Query {
         */
        public static function fill_query_vars( $args ) {
                $defaults = array(
-                       'blog_id' => $GLOBALS['blog_id'],
+                       'blog_id' => get_current_blog_id(),
                        'role' => '',
                        'role__in' => array(),
                        'role__not_in' => array(),
@@ -115,6 +115,12 @@ class WP_User_Query {
                        'fields' => 'all',
                        'who' => '',
                        'has_published_posts' => null,
+                       'nicename' => '',
+                       'nicename__in' => array(),
+                       'nicename__not_in' => array(),
+                       'login' => '',
+                       'login__in' => array(),
+                       'login__not_in' => array()
                );
 
                return wp_parse_args( $args, $defaults );
@@ -131,6 +137,8 @@ class WP_User_Query {
         * @since 4.4.0 Added 'paged', 'role__in', and 'role__not_in' parameters. The 'role' parameter was updated to
         *              permit an array or comma-separated list of values. The 'number' parameter was updated to support
         *              querying for all users with using -1.
+        * @since 4.7.0 Added 'nicename', 'nicename__in', 'nicename__not_in', 'login', 'login__in',
+        *              and 'login__not_in' parameters.
         *
         * @access public
         *
@@ -165,12 +173,12 @@ class WP_User_Query {
         *                                             an array of values, or a multi-dimensional array with fields as
         *                                             keys and orders ('ASC' or 'DESC') as values. Accepted values are
         *                                             'ID', 'display_name' (or 'name'), 'include', 'user_login'
-        *                                             (or 'login'), 'user_nicename' (or 'nicename'), 'user_email'
-        *                                             (or 'email'), 'user_url' (or 'url'), 'user_registered'
-        *                                             or 'registered'), 'post_count', 'meta_value', 'meta_value_num',
-        *                                             the value of `$meta_key`, or an array key of `$meta_query`. To use
-        *                                             'meta_value' or 'meta_value_num', `$meta_key` must be also be
-        *                                             defined. Default 'user_login'.
+        *                                             (or 'login'), 'login__in', 'user_nicename' (or 'nicename'),
+        *                                             'nicename__in', 'user_email (or 'email'), 'user_url' (or 'url'),
+        *                                             'user_registered' (or 'registered'), 'post_count', 'meta_value',
+        *                                             'meta_value_num', the value of `$meta_key`, or an array key of
+        *                                             `$meta_query`. To use 'meta_value' or 'meta_value_num', `$meta_key`
+        *                                             must be also be defined. Default 'user_login'.
         *     @type string       $order               Designates ascending or descending order of users. Order values
         *                                             passed as part of an `$orderby` array take precedence over this
         *                                             parameter. Accepts 'ASC', 'DESC'. Default 'ASC'.
@@ -195,6 +203,16 @@ class WP_User_Query {
         *     @type bool|array   $has_published_posts Pass an array of post types to filter results to users who have
         *                                             published posts in those post types. `true` is an alias for all
         *                                             public post types.
+        *     @type string       $nicename            The user nicename. Default empty.
+        *     @type array        $nicename__in        An array of nicenames to include. Users matching one of these
+        *                                             nicenames will be included in results. Default empty array.
+        *     @type array        $nicename__not_in    An array of nicenames to exclude. Users matching one of these
+        *                                             nicenames will not be included in results. Default empty array.
+        *     @type string       $login               The user login. Default empty.
+        *     @type array        $login__in           An array of logins to include. Users matching one of these
+        *                                             logins will be included in results. Default empty array.
+        *     @type array        $login__not_in       An array of logins to exclude. Users matching one of these
+        *                                             logins will not be included in results. Default empty array.
         * }
         */
        public function prepare_query( $query = array() ) {
@@ -270,6 +288,40 @@ class WP_User_Query {
                        $this->query_where .= " AND $wpdb->users.ID IN ( SELECT DISTINCT $posts_table.post_author FROM $posts_table WHERE $posts_table.post_status = 'publish' AND $posts_table.post_type IN ( " . join( ", ", $post_types ) . " ) )";
                }
 
+               // nicename
+               if ( '' !== $qv['nicename']) {
+                       $this->query_where .= $wpdb->prepare( ' AND user_nicename = %s', $qv['nicename'] );
+               }
+
+               if ( ! empty( $qv['nicename__in'] ) ) {
+                       $sanitized_nicename__in = array_map( 'esc_sql', $qv['nicename__in'] );
+                       $nicename__in = implode( "','", $sanitized_nicename__in );
+                       $this->query_where .= " AND user_nicename IN ( '$nicename__in' )";
+               }
+
+               if ( ! empty( $qv['nicename__not_in'] ) ) {
+                       $sanitized_nicename__not_in = array_map( 'esc_sql', $qv['nicename__not_in'] );
+                       $nicename__not_in = implode( "','", $sanitized_nicename__not_in );
+                       $this->query_where .= " AND user_nicename NOT IN ( '$nicename__not_in' )";
+               }
+
+               // login
+               if ( '' !== $qv['login']) {
+                       $this->query_where .= $wpdb->prepare( ' AND user_login = %s', $qv['login'] );
+               }
+
+               if ( ! empty( $qv['login__in'] ) ) {
+                       $sanitized_login__in = array_map( 'esc_sql', $qv['login__in'] );
+                       $login__in = implode( "','", $sanitized_login__in );
+                       $this->query_where .= " AND user_login IN ( '$login__in' )";
+               }
+
+               if ( ! empty( $qv['login__not_in'] ) ) {
+                       $sanitized_login__not_in = array_map( 'esc_sql', $qv['login__not_in'] );
+                       $login__not_in = implode( "','", $sanitized_login__not_in );
+                       $this->query_where .= " AND user_login NOT IN ( '$login__not_in' )";
+               }
+
                // Meta query.
                $this->meta_query = new WP_Meta_Query();
                $this->meta_query->parse_query_vars( $qv );
@@ -428,7 +480,11 @@ class WP_User_Query {
                                continue;
                        }
 
-                       $orderby_array[] = $parsed . ' ' . $this->parse_order( $_order );
+                       if ( 'nicename__in' === $_orderby || 'login__in' === $_orderby ) {
+                               $orderby_array[] = $parsed;
+                       } else {
+                               $orderby_array[] = $parsed . ' ' . $this->parse_order( $_order );
+                       }
                }
 
                // If no valid clauses were found, order by user_login.
@@ -706,6 +762,14 @@ class WP_User_Query {
                        $include = wp_parse_id_list( $this->query_vars['include'] );
                        $include_sql = implode( ',', $include );
                        $_orderby = "FIELD( $wpdb->users.ID, $include_sql )";
+               } elseif ( 'nicename__in' === $orderby ) {
+                       $sanitized_nicename__in = array_map( 'esc_sql', $this->query_vars['nicename__in'] );
+                       $nicename__in = implode( "','", $sanitized_nicename__in );
+                       $_orderby = "FIELD( user_nicename, '$nicename__in' )";
+               } elseif ( 'login__in' === $orderby ) {
+                       $sanitized_login__in = array_map( 'esc_sql', $this->query_vars['login__in'] );
+                       $login__in = implode( "','", $sanitized_login__in );
+                       $_orderby = "FIELD( user_login, '$login__in' )";
                } elseif ( isset( $meta_query_clauses[ $orderby ] ) ) {
                        $meta_clause = $meta_query_clauses[ $orderby ];
                        $_orderby = sprintf( "CAST(%s.meta_value AS %s)", esc_sql( $meta_clause['alias'] ), esc_sql( $meta_clause['cast'] ) );
index 0f5ee105462caafa5af55d9ca6872df27951c5b6..328fb6a5237df24457d9b014ea27ecb7526398d5 100644 (file)
  * @property string $user_registered
  * @property string $user_activation_key
  * @property string $user_status
+ * @property int    $user_level
  * @property string $display_name
  * @property string $spam
  * @property string $deleted
+ * @property string $locale
  */
 class WP_User {
        /**
index 44f3686ddc3ca20598a84e68c8001ac91601dd45..b69b219cd95d057fed3fbca95cfeadee1a408f16 100644 (file)
@@ -10,7 +10,7 @@
 /**
  * Core base class extended to register widgets.
  *
- * This class must be extended for each widget, and WP_Widget::widget() must be overriden.
+ * This class must be extended for each widget, and WP_Widget::widget() must be overridden.
  *
  * If adding widget options, WP_Widget::update() and WP_Widget::form() should also be overridden.
  *
@@ -37,6 +37,24 @@ class WP_Widget {
         */
        public $name;
 
+       /**
+        * Option name for this widget type.
+        *
+        * @since 2.8.0
+        * @access public
+        * @var string
+        */
+       public $option_name;
+
+       /**
+        * Alt option name for this widget type.
+        *
+        * @since 2.8.0
+        * @access public
+        * @var string
+        */
+       public $alt_option_name;
+
        /**
         * Option array passed to wp_register_sidebar_widget().
         *
@@ -86,7 +104,7 @@ class WP_Widget {
        public $updated = false;
 
        //
-       // Member functions that must be overriden by subclasses.
+       // Member functions that must be overridden by subclasses.
        //
 
        /**
index be2d3edb7dfb9d76d6f9799ddac532b9e4f56ba5..5084da65cb9d754aa06977cff1e9a9ae2d592379 100644 (file)
@@ -404,12 +404,8 @@ class wp_xmlrpc_server extends IXR_Server {
         * Passes property through {@see 'xmlrpc_blog_options'} filter.
         *
         * @since 2.6.0
-        *
-        * @global string $wp_version
         */
        public function initialise_blog_option_info() {
-               global $wp_version;
-
                $this->blog_options = array(
                        // Read only options
                        'software_name'     => array(
@@ -420,7 +416,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        'software_version'  => array(
                                'desc'          => __( 'Software Version' ),
                                'readonly'      => true,
-                               'value'         => $wp_version
+                               'value'         => get_bloginfo( 'version' )
                        ),
                        'blog_url'          => array(
                                'desc'          => __( 'WordPress Address (URL)' ),
@@ -591,6 +587,10 @@ class wp_xmlrpc_server extends IXR_Server {
         *  - 'xmlrpc' - url of xmlrpc endpoint
         */
        public function wp_getUsersBlogs( $args ) {
+               if ( ! $this->minimum_args( $args, 2 ) ) {
+                       return $this->error;
+               }
+
                // If this isn't on WPMU then just use blogger_getUsersBlogs
                if ( !is_multisite() ) {
                        array_unshift( $args, 1 );
@@ -628,7 +628,7 @@ class wp_xmlrpc_server extends IXR_Server {
 
                foreach ( $blogs as $blog ) {
                        // Don't include blogs that aren't hosted at this site.
-                       if ( $blog->site_id != get_current_site()->id )
+                       if ( $blog->site_id != get_current_network_id() )
                                continue;
 
                        $blog_id = $blog->userblog_id;
@@ -708,9 +708,9 @@ class wp_xmlrpc_server extends IXR_Server {
                 *
                 * @since 3.4.0
                 *
-                * @param array  $_taxonomy An array of taxonomy data.
-                * @param object $taxonomy  Taxonomy object.
-                * @param array  $fields    The subset of taxonomy fields to return.
+                * @param array       $_taxonomy An array of taxonomy data.
+                * @param WP_Taxonomy $taxonomy  Taxonomy object.
+                * @param array       $fields    The subset of taxonomy fields to return.
                 */
                return apply_filters( 'xmlrpc_prepare_taxonomy', $_taxonomy, $taxonomy, $fields );
        }
@@ -1270,7 +1270,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        }
                } elseif ( isset( $post_data['sticky'] ) )  {
                        if ( ! current_user_can( $post_type->cap->edit_others_posts ) ) {
-                               return new IXR_Error( 401, __( 'Sorry, you are not allowed to stick this post.' ) );
+                               return new IXR_Error( 401, __( 'Sorry, you are not allowed to make posts sticky.' ) );
                        }
 
                        $sticky = wp_validate_boolean( $post_data['sticky'] );
@@ -1324,12 +1324,12 @@ class wp_xmlrpc_server extends IXR_Server {
                                break;
                        case 'private':
                                if ( ! current_user_can( $post_type->cap->publish_posts ) )
-                                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type' ) );
+                                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type.' ) );
                                break;
                        case 'publish':
                        case 'future':
                                if ( ! current_user_can( $post_type->cap->publish_posts ) )
-                                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type' ) );
+                                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type.' ) );
                                break;
                        default:
                                if ( ! get_post_status_object( $post_data['post_status'] ) )
@@ -1338,7 +1338,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                if ( ! empty( $post_data['post_password'] ) && ! current_user_can( $post_type->cap->publish_posts ) )
-                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to create password protected posts in this post type' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to create password protected posts in this post type.' ) );
 
                $post_data['post_author'] = absint( $post_data['post_author'] );
                if ( ! empty( $post_data['post_author'] ) && $post_data['post_author'] != $user->ID ) {
@@ -1523,7 +1523,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 500, $post_ID->get_error_message() );
 
                if ( ! $post_ID )
-                       return new IXR_Error( 401, __( 'Sorry, your entry could not be posted. Something wrong happened.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, your entry could not be posted.' ) );
 
                return strval( $post_ID );
        }
@@ -1789,13 +1789,13 @@ class wp_xmlrpc_server extends IXR_Server {
                if ( isset( $filter['post_type'] ) ) {
                        $post_type = get_post_type_object( $filter['post_type'] );
                        if ( ! ( (bool) $post_type ) )
-                               return new IXR_Error( 403, __( 'The post type specified is not valid' ) );
+                               return new IXR_Error( 403, __( 'Invalid post type.' ) );
                } else {
                        $post_type = get_post_type_object( 'post' );
                }
 
                if ( ! current_user_can( $post_type->cap->edit_posts ) )
-                       return new IXR_Error( 401, __( 'Sorry, 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;
 
@@ -1877,8 +1877,9 @@ class wp_xmlrpc_server extends IXR_Server {
 
                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
 
-               if ( ! current_user_can( $taxonomy->cap->manage_terms ) )
+               if ( ! current_user_can( $taxonomy->cap->edit_terms ) ) {
                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) );
+               }
 
                $taxonomy = (array) $taxonomy;
 
@@ -1917,7 +1918,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 500, $term->get_error_message() );
 
                if ( ! $term )
-                       return new IXR_Error( 500, __( 'Sorry, your term could not be created. Something wrong happened.' ) );
+                       return new IXR_Error( 500, __( 'Sorry, your term could not be created.' ) );
 
                return strval( $term['term_id'] );
        }
@@ -1964,9 +1965,6 @@ class wp_xmlrpc_server extends IXR_Server {
 
                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
 
-               if ( ! current_user_can( $taxonomy->cap->edit_terms ) )
-                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) );
-
                $taxonomy = (array) $taxonomy;
 
                // hold the data of the term
@@ -1980,6 +1978,10 @@ class wp_xmlrpc_server extends IXR_Server {
                if ( ! $term )
                        return new IXR_Error( 404, __( 'Invalid term ID.' ) );
 
+               if ( ! current_user_can( 'edit_term', $term_id ) ) {
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this term.' ) );
+               }
+
                if ( isset( $content_struct['name'] ) ) {
                        $term_data['name'] = trim( $content_struct['name'] );
 
@@ -2059,10 +2061,6 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
 
                $taxonomy = get_taxonomy( $taxonomy );
-
-               if ( ! current_user_can( $taxonomy->cap->delete_terms ) )
-                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete terms in this taxonomy.' ) );
-
                $term = get_term( $term_id, $taxonomy->name );
 
                if ( is_wp_error( $term ) )
@@ -2071,6 +2069,10 @@ class wp_xmlrpc_server extends IXR_Server {
                if ( ! $term )
                        return new IXR_Error( 404, __( 'Invalid term ID.' ) );
 
+               if ( ! current_user_can( 'delete_term', $term_id ) ) {
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this term.' ) );
+               }
+
                $result = wp_delete_term( $term_id, $taxonomy->name );
 
                if ( is_wp_error( $result ) )
@@ -2131,9 +2133,6 @@ class wp_xmlrpc_server extends IXR_Server {
 
                $taxonomy = get_taxonomy( $taxonomy );
 
-               if ( ! current_user_can( $taxonomy->cap->assign_terms ) )
-                       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 );
 
                if ( is_wp_error( $term ) )
@@ -2142,6 +2141,10 @@ class wp_xmlrpc_server extends IXR_Server {
                if ( ! $term )
                        return new IXR_Error( 404, __( 'Invalid term ID.' ) );
 
+               if ( ! current_user_can( 'assign_term', $term_id ) ) {
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign this term.' ) );
+               }
+
                return $this->_prepare_term( $term );
        }
 
@@ -2473,7 +2476,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, __( 'Sorry, you are not allowed to browse users.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to list users.' ) );
 
                $query = array( 'fields' => 'all_with_meta' );
 
@@ -2489,7 +2492,7 @@ class wp_xmlrpc_server extends IXR_Server {
 
                if ( isset( $filter['role'] ) ) {
                        if ( get_role( $filter['role'] ) === null )
-                               return new IXR_Error( 403, __( 'The role specified is not valid' ) );
+                               return new IXR_Error( 403, __( 'Invalid role.' ) );
 
                        $query['role'] = $filter['role'];
                }
@@ -3471,7 +3474,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error(500, $result->get_error_message());
 
                if ( !$result )
-                       return new IXR_Error(500, __('Sorry, the comment could not be edited. Something wrong happened.'));
+                       return new IXR_Error(500, __('Sorry, the comment could not be edited.'));
 
                /**
                 * Fires after a comment has been successfully updated via XML-RPC.
@@ -3525,7 +3528,7 @@ class wp_xmlrpc_server extends IXR_Server {
                if ( !$user ) {
                        $logged_in = false;
                        if ( $allow_anon && get_option('comment_registration') ) {
-                               return new IXR_Error( 403, __( 'You must be registered to comment' ) );
+                               return new IXR_Error( 403, __( 'You must be registered to comment.' ) );
                        } elseif ( ! $allow_anon ) {
                                return $this->error;
                        }
@@ -3550,8 +3553,14 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 403, __( 'Sorry, comments are closed for this item.' ) );
                }
 
-               $comment = array();
-               $comment['comment_post_ID'] = $post_id;
+               if ( empty( $content_struct['content'] ) ) {
+                       return new IXR_Error( 403, __( 'Comment is required.' ) );
+               }
+
+               $comment = array(
+                       'comment_post_ID' => $post_id,
+                       'comment_content' => $content_struct['content'],
+               );
 
                if ( $logged_in ) {
                        $display_name = $user->display_name;
@@ -3579,20 +3588,25 @@ class wp_xmlrpc_server extends IXR_Server {
 
                        if ( get_option('require_name_email') ) {
                                if ( 6 > strlen($comment['comment_author_email']) || '' == $comment['comment_author'] )
-                                       return new IXR_Error( 403, __( 'Comment author name and email are required' ) );
+                                       return new IXR_Error( 403, __( 'Comment author name and email are required.' ) );
                                elseif ( !is_email($comment['comment_author_email']) )
-                                       return new IXR_Error( 403, __( 'A valid email address is required' ) );
+                                       return new IXR_Error( 403, __( 'A valid email address is required.' ) );
                        }
                }
 
                $comment['comment_parent'] = isset($content_struct['comment_parent']) ? absint($content_struct['comment_parent']) : 0;
 
-               $comment['comment_content'] =  isset($content_struct['content']) ? $content_struct['content'] : null;
-
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'wp.newComment' );
 
-               $comment_ID = wp_new_comment( $comment );
+               $comment_ID = wp_new_comment( $comment, true );
+               if ( is_wp_error( $comment_ID ) ) {
+                       return new IXR_Error( 403, $comment_ID->get_error_message() );
+               }
+
+               if ( ! $comment_ID ) {
+                       return new IXR_Error( 403, __( 'An unknown error occurred' ) );
+               }
 
                /**
                 * Fires after a new comment has been successfully created via XML-RPC.
@@ -4103,7 +4117,7 @@ class wp_xmlrpc_server extends IXR_Server {
                $post_type = get_post_type_object( $post_type_name );
 
                if ( ! current_user_can( $post_type->cap->edit_posts ) )
-                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post type.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
 
                return $this->_prepare_post_type( $post_type, $fields );
        }
@@ -4321,8 +4335,13 @@ class wp_xmlrpc_server extends IXR_Server {
         * @return array|IXR_Error
         */
        public function blogger_getUsersBlogs($args) {
-               if ( is_multisite() )
+               if ( ! $this->minimum_args( $args, 3 ) ) {
+                       return $this->error;
+               }
+
+               if ( is_multisite() ) {
                        return $this->_multisite_getUsersBlogs($args);
+               }
 
                $this->escape($args);
 
@@ -4363,7 +4382,7 @@ class wp_xmlrpc_server extends IXR_Server {
         * @return array|IXR_Error
         */
        protected function _multisite_getUsersBlogs( $args ) {
-               $current_blog = get_blog_details();
+               $current_blog = get_site();
 
                $domain = $current_blog->domain;
                $path = $current_blog->path . 'xmlrpc.php';
@@ -4625,7 +4644,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error(500, $post_ID->get_error_message());
 
                if ( !$post_ID )
-                       return new IXR_Error(500, __('Sorry, your entry could not be posted. Something wrong happened.'));
+                       return new IXR_Error(500, __('Sorry, your entry could not be posted.'));
 
                $this->attach_uploads( $post_ID, $post_content );
 
@@ -4879,7 +4898,7 @@ class wp_xmlrpc_server extends IXR_Server {
                if ( isset( $content_struct['wp_post_format'] ) ) {
                        $content_struct['wp_post_format'] = sanitize_key( $content_struct['wp_post_format'] );
                        if ( !array_key_exists( $content_struct['wp_post_format'], get_post_format_strings() ) ) {
-                               return new IXR_Error( 404, __( 'Invalid post format' ) );
+                               return new IXR_Error( 404, __( 'Invalid post format.' ) );
                        }
                }
 
@@ -5084,7 +5103,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error(500, $post_ID->get_error_message());
 
                if ( !$post_ID )
-                       return new IXR_Error(500, __('Sorry, your entry could not be posted. Something wrong happened.'));
+                       return new IXR_Error(500, __('Sorry, your entry could not be posted.'));
 
                /**
                 * Fires after a new post has been successfully created via the XML-RPC MovableType API.
@@ -5203,7 +5222,7 @@ class wp_xmlrpc_server extends IXR_Server {
                if ( isset( $content_struct['wp_post_format'] ) ) {
                        $content_struct['wp_post_format'] = sanitize_key( $content_struct['wp_post_format'] );
                        if ( !array_key_exists( $content_struct['wp_post_format'], get_post_format_strings() ) ) {
-                               return new IXR_Error( 404, __( 'Invalid post format' ) );
+                               return new IXR_Error( 404, __( 'Invalid post format.' ) );
                        }
                }
 
@@ -5405,7 +5424,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error(500, $result->get_error_message());
 
                if ( !$result )
-                       return new IXR_Error(500, __('Sorry, your entry could not be edited. Something wrong happened.'));
+                       return new IXR_Error(500, __('Sorry, your entry could not be edited.'));
 
                // Only posts can be sticky
                if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) {
@@ -5818,8 +5837,9 @@ class wp_xmlrpc_server extends IXR_Server {
 
                $upload = wp_upload_bits($name, null, $bits);
                if ( ! empty($upload['error']) ) {
-                       $errorString = sprintf(__('Could not write file %1$s (%2$s)'), $name, $upload['error']);
-                       return new IXR_Error(500, $errorString);
+                       /* translators: 1: file name, 2: error message */
+                       $errorString = sprintf( __( 'Could not write file %1$s (%2$s).' ), $name, $upload['error'] );
+                       return new IXR_Error( 500, $errorString );
                }
                // Construct the attachment array
                $post_id = 0;
@@ -6192,9 +6212,6 @@ class wp_xmlrpc_server extends IXR_Server {
         *
         * @since 1.5.0
         *
-        * @global wpdb $wpdb WordPress database abstraction object.
-        * @global string $wp_version
-        *
         * @param array  $args {
         *     Method arguments. Note: arguments must be ordered as documented.
         *
@@ -6204,7 +6221,7 @@ class wp_xmlrpc_server extends IXR_Server {
         * @return string|IXR_Error
         */
        public function pingback_ping( $args ) {
-               global $wpdb, $wp_version;
+               global $wpdb;
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'pingback.ping' );
@@ -6292,7 +6309,7 @@ class wp_xmlrpc_server extends IXR_Server {
                $remote_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] );
 
                /** This filter is documented in wp-includes/class-http.php */
-               $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) );
+               $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) );
 
                // Let's check the remote site
                $http_api_args = array(
@@ -6328,9 +6345,10 @@ class wp_xmlrpc_server extends IXR_Server {
                $remote_source = preg_replace( "/<\/*(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/", "\n\n", $remote_source );
 
                preg_match( '|<title>([^<]*?)</title>|is', $remote_source, $matchtitle );
-               $title = $matchtitle[1];
-               if ( empty( $title ) )
-                       return $this->pingback_error( 32, __('We cannot find a title on that page.' ) );
+               $title = isset( $matchtitle[1] ) ? $matchtitle[1] : '';
+               if ( empty( $title ) ) {
+                       return $this->pingback_error( 32, __( 'We cannot find a title on that page.' ) );
+               }
 
                $remote_source = strip_tags( $remote_source, '<a>' ); // just keep the tag we need
 
@@ -6398,7 +6416,8 @@ class wp_xmlrpc_server extends IXR_Server {
                 */
                do_action( 'pingback_post', $comment_ID );
 
-               return sprintf(__('Pingback from %1$s to %2$s registered. Keep the web talking! :-)'), $pagelinkedfrom, $pagelinkedto);
+               /* translators: 1: URL of the page linked from, 2: URL of the page linked to */
+               return sprintf( __( 'Pingback from %1$s to %2$s registered. Keep the web talking! :-)' ), $pagelinkedfrom, $pagelinkedto );
        }
 
        /**
index 4a9718364e14629da724d00c7d376723f80cbf40..c62d79082bfdf3b61fdf8f49f36fceff7bfddb58 100644 (file)
@@ -26,7 +26,7 @@ class WP {
         * @access public
         * @var array
         */
-       public $private_query_vars = array( 'offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in', 'post_parent', 'post_parent__in', 'post_parent__not_in', 'title' );
+       public $private_query_vars = array( 'offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in', 'post_parent', 'post_parent__in', 'post_parent__not_in', 'title', 'fields' );
 
        /**
         * Extra query variables set by the user.
@@ -422,22 +422,30 @@ class WP {
                        }
                        $headers['Content-Type'] = feed_content_type( $type ) . '; charset=' . get_option( 'blog_charset' );
 
-                       // We're showing a feed, so WP is indeed the only thing that last changed
-                       if ( !empty($this->query_vars['withcomments'])
-                               || false !== strpos( $this->query_vars['feed'], 'comments-' )
-                               || ( empty($this->query_vars['withoutcomments'])
-                                       && ( !empty($this->query_vars['p'])
-                                               || !empty($this->query_vars['name'])
-                                               || !empty($this->query_vars['page_id'])
-                                               || !empty($this->query_vars['pagename'])
-                                               || !empty($this->query_vars['attachment'])
-                                               || !empty($this->query_vars['attachment_id'])
-                                       )
-                               )
-                       )
-                               $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastcommentmodified('GMT'), 0).' GMT';
-                       else
-                               $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT'), 0).' GMT';
+                       // We're showing a feed, so WP is indeed the only thing that last changed.
+                       if ( ! empty( $this->query_vars['withcomments'] )
+                            || false !== strpos( $this->query_vars['feed'], 'comments-' )
+                            || ( empty( $this->query_vars['withoutcomments'] )
+                                 && ( ! empty( $this->query_vars['p'] )
+                                      || ! empty( $this->query_vars['name'] )
+                                      || ! empty( $this->query_vars['page_id'] )
+                                      || ! empty( $this->query_vars['pagename'] )
+                                      || ! empty( $this->query_vars['attachment'] )
+                                      || ! empty( $this->query_vars['attachment_id'] )
+                                 )
+                            )
+                       ) {
+                               $wp_last_modified = mysql2date( 'D, d M Y H:i:s', get_lastcommentmodified( 'GMT' ), false );
+                       } else {
+                               $wp_last_modified = mysql2date( 'D, d M Y H:i:s', get_lastpostmodified( 'GMT' ), false );
+                       }
+
+                       if ( ! $wp_last_modified ) {
+                               $wp_last_modified = date( 'D, d M Y H:i:s' );
+                       }
+
+                       $wp_last_modified .= ' GMT';
+
                        $wp_etag = '"' . md5($wp_last_modified) . '"';
                        $headers['Last-Modified'] = $wp_last_modified;
                        $headers['ETag'] = $wp_etag;
@@ -662,7 +670,7 @@ class WP {
 
                                // Only set X-Pingback for single posts that allow pings.
                                if ( $p && pings_open( $p ) ) {
-                                       @header( 'X-Pingback: ' . get_bloginfo( 'pingback_url' ) );
+                                       @header( 'X-Pingback: ' . get_bloginfo( 'pingback_url', 'display' ) );
                                }
 
                                // check for paged content that exceeds the max number of pages
@@ -738,93 +746,3 @@ class WP {
                do_action_ref_array( 'wp', array( &$this ) );
        }
 }
-
-/**
- * Helper class to remove the need to use eval to replace $matches[] in query strings.
- *
- * @since 2.9.0
- */
-class WP_MatchesMapRegex {
-       /**
-        * store for matches
-        *
-        * @access private
-        * @var array
-        */
-       private $_matches;
-
-       /**
-        * store for mapping result
-        *
-        * @access public
-        * @var string
-        */
-       public $output;
-
-       /**
-        * subject to perform mapping on (query string containing $matches[] references
-        *
-        * @access private
-        * @var string
-        */
-       private $_subject;
-
-       /**
-        * regexp pattern to match $matches[] references
-        *
-        * @var string
-        */
-       public $_pattern = '(\$matches\[[1-9]+[0-9]*\])'; // magic number
-
-       /**
-        * constructor
-        *
-        * @param string $subject subject if regex
-        * @param array  $matches data to use in map
-        */
-       public function __construct($subject, $matches) {
-               $this->_subject = $subject;
-               $this->_matches = $matches;
-               $this->output = $this->_map();
-       }
-
-       /**
-        * Substitute substring matches in subject.
-        *
-        * static helper function to ease use
-        *
-        * @static
-        * @access public
-        *
-        * @param string $subject subject
-        * @param array  $matches data used for substitution
-        * @return string
-        */
-       public static function apply($subject, $matches) {
-               $oSelf = new WP_MatchesMapRegex($subject, $matches);
-               return $oSelf->output;
-       }
-
-       /**
-        * do the actual mapping
-        *
-        * @access private
-        * @return string
-        */
-       private function _map() {
-               $callback = array($this, 'callback');
-               return preg_replace_callback($this->_pattern, $callback, $this->_subject);
-       }
-
-       /**
-        * preg_replace_callback hook
-        *
-        * @access public
-        * @param  array $matches preg_replace regexp matches
-        * @return string
-        */
-       public function callback($matches) {
-               $index = intval(substr($matches[0], 9, -1));
-               return ( isset( $this->_matches[$index] ) ? urlencode($this->_matches[$index]) : '' );
-       }
-}
index 03484181cf2f44c7648cd5cdc33213773fd60635..13ff04fa5a4a1887bc49b3991e8331a9a8267509 100644 (file)
@@ -211,7 +211,7 @@ class WP_Dependencies {
         *                                 as a query string for cache busting purposes. If version is set to false, a version
         *                                 number is automatically added equal to current installed WordPress version.
         *                                 If set to null, no version is added.
-        * @param mixed            $args   Optional. Custom property of the item. NOT the class property $args. Examples: $media, $in_footer. 
+        * @param mixed            $args   Optional. Custom property of the item. NOT the class property $args. Examples: $media, $in_footer.
         * @return bool Whether the item has been registered. True on success, false on failure.
         */
        public function add( $handle, $src, $deps = array(), $ver = false, $args = null ) {
@@ -411,99 +411,4 @@ class WP_Dependencies {
                return true;
        }
 
-} // WP_Dependencies
-
-/**
- * Class _WP_Dependency
- *
- * Helper class to register a handle and associated data.
- *
- * @access private
- * @since 2.6.0
- */
-class _WP_Dependency {
-       /**
-        * The handle name.
-        *
-        * @access public
-        * @since 2.6.0
-        * @var null
-        */
-       public $handle;
-
-       /**
-        * The handle source.
-        *
-        * @access public
-        * @since 2.6.0
-        * @var null
-        */
-       public $src;
-
-       /**
-        * An array of handle dependencies.
-        *
-        * @access public
-        * @since 2.6.0
-        * @var array
-        */
-       public $deps = array();
-
-       /**
-        * The handle version.
-        *
-        * Used for cache-busting.
-        *
-        * @access public
-        * @since 2.6.0
-        * @var bool|string
-        */
-       public $ver = false;
-
-       /**
-        * Additional arguments for the handle.
-        *
-        * @access public
-        * @since 2.6.0
-        * @var null
-        */
-       public $args = null;  // Custom property, such as $in_footer or $media.
-
-       /**
-        * Extra data to supply to the handle.
-        *
-        * @access public
-        * @since 2.6.0
-        * @var array
-        */
-       public $extra = array();
-
-       /**
-        * Setup dependencies.
-        *
-        * @since 2.6.0
-        */
-       public function __construct() {
-               @list( $this->handle, $this->src, $this->deps, $this->ver, $this->args ) = func_get_args();
-               if ( ! is_array($this->deps) )
-                       $this->deps = array();
-       }
-
-       /**
-        * Add handle data.
-        *
-        * @access public
-        * @since 2.6.0
-        *
-        * @param string $name The data key to add.
-        * @param mixed  $data The data value to add.
-        * @return bool False if not scalar, true otherwise.
-        */
-       public function add_data( $name, $data ) {
-               if ( !is_scalar($name) )
-                       return false;
-               $this->extra[$name] = $data;
-               return true;
-       }
-
-} // _WP_Dependencies
+}
index 42ebd41e3c079770417a85e9fbf3f37d8ed43180..c914796c0896c1a0db57dd2c2c9973871495f8ff 100644 (file)
@@ -1576,7 +1576,8 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c
  *                              Default 'respond'.
  *     @type string $reply_text The text of the Reply link. Default 'Reply'.
  *     @type string $login_text The text of the link to reply if logged out. Default 'Log in to Reply'.
- *     @type int    $depth'     The depth of the new comment. Must be greater than 0 and less than the value
+ *     @type int    $max_depth  The max depth of the comment tree. Default 0.
+ *     @type int    $depth      The depth of the new comment. Must be greater than 0 and less than the value
  *                              of the 'thread_comments_depth' option set in Settings > Discussion. Default 0.
  *     @type string $before     The text or HTML to add before the reply link. Default empty.
  *     @type string $after      The text or HTML to add after the reply link. Default empty.
@@ -1591,8 +1592,10 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null
                'add_below'     => 'comment',
                'respond_id'    => 'respond',
                'reply_text'    => __( 'Reply' ),
+               /* translators: Comment reply button text. 1: Comment author name */
                'reply_to_text' => __( 'Reply to %s' ),
                'login_text'    => __( 'Log in to Reply' ),
+               'max_depth'     => 0,
                'depth'         => 0,
                'before'        => '',
                'after'         => ''
@@ -1908,7 +1911,7 @@ function comment_form_title( $noreplytext = false, $replytext = false, $linktopa
  *     @type int    $page              Page ID to list comments for. Default empty.
  *     @type int    $per_page          Number of comments to list per page. Default empty.
  *     @type int    $avatar_size       Height and width dimensions of the avatar size. Default 32.
- *     @type string $reverse_top_level Ordering of the listed comments. Default null. Accepts 'desc', 'asc'.
+ *     @type bool   $reverse_top_level Ordering of the listed comments. If true, will display newest comments first.
  *     @type bool   $reverse_children  Whether to reverse child comments in the list. Default null.
  *     @type string $format            How to format the comments list.
  *                                     Default 'html5' if the theme supports it. Accepts 'html5', 'xhtml'.
@@ -2165,6 +2168,18 @@ function comment_form( $args = array(), $post_id = null ) {
        if ( null === $post_id )
                $post_id = get_the_ID();
 
+       // Exit the function when comments for the post are closed.
+       if ( ! comments_open( $post_id ) ) {
+               /**
+                * Fires after the comment form if comments are closed.
+                *
+                * @since 3.0.0
+                */
+               do_action( 'comment_form_comments_closed' );
+
+               return;
+       }
+
        $commenter = wp_get_current_commenter();
        $user = wp_get_current_user();
        $user_identity = $user->exists() ? $user->display_name : '';
@@ -2250,209 +2265,200 @@ function comment_form( $args = array(), $post_id = null ) {
        // Ensure that the filtered args contain all required default values.
        $args = array_merge( $defaults, $args );
 
-       if ( comments_open( $post_id ) ) : ?>
+       /**
+        * Fires before the comment form.
+        *
+        * @since 3.0.0
+        */
+       do_action( 'comment_form_before' );
+       ?>
+       <div id="respond" class="comment-respond">
                <?php
-               /**
-                * Fires before the comment form.
-                *
-                * @since 3.0.0
-                */
-               do_action( 'comment_form_before' );
-               ?>
-               <div id="respond" class="comment-respond">
-                       <?php
-                       echo $args['title_reply_before'];
+               echo $args['title_reply_before'];
 
-                       comment_form_title( $args['title_reply'], $args['title_reply_to'] );
+               comment_form_title( $args['title_reply'], $args['title_reply_to'] );
 
-                       echo $args['cancel_reply_before'];
+               echo $args['cancel_reply_before'];
 
-                       cancel_comment_reply_link( $args['cancel_reply_link'] );
+               cancel_comment_reply_link( $args['cancel_reply_link'] );
 
-                       echo $args['cancel_reply_after'];
+               echo $args['cancel_reply_after'];
 
-                       echo $args['title_reply_after'];
+               echo $args['title_reply_after'];
 
-                       if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) :
-                               echo $args['must_log_in'];
+               if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) :
+                       echo $args['must_log_in'];
+                       /**
+                        * Fires after the HTML-formatted 'must log in after' message in the comment form.
+                        *
+                        * @since 3.0.0
+                        */
+                       do_action( 'comment_form_must_log_in_after' );
+               else : ?>
+                       <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 after the HTML-formatted 'must log in after' message in the comment form.
+                                * Fires at the top of the comment form, inside the form tag.
                                 *
                                 * @since 3.0.0
                                 */
-                               do_action( 'comment_form_must_log_in_after' );
-                       else : ?>
-                               <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
+                               do_action( 'comment_form_top' );
+
+                               if ( is_user_logged_in() ) :
                                        /**
-                                        * Fires at the top of the comment form, inside the form tag.
+                                        * Filters the 'logged in' message for the comment form for display.
                                         *
                                         * @since 3.0.0
+                                        *
+                                        * @param string $args_logged_in The logged-in-as HTML-formatted message.
+                                        * @param array  $commenter      An array containing the comment author's
+                                        *                               username, email, and URL.
+                                        * @param string $user_identity  If the commenter is a registered user,
+                                        *                               the display name, blank otherwise.
                                         */
-                                       do_action( 'comment_form_top' );
+                                       echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity );
 
-                                       if ( is_user_logged_in() ) :
-                                               /**
-                                                * Filters the 'logged in' message for the comment form for display.
-                                                *
-                                                * @since 3.0.0
-                                                *
-                                                * @param string $args_logged_in The logged-in-as HTML-formatted message.
-                                                * @param array  $commenter      An array containing the comment author's
-                                                *                               username, email, and URL.
-                                                * @param string $user_identity  If the commenter is a registered user,
-                                                *                               the display name, blank otherwise.
-                                                */
-                                               echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity );
+                                       /**
+                                        * Fires after the is_user_logged_in() check in the comment form.
+                                        *
+                                        * @since 3.0.0
+                                        *
+                                        * @param array  $commenter     An array containing the comment author's
+                                        *                              username, email, and URL.
+                                        * @param string $user_identity If the commenter is a registered user,
+                                        *                              the display name, blank otherwise.
+                                        */
+                                       do_action( 'comment_form_logged_in_after', $commenter, $user_identity );
 
-                                               /**
-                                                * Fires after the is_user_logged_in() check in the comment form.
-                                                *
-                                                * @since 3.0.0
-                                                *
-                                                * @param array  $commenter     An array containing the comment author's
-                                                *                              username, email, and URL.
-                                                * @param string $user_identity If the commenter is a registered user,
-                                                *                              the display name, blank otherwise.
-                                                */
-                                               do_action( 'comment_form_logged_in_after', $commenter, $user_identity );
+                               else :
 
-                                       else :
+                                       echo $args['comment_notes_before'];
 
-                                               echo $args['comment_notes_before'];
+                               endif;
 
-                                       endif;
+                               // Prepare an array of all fields, including the textarea
+                               $comment_fields = array( 'comment' => $args['comment_field'] ) + (array) $args['fields'];
 
-                                       // Prepare an array of all fields, including the textarea
-                                       $comment_fields = array( 'comment' => $args['comment_field'] ) + (array) $args['fields'];
+                               /**
+                                * Filters the comment form fields, including the textarea.
+                                *
+                                * @since 4.4.0
+                                *
+                                * @param array $comment_fields The comment fields.
+                                */
+                               $comment_fields = apply_filters( 'comment_form_fields', $comment_fields );
 
-                                       /**
-                                        * Filters the comment form fields, including the textarea.
-                                        *
-                                        * @since 4.4.0
-                                        *
-                                        * @param array $comment_fields The comment fields.
-                                        */
-                                       $comment_fields = apply_filters( 'comment_form_fields', $comment_fields );
+                               // Get an array of field names, excluding the textarea
+                               $comment_field_keys = array_diff( array_keys( $comment_fields ), array( 'comment' ) );
 
-                                       // Get an array of field names, excluding the textarea
-                                       $comment_field_keys = array_diff( array_keys( $comment_fields ), array( 'comment' ) );
+                               // Get the first and the last field name, excluding the textarea
+                               $first_field = reset( $comment_field_keys );
+                               $last_field  = end( $comment_field_keys );
 
-                                       // Get the first and the last field name, excluding the textarea
-                                       $first_field = reset( $comment_field_keys );
-                                       $last_field  = end( $comment_field_keys );
+                               foreach ( $comment_fields as $name => $field ) {
 
-                                       foreach ( $comment_fields as $name => $field ) {
+                                       if ( 'comment' === $name ) {
 
-                                               if ( 'comment' === $name ) {
+                                               /**
+                                                * Filters the content of the comment textarea field for display.
+                                                *
+                                                * @since 3.0.0
+                                                *
+                                                * @param string $args_comment_field The content of the comment textarea field.
+                                                */
+                                               echo apply_filters( 'comment_form_field_comment', $field );
+
+                                               echo $args['comment_notes_after'];
+
+                                       } elseif ( ! is_user_logged_in() ) {
 
+                                               if ( $first_field === $name ) {
                                                        /**
-                                                        * Filters the content of the comment textarea field for display.
+                                                        * Fires before the comment fields in the comment form, excluding the textarea.
                                                         *
                                                         * @since 3.0.0
-                                                        *
-                                                        * @param string $args_comment_field The content of the comment textarea field.
                                                         */
-                                                       echo apply_filters( 'comment_form_field_comment', $field );
-
-                                                       echo $args['comment_notes_after'];
-
-                                               } elseif ( ! is_user_logged_in() ) {
+                                                       do_action( 'comment_form_before_fields' );
+                                               }
 
-                                                       if ( $first_field === $name ) {
-                                                               /**
-                                                                * Fires before the comment fields in the comment form, excluding the textarea.
-                                                                *
-                                                                * @since 3.0.0
-                                                                */
-                                                               do_action( 'comment_form_before_fields' );
-                                                       }
+                                               /**
+                                                * 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'.
+                                                *
+                                                * @since 3.0.0
+                                                *
+                                                * @param string $field The HTML-formatted output of the comment form field.
+                                                */
+                                               echo apply_filters( "comment_form_field_{$name}", $field ) . "\n";
 
+                                               if ( $last_field === $name ) {
                                                        /**
-                                                        * 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'.
+                                                        * Fires after the comment fields in the comment form, excluding the textarea.
                                                         *
                                                         * @since 3.0.0
-                                                        *
-                                                        * @param string $field The HTML-formatted output of the comment form field.
                                                         */
-                                                       echo apply_filters( "comment_form_field_{$name}", $field ) . "\n";
-
-                                                       if ( $last_field === $name ) {
-                                                               /**
-                                                                * Fires after the comment fields in the comment form, excluding the textarea.
-                                                                *
-                                                                * @since 3.0.0
-                                                                */
-                                                               do_action( 'comment_form_after_fields' );
-                                                       }
+                                                       do_action( 'comment_form_after_fields' );
                                                }
                                        }
+                               }
 
-                                       $submit_button = sprintf(
-                                               $args['submit_button'],
-                                               esc_attr( $args['name_submit'] ),
-                                               esc_attr( $args['id_submit'] ),
-                                               esc_attr( $args['class_submit'] ),
-                                               esc_attr( $args['label_submit'] )
-                                       );
+                               $submit_button = sprintf(
+                                       $args['submit_button'],
+                                       esc_attr( $args['name_submit'] ),
+                                       esc_attr( $args['id_submit'] ),
+                                       esc_attr( $args['class_submit'] ),
+                                       esc_attr( $args['label_submit'] )
+                               );
 
-                                       /**
-                                        * Filters the submit button for the comment form to display.
-                                        *
-                                        * @since 4.2.0
-                                        *
-                                        * @param string $submit_button HTML markup for the submit button.
-                                        * @param array  $args          Arguments passed to `comment_form()`.
-                                        */
-                                       $submit_button = apply_filters( 'comment_form_submit_button', $submit_button, $args );
+                               /**
+                                * Filters the submit button for the comment form to display.
+                                *
+                                * @since 4.2.0
+                                *
+                                * @param string $submit_button HTML markup for the submit button.
+                                * @param array  $args          Arguments passed to `comment_form()`.
+                                */
+                               $submit_button = apply_filters( 'comment_form_submit_button', $submit_button, $args );
 
-                                       $submit_field = sprintf(
-                                               $args['submit_field'],
-                                               $submit_button,
-                                               get_comment_id_fields( $post_id )
-                                       );
+                               $submit_field = sprintf(
+                                       $args['submit_field'],
+                                       $submit_button,
+                                       get_comment_id_fields( $post_id )
+                               );
 
-                                       /**
-                                        * 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.
-                                        *
-                                        * @since 4.2.0
-                                        *
-                                        * @param string $submit_field HTML markup for the submit field.
-                                        * @param array  $args         Arguments passed to comment_form().
-                                        */
-                                       echo apply_filters( 'comment_form_submit_field', $submit_field, $args );
+                               /**
+                                * 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.
+                                *
+                                * @since 4.2.0
+                                *
+                                * @param string $submit_field HTML markup for the submit field.
+                                * @param array  $args         Arguments passed to comment_form().
+                                */
+                               echo apply_filters( 'comment_form_submit_field', $submit_field, $args );
 
-                                       /**
-                                        * Fires at the bottom of the comment form, inside the closing </form> tag.
-                                        *
-                                        * @since 1.5.0
-                                        *
-                                        * @param int $post_id The post ID.
-                                        */
-                                       do_action( 'comment_form', $post_id );
-                                       ?>
-                               </form>
-                       <?php endif; ?>
-               </div><!-- #respond -->
-               <?php
-               /**
-                * Fires after the comment form.
-                *
-                * @since 3.0.0
-                */
-               do_action( 'comment_form_after' );
-       else :
-               /**
-                * Fires after the comment form if comments are closed.
-                *
-                * @since 3.0.0
-                */
-               do_action( 'comment_form_comments_closed' );
-       endif;
+                               /**
+                                * Fires at the bottom of the comment form, inside the closing </form> tag.
+                                *
+                                * @since 1.5.0
+                                *
+                                * @param int $post_id The post ID.
+                                */
+                               do_action( 'comment_form', $post_id );
+                               ?>
+                       </form>
+               <?php endif; ?>
+       </div><!-- #respond -->
+       <?php
+
+       /**
+        * Fires after the comment form.
+        *
+        * @since 3.0.0
+        */
+       do_action( 'comment_form_after' );
 }
index dad3f7639aa0069d58b8b3bc6f2ac8aff733deb2..8bb2e9eb3c1e91dcf11ce499782f0b7531bc6dda 100644 (file)
@@ -54,11 +54,13 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
                 * Filters the number of links found in a comment.
                 *
                 * @since 3.0.0
+                * @since 4.7.0 Added the `$comment` parameter.
                 *
                 * @param int    $num_links The number of links found.
                 * @param string $url       Comment author's URL. Included in allowed links total.
+                * @param string $comment   Content of the comment.
                 */
-               $num_links = apply_filters( 'comment_max_links_url', $num_links, $url );
+               $num_links = apply_filters( 'comment_max_links_url', $num_links, $url, $comment );
 
                /*
                 * If the number of links in the comment exceeds the allowed amount,
@@ -110,8 +112,13 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
         */
        if ( 1 == get_option('comment_whitelist')) {
                if ( 'trackback' != $comment_type && 'pingback' != $comment_type && $author != '' && $email != '' ) {
-                       // expected_slashed ($author, $email)
-                       $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' LIMIT 1");
+                       $comment_user = get_user_by( 'email', wp_unslash( $email ) );
+                       if ( ! empty( $comment_user->ID ) ) {
+                               $ok_to_comment = $wpdb->get_var( $wpdb->prepare( "SELECT comment_approved FROM $wpdb->comments WHERE user_id = %d AND comment_approved = '1' LIMIT 1", $comment_user->ID ) );
+                       } else {
+                               // expected_slashed ($author, $email)
+                               $ok_to_comment = $wpdb->get_var( $wpdb->prepare( "SELECT comment_approved FROM $wpdb->comments WHERE comment_author = %s AND comment_author_email = %s and comment_approved = '1' LIMIT 1", $author, $email ) );
+                       }
                        if ( ( 1 == $ok_to_comment ) &&
                                ( empty($mod_keys) || false === strpos( $email, $mod_keys) ) )
                                        return true;
@@ -163,7 +170,8 @@ function get_approved_comments( $post_id, $args = array() ) {
  * @global WP_Comment $comment
  *
  * @param WP_Comment|string|int $comment Comment to retrieve.
- * @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants.
+ * @param string                $output  Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                                       a WP_Comment object, an associative array, or a numeric array, respectively. Default OBJECT.
  * @return WP_Comment|array|null Depends on $output value.
  */
 function get_comment( &$comment = null, $output = OBJECT ) {
@@ -286,38 +294,46 @@ function get_default_comment_status( $post_type = 'post', $comment_type = 'comme
  * The date the last comment was modified.
  *
  * @since 1.5.0
+ * @since 4.7.0 Replaced caching the modified date in a local static variable
+ *              with the Object Cache API.
  *
  * @global wpdb $wpdb WordPress database abstraction object.
- * @staticvar array $cache_lastcommentmodified
  *
- * @param string $timezone Which timezone to use in reference to 'gmt', 'blog',
- *             or 'server' locations.
- * @return string Last comment modified date.
+ * @param string $timezone Which timezone to use in reference to 'gmt', 'blog', or 'server' locations.
+ * @return string|false Last comment modified date on success, false on failure.
  */
-function get_lastcommentmodified($timezone = 'server') {
+function get_lastcommentmodified( $timezone = 'server' ) {
        global $wpdb;
-       static $cache_lastcommentmodified = array();
 
-       if ( isset($cache_lastcommentmodified[$timezone]) )
-               return $cache_lastcommentmodified[$timezone];
+       $timezone = strtolower( $timezone );
+       $key = "lastcommentmodified:$timezone";
 
-       $add_seconds_server = date('Z');
+       $comment_modified_date = wp_cache_get( $key, 'timeinfo' );
+       if ( false !== $comment_modified_date ) {
+               return $comment_modified_date;
+       }
 
-       switch ( strtolower($timezone)) {
+       switch ( $timezone ) {
                case 'gmt':
-                       $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
+                       $comment_modified_date = $wpdb->get_var( "SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1" );
                        break;
                case 'blog':
-                       $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
+                       $comment_modified_date = $wpdb->get_var( "SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1" );
                        break;
                case 'server':
-                       $lastcommentmodified = $wpdb->get_var($wpdb->prepare("SELECT DATE_ADD(comment_date_gmt, INTERVAL %s SECOND) FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1", $add_seconds_server));
+                       $add_seconds_server = date( 'Z' );
+
+                       $comment_modified_date = $wpdb->get_var( $wpdb->prepare( "SELECT DATE_ADD(comment_date_gmt, INTERVAL %s SECOND) FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1", $add_seconds_server ) );
                        break;
        }
 
-       $cache_lastcommentmodified[$timezone] = $lastcommentmodified;
+       if ( $comment_modified_date ) {
+               wp_cache_set( $key, $comment_modified_date, 'timeinfo' );
 
-       return $lastcommentmodified;
+               return $comment_modified_date;
+       }
+
+       return false;
 }
 
 /**
@@ -581,13 +597,19 @@ function sanitize_comment_cookies() {
  * Validates whether this comment is allowed to be made.
  *
  * @since 2.0.0
+ * @since 4.7.0 The `$avoid_die` parameter was added, allowing the function to
+ *              return a WP_Error object instead of dying.
  *
  * @global wpdb $wpdb WordPress database abstraction object.
  *
- * @param array $commentdata Contains information on the comment
- * @return int|string Signifies the approval status (0|1|'spam')
+ * @param array $commentdata Contains information on the comment.
+ * @param bool  $avoid_die   When true, a disallowed comment will result in the function
+ *                           returning a WP_Error object, rather than executing wp_die().
+ *                           Default false.
+ * @return int|string|WP_Error Allowed comments return the approval status (0|1|'spam').
+ *                             If `$avoid_die` is true, disallowed comments return a WP_Error.
  */
-function wp_allow_comment( $commentdata ) {
+function wp_allow_comment( $commentdata, $avoid_die = false ) {
        global $wpdb;
 
        // Simple duplicate check
@@ -632,10 +654,15 @@ function wp_allow_comment( $commentdata ) {
                 * @param array $commentdata Comment data.
                 */
                do_action( 'comment_duplicate_trigger', $commentdata );
-               if ( defined( 'DOING_AJAX' ) ) {
-                       die( __('Duplicate comment detected; it looks as though you&#8217;ve already said that!') );
+               if ( true === $avoid_die ) {
+                       return new WP_Error( 'comment_duplicate', __( 'Duplicate comment detected; it looks as though you&#8217;ve already said that!' ), 409 );
+               } else {
+                       if ( wp_doing_ajax() ) {
+                               die( __('Duplicate comment detected; it looks as though you&#8217;ve already said that!') );
+                       }
+
+                       wp_die( __( 'Duplicate comment detected; it looks as though you&#8217;ve already said that!' ), 409 );
                }
-               wp_die( __( 'Duplicate comment detected; it looks as though you&#8217;ve already said that!' ), 409 );
        }
 
        /**
@@ -644,18 +671,49 @@ function wp_allow_comment( $commentdata ) {
         * Allows checking for comment flooding.
         *
         * @since 2.3.0
+        * @since 4.7.0 The `$avoid_die` parameter was added.
         *
         * @param string $comment_author_IP    Comment author's IP address.
         * @param string $comment_author_email Comment author's email.
         * @param string $comment_date_gmt     GMT date the comment was posted.
+        * @param bool   $avoid_die            Whether to prevent executing wp_die()
+        *                                     or die() if a comment flood is occurring.
         */
        do_action(
                'check_comment_flood',
                $commentdata['comment_author_IP'],
                $commentdata['comment_author_email'],
-               $commentdata['comment_date_gmt']
+               $commentdata['comment_date_gmt'],
+               $avoid_die
+       );
+
+       /**
+        * Filters whether a comment is part of a comment flood.
+        *
+        * The default check is wp_check_comment_flood(). See check_comment_flood_db().
+        *
+        * @since 4.7.0
+        *
+        * @param bool   $is_flood             Is a comment flooding occurring? Default false.
+        * @param string $comment_author_IP    Comment author's IP address.
+        * @param string $comment_author_email Comment author's email.
+        * @param string $comment_date_gmt     GMT date the comment was posted.
+        * @param bool   $avoid_die            Whether to prevent executing wp_die()
+        *                                     or die() if a comment flood is occurring.
+        */
+       $is_flood = apply_filters(
+               'wp_is_comment_flood',
+               false,
+               $commentdata['comment_author_IP'],
+               $commentdata['comment_author_email'],
+               $commentdata['comment_date_gmt'],
+               $avoid_die
        );
 
+       if ( $is_flood ) {
+               return new WP_Error( 'comment_flood', __( 'You are posting comments too quickly. Slow down.' ), 429 );
+       }
+
        if ( ! empty( $commentdata['user_id'] ) ) {
                $user = get_userdata( $commentdata['user_id'] );
                $post_author = $wpdb->get_var( $wpdb->prepare(
@@ -708,24 +766,50 @@ function wp_allow_comment( $commentdata ) {
 }
 
 /**
- * Check whether comment flooding is occurring.
+ * Hooks WP's native database-based comment-flood check.
+ *
+ * This wrapper maintains backward compatibility with plugins that expect to
+ * be able to unhook the legacy check_comment_flood_db() function from
+ * 'check_comment_flood' using remove_action().
+ *
+ * @since 2.3.0
+ * @since 4.7.0 Converted to be an add_filter() wrapper.
+ */
+function check_comment_flood_db() {
+       add_filter( 'wp_is_comment_flood', 'wp_check_comment_flood', 10, 5 );
+}
+
+/**
+ * Checks whether comment flooding is occurring.
  *
  * Won't run, if current user can manage options, so to not block
  * administrators.
  *
- * @since 2.3.0
+ * @since 4.7.0
  *
  * @global wpdb $wpdb WordPress database abstraction object.
  *
- * @param string $ip Comment IP.
- * @param string $email Comment author email address.
- * @param string $date MySQL time string.
+ * @param bool   $is_flood  Is a comment flooding occurring?
+ * @param string $ip        Comment IP.
+ * @param string $email     Comment author email address.
+ * @param string $date      MySQL time string.
+ * @param bool   $avoid_die When true, a disallowed comment will result in the function
+ *                          returning a WP_Error object, rather than executing wp_die().
+ *                          Default false.
+ * @return bool Whether comment flooding is occurring.
  */
-function check_comment_flood_db( $ip, $email, $date ) {
+function wp_check_comment_flood( $is_flood, $ip, $email, $date, $avoid_die = false ) {
+
        global $wpdb;
+
+       // Another callback has declared a flood. Trust it.
+       if ( true === $is_flood ) {
+               return $is_flood;
+       }
+
        // don't throttle admins or moderators
        if ( current_user_can( 'manage_options' ) || current_user_can( 'moderate_comments' ) ) {
-               return;
+               return false;
        }
        $hour_ago = gmdate( 'Y-m-d H:i:s', time() - HOUR_IN_SECONDS );
 
@@ -767,13 +851,19 @@ function check_comment_flood_db( $ip, $email, $date ) {
                         * @param int $time_newcomment  Timestamp of when the new comment was posted.
                         */
                        do_action( 'comment_flood_trigger', $time_lastcomment, $time_newcomment );
+                       if ( true === $avoid_die ) {
+                               return true;
+                       } else {
+                               if ( wp_doing_ajax() ) {
+                                       die( __('You are posting comments too quickly. Slow down.') );
+                               }
 
-                       if ( defined('DOING_AJAX') )
-                               die( __('You are posting comments too quickly. Slow down.') );
-
-                       wp_die( __( 'You are posting comments too quickly. Slow down.' ), 429 );
+                               wp_die( __( 'You are posting comments too quickly. Slow down.' ), 429 );
+                       }
                }
        }
+
+       return false;
 }
 
 /**
@@ -913,6 +1003,12 @@ function get_page_of_comment( $comment_ID, $args = array() ) {
                if ( $args['max_depth'] > 1 && 0 != $comment->comment_parent )
                        return get_page_of_comment( $comment->comment_parent, $args );
 
+               if ( 'desc' === get_option( 'comment_order' ) ) {
+                       $compare = 'after';
+               } else {
+                       $compare = 'before';
+               }
+
                $comment_args = array(
                        'type'       => $args['type'],
                        'post_id'    => $comment->comment_post_ID,
@@ -923,7 +1019,7 @@ function get_page_of_comment( $comment_ID, $args = array() ) {
                        'date_query' => array(
                                array(
                                        'column' => "$wpdb->comments.comment_date_gmt",
-                                       'before' => $comment->comment_date_gmt,
+                                       $compare => $comment->comment_date_gmt,
                                )
                        ),
                );
@@ -945,6 +1041,7 @@ function get_page_of_comment( $comment_ID, $args = array() ) {
         * Filters the calculated page on which a comment appears.
         *
         * @since 4.4.0
+        * @since 4.7.0 Introduced the `$comment_ID` parameter.
         *
         * @param int   $page          Comment page.
         * @param array $args {
@@ -965,8 +1062,9 @@ function get_page_of_comment( $comment_ID, $args = array() ) {
         *     @type int    $per_page  Number of comments per page.
         *     @type int    $max_depth Maximum comment threading depth allowed.
         * }
+        * @param int $comment_ID ID of the comment.
         */
-       return apply_filters( 'get_page_of_comment', (int) $page, $args, $original_args );
+       return apply_filters( 'get_page_of_comment', (int) $page, $args, $original_args, $comment_ID );
 }
 
 /**
@@ -1024,6 +1122,37 @@ function wp_get_comment_fields_max_lengths() {
        return apply_filters( 'wp_get_comment_fields_max_lengths', $lengths );
 }
 
+/**
+ * Compares the lengths of comment data against the maximum character limits.
+ *
+ * @since 4.7.0
+ *
+ * @param array $comment_data Array of arguments for inserting a comment.
+ * @return WP_Error|true WP_Error when a comment field exceeds the limit,
+ *                       otherwise true.
+ */
+function wp_check_comment_data_max_lengths( $comment_data ) {
+       $max_lengths = wp_get_comment_fields_max_lengths();
+
+       if ( isset( $comment_data['comment_author'] ) && mb_strlen( $comment_data['comment_author'], '8bit' ) > $max_lengths['comment_author'] ) {
+               return new WP_Error( 'comment_author_column_length', __( '<strong>ERROR</strong>: your name is too long.' ), 200 );
+       }
+
+       if ( isset( $comment_data['comment_author_email'] ) && strlen( $comment_data['comment_author_email'] ) > $max_lengths['comment_author_email'] ) {
+               return new WP_Error( 'comment_author_email_column_length', __( '<strong>ERROR</strong>: your email address is too long.' ), 200 );
+       }
+
+       if ( isset( $comment_data['comment_author_url'] ) && strlen( $comment_data['comment_author_url'] ) > $max_lengths['comment_author_url'] ) {
+               return new WP_Error( 'comment_author_url_column_length', __( '<strong>ERROR</strong>: your url is too long.' ), 200 );
+       }
+
+       if ( isset( $comment_data['comment_content'] ) && mb_strlen( $comment_data['comment_content'], '8bit' ) > $max_lengths['comment_content'] ) {
+               return new WP_Error( 'comment_content_column_length', __( '<strong>ERROR</strong>: your comment is too long.' ), 200 );
+       }
+
+       return true;
+}
+
 /**
  * Does comment contain blacklisted characters or words.
  *
@@ -1483,6 +1612,26 @@ function wp_transition_comment_status($new_status, $old_status, $comment) {
        do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment );
 }
 
+/**
+ * Clear the lastcommentmodified cached value when a comment status is changed.
+ *
+ * Deletes the lastcommentmodified cache key when a comment enters or leaves
+ * 'approved' status.
+ *
+ * @since 4.7.0
+ * @access private
+ *
+ * @param string $new_status The new comment status.
+ * @param string $old_status The old comment status.
+ */
+function _clear_modified_cache_on_transition_comment_status( $new_status, $old_status ) {
+       if ( 'approved' === $new_status || 'approved' === $old_status ) {
+               foreach ( array( 'server', 'gmt', 'blog' ) as $timezone ) {
+                       wp_cache_delete( "lastcommentmodified:$timezone", 'timeinfo' );
+               }
+       }
+}
+
 /**
  * Get current commenter's name, email, and URL.
  *
@@ -1592,6 +1741,10 @@ function wp_insert_comment( $commentdata ) {
 
        if ( $comment_approved == 1 ) {
                wp_update_comment_count( $comment_post_ID );
+
+               foreach ( array( 'server', 'gmt', 'blog' ) as $timezone ) {
+                       wp_cache_delete( "lastcommentmodified:$timezone", 'timeinfo' );
+               }
        }
 
        clean_comment_cache( $id );
@@ -1715,6 +1868,8 @@ function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment)
  *
  * @since 1.5.0
  * @since 4.3.0 'comment_agent' and 'comment_author_IP' can be set via `$commentdata`.
+ * @since 4.7.0 The `$avoid_die` parameter was added, allowing the function to
+ *              return a WP_Error object instead of dying.
  *
  * @see wp_insert_comment()
  * @global wpdb $wpdb WordPress database abstraction object.
@@ -1738,9 +1893,11 @@ function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment)
  *     @type string $comment_author_IP    Comment author IP address in IPv4 format. Default is the value of
  *                                        'REMOTE_ADDR' in the `$_SERVER` superglobal sent in the original request.
  * }
- * @return int|false The ID of the comment on success, false on failure.
+ * @param bool $avoid_die Should errors be returned as WP_Error objects instead of
+ *                        executing wp_die()? Default false.
+ * @return int|false|WP_Error The ID of the comment on success, false or WP_Error on failure.
  */
-function wp_new_comment( $commentdata ) {
+function wp_new_comment( $commentdata, $avoid_die = false ) {
        global $wpdb;
 
        if ( isset( $commentdata['user_ID'] ) ) {
@@ -1789,7 +1946,10 @@ function wp_new_comment( $commentdata ) {
 
        $commentdata = wp_filter_comment($commentdata);
 
-       $commentdata['comment_approved'] = wp_allow_comment($commentdata);
+       $commentdata['comment_approved'] = wp_allow_comment( $commentdata, $avoid_die );
+       if ( is_wp_error( $commentdata['comment_approved'] ) ) {
+               return $commentdata['comment_approved'];
+       }
 
        $comment_ID = wp_insert_comment($commentdata);
        if ( ! $comment_ID ) {
@@ -1803,7 +1963,10 @@ function wp_new_comment( $commentdata ) {
 
                $commentdata = wp_filter_comment( $commentdata );
 
-               $commentdata['comment_approved'] = wp_allow_comment( $commentdata );
+               $commentdata['comment_approved'] = wp_allow_comment( $commentdata, $avoid_die );
+               if ( is_wp_error( $commentdata['comment_approved'] ) ) {
+                       return $commentdata['comment_approved'];
+               }
 
                $comment_ID = wp_insert_comment( $commentdata );
                if ( ! $comment_ID ) {
@@ -2025,6 +2188,20 @@ function wp_update_comment($commentarr) {
        $comment_post_ID = $data['comment_post_ID'];
        $keys = array( 'comment_post_ID', 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_type', 'comment_parent', 'user_id', 'comment_agent', 'comment_author_IP' );
        $data = wp_array_slice_assoc( $data, $keys );
+
+       /**
+        * Filters the comment data immediately before it is updated in the database.
+        *
+        * Note: data being passed to the filter is already unslashed.
+        *
+        * @since 4.7.0
+        *
+        * @param array $data       The new, processed comment data.
+        * @param array $comment    The old, unslashed comment data.
+        * @param array $commentarr The new, raw comment data.
+        */
+       $data = apply_filters( 'wp_update_comment_data', $data, $comment, $commentarr );
+
        $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );
 
        clean_comment_cache( $comment_ID );
@@ -2292,19 +2469,23 @@ function do_all_pings() {
  * Perform trackbacks.
  *
  * @since 1.5.0
+ * @since 4.7.0 $post_id can be a WP_Post object.
  *
  * @global wpdb $wpdb WordPress database abstraction object.
  *
- * @param int $post_id Post ID to do trackbacks on.
+ * @param int|WP_Post $post_id Post object or ID to do trackbacks on.
  */
-function do_trackbacks($post_id) {
+function do_trackbacks( $post_id ) {
        global $wpdb;
-
        $post = get_post( $post_id );
-       $to_ping = get_to_ping($post_id);
-       $pinged  = get_pung($post_id);
-       if ( empty($to_ping) ) {
-               $wpdb->update($wpdb->posts, array('to_ping' => ''), array('ID' => $post_id) );
+       if ( ! $post ) {
+               return false;
+       }
+
+       $to_ping = get_to_ping( $post );
+       $pinged  = get_pung( $post );
+       if ( empty( $to_ping ) ) {
+               $wpdb->update($wpdb->posts, array( 'to_ping' => '' ), array( 'ID' => $post->ID ) );
                return;
        }
 
@@ -2327,10 +2508,11 @@ function do_trackbacks($post_id) {
                foreach ( (array) $to_ping as $tb_ping ) {
                        $tb_ping = trim($tb_ping);
                        if ( !in_array($tb_ping, $pinged) ) {
-                               trackback($tb_ping, $post_title, $excerpt, $post_id);
+                               trackback( $tb_ping, $post_title, $excerpt, $post->ID );
                                $pinged[] = $tb_ping;
                        } else {
-                               $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $tb_ping, $post_id) );
+                               $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s,
+                                       '')) WHERE ID = %d", $tb_ping, $post->ID ) );
                        }
                }
        }
@@ -2361,21 +2543,28 @@ function generic_ping( $post_id = 0 ) {
  * Pings back the links found in a post.
  *
  * @since 0.71
+ * @since 4.7.0 $post_id can be a WP_Post object.
  *
- * @global string $wp_version
- *
- * @param string $content Post content to check for links.
- * @param int $post_ID Post ID.
+ * @param string $content Post content to check for links. If empty will retrieve from post.
+ * @param int|WP_Post $post_id Post Object or ID.
  */
-function pingback($content, $post_ID) {
-       global $wp_version;
-       include_once(ABSPATH . WPINC . '/class-IXR.php');
-       include_once(ABSPATH . WPINC . '/class-wp-http-ixr-client.php');
+function pingback( $content, $post_id ) {
+       include_once( ABSPATH . WPINC . '/class-IXR.php' );
+       include_once( ABSPATH . WPINC . '/class-wp-http-ixr-client.php' );
 
        // original code by Mort (http://mort.mine.nu:8080)
        $post_links = array();
 
-       $pung = get_pung($post_ID);
+       $post = get_post( $post_id );
+       if ( ! $post ) {
+               return;
+       }
+
+       $pung = get_pung( $post );
+
+       if ( empty( $content ) ) {
+               $content = $post->post_content;
+       }
 
        // Step 1
        // Parsing the post, external links (if any) are stored in the $post_links array
@@ -2391,7 +2580,7 @@ function pingback($content, $post_ID) {
        // We don't wanna ping first and second types, even if they have a valid <link/>
 
        foreach ( (array) $post_links_temp as $link_test ) :
-               if ( !in_array($link_test, $pung) && (url_to_postid($link_test) != $post_ID) // If we haven't pung it already and it isn't a link to itself
+               if ( ! in_array( $link_test, $pung ) && ( url_to_postid( $link_test ) != $post->ID ) // If we haven't pung it already and it isn't a link to itself
                                && !is_local_attachment($link_test) ) : // Also, let's never ping local attachments.
                        if ( $test = @parse_url($link_test) ) {
                                if ( isset($test['query']) )
@@ -2412,7 +2601,7 @@ function pingback($content, $post_ID) {
         * @param array &$pung       Whether a link has already been pinged, passed by reference.
         * @param int   $post_ID     The post ID.
         */
-       do_action_ref_array( 'pre_ping', array( &$post_links, &$pung, $post_ID ) );
+       do_action_ref_array( 'pre_ping', array( &$post_links, &$pung, $post->ID ) );
 
        foreach ( (array) $post_links as $pagelinkedto ) {
                $pingback_server_url = discover_pingback_server_uri( $pagelinkedto );
@@ -2420,7 +2609,7 @@ function pingback($content, $post_ID) {
                if ( $pingback_server_url ) {
                        @ set_time_limit( 60 );
                        // Now, the RPC call
-                       $pagelinkedfrom = get_permalink($post_ID);
+                       $pagelinkedfrom = get_permalink( $post );
 
                        // using a timeout of 3 seconds should be enough to cover slow servers
                        $client = new WP_HTTP_IXR_Client($pingback_server_url);
@@ -2437,12 +2626,12 @@ function pingback($content, $post_ID) {
                         * @param string $pagelinkedto        URL of page linked to.
                         * @param string $pagelinkedfrom      URL of page linked from.
                         */
-                       $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . $wp_version, $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom );
+                       $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . get_bloginfo( 'version' ), $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom );
                        // when set to true, this outputs debug messages by itself
                        $client->debug = false;
 
                        if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto) || ( isset($client->error->code) && 48 == $client->error->code ) ) // Already registered
-                               add_ping( $post_ID, $pagelinkedto );
+                               add_ping( $post, $pagelinkedto );
                }
        }
 }
@@ -2506,20 +2695,17 @@ function trackback($trackback_url, $title, $excerpt, $ID) {
  *
  * @since 1.2.0
  *
- * @global string $wp_version
- *
  * @param string $server Host of blog to connect to.
  * @param string $path Path to send the ping.
  */
 function weblog_ping($server = '', $path = '') {
-       global $wp_version;
-       include_once(ABSPATH . WPINC . '/class-IXR.php');
-       include_once(ABSPATH . WPINC . '/class-wp-http-ixr-client.php');
+       include_once( ABSPATH . WPINC . '/class-IXR.php' );
+       include_once( ABSPATH . WPINC . '/class-wp-http-ixr-client.php' );
 
        // using a timeout of 3 seconds should be enough to cover slow servers
        $client = new WP_HTTP_IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path));
        $client->timeout = 3;
-       $client->useragent .= ' -- WordPress/'.$wp_version;
+       $client->useragent .= ' -- WordPress/' . get_bloginfo( 'version' );
 
        // when set to true, this outputs debug messages by itself
        $client->debug = false;
@@ -2741,7 +2927,7 @@ function _close_comments_for_old_post( $open, $post_id ) {
 function wp_handle_comment_submission( $comment_data ) {
 
        $comment_post_ID = $comment_parent = 0;
-       $comment_author = $comment_author_email = $comment_author_url = $comment_content = $_wp_unfiltered_html_comment = null;
+       $comment_author = $comment_author_email = $comment_author_url = $comment_content = null;
 
        if ( isset( $comment_data['comment_post_ID'] ) ) {
                $comment_post_ID = (int) $comment_data['comment_post_ID'];
@@ -2761,9 +2947,6 @@ function wp_handle_comment_submission( $comment_data ) {
        if ( isset( $comment_data['comment_parent'] ) ) {
                $comment_parent = absint( $comment_data['comment_parent'] );
        }
-       if ( isset( $comment_data['_wp_unfiltered_html_comment'] ) && is_string( $comment_data['_wp_unfiltered_html_comment'] ) ) {
-               $_wp_unfiltered_html_comment = trim( $comment_data['_wp_unfiltered_html_comment'] );
-       }
 
        $post = get_post( $comment_post_ID );
 
@@ -2876,12 +3059,11 @@ function wp_handle_comment_submission( $comment_data ) {
                }
        } else {
                if ( get_option( 'comment_registration' ) ) {
-                       return new WP_Error( 'not_logged_in', __( 'Sorry, you must be logged in to post a comment.' ), 403 );
+                       return new WP_Error( 'not_logged_in', __( 'Sorry, you must be logged in to comment.' ), 403 );
                }
        }
 
        $comment_type = '';
-       $max_lengths = wp_get_comment_fields_max_lengths();
 
        if ( get_option( 'require_name_email' ) && ! $user->exists() ) {
                if ( 6 > strlen( $comment_author_email ) || '' == $comment_author ) {
@@ -2891,22 +3073,8 @@ function wp_handle_comment_submission( $comment_data ) {
                }
        }
 
-       if ( isset( $comment_author ) && $max_lengths['comment_author'] < mb_strlen( $comment_author, '8bit' ) ) {
-               return new WP_Error( 'comment_author_column_length', __( '<strong>ERROR</strong>: your name is too long.' ), 200 );
-       }
-
-       if ( isset( $comment_author_email ) && $max_lengths['comment_author_email'] < strlen( $comment_author_email ) ) {
-               return new WP_Error( 'comment_author_email_column_length', __( '<strong>ERROR</strong>: your email address is too long.' ), 200 );
-       }
-
-       if ( isset( $comment_author_url ) && $max_lengths['comment_author_url'] < strlen( $comment_author_url ) ) {
-               return new WP_Error( 'comment_author_url_column_length', __( '<strong>ERROR</strong>: your url is too long.' ), 200 );
-       }
-
        if ( '' == $comment_content ) {
                return new WP_Error( 'require_valid_comment', __( '<strong>ERROR</strong>: please type a comment.' ), 200 );
-       } elseif ( $max_lengths['comment_content'] < mb_strlen( $comment_content, '8bit' ) ) {
-               return new WP_Error( 'comment_content_column_length', __( '<strong>ERROR</strong>: your comment is too long.' ), 200 );
        }
 
        $commentdata = compact(
@@ -2920,11 +3088,19 @@ function wp_handle_comment_submission( $comment_data ) {
                'user_ID'
        );
 
-       $comment_id = wp_new_comment( wp_slash( $commentdata ) );
+       $check_max_lengths = wp_check_comment_data_max_lengths( $commentdata );
+       if ( is_wp_error( $check_max_lengths ) ) {
+               return $check_max_lengths;
+       }
+
+       $comment_id = wp_new_comment( wp_slash( $commentdata ), true );
+       if ( is_wp_error( $comment_id ) ) {
+               return $comment_id;
+       }
+
        if ( ! $comment_id ) {
                return new WP_Error( 'comment_save_error', __( '<strong>ERROR</strong>: The comment could not be saved. Please try again later.' ), 500 );
        }
 
        return get_comment( $comment_id );
-
 }
index 696e2b8ea968153fe58ac04c261055994570a5a9..0ccee2d4986af983f7ccff8ccab9aaddb4aac72e 100644 (file)
@@ -450,7 +450,7 @@ if ( ! function_exists( 'array_replace_recursive' ) ) :
         *
         * @since 4.5.3
         *
-        * @see http://php.net/manual/en/function.array-replace-recursive.php#109390
+        * @see https://secure.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.
index a4d160f70c75f5c4846221144207f08b7cae6a9e..f7e444b83ed1b61d0ce5a3b803e7d0c2e791d26a 100644 (file)
@@ -1,28 +1,28 @@
 <?php
 /**
- * WordPress CRON API
+ * WordPress Cron API
  *
  * @package WordPress
  */
 
 /**
- * Schedules a hook to run only once.
+ * Schedules an event to run only once.
  *
- * Schedules a hook which will be executed once by the WordPress actions core at
+ * Schedules an event which will execute once by the WordPress actions core at
  * 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
+ * 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
  *
- * @param int $timestamp Timestamp for when to run the event.
- * @param string $hook Action hook to execute when cron is run.
+ * @param int $timestamp Unix timestamp (UTC) for when to run the event.
+ * @param string $hook Action hook to execute when event is run.
  * @param array $args Optional. Arguments to pass to the hook's callback function.
- * @return false|void False when an event is not scheduled.
+ * @return false|void False if the event does not get scheduled.
  */
 function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
        // Make sure timestamp is a positive integer
@@ -43,7 +43,14 @@ function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
         *
         * @since 3.1.0
         *
-        * @param object $event An object containing an event's data.
+        * @param stdClass $event {
+        *     An object containing an event's data.
+        *
+        *     @type string       $hook      Action hook to execute when event is run.
+        *     @type int          $timestamp Unix timestamp (UTC) for when to run the event.
+        *     @type string|false $schedule  How often the event should recur. See `wp_get_schedules()`.
+        *     @type array        $args      Arguments to pass to the hook's callback function.
+        * }
         */
        $event = apply_filters( 'schedule_event', $event );
 
@@ -59,24 +66,24 @@ function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
 }
 
 /**
- * Schedule a periodic event.
+ * Schedule a recurring event.
  *
  * Schedules a hook which will be executed by the WordPress actions core on a
  * specific interval, specified by you. The action will trigger when someone
  * visits your WordPress site, if the scheduled time has passed.
  *
- * Valid values for the recurrence are hourly, daily and twicedaily. These can
+ * Valid values for the recurrence are hourly, daily, and twicedaily. These can
  * be extended using the {@see 'cron_schedules'} filter in wp_get_schedules().
  *
  * Use wp_next_scheduled() to prevent duplicates
  *
  * @since 2.1.0
  *
- * @param int $timestamp Timestamp for when to run the event.
+ * @param int $timestamp Unix timestamp (UTC) for when to run the event.
  * @param string $recurrence How often the event should recur.
- * @param string $hook Action hook to execute when cron is run.
+ * @param string $hook Action hook to execute when event is run.
  * @param array $args Optional. Arguments to pass to the hook's callback function.
- * @return false|void False when an event is not scheduled.
+ * @return false|void False if the event does not get scheduled.
  */
 function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array()) {
        // Make sure timestamp is a positive integer
@@ -110,11 +117,11 @@ function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array()) {
  *
  * @since 2.1.0
  *
- * @param int $timestamp Timestamp for when to run the event.
+ * @param int $timestamp Unix timestamp (UTC) for when to run the event.
  * @param string $recurrence How often the event should recur.
- * @param string $hook Action hook to execute when cron is run.
+ * @param string $hook Action hook to execute when event is run.
  * @param array $args Optional. Arguments to pass to the hook's callback function.
- * @return false|void False when an event is not scheduled.
+ * @return false|void False if the event does not get rescheduled.
  */
 function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array() ) {
        // Make sure timestamp is a positive integer
@@ -152,20 +159,20 @@ function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array() )
 }
 
 /**
- * Unschedule a previously scheduled cron job.
+ * Unschedule a previously scheduled event.
  *
- * The $timestamp and $hook parameters are required, so that the event can be
+ * The $timestamp and $hook parameters are required so that the event can be
  * identified.
  *
  * @since 2.1.0
  *
- * @param int $timestamp Timestamp for when to run the event.
+ * @param int $timestamp Unix timestamp (UTC) for when to run the event.
  * @param string $hook Action hook, the execution of which will be unscheduled.
  * @param array $args Arguments to pass to the hook's callback function.
  * Although not passed to a callback function, these arguments are used
  * to uniquely identify the scheduled event, so they should be the same
  * as those used when originally scheduling the event.
- * @return false|void False when an event is not unscheduled.
+ * @return false|void False if the event does not get unscheduled.
  */
 function wp_unschedule_event( $timestamp, $hook, $args = array() ) {
        // Make sure timestamp is a positive integer
@@ -184,12 +191,12 @@ function wp_unschedule_event( $timestamp, $hook, $args = array() ) {
 }
 
 /**
- * Unschedule all cron jobs attached to a specific hook.
+ * Unschedule all events attached to the specified hook.
  *
  * @since 2.1.0
  *
  * @param string $hook Action hook, the execution of which will be unscheduled.
- * @param array $args Optional. Arguments that were to be pass to the hook's callback function.
+ * @param array $args Optional. Arguments that were to be passed to the hook's callback function.
  */
 function wp_clear_scheduled_hook( $hook, $args = array() ) {
        // Backward compatibility
@@ -215,13 +222,13 @@ function wp_clear_scheduled_hook( $hook, $args = array() ) {
 }
 
 /**
- * Retrieve the next timestamp for a cron event.
+ * Retrieve the next timestamp for an event.
  *
  * @since 2.1.0
  *
- * @param string $hook Action hook to execute when cron is run.
+ * @param string $hook Action hook to execute when event is run.
  * @param array $args Optional. Arguments to pass to the hook's callback function.
- * @return false|int The UNIX timestamp of the next time the scheduled event will occur.
+ * @return false|int The Unix timestamp of the next time the scheduled event will occur.
  */
 function wp_next_scheduled( $hook, $args = array() ) {
        $crons = _get_cron_array();
@@ -240,7 +247,7 @@ function wp_next_scheduled( $hook, $args = array() ) {
  *
  * @since 2.1.0
  *
- * @param int $gmt_time Optional. Unix timestamp. Default 0 (current time is used).
+ * @param int $gmt_time Optional. Unix timestamp (UTC). Default 0 (current time is used).
  */
 function spawn_cron( $gmt_time = 0 ) {
        if ( ! $gmt_time )
@@ -250,7 +257,7 @@ function spawn_cron( $gmt_time = 0 ) {
                return;
 
        /*
-        * Get the cron lock, which is a unix timestamp of when the last cron was spawned
+        * Get the cron lock, which is a Unix timestamp of when the last cron was spawned
         * and has not finished running.
         *
         * Multiple processes on multiple web servers can run this code concurrently,
@@ -364,11 +371,11 @@ function wp_cron() {
 }
 
 /**
- * Retrieve supported and filtered Cron recurrences.
+ * Retrieve supported event recurrence schedules.
  *
- * The supported recurrences are 'hourly' and 'daily'. A plugin may add more by
- * 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
+ * The default supported recurrences are 'hourly', 'twicedaily', and 'daily'. A plugin may
+ * add more by 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'.
  *
@@ -410,13 +417,15 @@ function wp_get_schedules() {
 }
 
 /**
- * Retrieve Cron schedule for hook with arguments.
+ * Retrieve the recurrence schedule for an event.
+ *
+ * @see wp_get_schedules() for available schedules.
  *
  * @since 2.1.0
  *
- * @param string $hook Action hook to execute when cron is run.
- * @param array $args Optional. Arguments to pass to the hook's callback function.
- * @return string|false False, if no schedule. Schedule on success.
+ * @param string $hook Action hook to identify the event.
+ * @param array $args Optional. Arguments passed to the event's callback function.
+ * @return string|false False, if no schedule. Schedule name on success.
  */
 function wp_get_schedule($hook, $args = array()) {
        $crons = _get_cron_array();
index c02e1efc6ae54ef54b8386a51412c0a7d1ca2563..301459f5e81971db19dac66b6f2bd4f18a970c51 100644 (file)
@@ -294,6 +294,7 @@ html:lang(he-il) .rtl #wpadminbar *  {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
index 03cc3079ccc5041582b949eef02f6c745dd9b72a..985002f5400f428cc366c0db8a5b6df7a2ef405e 100644 (file)
@@ -1 +1 @@
-#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
+#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 .ab-icon: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 573ff8d8a6a2caf8df9734dcc5b4b5f450eef31f..e108a8e6bca049bf97a6488de178daaebb9dd8bc 100644 (file)
@@ -294,6 +294,7 @@ html:lang(he-il) .rtl #wpadminbar *  {
 #wpadminbar li:hover .ab-item:before,
 #wpadminbar li a:focus .ab-icon:before,
 #wpadminbar li .ab-item:focus:before,
+#wpadminbar li .ab-item:focus .ab-icon:before,
 #wpadminbar li.hover .ab-icon:before,
 #wpadminbar li.hover .ab-item:before,
 #wpadminbar li:hover #adminbarsearch:before,
index abb1b4d8483ba26e0c1cf8fde45526301b31267e..68665fc608478006330169a300b03903d549bd5c 100644 (file)
@@ -1 +1 @@
-#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
+#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 .ab-icon: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
diff --git a/wp-includes/css/customize-preview-rtl.css b/wp-includes/css/customize-preview-rtl.css
new file mode 100644 (file)
index 0000000..cce4e4e
--- /dev/null
@@ -0,0 +1,267 @@
+.customize-partial-refreshing {
+       opacity: 0.25;
+       -webkit-transition: opacity 0.25s;
+       transition: opacity 0.25s;
+       cursor: progress;
+}
+
+/* Override highlight when refreshing */
+.customize-partial-refreshing.widget-customizer-highlighted-widget {
+       -webkit-box-shadow: none;
+       box-shadow: none;
+}
+
+/* Make shortcut buttons essentially invisible */
+.widget .customize-partial-edit-shortcut,
+.customize-partial-edit-shortcut {
+       position: absolute;
+       float: right;
+       width: 1px; /* required to have a size to be focusable in Safari */
+       height: 1px;
+       padding: 0;
+       margin: -1px -1px 0 0;
+       border: 0;
+       background: transparent;
+       color: transparent;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       outline: none;
+       z-index: 5;
+}
+
+/**
+ * Styles for the actual shortcut
+ *
+ * Note that some properties are overly verbose to prevent theme interference.
+ */
+.widget .customize-partial-edit-shortcut button,
+.customize-partial-edit-shortcut button {
+       position: absolute;
+       right: -30px;
+       top: 2px;
+       color: #fff;
+       width: 30px;
+       height: 30px;
+       min-width: 30px;
+       min-height: 30px;
+       line-height: 1em !important;
+       font-size: 18px;
+       z-index: 5;
+       background: #0085ba !important;
+       -webkit-border-radius: 50%;
+       border-radius: 50%;
+       border: 2px solid #fff;
+       -webkit-box-shadow: 0 2px 1px rgba(46,68,83,0.15);
+       box-shadow: 0 2px 1px rgba(46,68,83,0.15);
+       text-align: center;
+       cursor: pointer;
+       -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+       box-sizing: border-box;
+       padding: 3px;
+       -webkit-animation-fill-mode: both;
+       animation-fill-mode: both;
+       -webkit-animation-duration: .4s;
+       animation-duration: .4s;
+       opacity: 0;
+       pointer-events: none;
+       text-shadow: 0 -1px 1px #006799,
+                    -1px 0 1px #006799,
+                    0 1px 1px #006799,
+                    1px 0 1px #006799;
+}
+.wp-custom-header .customize-partial-edit-shortcut button {
+       right: 2px
+}
+
+.customize-partial-edit-shortcut button svg {
+       fill: #fff;
+       min-width: 20px;
+       min-height: 20px;
+       width: 20px;
+       height: 20px;
+       margin: auto;
+}
+
+.customize-partial-edit-shortcut button:hover {
+       background: #008ec2 !important; /* matches primary buttons */
+}
+
+.customize-partial-edit-shortcut button:focus {
+       -webkit-box-shadow: 0 0 0 2px #008ec2;
+       box-shadow: 0 0 0 2px #008ec2;
+}
+
+body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut button {
+       -webkit-animation-name: customize-partial-edit-shortcut-bounce-appear;
+       animation-name: customize-partial-edit-shortcut-bounce-appear;
+       pointer-events: auto;
+}
+body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut button {
+       -webkit-animation-name: customize-partial-edit-shortcut-bounce-disappear;
+       animation-name: customize-partial-edit-shortcut-bounce-disappear;
+       pointer-events: none;
+}
+
+.page-sidebar-collapsed .customize-partial-edit-shortcut button,
+.customize-partial-edit-shortcut-hidden .customize-partial-edit-shortcut button {
+       visibility: hidden;
+}
+
+@-webkit-keyframes customize-partial-edit-shortcut-bounce-appear {
+       from, 20%, 40%, 60%, 80%, to {
+               -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+               animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+       }
+       0% {
+               opacity: 0;
+               -webkit-transform: scale3d(.3, .3, .3);
+               transform: scale3d(.3, .3, .3);
+       }
+       20% {
+               -webkit-transform: scale3d(1.1, 1.1, 1.1);
+               transform: scale3d(1.1, 1.1, 1.1);
+       }
+       40% {
+               -webkit-transform: scale3d(.9, .9, .9);
+               transform: scale3d(.9, .9, .9);
+       }
+       60% {
+               opacity: 1;
+               -webkit-transform: scale3d(1.03, 1.03, 1.03);
+               transform: scale3d(1.03, 1.03, 1.03);
+       }
+       80% {
+               -webkit-transform: scale3d(.97, .97, .97);
+               transform: scale3d(.97, .97, .97);
+       }
+       to {
+               opacity: 1;
+               -webkit-transform: scale3d(1, 1, 1);
+               transform: scale3d(1, 1, 1);
+       }
+}
+
+@keyframes customize-partial-edit-shortcut-bounce-appear {
+       from, 20%, 40%, 60%, 80%, to {
+               -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+               animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+       }
+       0% {
+               opacity: 0;
+               -webkit-transform: scale3d(.3, .3, .3);
+               transform: scale3d(.3, .3, .3);
+       }
+       20% {
+               -webkit-transform: scale3d(1.1, 1.1, 1.1);
+               transform: scale3d(1.1, 1.1, 1.1);
+       }
+       40% {
+               -webkit-transform: scale3d(.9, .9, .9);
+               transform: scale3d(.9, .9, .9);
+       }
+       60% {
+               opacity: 1;
+               -webkit-transform: scale3d(1.03, 1.03, 1.03);
+               transform: scale3d(1.03, 1.03, 1.03);
+       }
+       80% {
+               -webkit-transform: scale3d(.97, .97, .97);
+               transform: scale3d(.97, .97, .97);
+       }
+       to {
+               opacity: 1;
+               -webkit-transform: scale3d(1, 1, 1);
+               transform: scale3d(1, 1, 1);
+       }
+}
+
+@-webkit-keyframes customize-partial-edit-shortcut-bounce-disappear {
+       from, 20%, 40%, 60%, 80%, to {
+               -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+               animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+       }
+       0% {
+               opacity: 1;
+               -webkit-transform: scale3d(1, 1, 1);
+               transform: scale3d(1, 1, 1);
+       }
+       20% {
+               -webkit-transform: scale3d(.97, .97, .97);
+               transform: scale3d(.97, .97, .97);
+       }
+       40% {
+               opacity: 1;
+               -webkit-transform: scale3d(1.03, 1.03, 1.03);
+               transform: scale3d(1.03, 1.03, 1.03);
+       }
+       60% {
+               -webkit-transform: scale3d(.9, .9, .9);
+               transform: scale3d(.9, .9, .9);
+       }
+       80% {
+               -webkit-transform: scale3d(1.1, 1.1, 1.1);
+               transform: scale3d(1.1, 1.1, 1.1);
+       }
+       to {
+               opacity: 0;
+               -webkit-transform: scale3d(.3, .3, .3);
+               transform: scale3d(.3, .3, .3);
+       }
+}
+
+@keyframes customize-partial-edit-shortcut-bounce-disappear {
+       from, 20%, 40%, 60%, 80%, to {
+               -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+               animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+       }
+       0% {
+               opacity: 1;
+               -webkit-transform: scale3d(1, 1, 1);
+               transform: scale3d(1, 1, 1);
+       }
+       20% {
+               -webkit-transform: scale3d(.97, .97, .97);
+               transform: scale3d(.97, .97, .97);
+       }
+       40% {
+               opacity: 1;
+               -webkit-transform: scale3d(1.03, 1.03, 1.03);
+               transform: scale3d(1.03, 1.03, 1.03);
+       }
+       60% {
+               -webkit-transform: scale3d(.9, .9, .9);
+               transform: scale3d(.9, .9, .9);
+       }
+       80% {
+               -webkit-transform: scale3d(1.1, 1.1, 1.1);
+               transform: scale3d(1.1, 1.1, 1.1);
+       }
+       to {
+               opacity: 0;
+               -webkit-transform: scale3d(.3, .3, .3);
+               transform: scale3d(.3, .3, .3);
+       }
+}
+
+@media screen and (max-width:800px) {
+       .widget .customize-partial-edit-shortcut button,
+       .customize-partial-edit-shortcut button {
+               right: -32px;
+       }
+}
+
+@media screen and (max-width:320px) {
+       body.customize-partial-edit-shortcuts-shown .site-title {
+               padding-right: 10px;
+       }
+
+       body.customize-partial-edit-shortcuts-shown .widget-area .widget {
+               padding-right: 10px;
+       }
+
+       .widget .customize-partial-edit-shortcut button,
+       .customize-partial-edit-shortcut button {
+               right: -30px;
+       }
+}
diff --git a/wp-includes/css/customize-preview-rtl.min.css b/wp-includes/css/customize-preview-rtl.min.css
new file mode 100644 (file)
index 0000000..8f8c421
--- /dev/null
@@ -0,0 +1 @@
+.customize-partial-refreshing{opacity:.25;-webkit-transition:opacity .25s;transition:opacity .25s;cursor:progress}.customize-partial-refreshing.widget-customizer-highlighted-widget{-webkit-box-shadow:none;box-shadow:none}.customize-partial-edit-shortcut,.widget .customize-partial-edit-shortcut{position:absolute;float:right;width:1px;height:1px;padding:0;margin:-1px -1px 0 0;border:0;background:0 0;color:transparent;-webkit-box-shadow:none;box-shadow:none;outline:0;z-index:5}.customize-partial-edit-shortcut button,.widget .customize-partial-edit-shortcut button{position:absolute;right:-30px;top:2px;color:#fff;width:30px;height:30px;min-width:30px;min-height:30px;line-height:1em!important;font-size:18px;z-index:5;background:#0085ba!important;-webkit-border-radius:50%;border-radius:50%;border:2px solid #fff;-webkit-box-shadow:0 2px 1px rgba(46,68,83,.15);box-shadow:0 2px 1px rgba(46,68,83,.15);text-align:center;cursor:pointer;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:3px;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.4s;animation-duration:.4s;opacity:0;pointer-events:none;text-shadow:0 -1px 1px #006799,-1px 0 1px #006799,0 1px 1px #006799,1px 0 1px #006799}.wp-custom-header .customize-partial-edit-shortcut button{right:2px}.customize-partial-edit-shortcut button svg{fill:#fff;min-width:20px;min-height:20px;width:20px;height:20px;margin:auto}.customize-partial-edit-shortcut button:hover{background:#008ec2!important}.customize-partial-edit-shortcut button:focus{-webkit-box-shadow:0 0 0 2px #008ec2;box-shadow:0 0 0 2px #008ec2}body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut button{-webkit-animation-name:customize-partial-edit-shortcut-bounce-appear;animation-name:customize-partial-edit-shortcut-bounce-appear;pointer-events:auto}body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut button{-webkit-animation-name:customize-partial-edit-shortcut-bounce-disappear;animation-name:customize-partial-edit-shortcut-bounce-disappear;pointer-events:none}.customize-partial-edit-shortcut-hidden .customize-partial-edit-shortcut button,.page-sidebar-collapsed .customize-partial-edit-shortcut button{visibility:hidden}@-webkit-keyframes customize-partial-edit-shortcut-bounce-appear{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes customize-partial-edit-shortcut-bounce-appear{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes customize-partial-edit-shortcut-bounce-disappear{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}20%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}40%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}80%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes customize-partial-edit-shortcut-bounce-disappear{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}20%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}40%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}80%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@media screen and (max-width:800px){.customize-partial-edit-shortcut button,.widget .customize-partial-edit-shortcut button{right:-32px}}@media screen and (max-width:320px){body.customize-partial-edit-shortcuts-shown .site-title,body.customize-partial-edit-shortcuts-shown .widget-area .widget{padding-right:10px}.customize-partial-edit-shortcut button,.widget .customize-partial-edit-shortcut button{right:-30px}}
\ No newline at end of file
index 75251ea93a7983cb92502ec6fb30e3c9ceb233af..1a5067ff8b8d8403bcc0043f48f30674fc7091a2 100644 (file)
        -webkit-box-shadow: none;
        box-shadow: none;
 }
+
+/* Make shortcut buttons essentially invisible */
+.widget .customize-partial-edit-shortcut,
+.customize-partial-edit-shortcut {
+       position: absolute;
+       float: left;
+       width: 1px; /* required to have a size to be focusable in Safari */
+       height: 1px;
+       padding: 0;
+       margin: -1px 0 0 -1px;
+       border: 0;
+       background: transparent;
+       color: transparent;
+       -webkit-box-shadow: none;
+       box-shadow: none;
+       outline: none;
+       z-index: 5;
+}
+
+/**
+ * Styles for the actual shortcut
+ *
+ * Note that some properties are overly verbose to prevent theme interference.
+ */
+.widget .customize-partial-edit-shortcut button,
+.customize-partial-edit-shortcut button {
+       position: absolute;
+       left: -30px;
+       top: 2px;
+       color: #fff;
+       width: 30px;
+       height: 30px;
+       min-width: 30px;
+       min-height: 30px;
+       line-height: 1em !important;
+       font-size: 18px;
+       z-index: 5;
+       background: #0085ba !important;
+       -webkit-border-radius: 50%;
+       border-radius: 50%;
+       border: 2px solid #fff;
+       -webkit-box-shadow: 0 2px 1px rgba(46,68,83,0.15);
+       box-shadow: 0 2px 1px rgba(46,68,83,0.15);
+       text-align: center;
+       cursor: pointer;
+       -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+       box-sizing: border-box;
+       padding: 3px;
+       -webkit-animation-fill-mode: both;
+       animation-fill-mode: both;
+       -webkit-animation-duration: .4s;
+       animation-duration: .4s;
+       opacity: 0;
+       pointer-events: none;
+       text-shadow: 0 -1px 1px #006799,
+                    1px 0 1px #006799,
+                    0 1px 1px #006799,
+                    -1px 0 1px #006799;
+}
+.wp-custom-header .customize-partial-edit-shortcut button {
+       left: 2px
+}
+
+.customize-partial-edit-shortcut button svg {
+       fill: #fff;
+       min-width: 20px;
+       min-height: 20px;
+       width: 20px;
+       height: 20px;
+       margin: auto;
+}
+
+.customize-partial-edit-shortcut button:hover {
+       background: #008ec2 !important; /* matches primary buttons */
+}
+
+.customize-partial-edit-shortcut button:focus {
+       -webkit-box-shadow: 0 0 0 2px #008ec2;
+       box-shadow: 0 0 0 2px #008ec2;
+}
+
+body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut button {
+       -webkit-animation-name: customize-partial-edit-shortcut-bounce-appear;
+       animation-name: customize-partial-edit-shortcut-bounce-appear;
+       pointer-events: auto;
+}
+body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut button {
+       -webkit-animation-name: customize-partial-edit-shortcut-bounce-disappear;
+       animation-name: customize-partial-edit-shortcut-bounce-disappear;
+       pointer-events: none;
+}
+
+.page-sidebar-collapsed .customize-partial-edit-shortcut button,
+.customize-partial-edit-shortcut-hidden .customize-partial-edit-shortcut button {
+       visibility: hidden;
+}
+
+@-webkit-keyframes customize-partial-edit-shortcut-bounce-appear {
+       from, 20%, 40%, 60%, 80%, to {
+               -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+               animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+       }
+       0% {
+               opacity: 0;
+               -webkit-transform: scale3d(.3, .3, .3);
+               transform: scale3d(.3, .3, .3);
+       }
+       20% {
+               -webkit-transform: scale3d(1.1, 1.1, 1.1);
+               transform: scale3d(1.1, 1.1, 1.1);
+       }
+       40% {
+               -webkit-transform: scale3d(.9, .9, .9);
+               transform: scale3d(.9, .9, .9);
+       }
+       60% {
+               opacity: 1;
+               -webkit-transform: scale3d(1.03, 1.03, 1.03);
+               transform: scale3d(1.03, 1.03, 1.03);
+       }
+       80% {
+               -webkit-transform: scale3d(.97, .97, .97);
+               transform: scale3d(.97, .97, .97);
+       }
+       to {
+               opacity: 1;
+               -webkit-transform: scale3d(1, 1, 1);
+               transform: scale3d(1, 1, 1);
+       }
+}
+
+@keyframes customize-partial-edit-shortcut-bounce-appear {
+       from, 20%, 40%, 60%, 80%, to {
+               -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+               animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+       }
+       0% {
+               opacity: 0;
+               -webkit-transform: scale3d(.3, .3, .3);
+               transform: scale3d(.3, .3, .3);
+       }
+       20% {
+               -webkit-transform: scale3d(1.1, 1.1, 1.1);
+               transform: scale3d(1.1, 1.1, 1.1);
+       }
+       40% {
+               -webkit-transform: scale3d(.9, .9, .9);
+               transform: scale3d(.9, .9, .9);
+       }
+       60% {
+               opacity: 1;
+               -webkit-transform: scale3d(1.03, 1.03, 1.03);
+               transform: scale3d(1.03, 1.03, 1.03);
+       }
+       80% {
+               -webkit-transform: scale3d(.97, .97, .97);
+               transform: scale3d(.97, .97, .97);
+       }
+       to {
+               opacity: 1;
+               -webkit-transform: scale3d(1, 1, 1);
+               transform: scale3d(1, 1, 1);
+       }
+}
+
+@-webkit-keyframes customize-partial-edit-shortcut-bounce-disappear {
+       from, 20%, 40%, 60%, 80%, to {
+               -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+               animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+       }
+       0% {
+               opacity: 1;
+               -webkit-transform: scale3d(1, 1, 1);
+               transform: scale3d(1, 1, 1);
+       }
+       20% {
+               -webkit-transform: scale3d(.97, .97, .97);
+               transform: scale3d(.97, .97, .97);
+       }
+       40% {
+               opacity: 1;
+               -webkit-transform: scale3d(1.03, 1.03, 1.03);
+               transform: scale3d(1.03, 1.03, 1.03);
+       }
+       60% {
+               -webkit-transform: scale3d(.9, .9, .9);
+               transform: scale3d(.9, .9, .9);
+       }
+       80% {
+               -webkit-transform: scale3d(1.1, 1.1, 1.1);
+               transform: scale3d(1.1, 1.1, 1.1);
+       }
+       to {
+               opacity: 0;
+               -webkit-transform: scale3d(.3, .3, .3);
+               transform: scale3d(.3, .3, .3);
+       }
+}
+
+@keyframes customize-partial-edit-shortcut-bounce-disappear {
+       from, 20%, 40%, 60%, 80%, to {
+               -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+               animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
+       }
+       0% {
+               opacity: 1;
+               -webkit-transform: scale3d(1, 1, 1);
+               transform: scale3d(1, 1, 1);
+       }
+       20% {
+               -webkit-transform: scale3d(.97, .97, .97);
+               transform: scale3d(.97, .97, .97);
+       }
+       40% {
+               opacity: 1;
+               -webkit-transform: scale3d(1.03, 1.03, 1.03);
+               transform: scale3d(1.03, 1.03, 1.03);
+       }
+       60% {
+               -webkit-transform: scale3d(.9, .9, .9);
+               transform: scale3d(.9, .9, .9);
+       }
+       80% {
+               -webkit-transform: scale3d(1.1, 1.1, 1.1);
+               transform: scale3d(1.1, 1.1, 1.1);
+       }
+       to {
+               opacity: 0;
+               -webkit-transform: scale3d(.3, .3, .3);
+               transform: scale3d(.3, .3, .3);
+       }
+}
+
+@media screen and (max-width:800px) {
+       .widget .customize-partial-edit-shortcut button,
+       .customize-partial-edit-shortcut button {
+               left: -32px;
+       }
+}
+
+@media screen and (max-width:320px) {
+       body.customize-partial-edit-shortcuts-shown .site-title {
+               padding-left: 10px;
+       }
+
+       body.customize-partial-edit-shortcuts-shown .widget-area .widget {
+               padding-left: 10px;
+       }
+
+       .widget .customize-partial-edit-shortcut button,
+       .customize-partial-edit-shortcut button {
+               left: -30px;
+       }
+}
index f2613499e32ac2be8fe6d2e523abcbe4142981cb..529d443a2499dfdcfc756e05d028807bb0adce40 100644 (file)
@@ -1 +1 @@
-.customize-partial-refreshing{opacity:.25;-webkit-transition:opacity .25s;transition:opacity .25s;cursor:progress}.customize-partial-refreshing.widget-customizer-highlighted-widget{-webkit-box-shadow:none;box-shadow:none}
\ No newline at end of file
+.customize-partial-refreshing{opacity:.25;-webkit-transition:opacity .25s;transition:opacity .25s;cursor:progress}.customize-partial-refreshing.widget-customizer-highlighted-widget{-webkit-box-shadow:none;box-shadow:none}.customize-partial-edit-shortcut,.widget .customize-partial-edit-shortcut{position:absolute;float:left;width:1px;height:1px;padding:0;margin:-1px 0 0 -1px;border:0;background:0 0;color:transparent;-webkit-box-shadow:none;box-shadow:none;outline:0;z-index:5}.customize-partial-edit-shortcut button,.widget .customize-partial-edit-shortcut button{position:absolute;left:-30px;top:2px;color:#fff;width:30px;height:30px;min-width:30px;min-height:30px;line-height:1em!important;font-size:18px;z-index:5;background:#0085ba!important;-webkit-border-radius:50%;border-radius:50%;border:2px solid #fff;-webkit-box-shadow:0 2px 1px rgba(46,68,83,.15);box-shadow:0 2px 1px rgba(46,68,83,.15);text-align:center;cursor:pointer;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:3px;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.4s;animation-duration:.4s;opacity:0;pointer-events:none;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799}.wp-custom-header .customize-partial-edit-shortcut button{left:2px}.customize-partial-edit-shortcut button svg{fill:#fff;min-width:20px;min-height:20px;width:20px;height:20px;margin:auto}.customize-partial-edit-shortcut button:hover{background:#008ec2!important}.customize-partial-edit-shortcut button:focus{-webkit-box-shadow:0 0 0 2px #008ec2;box-shadow:0 0 0 2px #008ec2}body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut button{-webkit-animation-name:customize-partial-edit-shortcut-bounce-appear;animation-name:customize-partial-edit-shortcut-bounce-appear;pointer-events:auto}body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut button{-webkit-animation-name:customize-partial-edit-shortcut-bounce-disappear;animation-name:customize-partial-edit-shortcut-bounce-disappear;pointer-events:none}.customize-partial-edit-shortcut-hidden .customize-partial-edit-shortcut button,.page-sidebar-collapsed .customize-partial-edit-shortcut button{visibility:hidden}@-webkit-keyframes customize-partial-edit-shortcut-bounce-appear{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes customize-partial-edit-shortcut-bounce-appear{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes customize-partial-edit-shortcut-bounce-disappear{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}20%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}40%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}80%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes customize-partial-edit-shortcut-bounce-disappear{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}20%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}40%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}80%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@media screen and (max-width:800px){.customize-partial-edit-shortcut button,.widget .customize-partial-edit-shortcut button{left:-32px}}@media screen and (max-width:320px){body.customize-partial-edit-shortcuts-shown .site-title,body.customize-partial-edit-shortcuts-shown .widget-area .widget{padding-left:10px}.customize-partial-edit-shortcut button,.widget .customize-partial-edit-shortcut button{left:-30px}}
\ No newline at end of file
index e57805ff60b8e73b9a738043b8a79511152ff8aa..99dda5e7bf834e74ee146d5c2c4f9357be941de1 100644 (file)
        font-family: inherit;
 }
 
+.mce-container .mce-monospace,
+.mce-widget .mce-monospace {
+       font-family: Consolas, Monaco, monospace;
+       font-size: 13px;
+       line-height: 150%;
+}
+
 /* TinyMCE windows */
 #mce-modal-block,
 #mce-modal-block.mce-fade {
@@ -581,6 +588,7 @@ div.mce-path {
 .mce-menu .mce-menu-item-normal.mce-active,
 .mce-menu .mce-menu-item-preview.mce-active {
        background: #0073aa; /* See color scheme. */
+       color: #fff;
 }
 
 .mce-menu .mce-menu-item-preview.mce-active {
@@ -643,6 +651,16 @@ div.mce-menu .mce-menu-item-sep,
        margin-right: -2px;
 }
 
+/* Keyboard shortcuts position */
+.mce-menu.mce-menu-align .mce-menu-item-normal {
+       position: relative;
+}
+
+.mce-menu.mce-menu-align .mce-menu-shortcut {
+       bottom: 0.6em;
+       font-size: 0.9em;
+}
+
 /* Buttons in modals */
 .mce-primary button,
 .mce-primary button i {
@@ -840,6 +858,11 @@ div.mce-menu .mce-menu-item-sep,
        border-right-color: #23282d;
 }
 
+div.mce-notification {
+       right: 10% !important;
+       left: 10%;
+}
+
 .mce-notification button.mce-close {
        left: 6px;
        top: 3px;
@@ -1147,7 +1170,7 @@ i.mce-i-wp_code:before {
 }
 
 .js .tmce-active .wp-editor-area {
-       color: white;
+       color: #fff;
 }
 
 .tmce-active .quicktags-toolbar {
@@ -1304,7 +1327,7 @@ i.mce-i-wp_code:before {
 
 @media screen and ( min-width: 782px ) {
        .wp-core-ui .quicktags-toolbar input.button.button-small {
-               /* .button-small is normaly 11px, but a bit too small for these buttons. */
+               /* .button-small is normally 11px, but a bit too small for these buttons. */
                font-size: 12px;
                height: 26px;
                line-height: 24px;
index 0c84b67772b0831822b83997c0bf47490715b8a9..21b6a6efb3ad0321ea2d27406be8556d98c54ae9 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: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-btn .mce-txt{direction:inherit;text-align:inherit}.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
+#wp-link-wrap,.mce-window{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3)}.mce-window .mce-wp-help *,div.mce-inline-toolbar-grp{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}.mce-container .mce-monospace,.mce-widget .mce-monospace{font-family:Consolas,Monaco,monospace;font-size:13px;line-height:150%}#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 *{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);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:""}.mce-menu.mce-menu-align .mce-menu-item-normal,.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-btn .mce-txt{direction:inherit;text-align:inherit}.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;color:#fff}.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-menu.mce-menu-align .mce-menu-shortcut{bottom:.6em;font-size:.9em}.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}div.mce-notification{right:10%!important;left:10%}.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 fa5e71a741c8bcdf84c81150a1bfc514cec100a4..e04317ec89cbdcc896a106ef33a0c30465dde475 100644 (file)
        font-family: inherit;
 }
 
+.mce-container .mce-monospace,
+.mce-widget .mce-monospace {
+       font-family: Consolas, Monaco, monospace;
+       font-size: 13px;
+       line-height: 150%;
+}
+
 /* TinyMCE windows */
 #mce-modal-block,
 #mce-modal-block.mce-fade {
@@ -581,6 +588,7 @@ div.mce-path {
 .mce-menu .mce-menu-item-normal.mce-active,
 .mce-menu .mce-menu-item-preview.mce-active {
        background: #0073aa; /* See color scheme. */
+       color: #fff;
 }
 
 .mce-menu .mce-menu-item-preview.mce-active {
@@ -643,6 +651,16 @@ div.mce-menu .mce-menu-item-sep,
        margin-left: -2px;
 }
 
+/* Keyboard shortcuts position */
+.mce-menu.mce-menu-align .mce-menu-item-normal {
+       position: relative;
+}
+
+.mce-menu.mce-menu-align .mce-menu-shortcut {
+       bottom: 0.6em;
+       font-size: 0.9em;
+}
+
 /* Buttons in modals */
 .mce-primary button,
 .mce-primary button i {
@@ -840,6 +858,11 @@ div.mce-menu .mce-menu-item-sep,
        border-left-color: #23282d;
 }
 
+div.mce-notification {
+       left: 10% !important;
+       right: 10%;
+}
+
 .mce-notification button.mce-close {
        right: 6px;
        top: 3px;
@@ -1147,7 +1170,7 @@ i.mce-i-wp_code:before {
 }
 
 .js .tmce-active .wp-editor-area {
-       color: white;
+       color: #fff;
 }
 
 .tmce-active .quicktags-toolbar {
@@ -1304,7 +1327,7 @@ i.mce-i-wp_code:before {
 
 @media screen and ( min-width: 782px ) {
        .wp-core-ui .quicktags-toolbar input.button.button-small {
-               /* .button-small is normaly 11px, but a bit too small for these buttons. */
+               /* .button-small is normally 11px, but a bit too small for these buttons. */
                font-size: 12px;
                height: 26px;
                line-height: 24px;
index 40d0e127642b9fe7afcee335bc0c24504de176b1..396001be0b0efa50c45af45bc9dff3baa5895563 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: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-btn .mce-txt{direction:inherit;text-align:inherit}.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
+#wp-link-wrap,.mce-window{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3)}.mce-window .mce-wp-help *,div.mce-inline-toolbar-grp{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}.mce-container .mce-monospace,.mce-widget .mce-monospace{font-family:Consolas,Monaco,monospace;font-size:13px;line-height:150%}#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 *{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);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:""}.mce-menu.mce-menu-align .mce-menu-item-normal,.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-btn .mce-txt{direction:inherit;text-align:inherit}.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;color:#fff}.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-menu.mce-menu-align .mce-menu-shortcut{bottom:.6em;font-size:.9em}.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}div.mce-notification{left:10%!important;right:10%}.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 10ff56ef561eb13025af950ef32924ce05216f26..28e437c411ddb07384545f7e42b0bd5a4329ce78 100644 (file)
@@ -64,7 +64,7 @@ body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        line-height: 1.5;
        color: #82878c;
-       background: white;
+       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);
index 588e32a9c81d2b5c02c0f53bcb4bbc8e366203e7..50956f85223793f9ba851b38fec366058a7e9071 100644 (file)
@@ -40,7 +40,9 @@ class WP_Customize_Background_Image_Control extends WP_Customize_Image_Control {
        public function enqueue() {
                parent::enqueue();
 
+               $custom_background = get_theme_support( 'custom-background' );
                wp_localize_script( 'customize-controls', '_wpCustomizeBackground', array(
+                       'defaults' => ! empty( $custom_background[0] ) ? $custom_background[0] : array(),
                        'nonces' => array(
                                'add' => wp_create_nonce( 'background-add' ),
                        ),
diff --git a/wp-includes/customize/class-wp-customize-background-position-control.php b/wp-includes/customize/class-wp-customize-background-position-control.php
new file mode 100644 (file)
index 0000000..475a01a
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Customize API: WP_Customize_Background_Position_Control class
+ *
+ * @package WordPress
+ * @subpackage Customize
+ * @since 4.7.0
+ */
+
+/**
+ * Customize Background Position Control class.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_Customize_Control
+ */
+class WP_Customize_Background_Position_Control extends WP_Customize_Control {
+
+       /**
+        * Type.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var string
+        */
+       public $type = 'background_position';
+
+       /**
+        * Don't render the control content from PHP, as it's rendered via JS on load.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function render_content() {}
+
+       /**
+        * Render a JS template for the content of the position control.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function content_template() {
+               $options = array(
+                       array(
+                               'left top'   => array( 'label' => __( 'Top Left' ), 'icon' => 'dashicons dashicons-arrow-left-alt' ),
+                               'center top' => array( 'label' => __( 'Top' ), 'icon' => 'dashicons dashicons-arrow-up-alt' ),
+                               'right top'  => array( 'label' => __( 'Top Right' ), 'icon' => 'dashicons dashicons-arrow-right-alt' ),
+                       ),
+                       array(
+                               'left center'   => array( 'label' => __( 'Left' ), 'icon' => 'dashicons dashicons-arrow-left-alt' ),
+                               'center center' => array( 'label' => __( 'Center' ), 'icon' => 'background-position-center-icon' ),
+                               'right center'  => array( 'label' => __( 'Right' ), 'icon' => 'dashicons dashicons-arrow-right-alt' ),
+                       ),
+                       array(
+                               'left bottom'   => array( 'label' => __( 'Bottom Left' ), 'icon' => 'dashicons dashicons-arrow-left-alt' ),
+                               'center bottom' => array( 'label' => __( 'Bottom' ), 'icon' => 'dashicons dashicons-arrow-down-alt' ),
+                               'right bottom'  => array( 'label' => __( 'Bottom Right' ), 'icon' => 'dashicons dashicons-arrow-right-alt' ),
+                       ),
+               );
+               ?>
+               <# if ( data.label ) { #>
+                       <span class="customize-control-title">{{{ data.label }}}</span>
+               <# } #>
+               <# if ( data.description ) { #>
+                       <span class="description customize-control-description">{{{ data.description }}}</span>
+               <# } #>
+               <div class="customize-control-content">
+                       <fieldset>
+                               <legend class="screen-reader-text"><span><?php _e( 'Image Position' ); ?></span></legend>
+                               <div class="background-position-control">
+                               <?php foreach ( $options as $group ) : ?>
+                                       <div class="button-group">
+                                       <?php foreach ( $group as $value => $input ) : ?>
+                                               <label>
+                                                       <input class="screen-reader-text" name="background-position" type="radio" value="<?php echo esc_attr( $value ); ?>">
+                                                       <span class="button display-options position"><span class="<?php echo esc_attr( $input['icon'] ); ?>" aria-hidden="true"></span></span>
+                                                       <span class="screen-reader-text"><?php echo $input['label']; ?></span>
+                                               </label>
+                                       <?php endforeach; ?>
+                                       </div>
+                               <?php endforeach; ?>
+                               </div>
+                       </fieldset>
+               </div>
+               <?php
+       }
+}
index fac9a7d5ce7c7ff3aefcbe24fa9f9fb956ee100d..7f6a9b5a849aeeebadc46dfe513dccb3e6e56f5e 100644 (file)
  */
 class WP_Customize_Color_Control extends WP_Customize_Control {
        /**
+        * Type.
+        *
         * @access public
         * @var string
         */
        public $type = 'color';
 
        /**
+        * Statuses.
+        *
         * @access public
         * @var array
         */
        public $statuses;
 
+       /**
+        * Mode.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var string
+        */
+       public $mode = 'full';
+
        /**
         * Constructor.
         *
@@ -62,6 +75,7 @@ class WP_Customize_Color_Control extends WP_Customize_Control {
                parent::to_json();
                $this->json['statuses'] = $this->statuses;
                $this->json['defaultValue'] = $this->setting->default;
+               $this->json['mode'] = $this->mode;
        }
 
        /**
@@ -78,8 +92,10 @@ class WP_Customize_Color_Control extends WP_Customize_Control {
         */
        public function content_template() {
                ?>
-               <# var defaultValue = '';
-               if ( data.defaultValue ) {
+               <# var defaultValue = '',
+                       isHueSlider = data.mode === 'hue';
+
+               if ( data.defaultValue && ! isHueSlider ) {
                        if ( '#' !== data.defaultValue.substring( 0, 1 ) ) {
                                defaultValue = '#' + data.defaultValue;
                        } else {
@@ -95,7 +111,11 @@ class WP_Customize_Color_Control extends WP_Customize_Control {
                                <span class="description customize-control-description">{{{ data.description }}}</span>
                        <# } #>
                        <div class="customize-control-content">
-                               <input class="color-picker-hex" type="text" maxlength="7" placeholder="<?php esc_attr_e( 'Hex Value' ); ?>" {{ defaultValue }} />
+                               <# if ( isHueSlider ) { #>
+                                       <input class="color-picker-hue" type="text" data-type="hue" />
+                               <# } else { #>
+                                       <input class="color-picker-hex" type="text" maxlength="7" placeholder="<?php esc_attr_e( 'Hex Value' ); ?>" {{ defaultValue }} />
+                               <# } #>
                        </div>
                </label>
                <?php
diff --git a/wp-includes/customize/class-wp-customize-custom-css-setting.php b/wp-includes/customize/class-wp-customize-custom-css-setting.php
new file mode 100644 (file)
index 0000000..cb0f151
--- /dev/null
@@ -0,0 +1,373 @@
+<?php
+/**
+ * Customize API: WP_Customize_Custom_CSS_Setting class
+ *
+ * This handles validation, sanitization and saving of the value.
+ *
+ * @package WordPress
+ * @subpackage Customize
+ * @since 4.7.0
+ */
+
+/**
+ * Custom Setting to handle WP Custom CSS.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_Customize_Setting
+ */
+final class WP_Customize_Custom_CSS_Setting extends WP_Customize_Setting {
+
+       /**
+        * The setting type.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var string
+        */
+       public $type = 'custom_css';
+
+       /**
+        * Setting Transport
+        *
+        * @since 4.7.0
+        * @access public
+        * @var string
+        */
+       public $transport = 'postMessage';
+
+       /**
+        * Capability required to edit this setting.
+        *
+        * @since 4.7.0
+        * @access public
+        * @var string
+        */
+       public $capability = 'edit_css';
+
+       /**
+        * Stylesheet
+        *
+        * @since 4.7.0
+        * @access public
+        * @var string
+        */
+       public $stylesheet = '';
+
+       /**
+        * WP_Customize_Custom_CSS_Setting constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @throws Exception If the setting ID does not match the pattern `custom_css[$stylesheet]`.
+        *
+        * @param WP_Customize_Manager $manager The Customize Manager class.
+        * @param string               $id      An specific ID of the setting. Can be a
+        *                                      theme mod or option name.
+        * @param array                $args    Setting arguments.
+        */
+       public function __construct( $manager, $id, $args = array() ) {
+               parent::__construct( $manager, $id, $args );
+               if ( 'custom_css' !== $this->id_data['base'] ) {
+                       throw new Exception( 'Expected custom_css id_base.' );
+               }
+               if ( 1 !== count( $this->id_data['keys'] ) || empty( $this->id_data['keys'][0] ) ) {
+                       throw new Exception( 'Expected single stylesheet key.' );
+               }
+               $this->stylesheet = $this->id_data['keys'][0];
+       }
+
+       /**
+        * Add filter to preview post value.
+        *
+        * @since 4.7.9
+        * @access public
+        *
+        * @return bool False when preview short-circuits due no change needing to be previewed.
+        */
+       public function preview() {
+               if ( $this->is_previewed ) {
+                       return false;
+               }
+               $this->is_previewed = true;
+               add_filter( 'wp_get_custom_css', array( $this, 'filter_previewed_wp_get_custom_css' ), 9, 2 );
+               return true;
+       }
+
+       /**
+        * Filter `wp_get_custom_css` for applying the customized value.
+        *
+        * This is used in the preview when `wp_get_custom_css()` is called for rendering the styles.
+        *
+        * @since 4.7.0
+        * @access private
+        * @see wp_get_custom_css()
+        *
+        * @param string $css        Original CSS.
+        * @param string $stylesheet Current stylesheet.
+        * @return string CSS.
+        */
+       public function filter_previewed_wp_get_custom_css( $css, $stylesheet ) {
+               if ( $stylesheet === $this->stylesheet ) {
+                       $customized_value = $this->post_value( null );
+                       if ( ! is_null( $customized_value ) ) {
+                               $css = $customized_value;
+                       }
+               }
+               return $css;
+       }
+
+       /**
+        * Fetch the value of the setting. Will return the previewed value when `preview()` is called.
+        *
+        * @since 4.7.0
+        * @access public
+        * @see WP_Customize_Setting::value()
+        *
+        * @return string
+        */
+       public function value() {
+               if ( $this->is_previewed ) {
+                       $post_value = $this->post_value( null );
+                       if ( null !== $post_value ) {
+                               return $post_value;
+                       }
+               }
+               $id_base = $this->id_data['base'];
+               $value = '';
+               $post = wp_get_custom_css_post( $this->stylesheet );
+               if ( $post ) {
+                       $value = $post->post_content;
+               }
+               if ( empty( $value ) ) {
+                       $value = $this->default;
+               }
+
+               /** This filter is documented in wp-includes/class-wp-customize-setting.php */
+               $value = apply_filters( "customize_value_{$id_base}", $value, $this );
+
+               return $value;
+       }
+
+       /**
+        * Validate CSS.
+        *
+        * Checks for imbalanced braces, brackets, and comments.
+        * Notifications are rendered when the customizer state is saved.
+        *
+        * @todo There are cases where valid CSS can be incorrectly marked as invalid when strings or comments include balancing characters. To fix, CSS tokenization needs to be used.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param string $css The input string.
+        * @return true|WP_Error True if the input was validated, otherwise WP_Error.
+        */
+       public function validate( $css ) {
+               $validity = new WP_Error();
+
+               if ( preg_match( '#</?\w+#', $css ) ) {
+                       $validity->add( 'illegal_markup', __( 'Markup is not allowed in CSS.' ) );
+               }
+
+               $imbalanced = false;
+
+               // Make sure that there is a closing brace for each opening brace.
+               if ( ! $this->validate_balanced_characters( '{', '}', $css ) ) {
+                       $validity->add( 'imbalanced_curly_brackets', __( 'Your curly brackets <code>{}</code> are imbalanced. Make sure there is a closing <code>}</code> for every opening <code>{</code>.' ) );
+                       $imbalanced = true;
+               }
+
+               // Ensure brackets are balanced.
+               if ( ! $this->validate_balanced_characters( '[', ']', $css ) ) {
+                       $validity->add( 'imbalanced_braces', __( 'Your brackets <code>[]</code> are imbalanced. Make sure there is a closing <code>]</code> for every opening <code>[</code>.' ) );
+                       $imbalanced = true;
+               }
+
+               // Ensure parentheses are balanced.
+               if ( ! $this->validate_balanced_characters( '(', ')', $css ) ) {
+                       $validity->add( 'imbalanced_parentheses', __( 'Your parentheses <code>()</code> are imbalanced. Make sure there is a closing <code>)</code> for every opening <code>(</code>.' ) );
+                       $imbalanced = true;
+               }
+
+               // Ensure single quotes are equal.
+               if ( ! $this->validate_equal_characters( '\'', $css ) ) {
+                       $validity->add( 'unequal_single_quotes', __( 'Your single quotes <code>\'</code> are uneven. Make sure there is a closing <code>\'</code> for every opening <code>\'</code>.' ) );
+                       $imbalanced = true;
+               }
+
+               // Ensure single quotes are equal.
+               if ( ! $this->validate_equal_characters( '"', $css ) ) {
+                       $validity->add( 'unequal_double_quotes', __( 'Your double quotes <code>"</code> are uneven. Make sure there is a closing <code>"</code> for every opening <code>"</code>.' ) );
+                       $imbalanced = true;
+               }
+
+               /*
+                * Make sure any code comments are closed properly.
+                *
+                * The first check could miss stray an unpaired comment closing figure, so if
+                * The number appears to be balanced, then check for equal numbers
+                * of opening/closing comment figures.
+                *
+                * Although it may initially appear redundant, we use the first method
+                * to give more specific feedback to the user.
+                */
+               $unclosed_comment_count = $this->validate_count_unclosed_comments( $css );
+               if ( 0 < $unclosed_comment_count ) {
+                       $validity->add( 'unclosed_comment', sprintf( _n( 'There is %s unclosed code comment. Close each comment with <code>*/</code>.', 'There are %s unclosed code comments. Close each comment with <code>*/</code>.', $unclosed_comment_count ), $unclosed_comment_count ) );
+                       $imbalanced = true;
+               } elseif ( ! $this->validate_balanced_characters( '/*', '*/', $css ) ) {
+                       $validity->add( 'imbalanced_comments', __( 'There is an extra <code>*/</code>, indicating an end to a comment.  Be sure that there is an opening <code>/*</code> for every closing <code>*/</code>.' ) );
+                       $imbalanced = true;
+               }
+               if ( $imbalanced && $this->is_possible_content_error( $css ) ) {
+                       $validity->add( 'possible_false_positive', __( 'Imbalanced/unclosed character errors can be caused by <code>content: "";</code> declarations. You may need to remove this or add it to a custom CSS file.' ) );
+               }
+
+               if ( empty( $validity->errors ) ) {
+                       $validity = parent::validate( $css );
+               }
+               return $validity;
+       }
+
+       /**
+        * Store the CSS setting value in the custom_css custom post type for the stylesheet.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param string $css The input value.
+        * @return int|false The post ID or false if the value could not be saved.
+        */
+       public function update( $css ) {
+               if ( empty( $css ) ) {
+                       $css = '';
+               }
+
+               $r = wp_update_custom_css_post( $css, array(
+                       'stylesheet' => $this->stylesheet,
+               ) );
+
+               if ( $r instanceof WP_Error ) {
+                       return false;
+               }
+               $post_id = $r->ID;
+
+               // Cache post ID in theme mod for performance to avoid additional DB query.
+               if ( $this->manager->get_stylesheet() === $this->stylesheet ) {
+                       set_theme_mod( 'custom_css_post_id', $post_id );
+               }
+
+               return $post_id;
+       }
+
+       /**
+        * Ensure there are a balanced number of paired characters.
+        *
+        * This is used to check that the number of opening and closing
+        * characters is equal.
+        *
+        * For instance, there should be an equal number of braces ("{", "}")
+        * in the CSS.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @param string $opening_char The opening character.
+        * @param string $closing_char The closing character.
+        * @param string $css The CSS input string.
+        *
+        * @return bool
+        */
+       private function validate_balanced_characters( $opening_char, $closing_char, $css ) {
+               return substr_count( $css, $opening_char ) === substr_count( $css, $closing_char );
+       }
+
+       /**
+        * Ensure there are an even number of paired characters.
+        *
+        * This is used to check that the number of a specific
+        * character is even.
+        *
+        * For instance, there should be an even number of double quotes
+        * in the CSS.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @param string $char A character.
+        * @param string $css The CSS input string.
+        * @return bool Equality.
+        */
+       private function validate_equal_characters( $char, $css ) {
+               $char_count = substr_count( $css, $char );
+               return ( 0 === $char_count % 2 );
+       }
+
+       /**
+        * Count unclosed CSS Comments.
+        *
+        * Used during validation.
+        *
+        * @see self::validate()
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @param string $css The CSS input string.
+        * @return int Count.
+        */
+       private function validate_count_unclosed_comments( $css ) {
+               $count = 0;
+               $comments = explode( '/*', $css );
+
+               if ( ! is_array( $comments ) || ( 1 >= count( $comments ) ) ) {
+                       return $count;
+               }
+
+               unset( $comments[0] ); // The first item is before the first comment.
+               foreach ( $comments as $comment ) {
+                       if ( false === strpos( $comment, '*/' ) ) {
+                               $count++;
+                       }
+               }
+               return $count;
+       }
+
+       /**
+        * Find "content:" within a string.
+        *
+        * Imbalanced/Unclosed validation errors may be caused
+        * when a character is used in a "content:" declaration.
+        *
+        * This function is used to detect if this is a possible
+        * cause of the validation error, so that if it is,
+        * a notification may be added to the Validation Errors.
+        *
+        * Example:
+        * .element::before {
+        *   content: "(\"";
+        * }
+        * .element::after {
+        *   content: "\")";
+        * }
+        *
+        * Using ! empty() because strpos() may return non-boolean values
+        * that evaluate to false. This would be problematic when
+        * using a strict "false === strpos()" comparison.
+        *
+        * @since 4.7.0
+        * @access private
+        *
+        * @param string $css The CSS input string.
+        * @return bool
+        */
+       private function is_possible_content_error( $css ) {
+               $found = preg_match( '/\bcontent\s*:/', $css );
+               if ( ! empty( $found ) ) {
+                       return true;
+               }
+               return false;
+       }
+}
index 9852de6ddc42fc414d6ac0393c3b9876eba81995..b87a7bb35a2c3e329cb0850b987dd01ac9cf5637 100644 (file)
@@ -102,10 +102,6 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
 
                        <# } else { #>
 
-                       <# if (data.type === 'uploaded') { #>
-                               <button type="button" class="dashicons dashicons-no close"><span class="screen-reader-text"><?php _e( 'Remove image' ); ?></span></button>
-                       <# } #>
-
                        <button type="button" class="choice thumbnail"
                                data-customize-image-value="{{{data.header.url}}}"
                                data-customize-header-image-data="{{JSON.stringify(data.header)}}">
@@ -113,6 +109,10 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
                                <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}">
                        </button>
 
+                       <# if ( data.type === 'uploaded' ) { #>
+                               <button type="button" class="dashicons dashicons-no close"><span class="screen-reader-text"><?php _e( 'Remove image' ); ?></span></button>
+                       <# } #>
+
                        <# } #>
                </script>
 
@@ -131,7 +131,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
 
                                <# } else { #>
 
-                       <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}" tabindex="0"/>
+                       <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}" />
 
                                <# } #>
                        <# } else { #>
@@ -166,9 +166,15 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
                $height = absint( get_theme_support( 'custom-header', 'height' ) );
                ?>
                <div class="customize-control-content">
-                       <p class="customizer-section-intro">
+                       <?php if ( current_theme_supports( 'custom-header', 'video' ) ) {
+                               echo '<span class="customize-control-title">' . $this->label . '</span>';
+                       } ?>
+                       <div class="customize-control-notifications-container"></div>
+                       <p class="customizer-section-intro customize-control-description">
                                <?php
-                               if ( $width && $height ) {
+                               if ( current_theme_supports( 'custom-header', 'video' ) ) {
+                                       _e( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, we recommend matching the size of your video.' );
+                               } elseif ( $width && $height ) {
                                        /* translators: %s: header size in pixels */
                                        printf( __( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, your theme recommends a header size of %s pixels.' ),
                                                sprintf( '<strong>%s &times; %s</strong>', $width, $height )
index 98b79aed56107b4a4e60a06e7742416740191b0a..af5c516243bbb203685430d5cfd353b136f8e39e 100644 (file)
@@ -29,6 +29,15 @@ final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
        public function update( $value ) {
                global $custom_image_header;
 
+               // If _custom_header_background_just_in_time() fails to initialize $custom_image_header when not is_admin().
+               if ( empty( $custom_image_header ) ) {
+                       require_once( ABSPATH . 'wp-admin/custom-header.php' );
+                       $args = get_theme_support( 'custom-header' );
+                       $admin_head_callback = isset( $args[0]['admin-head-callback'] ) ? $args[0]['admin-head-callback'] : null;
+                       $admin_preview_callback = isset( $args[0]['admin-preview-callback'] ) ? $args[0]['admin-preview-callback'] : null;
+                       $custom_image_header = new Custom_Image_Header( $admin_head_callback, $admin_preview_callback );
+               }
+
                // If the value doesn't exist (removed or random),
                // use the header_image value.
                if ( ! $value )
index 7dfd187218eff961e912e82c65fb2b77a807ba88..6b00a9156041cebcf381237ac928fb6d3a4e4cc7 100644 (file)
@@ -48,7 +48,7 @@ class WP_Customize_Nav_Menu_Control extends WP_Customize_Control {
         */
        public function content_template() {
                ?>
-               <button type="button" class="button-secondary add-new-menu-item" aria-label="<?php esc_attr_e( 'Add or remove menu items' ); ?>" aria-expanded="false" aria-controls="available-menu-items">
+               <button type="button" class="button add-new-menu-item" aria-label="<?php esc_attr_e( 'Add or remove menu items' ); ?>" aria-expanded="false" aria-controls="available-menu-items">
                        <?php _e( 'Add Items' ); ?>
                </button>
                <button type="button" class="button-link reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder menu items' ); ?>" aria-describedby="reorder-items-desc-{{ data.menu_id }}">
@@ -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( 'Display Location' ); ?></span>
                        </li>
 
                        <?php foreach ( get_registered_nav_menus() as $location => $description ) : ?>
index 95e7b54df0c8a275146aacf62d07a2fd8eb378f5..941dad4c345652efcd6cf949079755b6c48a5b59 100644 (file)
@@ -69,7 +69,7 @@ class WP_Customize_Nav_Menu_Item_Control extends WP_Customize_Control {
                                <span class="item-type" aria-hidden="true">{{ data.item_type_label }}</span>
                                <span class="item-title" aria-hidden="true">
                                        <span class="spinner"></span>
-                                       <span class="menu-item-title<# if ( ! data.title ) { #> no-title<# } #>">{{ data.title || wp.customize.Menus.data.l10n.untitled }}</span>
+                                       <span class="menu-item-title<# if ( ! data.title && ! data.original_title ) { #> no-title<# } #>">{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}</span>
                                </span>
                                <span class="item-controls">
                                        <button type="button" class="button-link item-edit" aria-expanded="false"><span class="screen-reader-text"><?php
@@ -96,7 +96,7 @@ class WP_Customize_Nav_Menu_Item_Control extends WP_Customize_Control {
                        <p class="description description-thin">
                                <label for="edit-menu-item-title-{{ data.menu_item_id }}">
                                        <?php _e( 'Navigation Label' ); ?><br />
-                                       <input type="text" id="edit-menu-item-title-{{ data.menu_item_id }}" class="widefat edit-menu-item-title" name="menu-item-title" />
+                                       <input type="text" id="edit-menu-item-title-{{ data.menu_item_id }}" placeholder="{{ data.original_title }}" class="widefat edit-menu-item-title" name="menu-item-title" />
                                </label>
                        </p>
                        <p class="field-link-target description description-thin">
@@ -134,7 +134,10 @@ class WP_Customize_Nav_Menu_Item_Control extends WP_Customize_Control {
                        <div class="menu-item-actions description-thin submitbox">
                                <# if ( ( 'post_type' === data.item_type || 'taxonomy' === data.item_type ) && '' !== data.original_title ) { #>
                                <p class="link-to-original">
-                                       <?php printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' ); ?>
+                                       <?php
+                                               /* translators: Nav menu item original title. 1: Original title */
+                                               printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' );
+                                       ?>
                                </p>
                                <# } #>
 
index c71ab09754def899deaf72901bb29f5c60c0e5de..11b5cd6d5a8f25a545abc50d9b3d5db39648fedc 100644 (file)
@@ -233,7 +233,10 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
                        } else {
                                $value = $post_value;
                        }
-               } else if ( isset( $this->value ) ) {
+                       if ( ! empty( $value ) && empty( $value['original_title'] ) ) {
+                               $value['original_title'] = $this->get_original_title( (object) $value );
+                       }
+               } elseif ( isset( $this->value ) ) {
                        $value = $this->value;
                } else {
                        $value = false;
@@ -242,7 +245,11 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
                        if ( $this->post_id > 0 ) {
                                $post = get_post( $this->post_id );
                                if ( $post && self::POST_TYPE === $post->post_type ) {
+                                       $is_title_empty = empty( $post->post_title );
                                        $value = (array) wp_setup_nav_menu_item( $post );
+                                       if ( $is_title_empty ) {
+                                               $value['title'] = '';
+                                       }
                                }
                        }
 
@@ -256,9 +263,82 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
                        $value = $this->value;
                }
 
+               if ( ! empty( $value ) && empty( $value['type_label'] ) ) {
+                       $value['type_label'] = $this->get_type_label( (object) $value );
+               }
+
                return $value;
        }
 
+       /**
+        * Get original title.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param object $item Nav menu item.
+        * @return string The original title.
+        */
+       protected function get_original_title( $item ) {
+               $original_title = '';
+               if ( 'post_type' === $item->type && ! empty( $item->object_id ) ) {
+                       $original_object = get_post( $item->object_id );
+                       if ( $original_object ) {
+                               /** This filter is documented in wp-includes/post-template.php */
+                               $original_title = apply_filters( 'the_title', $original_object->post_title, $original_object->ID );
+
+                               if ( '' === $original_title ) {
+                                       /* translators: %d: ID of a post */
+                                       $original_title = sprintf( __( '#%d (no title)' ), $original_object->ID );
+                               }
+                       }
+               } elseif ( 'taxonomy' === $item->type && ! empty( $item->object_id ) ) {
+                       $original_term_title = get_term_field( 'name', $item->object_id, $item->object, 'raw' );
+                       if ( ! is_wp_error( $original_term_title ) ) {
+                               $original_title = $original_term_title;
+                       }
+               } elseif ( 'post_type_archive' === $item->type ) {
+                       $original_object = get_post_type_object( $item->object );
+                       if ( $original_object ) {
+                               $original_title = $original_object->labels->archives;
+                       }
+               }
+               $original_title = html_entity_decode( $original_title, ENT_QUOTES, get_bloginfo( 'charset' ) );
+               return $original_title;
+       }
+
+       /**
+        * Get type label.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param object $item Nav menu item.
+        * @returns string The type label.
+        */
+       protected function get_type_label( $item ) {
+               if ( 'post_type' === $item->type ) {
+                       $object = get_post_type_object( $item->object );
+                       if ( $object ) {
+                               $type_label = $object->labels->singular_name;
+                       } else {
+                               $type_label = $item->object;
+                       }
+               } elseif ( 'taxonomy' === $item->type ) {
+                       $object = get_taxonomy( $item->object );
+                       if ( $object ) {
+                               $type_label = $object->labels->singular_name;
+                       } else {
+                               $type_label = $item->object;
+                       }
+               } elseif ( 'post_type_archive' === $item->type ) {
+                       $type_label = __( 'Post Type Archive' );
+               } else {
+                       $type_label = __( 'Custom Link' );
+               }
+               return $type_label;
+       }
+
        /**
         * Ensure that the value is fully populated with the necessary properties.
         *
@@ -284,16 +364,7 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
                }
 
                if ( ! isset( $this->value['original_title'] ) ) {
-                       $original_title = '';
-                       if ( 'post_type' === $this->value['type'] ) {
-                               $original_title = get_the_title( $this->value['object_id'] );
-                       } elseif ( 'taxonomy' === $this->value['type'] ) {
-                               $original_title = get_term_field( 'name', $this->value['object_id'], $this->value['object'], 'raw' );
-                               if ( is_wp_error( $original_title ) ) {
-                                       $original_title = '';
-                               }
-                       }
-                       $this->value['original_title'] = html_entity_decode( $original_title, ENT_QUOTES, get_bloginfo( 'charset' ) );
+                       $this->value['original_title'] = $this->get_original_title( (object) $this->value );
                }
 
                if ( ! isset( $this->value['nav_menu_term_id'] ) && $this->post_id > 0 ) {
@@ -503,8 +574,9 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
                }
 
                if ( ARRAY_A === $args['output'] ) {
-                       $GLOBALS['_menu_item_sort_prop'] = $args['output_key'];
-                       usort( $items, '_sort_nav_menu_items' );
+                       $items = wp_list_sort( $items, array(
+                               $args['output_key'] => 'ASC',
+                       ) );
                        $i = 1;
 
                        foreach ( $items as $k => $item ) {
@@ -534,6 +606,12 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
                $item->menu_order = $item->position;
                unset( $item->position );
 
+               if ( empty( $item->original_title ) ) {
+                       $item->original_title = $this->get_original_title( $item );
+               }
+               if ( empty( $item->title ) && ! empty( $item->original_title ) ) {
+                       $item->title = $item->original_title;
+               }
                if ( $item->title ) {
                        $item->post_title = $item->title;
                }
@@ -547,23 +625,19 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
                }
 
                if ( ! isset( $post->type_label ) ) {
-                       if ( 'post_type' === $post->type ) {
-                               $object = get_post_type_object( $post->object );
-                               if ( $object ) {
-                                       $post->type_label = $object->labels->singular_name;
-                               } else {
-                                       $post->type_label = $post->object;
-                               }
-                       } elseif ( 'taxonomy' == $post->type ) {
-                               $object = get_taxonomy( $post->object );
-                               if ( $object ) {
-                                       $post->type_label = $object->labels->singular_name;
-                               } else {
-                                       $post->type_label = $post->object;
-                               }
-                       } else {
-                               $post->type_label = __( 'Custom Link' );
-                       }
+                       $post->type_label = $this->get_type_label( $post );
+               }
+
+               // Ensure nav menu item URL is set according to linked object.
+               if ( 'post_type' === $post->type && ! empty( $post->object_id ) ) {
+                       $post->url = get_permalink( $post->object_id );
+               } elseif ( 'taxonomy' === $post->type && ! empty( $post->object ) && ! empty( $post->object_id ) ) {
+                       $post->url = get_term_link( (int) $post->object_id, $post->object );
+               } elseif ( 'post_type_archive' === $post->type && ! empty( $post->object ) ) {
+                       $post->url = get_post_type_archive_link( $post->object );
+               }
+               if ( is_wp_error( $post->url ) ) {
+                       $post->url = '';
                }
 
                /** This filter is documented in wp-includes/nav-menu.php */
index 0275c79a0113786d868580b761cb3eb1a4797991..4d65cc4c7bbd3881fbbd0d0e76c4d581edf0a748 100644 (file)
@@ -287,8 +287,9 @@ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
 
                // Make sure the menu objects get re-sorted after an update/insert.
                if ( ! $is_delete && ! empty( $args['orderby'] ) ) {
-                       $this->_current_menus_sort_orderby = $args['orderby'];
-                       usort( $menus, array( $this, '_sort_menus_by_orderby' ) );
+                       $menus = wp_list_sort( $menus, array(
+                               $args['orderby'] => 'ASC',
+                       ) );
                }
                // @todo add support for $args['hide_empty'] === true
 
@@ -313,7 +314,9 @@ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
         * This is a workaround for a lack of closures.
         *
         * @since 4.3.0
+        * @deprecated 4.7.0 Use wp_list_sort()
         * @access protected
+        *
         * @param object $menu1
         * @param object $menu2
         * @return int
@@ -321,6 +324,8 @@ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
         * @see WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menus()
         */
        protected function _sort_menus_by_orderby( $menu1, $menu2 ) {
+               _deprecated_function( __METHOD__, '4.7.0', 'wp_list_sort' );
+
                $key = $this->_current_menus_sort_orderby;
                return strcmp( $menu1->$key, $menu2->$key );
        }
index 0495264a0db410be5fd82db87489b941830bd5e0..ba75928f88ad6849e06542a346a3714d2ada077b 100644 (file)
@@ -36,7 +36,7 @@ class WP_Customize_New_Menu_Section extends WP_Customize_Section {
        protected function render() {
                ?>
                <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="accordion-section-new-menu">
-                       <button type="button" class="button-secondary add-new-menu-item add-menu-toggle" aria-expanded="false">
+                       <button type="button" class="button add-new-menu-item add-menu-toggle" aria-expanded="false">
                                <?php echo esc_html( $this->title ); ?>
                        </button>
                        <ul class="new-menu-section-content"></ul>
index 245d32a27bc4bf95067c10aadcdc29eebb075085..2342aef9baa421e7fc60a701b9f6d96cd8eea376 100644 (file)
@@ -184,6 +184,10 @@ final class WP_Customize_Selective_Refresh {
                        'renderQueryVar' => self::RENDER_QUERY_VAR,
                        'l10n'           => array(
                                'shiftClickToEdit' => __( 'Shift-click to edit this element.' ),
+                               'clickEditMenu' => __( 'Click to edit this menu.' ),
+                               'clickEditWidget' => __( 'Click to edit this widget.' ),
+                               'clickEditTitle' => __( 'Click to edit the site title.' ),
+                               'clickEditMisc' => __( 'Click to edit this element.' ),
                                /* translators: %s: document.write() */
                                'badDocumentWrite' => sprintf( __( '%s is forbidden' ), 'document.write()' ),
                        ),
@@ -307,19 +311,15 @@ final class WP_Customize_Selective_Refresh {
                        return;
                }
 
-               $this->manager->remove_preview_signature();
-
                /*
                 * Note that is_customize_preview() returning true will entail that the
                 * user passed the 'customize' capability check and the nonce check, since
                 * WP_Customize_Manager::setup_theme() is where the previewing flag is set.
                 */
                if ( ! is_customize_preview() ) {
-                       status_header( 403 );
-                       wp_send_json_error( 'expected_customize_preview' );
+                       wp_send_json_error( 'expected_customize_preview', 403 );
                } else if ( ! isset( $_POST['partials'] ) ) {
-                       status_header( 400 );
-                       wp_send_json_error( 'missing_partials' );
+                       wp_send_json_error( 'missing_partials', 400 );
                }
 
                $partials = json_decode( wp_unslash( $_POST['partials'] ), true );
index e696687298ebf96a05af645e3897b5780ce91c51..5187d022c5b67a1c776536ef3739600dc179e391 100644 (file)
@@ -63,8 +63,8 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {
         */
        public function content_template() {
                $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
-               $active_url  = esc_url( remove_query_arg( 'theme', $current_url ) );
-               $preview_url = esc_url( add_query_arg( 'theme', '__THEME__', $current_url ) ); // Token because esc_url() strips curly braces.
+               $active_url  = esc_url( remove_query_arg( 'customize_theme', $current_url ) );
+               $preview_url = esc_url( add_query_arg( 'customize_theme', '__THEME__', $current_url ) ); // Token because esc_url() strips curly braces.
                $preview_url = str_replace( '__THEME__', '{{ data.theme.id }}', $preview_url );
                ?>
                <# if ( data.theme.isActiveTheme ) { #>
@@ -87,7 +87,10 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {
                                <span class="more-details" id="{{ data.theme.id }}-action"><?php _e( 'Live Preview' ); ?></span>
                        <# } #>
 
-                       <div class="theme-author"><?php printf( __( 'By %s' ), '{{ data.theme.author }}' ); ?></div>
+                       <div class="theme-author"><?php
+                               /* translators: Theme author name */
+                               printf( _x( 'By %s', 'theme author' ), '{{ data.theme.author }}' );
+                       ?></div>
 
                        <# if ( data.theme.isActiveTheme ) { #>
                                <h3 class="theme-name" id="{{ data.theme.id }}-name">
index 298aece9b322927d0d846437e4c1f3daf46fa502..8f76169c9e8aebe1562be09badb779e42f873777 100644 (file)
@@ -57,7 +57,7 @@ class WP_Widget_Area_Customize_Control extends WP_Customize_Control {
        public function render_content() {
                $id = 'reorder-widgets-desc-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );
                ?>
-               <button type="button" class="button-secondary add-new-widget" aria-expanded="false" aria-controls="available-widgets">
+               <button type="button" class="button add-new-widget" aria-expanded="false" aria-controls="available-widgets">
                        <?php _e( 'Add a Widget' ); ?>
                </button>
                <button type="button" class="button-link reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder widgets' ); ?>" aria-describedby="<?php echo esc_attr( $id ); ?>">
index d1f85f8c0d7f8183628f19ceeea929059c0b94a1..c7d6b0409c5822c328ae0c6a78e89540666b0987 100644 (file)
@@ -151,7 +151,6 @@ class WP_Date_Query {
         *                              'comment_date', 'comment_date_gmt'.
         */
        public function __construct( $date_query, $default_column = 'post_date' ) {
-
                if ( isset( $date_query['relation'] ) && 'OR' === strtoupper( $date_query['relation'] ) ) {
                        $this->relation = 'OR';
                } else {
@@ -740,12 +739,12 @@ class WP_Date_Query {
                }
 
                // Range queries.
-               if ( ! empty( $query['after'] ) )
+               if ( ! empty( $query['after'] ) ) {
                        $where_parts[] = $wpdb->prepare( "$column $gt %s", $this->build_mysql_datetime( $query['after'], ! $inclusive ) );
-
-               if ( ! empty( $query['before'] ) )
+               }
+               if ( ! empty( $query['before'] ) ) {
                        $where_parts[] = $wpdb->prepare( "$column $lt %s", $this->build_mysql_datetime( $query['before'], $inclusive ) );
-
+               }
                // Specific value queries.
 
                if ( isset( $query['year'] ) && $value = $this->build_value( $compare, $query['year'] ) )
index 2aa3430ec5b64d5e0127ea51c532fe6d2d486466..b8a73bc0d46e82064590053cd63415c4c8bee9aa 100644 (file)
@@ -205,7 +205,7 @@ function wp_cookie_constants() {
                if ( $siteurl )
                        define( 'COOKIEHASH', md5( $siteurl ) );
                else
-                       define( 'COOKIEHASH', '' );
+                       define( 'COOKIEHASH', md5( wp_guess_url() ) );
        }
 
        /**
@@ -357,6 +357,6 @@ function wp_templating_constants() {
         * @see WP_Theme::get_core_default_theme()
         */
        if ( !defined('WP_DEFAULT_THEME') )
-               define( 'WP_DEFAULT_THEME', 'twentysixteen' );
+               define( 'WP_DEFAULT_THEME', 'twentyseventeen' );
 
 }
index 3402e48ef2c1a9cc8638e2b00b1d29308849d153..5a739754b62d55565e8c937a76199c51d58ac7ab 100644 (file)
@@ -75,6 +75,7 @@ foreach ( array( 'user_url', 'link_url', 'link_image', 'link_rss', 'comment_url'
 
 // Slugs
 add_filter( 'pre_term_slug', 'sanitize_title' );
+add_filter( 'wp_insert_post_data', '_wp_customize_changeset_filter_insert_post_data', 10, 2 );
 
 // Keys
 foreach ( array( 'pre_post_type', 'pre_post_status', 'pre_post_comment_status', 'pre_post_ping_status' ) as $filter ) {
@@ -187,6 +188,11 @@ add_filter( 'the_guid',           'esc_url'                       );
 // Email filters
 add_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
 
+// Mark site as no longer fresh
+foreach ( array( 'publish_post', 'publish_page', 'wp_ajax_save-widget', 'wp_ajax_widgets-order', 'customize_save_after' ) as $action ) {
+       add_action( $action, '_delete_option_fresh_site' );
+}
+
 // Misc filters
 add_filter( 'option_ping_sites',        'privacy_ping_filter'                 );
 add_filter( 'option_blog_charset',      '_wp_specialchars'                    ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop
@@ -197,7 +203,7 @@ add_filter( 'tiny_mce_before_init',     '_mce_set_direction'                  );
 add_filter( 'teeny_mce_before_init',    '_mce_set_direction'                  );
 add_filter( 'pre_kses',                 'wp_pre_kses_less_than'               );
 add_filter( 'sanitize_title',           'sanitize_title_with_dashes',   10, 3 );
-add_action( 'check_comment_flood',      'check_comment_flood_db',       10, 3 );
+add_action( 'check_comment_flood',      'check_comment_flood_db',       10, 4 );
 add_filter( 'comment_flood_filter',     'wp_throttle_comment_flood',    10, 3 );
 add_filter( 'pre_comment_content',      'wp_rel_nofollow',              15    );
 add_filter( 'comment_email',            'antispambot'                         );
@@ -213,6 +219,8 @@ 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_action( 'transition_comment_status', '_clear_modified_cache_on_transition_comment_status', 10, 2 );
+
 add_filter( 'http_request_host_is_external',    'allowed_http_request_hosts', 10, 2 );
 
 // REST API filters.
@@ -244,6 +252,7 @@ add_action( 'wp_head',             'wp_print_head_scripts',            9    );
 add_action( 'wp_head',             'wp_generator'                           );
 add_action( 'wp_head',             'rel_canonical'                          );
 add_action( 'wp_head',             'wp_shortlink_wp_head',            10, 0 );
+add_action( 'wp_head',             'wp_custom_css_cb',                11    );
 add_action( 'wp_head',             'wp_site_icon',                    99    );
 add_action( 'wp_footer',           'wp_print_footer_scripts',         20    );
 add_action( 'template_redirect',   'wp_shortlink_header',             11, 0 );
@@ -372,7 +381,9 @@ add_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );
 
 // REST API actions.
 add_action( 'init',          'rest_api_init' );
-add_action( 'rest_api_init', 'rest_api_default_filters', 10, 1 );
+add_action( 'rest_api_init', 'rest_api_default_filters',   10, 1 );
+add_action( 'rest_api_init', 'register_initial_settings',  10 );
+add_action( 'rest_api_init', 'create_initial_rest_routes', 99 );
 add_action( 'parse_request', 'rest_api_loaded' );
 
 /**
@@ -382,6 +393,7 @@ add_action( 'parse_request', 'rest_api_loaded' );
 add_action( 'wp_loaded', '_custom_header_background_just_in_time' );
 add_action( 'wp_head', '_custom_logo_header_styles' );
 add_action( 'plugins_loaded', '_wp_customize_include' );
+add_action( 'transition_post_status', '_wp_customize_publish_changeset', 10, 3 );
 add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' );
 add_action( 'delete_attachment', '_delete_attachment_theme_mod' );
 
@@ -399,6 +411,7 @@ add_action( 'init', 'create_initial_post_types', 0 ); // highest priority
 add_action( 'admin_menu', '_add_post_type_submenus' );
 add_action( 'before_delete_post', '_reset_front_page_settings_for_post' );
 add_action( 'wp_trash_post',      '_reset_front_page_settings_for_post' );
+add_action( 'change_locale', 'create_initial_post_types' );
 
 // Post Formats
 add_filter( 'request', '_post_format_request' );
@@ -424,6 +437,7 @@ add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 );
 
 // Taxonomy
 add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority
+add_action( 'change_locale', 'create_initial_taxonomies' );
 
 // Canonical
 add_action( 'template_redirect', 'redirect_canonical' );
index 0d30113b28f8cbc81db94c8082c123550b4e045c..f35ea0ce99321540f2c88232112f40e4a49469a0 100644 (file)
@@ -2015,7 +2015,7 @@ function sanitize_url( $url, $protocols = null ) {
  *
  * @since 1.2.0
  * @deprecated 3.0.0 Use esc_url()
- * @see Alias for esc_url()
+ * @see esc_url()
  *
  * @param string $url The URL to be cleaned.
  * @param array $protocols Optional. An array of acceptable protocols.
@@ -2357,7 +2357,6 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) {
  * @see get_users()
  *
  * @global wpdb $wpdb    WordPress database abstraction object.
- * @global int  $blog_id The site ID of the site for those that use more than one site.
  *
  * @param int $id Site ID.
  * @return array List of users that are part of that site ID
@@ -2365,9 +2364,10 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) {
 function get_users_of_blog( $id = '' ) {
        _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
 
-       global $wpdb, $blog_id;
-       if ( empty($id) )
-               $id = (int) $blog_id;
+       global $wpdb;
+       if ( empty( $id ) ) {
+               $id = get_current_blog_id();
+       }
        $blog_prefix = $wpdb->get_blog_prefix($id);
        $users = $wpdb->get_results( "SELECT user_id, user_id AS ID, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" );
        return $users;
@@ -3169,8 +3169,10 @@ function wp_load_image( $file ) {
        if ( is_numeric( $file ) )
                $file = get_attached_file( $file );
 
-       if ( ! is_file( $file ) )
-               return sprintf(__('File &#8220;%s&#8221; doesn&#8217;t exist?'), $file);
+       if ( ! is_file( $file ) ) {
+               /* translators: %s: file name */
+               return sprintf( __( 'File &#8220;%s&#8221; doesn&#8217;t exist?' ), $file );
+       }
 
        if ( ! function_exists('imagecreatefromstring') )
                return __('The GD image library is not installed.');
@@ -3180,8 +3182,10 @@ function wp_load_image( $file ) {
 
        $image = imagecreatefromstring( file_get_contents( $file ) );
 
-       if ( !is_resource( $image ) )
-               return sprintf(__('File &#8220;%s&#8221; is not an image.'), $file);
+       if ( ! is_resource( $image ) ) {
+               /* translators: %s: file name */
+               return sprintf( __( 'File &#8220;%s&#8221; is not an image.' ), $file );
+       }
 
        return $image;
 }
@@ -3754,3 +3758,123 @@ function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
 
        return '';
 }
+
+/**
+ * Retrieve path of paged template in current or parent template.
+ *
+ * @since 1.5.0
+ * @deprecated 4.7.0 The paged.php template is no longer part of the theme template hierarchy.
+ *
+ * @return string Full path to paged template file.
+ */
+function get_paged_template() {
+       _deprecated_function( __FUNCTION__, '4.7.0' );
+
+       return get_query_template( 'paged' );
+}
+
+/**
+ * Removes the HTML JavaScript entities found in early versions of Netscape 4.
+ *
+ * Previously, this function was pulled in from the original
+ * import of kses and removed a specific vulnerability only
+ * existent in early version of Netscape 4. However, this
+ * vulnerability never affected any other browsers and can
+ * be considered safe for the modern web.
+ *
+ * The regular expression which sanitized this vulnerability
+ * has been removed in consideration of the performance and
+ * energy demands it placed, now merely passing through its
+ * input to the return.
+ *
+ * @since 1.0.0
+ * @deprecated deprecated since 4.7
+ *
+ * @param string $string
+ * @return string
+ */
+function wp_kses_js_entities( $string ) {
+       _deprecated_function( __FUNCTION__, '4.7.0' );
+
+       return preg_replace( '%&\s*\{[^}]*(\}\s*;?|$)%', '', $string );
+}
+
+/**
+ * Sort categories by ID.
+ *
+ * Used by usort() as a callback, should not be used directly. Can actually be
+ * used to sort any term object.
+ *
+ * @since 2.3.0
+ * @deprecated 4.7.0 Use wp_list_sort()
+ * @access private
+ *
+ * @param object $a
+ * @param object $b
+ * @return int
+ */
+function _usort_terms_by_ID( $a, $b ) {
+       _deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort' );
+
+       if ( $a->term_id > $b->term_id )
+               return 1;
+       elseif ( $a->term_id < $b->term_id )
+               return -1;
+       else
+               return 0;
+}
+
+/**
+ * Sort categories by name.
+ *
+ * Used by usort() as a callback, should not be used directly. Can actually be
+ * used to sort any term object.
+ *
+ * @since 2.3.0
+ * @deprecated 4.7.0 Use wp_list_sort()
+ * @access private
+ *
+ * @param object $a
+ * @param object $b
+ * @return int
+ */
+function _usort_terms_by_name( $a, $b ) {
+       _deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort' );
+
+       return strcmp( $a->name, $b->name );
+}
+
+/**
+ * Sort menu items by the desired key.
+ *
+ * @since 3.0.0
+ * @deprecated 4.7.0 Use wp_list_sort()
+ * @access private
+ *
+ * @global string $_menu_item_sort_prop
+ *
+ * @param object $a The first object to compare
+ * @param object $b The second object to compare
+ * @return int -1, 0, or 1 if $a is considered to be respectively less than, equal to, or greater than $b.
+ */
+function _sort_nav_menu_items( $a, $b ) {
+       global $_menu_item_sort_prop;
+
+       _deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort' );
+
+       if ( empty( $_menu_item_sort_prop ) )
+               return 0;
+
+       if ( ! isset( $a->$_menu_item_sort_prop ) || ! isset( $b->$_menu_item_sort_prop ) )
+               return 0;
+
+       $_a = (int) $a->$_menu_item_sort_prop;
+       $_b = (int) $b->$_menu_item_sort_prop;
+
+       if ( $a->$_menu_item_sort_prop == $b->$_menu_item_sort_prop )
+               return 0;
+       elseif ( $_a == $a->$_menu_item_sort_prop && $_b == $b->$_menu_item_sort_prop )
+               return $_a < $_b ? -1 : 1;
+       else
+               return strcmp( $a->$_menu_item_sort_prop, $b->$_menu_item_sort_prop );
+}
index 1287c4e5fa1428aa7b526f18862de47def4e1352..ddd5dd988c8024ce921495b394210651df7eecef 100644 (file)
@@ -94,11 +94,29 @@ function wp_embed_defaults( $url = '' ) {
  * @return false|string False on failure or the embed HTML on success.
  */
 function wp_oembed_get( $url, $args = '' ) {
-       require_once( ABSPATH . WPINC . '/class-oembed.php' );
        $oembed = _wp_oembed_get_object();
        return $oembed->get_html( $url, $args );
 }
 
+/**
+ * Returns the initialized WP_oEmbed object.
+ *
+ * @since 2.9.0
+ * @access private
+ *
+ * @staticvar WP_oEmbed $wp_oembed
+ *
+ * @return WP_oEmbed object.
+ */
+function _wp_oembed_get_object() {
+       static $wp_oembed = null;
+
+       if ( is_null( $wp_oembed ) ) {
+               $wp_oembed = new WP_oEmbed();
+       }
+       return $wp_oembed;
+}
+
 /**
  * Adds a URL format and oEmbed provider URL pair.
  *
@@ -112,8 +130,6 @@ function wp_oembed_get( $url, $args = '' ) {
  * @param boolean $regex    Optional. Whether the `$format` parameter is in a RegEx format. Default false.
  */
 function wp_oembed_add_provider( $format, $provider, $regex = false ) {
-       require_once( ABSPATH . WPINC . '/class-oembed.php' );
-
        if ( did_action( 'plugins_loaded' ) ) {
                $oembed = _wp_oembed_get_object();
                $oembed->providers[$format] = array( $provider, $regex );
@@ -133,8 +149,6 @@ function wp_oembed_add_provider( $format, $provider, $regex = false ) {
  * @return bool Was the provider removed successfully?
  */
 function wp_oembed_remove_provider( $format ) {
-       require_once( ABSPATH . WPINC . '/class-oembed.php' );
-
        if ( did_action( 'plugins_loaded' ) ) {
                $oembed = _wp_oembed_get_object();
 
@@ -380,14 +394,10 @@ function get_post_embed_url( $post = null ) {
 function get_oembed_endpoint_url( $permalink = '', $format = 'json' ) {
        $url = rest_url( 'oembed/1.0/embed' );
 
-       if ( 'json' === $format ) {
-               $format = false;
-       }
-
        if ( '' !== $permalink ) {
                $url = add_query_arg( array(
                        'url'    => urlencode( $permalink ),
-                       'format' => $format,
+                       'format' => ( 'json' !== $format ) ? $format : false,
                ), $url );
        }
 
@@ -440,7 +450,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(~~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);
+               !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"))f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f);if(g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}}}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//--><!]]>";
@@ -710,7 +720,6 @@ function wp_filter_oembed_result( $result, $data, $url ) {
                return $result;
        }
 
-       require_once( ABSPATH . WPINC . '/class-oembed.php' );
        $wp_oembed = _wp_oembed_get_object();
 
        // Don't modify the HTML for trusted providers.
index e5c70891640a039435de1af44a3f55370d5742a2..9e62f20ad2b4ed56399c34a427ef33cabd30d26b 100644 (file)
@@ -28,16 +28,23 @@ do_action( 'rss_tag_pre', 'atom-comments' );
        ?>
 >
        <title type="text"><?php
-               if ( is_singular() )
+               if ( is_singular() ) {
+                       /* translators: Comments feed title. 1: Post title */
                        printf( ent2ncr( __( 'Comments on %s' ) ), get_the_title_rss() );
-               elseif ( is_search() )
+               } elseif ( is_search() ) {
+                       /* translators: Comments feed title. 1: Site name, 2: Search query */
                        printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
-               else
+               } else {
+                       /* translators: Comments feed title. 1: Site name */
                        printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() );
+               }
        ?></title>
        <subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle>
 
-       <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT'), false); ?></updated>
+       <updated><?php
+               $date = get_lastcommentmodified( 'GMT' );
+               echo $date ? mysql2date( 'Y-m-d\TH:i:s\Z', $date ) : date( 'Y-m-d\TH:i:s\Z' );
+       ?></updated>
 
 <?php if ( is_singular() ) { ?>
        <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php comments_link_feed(); ?>" />
@@ -70,8 +77,10 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment();
                                $title = get_the_title($comment_post->ID);
                                /** This filter is documented in wp-includes/feed.php */
                                $title = apply_filters( 'the_title_rss', $title );
+                               /* translators: Individual comment title. 1: Post title, 2: Comment author name */
                                printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
                        } else {
+                               /* translators: Comment author title. 1: Comment author name */
                                printf(ent2ncr(__('By: %s')), get_comment_author_rss());
                        }
                ?></title>
index a4a62f74b94bf755f30be592caf114819ccf97dc..09cb7c016ec5ccacc4e3597e796faef2431fbc94 100644 (file)
@@ -30,7 +30,10 @@ do_action( 'rss_tag_pre', 'atom' );
        <title type="text"><?php wp_title_rss(); ?></title>
        <subtitle type="text"><?php bloginfo_rss("description") ?></subtitle>
 
-       <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></updated>
+       <updated><?php
+               $date = get_lastpostmodified( 'GMT' );
+               echo $date ? mysql2date( 'Y-m-d\TH:i:s\Z', $date ) : date( 'Y-m-d\TH:i:s\Z' );
+       ?></updated>
 
        <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('url') ?>" />
        <id><?php bloginfo('atom_url'); ?></id>
index 8302881500e9bdbe526eb9a52cc04406f160e2c4..b748400032afc0834527d7db370e421a29e0e696 100644 (file)
@@ -33,7 +33,10 @@ do_action( 'rss_tag_pre', 'rdf' );
        <title><?php wp_title_rss(); ?></title>
        <link><?php bloginfo_rss('url') ?></link>
        <description><?php bloginfo_rss('description') ?></description>
-       <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date>
+       <dc:date><?php
+               $date = get_lastpostmodified( 'GMT' );
+               echo $date ? mysql2date( 'Y-m-d\TH:i:s\Z', $date ) : date( 'Y-m-d\TH:i:s\Z' );
+       ?></dc:date>
        <sy:updatePeriod><?php
                /** This filter is documented in wp-includes/feed-rss2.php */
                echo apply_filters( 'rss_update_period', 'hourly' );
index df231968b791233a6f2e5821f6f12f17463acec3..39202b83b23a1c8caebae074dac959f89ebd51c8 100644 (file)
@@ -14,7 +14,10 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
        <title><?php wp_title_rss(); ?></title>
        <link><?php bloginfo_rss('url') ?></link>
        <description><?php bloginfo_rss('description') ?></description>
-       <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
+       <lastBuildDate><?php
+               $date = get_lastpostmodified( 'GMT' );
+               echo $date ? mysql2date( 'D, d M Y H:i:s +0000', $date ) : date( 'D, d M Y H:i:s +0000' );
+       ?></lastBuildDate>
        <docs>http://backend.userland.com/rss092</docs>
        <language><?php bloginfo_rss( 'language' ); ?></language>
 
index f05bb8f71a2008ec8ac303b341349c730ba882c2..d6ed5ae2b75eca2a07cd29a25038aa95ea98a8b8 100644 (file)
@@ -33,17 +33,24 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
 >
 <channel>
        <title><?php
-               if ( is_singular() )
+               if ( is_singular() ) {
+                       /* translators: Comments feed title. 1: Post title */
                        printf( ent2ncr( __( 'Comments on: %s' ) ), get_the_title_rss() );
-               elseif ( is_search() )
+               } elseif ( is_search() ) {
+                       /* translators: Comments feed title. 1: Site name, 2: Search query */
                        printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
-               else
+               } else {
+                       /* translators: Comments feed title. 1: Site name */
                        printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() );
+               }
        ?></title>
        <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
        <link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
        <description><?php bloginfo_rss("description") ?></description>
-       <lastBuildDate><?php echo mysql2date('r', get_lastcommentmodified('GMT')); ?></lastBuildDate>
+       <lastBuildDate><?php
+               $date = get_lastcommentmodified( 'GMT' );
+               echo $date ? mysql2date( 'r', $date ) : date( 'r' );
+       ?></lastBuildDate>
        <sy:updatePeriod><?php
                /** This filter is documented in wp-includes/feed-rss2.php */
                echo apply_filters( 'rss_update_period', 'hourly' );
@@ -69,8 +76,10 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
                                $title = get_the_title($comment_post->ID);
                                /** This filter is documented in wp-includes/feed.php */
                                $title = apply_filters( 'the_title_rss', $title );
+                               /* translators: Individual comment title. 1: Post title, 2: Comment author name */
                                printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
                        } else {
+                               /* translators: Comment author title. 1: Comment author name */
                                printf(ent2ncr(__('By: %s')), get_comment_author_rss());
                        }
                ?></title>
index b5f3d781b2acad8785229d6d695aa91058d072bd..a7b9ac7ec1c9144a2093f136ad755f97fdfdfa74 100644 (file)
@@ -42,7 +42,10 @@ do_action( 'rss_tag_pre', 'rss2' );
        <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
        <link><?php bloginfo_rss('url') ?></link>
        <description><?php bloginfo_rss("description") ?></description>
-       <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
+       <lastBuildDate><?php
+               $date = get_lastpostmodified( 'GMT' );
+               echo $date ? mysql2date( 'D, d M Y H:i:s +0000', $date ) : date( 'D, d M Y H:i:s +0000' );
+       ?></lastBuildDate>
        <language><?php bloginfo_rss( 'language' ); ?></language>
        <sy:updatePeriod><?php
                $duration = 'hourly';
index f673e91d8bc52bc08f1ae14d62e8298886f555b5..e6686c040ebef9dbc66a9228110b22b0d6e3095e 100644 (file)
@@ -538,6 +538,12 @@ function prep_atom_text_construct($data) {
                return array('text', $data);
        }
 
+       if ( ! function_exists( 'xml_parser_create' ) ) {
+               trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );
+
+               return array( 'html', "<![CDATA[$data]]>" );
+       }
+
        $parser = xml_parser_create();
        xml_parse($parser, '<div>' . $data . '</div>', true);
        $code = xml_get_error_code($parser);
@@ -663,7 +669,14 @@ function feed_content_type( $type = '' ) {
  * @return WP_Error|SimplePie WP_Error object on failure or SimplePie object on success
  */
 function fetch_feed( $url ) {
-       require_once( ABSPATH . WPINC . '/class-feed.php' );
+       if ( ! class_exists( 'SimplePie', false ) ) {
+               require_once( ABSPATH . WPINC . '/class-simplepie.php' );
+       }
+
+       require_once( ABSPATH . WPINC . '/class-wp-feed-cache.php' );
+       require_once( ABSPATH . WPINC . '/class-wp-feed-cache-transient.php' );
+       require_once( ABSPATH . WPINC . '/class-wp-simplepie-file.php' );
+       require_once( ABSPATH . WPINC . '/class-wp-simplepie-sanitize-kses.php' );
 
        $feed = new SimplePie();
 
@@ -676,7 +689,7 @@ function fetch_feed( $url ) {
        $feed->set_file_class( 'WP_SimplePie_File' );
 
        $feed->set_feed_url( $url );
-       /** This filter is documented in wp-includes/class-feed.php */
+       /** This filter is documented in wp-includes/class-wp-feed-cache-transient.php */
        $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) );
        /**
         * Fires just before processing the SimplePie feed object.
index 2701c1a1a9080cb34d2d0f9559bde21d2e34add7..85d4e7e43f86a17efde4c71b475ed6762ce90af4 100644 (file)
@@ -468,8 +468,8 @@ function wpautop( $pee, $br = true ) {
 
        $allblocks = '(?: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)';
 
-       // Add a single line break above block-level opening tags.
-       $pee = preg_replace('!(<' . $allblocks . '[\s/>])!', "\n$1", $pee);
+       // Add a double line break above block-level opening tags.
+       $pee = preg_replace('!(<' . $allblocks . '[\s/>])!', "\n\n$1", $pee);
 
        // Add a double line break below block-level closing tags.
        $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
@@ -1279,9 +1279,9 @@ function utf8_uri_encode( $utf8_string, $length = 0 ) {
  * | 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+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                 |
@@ -1490,8 +1490,16 @@ function utf8_uri_encode( $utf8_string, $length = 0 ) {
  * | -------- | ----- | ----------- | --------------------------------------- |
  * | U+00B7   | l·l   | ll          | Flown dot (between two Ls)              |
  *
+ * Serbian (`sr_RS`) locale:
+ *
+ * |   Code   | Glyph | Replacement |               Description               |
+ * | -------- | ----- | ----------- | --------------------------------------- |
+ * | U+0110   | Đ     | DJ          | Latin capital letter D with stroke      |
+ * | U+0111   | đ     | dj          | Latin small letter d with stroke        |
+ *
  * @since 1.2.1
  * @since 4.6.0 Added locale support for `de_CH`, `de_CH_informal`, and `ca`.
+ * @since 4.7.0 Added locale support for `sr_RS`.
  *
  * @param string $string Text that might have accent characters
  * @return string Filtered string with replaced "nice" characters.
@@ -1503,222 +1511,225 @@ function remove_accents( $string ) {
        if (seems_utf8($string)) {
                $chars = array(
                // Decompositions for Latin-1 Supplement
-               chr(194).chr(170) => 'a', chr(194).chr(186) => 'o',
-               chr(195).chr(128) => 'A', chr(195).chr(129) => 'A',
-               chr(195).chr(130) => 'A', chr(195).chr(131) => 'A',
-               chr(195).chr(132) => 'A', chr(195).chr(133) => 'A',
-               chr(195).chr(134) => 'AE',chr(195).chr(135) => 'C',
-               chr(195).chr(136) => 'E', chr(195).chr(137) => 'E',
-               chr(195).chr(138) => 'E', chr(195).chr(139) => 'E',
-               chr(195).chr(140) => 'I', chr(195).chr(141) => 'I',
-               chr(195).chr(142) => 'I', chr(195).chr(143) => 'I',
-               chr(195).chr(144) => 'D', chr(195).chr(145) => 'N',
-               chr(195).chr(146) => 'O', chr(195).chr(147) => 'O',
-               chr(195).chr(148) => 'O', chr(195).chr(149) => 'O',
-               chr(195).chr(150) => 'O', chr(195).chr(153) => 'U',
-               chr(195).chr(154) => 'U', chr(195).chr(155) => 'U',
-               chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y',
-               chr(195).chr(158) => 'TH',chr(195).chr(159) => 's',
-               chr(195).chr(160) => 'a', chr(195).chr(161) => 'a',
-               chr(195).chr(162) => 'a', chr(195).chr(163) => 'a',
-               chr(195).chr(164) => 'a', chr(195).chr(165) => 'a',
-               chr(195).chr(166) => 'ae',chr(195).chr(167) => 'c',
-               chr(195).chr(168) => 'e', chr(195).chr(169) => 'e',
-               chr(195).chr(170) => 'e', chr(195).chr(171) => 'e',
-               chr(195).chr(172) => 'i', chr(195).chr(173) => 'i',
-               chr(195).chr(174) => 'i', chr(195).chr(175) => 'i',
-               chr(195).chr(176) => 'd', chr(195).chr(177) => 'n',
-               chr(195).chr(178) => 'o', chr(195).chr(179) => 'o',
-               chr(195).chr(180) => 'o', chr(195).chr(181) => 'o',
-               chr(195).chr(182) => 'o', chr(195).chr(184) => 'o',
-               chr(195).chr(185) => 'u', chr(195).chr(186) => 'u',
-               chr(195).chr(187) => 'u', chr(195).chr(188) => 'u',
-               chr(195).chr(189) => 'y', chr(195).chr(190) => 'th',
-               chr(195).chr(191) => 'y', chr(195).chr(152) => 'O',
+               'ª' => 'a', 'º' => 'o',
+               'À' => 'A', 'Á' => 'A',
+               'Â' => 'A', 'Ã' => 'A',
+               'Ä' => 'A', 'Å' => 'A',
+               'Æ' => 'AE','Ç' => 'C',
+               'È' => 'E', 'É' => 'E',
+               'Ê' => 'E', 'Ë' => 'E',
+               'Ì' => 'I', 'Í' => 'I',
+               'Î' => 'I', 'Ï' => 'I',
+               'Ð' => 'D', 'Ñ' => 'N',
+               'Ò' => 'O', 'Ó' => 'O',
+               'Ô' => 'O', 'Õ' => 'O',
+               'Ö' => 'O', 'Ù' => 'U',
+               'Ú' => 'U', 'Û' => 'U',
+               'Ü' => 'U', 'Ý' => 'Y',
+               'Þ' => 'TH','ß' => 's',
+               'à' => 'a', 'á' => 'a',
+               'â' => 'a', 'ã' => 'a',
+               'ä' => 'a', 'å' => 'a',
+               'æ' => 'ae','ç' => 'c',
+               'è' => 'e', 'é' => 'e',
+               'ê' => 'e', 'ë' => 'e',
+               'ì' => 'i', 'í' => 'i',
+               'î' => 'i', 'ï' => 'i',
+               'ð' => 'd', 'ñ' => 'n',
+               'ò' => 'o', 'ó' => 'o',
+               'ô' => 'o', 'õ' => 'o',
+               'ö' => 'o', 'ø' => 'o',
+               'ù' => 'u', 'ú' => 'u',
+               'û' => 'u', 'ü' => 'u',
+               'ý' => 'y', 'þ' => 'th',
+               'ÿ' => 'y', 'Ø' => 'O',
                // Decompositions for Latin Extended-A
-               chr(196).chr(128) => 'A', chr(196).chr(129) => 'a',
-               chr(196).chr(130) => 'A', chr(196).chr(131) => 'a',
-               chr(196).chr(132) => 'A', chr(196).chr(133) => 'a',
-               chr(196).chr(134) => 'C', chr(196).chr(135) => 'c',
-               chr(196).chr(136) => 'C', chr(196).chr(137) => 'c',
-               chr(196).chr(138) => 'C', chr(196).chr(139) => 'c',
-               chr(196).chr(140) => 'C', chr(196).chr(141) => 'c',
-               chr(196).chr(142) => 'D', chr(196).chr(143) => 'd',
-               chr(196).chr(144) => 'D', chr(196).chr(145) => 'd',
-               chr(196).chr(146) => 'E', chr(196).chr(147) => 'e',
-               chr(196).chr(148) => 'E', chr(196).chr(149) => 'e',
-               chr(196).chr(150) => 'E', chr(196).chr(151) => 'e',
-               chr(196).chr(152) => 'E', chr(196).chr(153) => 'e',
-               chr(196).chr(154) => 'E', chr(196).chr(155) => 'e',
-               chr(196).chr(156) => 'G', chr(196).chr(157) => 'g',
-               chr(196).chr(158) => 'G', chr(196).chr(159) => 'g',
-               chr(196).chr(160) => 'G', chr(196).chr(161) => 'g',
-               chr(196).chr(162) => 'G', chr(196).chr(163) => 'g',
-               chr(196).chr(164) => 'H', chr(196).chr(165) => 'h',
-               chr(196).chr(166) => 'H', chr(196).chr(167) => 'h',
-               chr(196).chr(168) => 'I', chr(196).chr(169) => 'i',
-               chr(196).chr(170) => 'I', chr(196).chr(171) => 'i',
-               chr(196).chr(172) => 'I', chr(196).chr(173) => 'i',
-               chr(196).chr(174) => 'I', chr(196).chr(175) => 'i',
-               chr(196).chr(176) => 'I', chr(196).chr(177) => 'i',
-               chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij',
-               chr(196).chr(180) => 'J', chr(196).chr(181) => 'j',
-               chr(196).chr(182) => 'K', chr(196).chr(183) => 'k',
-               chr(196).chr(184) => 'k', chr(196).chr(185) => 'L',
-               chr(196).chr(186) => 'l', chr(196).chr(187) => 'L',
-               chr(196).chr(188) => 'l', chr(196).chr(189) => 'L',
-               chr(196).chr(190) => 'l', chr(196).chr(191) => 'L',
-               chr(197).chr(128) => 'l', chr(197).chr(129) => 'L',
-               chr(197).chr(130) => 'l', chr(197).chr(131) => 'N',
-               chr(197).chr(132) => 'n', chr(197).chr(133) => 'N',
-               chr(197).chr(134) => 'n', chr(197).chr(135) => 'N',
-               chr(197).chr(136) => 'n', chr(197).chr(137) => 'N',
-               chr(197).chr(138) => 'n', chr(197).chr(139) => 'N',
-               chr(197).chr(140) => 'O', chr(197).chr(141) => 'o',
-               chr(197).chr(142) => 'O', chr(197).chr(143) => 'o',
-               chr(197).chr(144) => 'O', chr(197).chr(145) => 'o',
-               chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe',
-               chr(197).chr(148) => 'R',chr(197).chr(149) => 'r',
-               chr(197).chr(150) => 'R',chr(197).chr(151) => 'r',
-               chr(197).chr(152) => 'R',chr(197).chr(153) => 'r',
-               chr(197).chr(154) => 'S',chr(197).chr(155) => 's',
-               chr(197).chr(156) => 'S',chr(197).chr(157) => 's',
-               chr(197).chr(158) => 'S',chr(197).chr(159) => 's',
-               chr(197).chr(160) => 'S', chr(197).chr(161) => 's',
-               chr(197).chr(162) => 'T', chr(197).chr(163) => 't',
-               chr(197).chr(164) => 'T', chr(197).chr(165) => 't',
-               chr(197).chr(166) => 'T', chr(197).chr(167) => 't',
-               chr(197).chr(168) => 'U', chr(197).chr(169) => 'u',
-               chr(197).chr(170) => 'U', chr(197).chr(171) => 'u',
-               chr(197).chr(172) => 'U', chr(197).chr(173) => 'u',
-               chr(197).chr(174) => 'U', chr(197).chr(175) => 'u',
-               chr(197).chr(176) => 'U', chr(197).chr(177) => 'u',
-               chr(197).chr(178) => 'U', chr(197).chr(179) => 'u',
-               chr(197).chr(180) => 'W', chr(197).chr(181) => 'w',
-               chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y',
-               chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z',
-               chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z',
-               chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z',
-               chr(197).chr(190) => 'z', chr(197).chr(191) => 's',
+               'Ā' => 'A', 'ā' => 'a',
+               'Ă' => 'A', 'ă' => 'a',
+               'Ą' => 'A', 'ą' => 'a',
+               'Ć' => 'C', 'ć' => 'c',
+               'Ĉ' => 'C', 'ĉ' => 'c',
+               'Ċ' => 'C', 'ċ' => 'c',
+               'Č' => 'C', 'č' => 'c',
+               'Ď' => 'D', 'ď' => 'd',
+               'Đ' => 'D', 'đ' => 'd',
+               'Ē' => 'E', 'ē' => 'e',
+               'Ĕ' => 'E', 'ĕ' => 'e',
+               'Ė' => 'E', 'ė' => 'e',
+               'Ę' => 'E', 'ę' => 'e',
+               'Ě' => 'E', 'ě' => 'e',
+               'Ĝ' => 'G', 'ĝ' => 'g',
+               'Ğ' => 'G', 'ğ' => 'g',
+               'Ġ' => 'G', 'ġ' => 'g',
+               'Ģ' => 'G', 'ģ' => 'g',
+               'Ĥ' => 'H', 'ĥ' => 'h',
+               'Ħ' => 'H', 'ħ' => 'h',
+               'Ĩ' => 'I', 'ĩ' => 'i',
+               'Ī' => 'I', 'ī' => 'i',
+               'Ĭ' => 'I', 'ĭ' => 'i',
+               'Į' => 'I', 'į' => 'i',
+               'İ' => 'I', 'ı' => 'i',
+               'IJ' => 'IJ','ij' => 'ij',
+               'Ĵ' => 'J', 'ĵ' => 'j',
+               'Ķ' => 'K', 'ķ' => 'k',
+               'ĸ' => 'k', 'Ĺ' => 'L',
+               'ĺ' => 'l', 'Ļ' => 'L',
+               'ļ' => 'l', 'Ľ' => 'L',
+               'ľ' => 'l', 'Ŀ' => 'L',
+               'ŀ' => 'l', 'Ł' => 'L',
+               'ł' => 'l', 'Ń' => 'N',
+               'ń' => 'n', 'Ņ' => 'N',
+               'ņ' => 'n', 'Ň' => 'N',
+               'ň' => 'n', 'ʼn' => 'n',
+               'Ŋ' => 'N', 'ŋ' => 'n',
+               'Ō' => 'O', 'ō' => 'o',
+               'Ŏ' => 'O', 'ŏ' => 'o',
+               'Ő' => 'O', 'ő' => 'o',
+               'Œ' => 'OE','œ' => 'oe',
+               'Ŕ' => 'R','ŕ' => 'r',
+               'Ŗ' => 'R','ŗ' => 'r',
+               'Ř' => 'R','ř' => 'r',
+               'Ś' => 'S','ś' => 's',
+               'Ŝ' => 'S','ŝ' => 's',
+               'Ş' => 'S','ş' => 's',
+               'Š' => 'S', 'š' => 's',
+               'Ţ' => 'T', 'ţ' => 't',
+               'Ť' => 'T', 'ť' => 't',
+               'Ŧ' => 'T', 'ŧ' => 't',
+               'Ũ' => 'U', 'ũ' => 'u',
+               'Ū' => 'U', 'ū' => 'u',
+               'Ŭ' => 'U', 'ŭ' => 'u',
+               'Ů' => 'U', 'ů' => 'u',
+               'Ű' => 'U', 'ű' => 'u',
+               'Ų' => 'U', 'ų' => 'u',
+               'Ŵ' => 'W', 'ŵ' => 'w',
+               'Ŷ' => 'Y', 'ŷ' => 'y',
+               'Ÿ' => 'Y', 'Ź' => 'Z',
+               'ź' => 'z', 'Ż' => 'Z',
+               'ż' => 'z', 'Ž' => 'Z',
+               'ž' => 'z', 'ſ' => 's',
                // Decompositions for Latin Extended-B
-               chr(200).chr(152) => 'S', chr(200).chr(153) => 's',
-               chr(200).chr(154) => 'T', chr(200).chr(155) => 't',
+               'Ș' => 'S', 'ș' => 's',
+               'Ț' => 'T', 'ț' => 't',
                // Euro Sign
-               chr(226).chr(130).chr(172) => 'E',
+               '€' => 'E',
                // GBP (Pound) Sign
-               chr(194).chr(163) => '',
+               '£' => '',
                // Vowels with diacritic (Vietnamese)
                // unmarked
-               chr(198).chr(160) => 'O', chr(198).chr(161) => 'o',
-               chr(198).chr(175) => 'U', chr(198).chr(176) => 'u',
+               'Ơ' => 'O', 'ơ' => 'o',
+               'Ư' => 'U', 'ư' => 'u',
                // grave accent
-               chr(225).chr(186).chr(166) => 'A', chr(225).chr(186).chr(167) => 'a',
-               chr(225).chr(186).chr(176) => 'A', chr(225).chr(186).chr(177) => 'a',
-               chr(225).chr(187).chr(128) => 'E', chr(225).chr(187).chr(129) => 'e',
-               chr(225).chr(187).chr(146) => 'O', chr(225).chr(187).chr(147) => 'o',
-               chr(225).chr(187).chr(156) => 'O', chr(225).chr(187).chr(157) => 'o',
-               chr(225).chr(187).chr(170) => 'U', chr(225).chr(187).chr(171) => 'u',
-               chr(225).chr(187).chr(178) => 'Y', chr(225).chr(187).chr(179) => 'y',
+               'Ầ' => 'A', 'ầ' => 'a',
+               'Ằ' => 'A', 'ằ' => 'a',
+               'Ề' => 'E', 'ề' => 'e',
+               'Ồ' => 'O', 'ồ' => 'o',
+               'Ờ' => 'O', 'ờ' => 'o',
+               'Ừ' => 'U', 'ừ' => 'u',
+               'Ỳ' => 'Y', 'ỳ' => 'y',
                // hook
-               chr(225).chr(186).chr(162) => 'A', chr(225).chr(186).chr(163) => 'a',
-               chr(225).chr(186).chr(168) => 'A', chr(225).chr(186).chr(169) => 'a',
-               chr(225).chr(186).chr(178) => 'A', chr(225).chr(186).chr(179) => 'a',
-               chr(225).chr(186).chr(186) => 'E', chr(225).chr(186).chr(187) => 'e',
-               chr(225).chr(187).chr(130) => 'E', chr(225).chr(187).chr(131) => 'e',
-               chr(225).chr(187).chr(136) => 'I', chr(225).chr(187).chr(137) => 'i',
-               chr(225).chr(187).chr(142) => 'O', chr(225).chr(187).chr(143) => 'o',
-               chr(225).chr(187).chr(148) => 'O', chr(225).chr(187).chr(149) => 'o',
-               chr(225).chr(187).chr(158) => 'O', chr(225).chr(187).chr(159) => 'o',
-               chr(225).chr(187).chr(166) => 'U', chr(225).chr(187).chr(167) => 'u',
-               chr(225).chr(187).chr(172) => 'U', chr(225).chr(187).chr(173) => 'u',
-               chr(225).chr(187).chr(182) => 'Y', chr(225).chr(187).chr(183) => 'y',
+               'Ả' => 'A', 'ả' => 'a',
+               'Ẩ' => 'A', 'ẩ' => 'a',
+               'Ẳ' => 'A', 'ẳ' => 'a',
+               'Ẻ' => 'E', 'ẻ' => 'e',
+               'Ể' => 'E', 'ể' => 'e',
+               'Ỉ' => 'I', 'ỉ' => 'i',
+               'Ỏ' => 'O', 'ỏ' => 'o',
+               'Ổ' => 'O', 'ổ' => 'o',
+               'Ở' => 'O', 'ở' => 'o',
+               'Ủ' => 'U', 'ủ' => 'u',
+               'Ử' => 'U', 'ử' => 'u',
+               'Ỷ' => 'Y', 'ỷ' => 'y',
                // tilde
-               chr(225).chr(186).chr(170) => 'A', chr(225).chr(186).chr(171) => 'a',
-               chr(225).chr(186).chr(180) => 'A', chr(225).chr(186).chr(181) => 'a',
-               chr(225).chr(186).chr(188) => 'E', chr(225).chr(186).chr(189) => 'e',
-               chr(225).chr(187).chr(132) => 'E', chr(225).chr(187).chr(133) => 'e',
-               chr(225).chr(187).chr(150) => 'O', chr(225).chr(187).chr(151) => 'o',
-               chr(225).chr(187).chr(160) => 'O', chr(225).chr(187).chr(161) => 'o',
-               chr(225).chr(187).chr(174) => 'U', chr(225).chr(187).chr(175) => 'u',
-               chr(225).chr(187).chr(184) => 'Y', chr(225).chr(187).chr(185) => 'y',
+               'Ẫ' => 'A', 'ẫ' => 'a',
+               'Ẵ' => 'A', 'ẵ' => 'a',
+               'Ẽ' => 'E', 'ẽ' => 'e',
+               'Ễ' => 'E', 'ễ' => 'e',
+               'Ỗ' => 'O', 'ỗ' => 'o',
+               'Ỡ' => 'O', 'ỡ' => 'o',
+               'Ữ' => 'U', 'ữ' => 'u',
+               'Ỹ' => 'Y', 'ỹ' => 'y',
                // acute accent
-               chr(225).chr(186).chr(164) => 'A', chr(225).chr(186).chr(165) => 'a',
-               chr(225).chr(186).chr(174) => 'A', chr(225).chr(186).chr(175) => 'a',
-               chr(225).chr(186).chr(190) => 'E', chr(225).chr(186).chr(191) => 'e',
-               chr(225).chr(187).chr(144) => 'O', chr(225).chr(187).chr(145) => 'o',
-               chr(225).chr(187).chr(154) => 'O', chr(225).chr(187).chr(155) => 'o',
-               chr(225).chr(187).chr(168) => 'U', chr(225).chr(187).chr(169) => 'u',
+               'Ấ' => 'A', 'ấ' => 'a',
+               'Ắ' => 'A', 'ắ' => 'a',
+               'Ế' => 'E', 'ế' => 'e',
+               'Ố' => 'O', 'ố' => 'o',
+               'Ớ' => 'O', 'ớ' => 'o',
+               'Ứ' => 'U', 'ứ' => 'u',
                // dot below
-               chr(225).chr(186).chr(160) => 'A', chr(225).chr(186).chr(161) => 'a',
-               chr(225).chr(186).chr(172) => 'A', chr(225).chr(186).chr(173) => 'a',
-               chr(225).chr(186).chr(182) => 'A', chr(225).chr(186).chr(183) => 'a',
-               chr(225).chr(186).chr(184) => 'E', chr(225).chr(186).chr(185) => 'e',
-               chr(225).chr(187).chr(134) => 'E', chr(225).chr(187).chr(135) => 'e',
-               chr(225).chr(187).chr(138) => 'I', chr(225).chr(187).chr(139) => 'i',
-               chr(225).chr(187).chr(140) => 'O', chr(225).chr(187).chr(141) => 'o',
-               chr(225).chr(187).chr(152) => 'O', chr(225).chr(187).chr(153) => 'o',
-               chr(225).chr(187).chr(162) => 'O', chr(225).chr(187).chr(163) => 'o',
-               chr(225).chr(187).chr(164) => 'U', chr(225).chr(187).chr(165) => 'u',
-               chr(225).chr(187).chr(176) => 'U', chr(225).chr(187).chr(177) => 'u',
-               chr(225).chr(187).chr(180) => 'Y', chr(225).chr(187).chr(181) => 'y',
+               'Ạ' => 'A', 'ạ' => 'a',
+               'Ậ' => 'A', 'ậ' => 'a',
+               'Ặ' => 'A', 'ặ' => 'a',
+               'Ẹ' => 'E', 'ẹ' => 'e',
+               'Ệ' => 'E', 'ệ' => 'e',
+               'Ị' => 'I', 'ị' => 'i',
+               'Ọ' => 'O', 'ọ' => 'o',
+               'Ộ' => 'O', 'ộ' => 'o',
+               'Ợ' => 'O', 'ợ' => 'o',
+               'Ụ' => 'U', 'ụ' => 'u',
+               'Ự' => 'U', 'ự' => 'u',
+               'Ỵ' => 'Y', 'ỵ' => 'y',
                // Vowels with diacritic (Chinese, Hanyu Pinyin)
-               chr(201).chr(145) => 'a',
+               'ɑ' => 'a',
                // macron
-               chr(199).chr(149) => 'U', chr(199).chr(150) => 'u',
+               'Ǖ' => 'U', 'ǖ' => 'u',
                // acute accent
-               chr(199).chr(151) => 'U', chr(199).chr(152) => 'u',
+               'Ǘ' => 'U', 'ǘ' => 'u',
                // caron
-               chr(199).chr(141) => 'A', chr(199).chr(142) => 'a',
-               chr(199).chr(143) => 'I', chr(199).chr(144) => 'i',
-               chr(199).chr(145) => 'O', chr(199).chr(146) => 'o',
-               chr(199).chr(147) => 'U', chr(199).chr(148) => 'u',
-               chr(199).chr(153) => 'U', chr(199).chr(154) => 'u',
+               'Ǎ' => 'A', 'ǎ' => 'a',
+               'Ǐ' => 'I', 'ǐ' => 'i',
+               'Ǒ' => 'O', 'ǒ' => 'o',
+               'Ǔ' => 'U', 'ǔ' => 'u',
+               'Ǚ' => 'U', 'ǚ' => 'u',
                // grave accent
-               chr(199).chr(155) => 'U', chr(199).chr(156) => 'u',
+               'Ǜ' => 'U', 'ǜ' => 'u',
                );
 
                // Used for locale-specific rules
                $locale = get_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';
-                       $chars[ chr(195).chr(182) ] = 'oe';
-                       $chars[ chr(195).chr(156) ] = 'Ue';
-                       $chars[ chr(195).chr(188) ] = 'ue';
-                       $chars[ chr(195).chr(159) ] = 'ss';
+                       $chars[ 'Ä' ] = 'Ae';
+                       $chars[ 'ä' ] = 'ae';
+                       $chars[ 'Ö' ] = 'Oe';
+                       $chars[ 'ö' ] = 'oe';
+                       $chars[ 'Ü' ] = 'Ue';
+                       $chars[ 'ü' ] = 'ue';
+                       $chars[ 'ß' ] = 'ss';
                } elseif ( 'da_DK' === $locale ) {
-                       $chars[ chr(195).chr(134) ] = 'Ae';
-                       $chars[ chr(195).chr(166) ] = 'ae';
-                       $chars[ chr(195).chr(152) ] = 'Oe';
-                       $chars[ chr(195).chr(184) ] = 'oe';
-                       $chars[ chr(195).chr(133) ] = 'Aa';
-                       $chars[ chr(195).chr(165) ] = 'aa';
+                       $chars[ 'Æ' ] = 'Ae';
+                       $chars[ 'æ' ] = 'ae';
+                       $chars[ 'Ø' ] = 'Oe';
+                       $chars[ 'ø' ] = 'oe';
+                       $chars[ 'Å' ] = 'Aa';
+                       $chars[ 'å' ] = 'aa';
                } elseif ( 'ca' === $locale ) {
-                       $chars[ chr(108).chr(194).chr(183).chr(108) ] = 'll';
+                       $chars[ 'l·l' ] = 'll';
+               } elseif ( 'sr_RS' === $locale ) {
+                       $chars[ 'Đ' ] = 'DJ';
+                       $chars[ 'đ' ] = 'dj';
                }
 
                $string = strtr($string, $chars);
        } else {
                $chars = array();
                // Assume ISO-8859-1 if not UTF-8
-               $chars['in'] = chr(128).chr(131).chr(138).chr(142).chr(154).chr(158)
-                       .chr(159).chr(162).chr(165).chr(181).chr(192).chr(193).chr(194)
-                       .chr(195).chr(196).chr(197).chr(199).chr(200).chr(201).chr(202)
-                       .chr(203).chr(204).chr(205).chr(206).chr(207).chr(209).chr(210)
-                       .chr(211).chr(212).chr(213).chr(214).chr(216).chr(217).chr(218)
-                       .chr(219).chr(220).chr(221).chr(224).chr(225).chr(226).chr(227)
-                       .chr(228).chr(229).chr(231).chr(232).chr(233).chr(234).chr(235)
-                       .chr(236).chr(237).chr(238).chr(239).chr(241).chr(242).chr(243)
-                       .chr(244).chr(245).chr(246).chr(248).chr(249).chr(250).chr(251)
-                       .chr(252).chr(253).chr(255);
+               $chars['in'] = "\x80\x83\x8a\x8e\x9a\x9e"
+                       ."\x9f\xa2\xa5\xb5\xc0\xc1\xc2"
+                       ."\xc3\xc4\xc5\xc7\xc8\xc9\xca"
+                       ."\xcb\xcc\xcd\xce\xcf\xd1\xd2"
+                       ."\xd3\xd4\xd5\xd6\xd8\xd9\xda"
+                       ."\xdb\xdc\xdd\xe0\xe1\xe2\xe3"
+                       ."\xe4\xe5\xe7\xe8\xe9\xea\xeb"
+                       ."\xec\xed\xee\xef\xf1\xf2\xf3"
+                       ."\xf4\xf5\xf6\xf8\xf9\xfa\xfb"
+                       ."\xfc\xfd\xff";
 
                $chars['out'] = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy";
 
                $string = strtr($string, $chars['in'], $chars['out']);
                $double_chars = array();
-               $double_chars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254));
+               $double_chars['in'] = array("\x8c", "\x9c", "\xc6", "\xd0", "\xde", "\xdf", "\xe6", "\xf0", "\xfe");
                $double_chars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th');
                $string = str_replace($double_chars['in'], $double_chars['out'], $string);
        }
@@ -3206,32 +3217,37 @@ function human_time_diff( $from, $to = '' ) {
                $mins = round( $diff / MINUTE_IN_SECONDS );
                if ( $mins <= 1 )
                        $mins = 1;
-               /* translators: min=minute */
+               /* translators: Time difference between two dates, in minutes (min=minute). 1: Number of minutes */
                $since = sprintf( _n( '%s min', '%s mins', $mins ), $mins );
        } elseif ( $diff < DAY_IN_SECONDS && $diff >= HOUR_IN_SECONDS ) {
                $hours = round( $diff / HOUR_IN_SECONDS );
                if ( $hours <= 1 )
                        $hours = 1;
+               /* translators: Time difference between two dates, in hours. 1: Number of hours */
                $since = sprintf( _n( '%s hour', '%s hours', $hours ), $hours );
        } elseif ( $diff < WEEK_IN_SECONDS && $diff >= DAY_IN_SECONDS ) {
                $days = round( $diff / DAY_IN_SECONDS );
                if ( $days <= 1 )
                        $days = 1;
+               /* translators: Time difference between two dates, in days. 1: Number of days */
                $since = sprintf( _n( '%s day', '%s days', $days ), $days );
        } elseif ( $diff < MONTH_IN_SECONDS && $diff >= WEEK_IN_SECONDS ) {
                $weeks = round( $diff / WEEK_IN_SECONDS );
                if ( $weeks <= 1 )
                        $weeks = 1;
+               /* translators: Time difference between two dates, in weeks. 1: Number of weeks */
                $since = sprintf( _n( '%s week', '%s weeks', $weeks ), $weeks );
        } elseif ( $diff < YEAR_IN_SECONDS && $diff >= MONTH_IN_SECONDS ) {
                $months = round( $diff / MONTH_IN_SECONDS );
                if ( $months <= 1 )
                        $months = 1;
+               /* translators: Time difference between two dates, in months. 1: Number of months */
                $since = sprintf( _n( '%s month', '%s months', $months ), $months );
        } elseif ( $diff >= YEAR_IN_SECONDS ) {
                $years = round( $diff / YEAR_IN_SECONDS );
                if ( $years <= 1 )
                        $years = 1;
+               /* translators: Time difference between two dates, in years. 1: Number of years */
                $since = sprintf( _n( '%s year', '%s years', $years ), $years );
        }
 
@@ -4642,6 +4658,7 @@ function wp_strip_all_tags($string, $remove_breaks = false) {
  *
  * @since 2.9.0
  *
+ * @see sanitize_textarea_field()
  * @see wp_check_invalid_utf8()
  * @see wp_strip_all_tags()
  *
@@ -4649,16 +4666,75 @@ function wp_strip_all_tags($string, $remove_breaks = false) {
  * @return string Sanitized string.
  */
 function sanitize_text_field( $str ) {
+       $filtered = _sanitize_text_fields( $str, false );
+
+       /**
+        * Filters a sanitized text field string.
+        *
+        * @since 2.9.0
+        *
+        * @param string $filtered The sanitized string.
+        * @param string $str      The string prior to being sanitized.
+        */
+       return apply_filters( 'sanitize_text_field', $filtered, $str );
+}
+
+/**
+ * Sanitizes a multiline string from user input or from the database.
+ *
+ * The function is like sanitize_text_field(), but preserves
+ * new lines (\n) and other whitespace, which are legitimate
+ * input in textarea elements.
+ *
+ * @see sanitize_text_field()
+ *
+ * @since 4.7.0
+ *
+ * @param string $str String to sanitize.
+ * @return string Sanitized string.
+ */
+function sanitize_textarea_field( $str ) {
+       $filtered = _sanitize_text_fields( $str, true );
+
+       /**
+        * Filters a sanitized textarea field string.
+        *
+        * @since 4.7.0
+        *
+        * @param string $filtered The sanitized string.
+        * @param string $str      The string prior to being sanitized.
+        */
+       return apply_filters( 'sanitize_textarea_field', $filtered, $str );
+}
+
+/**
+ * Internal helper function to sanitize a string from user input or from the db
+ *
+ * @since 4.7.0
+ * @access private
+ *
+ * @param string $str String to sanitize.
+ * @param bool $keep_newlines optional Whether to keep newlines. Default: false.
+ * @return string Sanitized string.
+ */
+function _sanitize_text_fields( $str, $keep_newlines = false ) {
        $filtered = wp_check_invalid_utf8( $str );
 
        if ( strpos($filtered, '<') !== false ) {
                $filtered = wp_pre_kses_less_than( $filtered );
                // This will strip extra whitespace for us.
-               $filtered = wp_strip_all_tags( $filtered, true );
-       } else {
-               $filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) );
+               $filtered = wp_strip_all_tags( $filtered, false );
+
+               // Use html entities in a special case to make sure no later
+               // newline stripping stage could lead to a functional tag
+               $filtered = str_replace("<\n", "&lt;\n", $filtered);
        }
 
+       if ( ! $keep_newlines ) {
+               $filtered = preg_replace( '/[\r\n\t ]+/', ' ', $filtered );
+       }
+       $filtered = trim( $filtered );
+
        $found = false;
        while ( preg_match('/%[a-f0-9]{2}/i', $filtered, $match) ) {
                $filtered = str_replace($match[0], '', $filtered);
@@ -4670,15 +4746,7 @@ function sanitize_text_field( $str ) {
                $filtered = trim( preg_replace('/ +/', ' ', $filtered) );
        }
 
-       /**
-        * Filters a sanitized text field string.
-        *
-        * @since 2.9.0
-        *
-        * @param string $filtered The sanitized string.
-        * @param string $str      The string prior to being sanitized.
-        */
-       return apply_filters( 'sanitize_text_field', $filtered, $str );
+       return $filtered;
 }
 
 /**
@@ -4927,12 +4995,8 @@ function print_emoji_detection_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(
                /**
                 * Filters the URL where emoji png images are hosted.
@@ -4941,7 +5005,7 @@ function _print_emoji_detection_script() {
                 *
                 * @param string The emoji base URL for png images.
                 */
-               'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/2/72x72/' ),
+               'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/2.2.1/72x72/' ),
 
                /**
                 * Filters the extension of the emoji png files.
@@ -4959,7 +5023,7 @@ function _print_emoji_detection_script() {
                 *
                 * @param string The emoji base URL for svg images.
                 */
-               'svgUrl' => apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' ),
+               'svgUrl' => apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2.2.1/svg/' ),
 
                /**
                 * Filters the extension of the emoji SVG files.
@@ -4971,7 +5035,7 @@ function _print_emoji_detection_script() {
                'svgExt' => apply_filters( 'emoji_svg_ext', '.svg' ),
        );
 
-       $version = 'ver=' . $wp_version;
+       $version = 'ver=' . get_bloginfo( 'version' );
 
        if ( SCRIPT_DEBUG ) {
                $settings['source'] = array(
@@ -5006,7 +5070,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,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);
+                       !function(a,b,c){function d(a){var b,c,d,e,f=String.fromCharCode;if(!k||!k.fillText)return!1;switch(k.clearRect(0,0,j.width,j.height),k.textBaseline="top",k.font="600 32px Arial",a){case"flag":return k.fillText(f(55356,56826,55356,56819),0,0),!(j.toDataURL().length<3e3)&&(k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,65039,8205,55356,57096),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,55356,57096),0,0),c=j.toDataURL(),b!==c);case"emoji4":return k.fillText(f(55357,56425,55356,57341,8205,55357,56507),0,0),d=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55357,56425,55356,57341,55357,56507),0,0),e=j.toDataURL(),d!==e}return!1}function e(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i,j=b.createElement("canvas"),k=j.getContext&&j.getContext("2d");for(i=Array("flag","emoji4"),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
        }
@@ -5071,7 +5135,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/2/72x72/' );
+       $cdn_url = apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/2.2.1/72x72/' );
 
        /** This filter is documented in wp-includes/formatting.php */
        $ext = apply_filters( 'emoji_ext', '.png' );
index e3c9294909dced48a27dda773e5ef4af0af15966..8593e8c9230a16e80dcc350b1f14b47845de79d8 100644 (file)
@@ -91,13 +91,7 @@ function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
        $i = $unixtimestamp;
 
        if ( false === $i ) {
-               if ( ! $gmt )
-                       $i = current_time( 'timestamp' );
-               else
-                       $i = time();
-               // we should not let date() interfere with our
-               // specially computed timestamp
-               $gmt = true;
+               $i = current_time( 'timestamp', $gmt );
        }
 
        /*
@@ -106,15 +100,13 @@ function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
         */
        $req_format = $dateformatstring;
 
-       $datefunc = $gmt? 'gmdate' : 'date';
-
        if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) {
-               $datemonth = $wp_locale->get_month( $datefunc( 'm', $i ) );
+               $datemonth = $wp_locale->get_month( date( 'm', $i ) );
                $datemonth_abbrev = $wp_locale->get_month_abbrev( $datemonth );
-               $dateweekday = $wp_locale->get_weekday( $datefunc( 'w', $i ) );
+               $dateweekday = $wp_locale->get_weekday( date( 'w', $i ) );
                $dateweekday_abbrev = $wp_locale->get_weekday_abbrev( $dateweekday );
-               $datemeridiem = $wp_locale->get_meridiem( $datefunc( 'a', $i ) );
-               $datemeridiem_capital = $wp_locale->get_meridiem( $datefunc( 'A', $i ) );
+               $datemeridiem = $wp_locale->get_meridiem( date( 'a', $i ) );
+               $datemeridiem_capital = $wp_locale->get_meridiem( date( 'A', $i ) );
                $dateformatstring = ' '.$dateformatstring;
                $dateformatstring = preg_replace( "/([^\\\])D/", "\\1" . backslashit( $dateweekday_abbrev ), $dateformatstring );
                $dateformatstring = preg_replace( "/([^\\\])F/", "\\1" . backslashit( $datemonth ), $dateformatstring );
@@ -142,7 +134,7 @@ function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
                        }
                }
        }
-       $j = @$datefunc( $dateformatstring, $i );
+       $j = @date( $dateformatstring, $i );
 
        /**
         * Filters the date formatted based on the locale.
@@ -1221,6 +1213,18 @@ function bool_from_yn( $yn ) {
 function do_feed() {
        global $wp_query;
 
+       // Determine if we are looking at the main comment feed
+       $is_main_comments_feed = ( $wp_query->is_comment_feed() && ! $wp_query->is_singular() );
+
+       /*
+        * Check the queried object for the existence of posts if it is not a feed for an archive,
+        * search result, or main comments. By checking for the absense of posts we can prevent rendering the feed
+        * templates at invalid endpoints. e.g.) /wp-content/plugins/feed/
+        */
+       if ( ! $wp_query->have_posts() && ! ( $wp_query->is_archive() || $wp_query->is_search() || $is_main_comments_feed ) ) {
+               wp_die( __( 'ERROR: This is not a valid feed.' ), '', array( 'response' => 404 ) );
+       }
+
        $feed = get_query_var( 'feed' );
 
        // Remove the pad, if present.
@@ -1411,7 +1415,12 @@ function is_blog_installed() {
                wp_load_translations_early();
 
                // Die with a DB error.
-               $wpdb->error = sprintf( __( 'One or more database tables are unavailable. The database may need to be <a href="%s">repaired</a>.' ), 'maint/repair.php?referrer=is_blog_installed' );
+               $wpdb->error = sprintf(
+                       /* translators: %s: database repair URL */
+                       __( 'One or more database tables are unavailable. The database may need to be <a href="%s">repaired</a>.' ),
+                       'maint/repair.php?referrer=is_blog_installed'
+               );
+
                dead_db();
        }
 
@@ -1895,7 +1904,11 @@ function wp_upload_dir( $time = null, $create_dir = true, $refresh_cache = false
                                        $error_path = basename( $uploads['basedir'] ) . $uploads['subdir'];
                                }
 
-                               $uploads['error'] = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), esc_html( $error_path ) );
+                               $uploads['error'] = sprintf(
+                                       /* translators: %s: directory path */
+                                       __( 'Unable to create directory %s. Is its parent directory writable by the server?' ),
+                                       esc_html( $error_path )
+                               );
                        }
 
                        $tested_paths[ $path ] = $uploads['error'];
@@ -2034,13 +2047,16 @@ function wp_unique_filename( $dir, $filename, $unique_filename_callback = null )
        $filename = sanitize_file_name($filename);
 
        // Separate the filename into a name and extension.
-       $info = pathinfo($filename);
-       $ext = !empty($info['extension']) ? '.' . $info['extension'] : '';
-       $name = basename($filename, $ext);
+       $ext = pathinfo( $filename, PATHINFO_EXTENSION );
+       $name = pathinfo( $filename, PATHINFO_BASENAME );
+       if ( $ext ) {
+               $ext = '.' . $ext;
+       }
 
        // Edge case: if file is named '.ext', treat as an empty name.
-       if ( $name === $ext )
+       if ( $name === $ext ) {
                $name = '';
+       }
 
        /*
         * Increment the file number until we have a unique file to save in $dir.
@@ -2154,7 +2170,11 @@ function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
                else
                        $error_path = basename( $upload['basedir'] ) . $upload['subdir'];
 
-               $message = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), $error_path );
+               $message = sprintf(
+                       /* translators: %s: directory path */
+                       __( 'Unable to create directory %s. Is its parent directory writable by the server?' ),
+                       $error_path
+               );
                return array( 'error' => $message );
        }
 
@@ -2234,7 +2254,7 @@ function wp_check_filetype( $filename, $mimes = null ) {
  * If it's determined that the extension does not match the file's real type,
  * then the "proper_filename" value will be set with a proper filename and extension.
  *
- * Currently this function only supports renaming images validated via wp_get_image_mime().
+ * Currently this function only supports validating images known to getimagesize().
  *
  * @since 3.0.0
  *
@@ -2258,15 +2278,14 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
                return compact( 'ext', 'type', 'proper_filename' );
        }
 
-       // Validate image types.
-       if ( $type && 0 === strpos( $type, 'image/' ) ) {
+       // We're able to validate images using GD
+       if ( $type && 0 === strpos( $type, 'image/' ) && function_exists('getimagesize') ) {
 
                // Attempt to figure out what type of image it actually is
-               $real_mime = wp_get_image_mime( $file );
+               $imgstats = @getimagesize( $file );
 
-               if ( ! $real_mime ) {
-                       $type = $ext = false;
-               } elseif ( $real_mime != $type ) {
+               // 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 ) {
                        /**
                         * Filters the list mapping image mime types to their respective extensions.
                         *
@@ -2283,10 +2302,10 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
                        ) );
 
                        // Replace whatever is after the last period in the filename with the correct extension
-                       if ( ! empty( $mime_to_ext[ $real_mime ] ) ) {
+                       if ( ! empty( $mime_to_ext[ $imgstats['mime'] ] ) ) {
                                $filename_parts = explode( '.', $filename );
                                array_pop( $filename_parts );
-                               $filename_parts[] = $mime_to_ext[ $real_mime ];
+                               $filename_parts[] = $mime_to_ext[ $imgstats['mime'] ];
                                $new_filename = implode( '.', $filename_parts );
 
                                if ( $new_filename != $filename ) {
@@ -2296,20 +2315,8 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
                                $wp_filetype = wp_check_filetype( $new_filename, $mimes );
                                $ext = $wp_filetype['ext'];
                                $type = $wp_filetype['type'];
-                       } else {
-                               $type = $ext = false;
                        }
                }
-       } elseif ( function_exists( 'finfo_file' ) ) {
-               // Use finfo_file if available to validate non-image files.
-               $finfo = finfo_open( FILEINFO_MIME_TYPE );
-               $real_mime = finfo_file( $finfo, $file );
-               finfo_close( $finfo );
-
-               // If the extension does not match the file's real type, return false.
-               if ( $real_mime !== $type ) {
-                       $type = $ext = false;
-               }
        }
 
        /**
@@ -2327,38 +2334,6 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
        return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes );
 }
 
-/**
- * Returns the real mime type of an image file.
- *
- * This depends on exif_imagetype() or getimagesize() to determine real mime types.
- *
- * @since 4.7.1
- *
- * @param string $file Full path to the file.
- * @return string|false The actual mime type or false if the type cannot be determined.
- */
-function wp_get_image_mime( $file ) {
-       /*
-        * Use exif_imagetype() to check the mimetype if available or fall back to
-        * getimagesize() if exif isn't avaialbe. If either function throws an Exception
-        * we assume the file could not be validated.
-        */
-       try {
-               if ( is_callable( 'exif_imagetype' ) ) {
-                       $mime = image_type_to_mime_type( exif_imagetype( $file ) );
-               } elseif ( function_exists( 'getimagesize' ) ) {
-                       $imagesize = getimagesize( $file );
-                       $mime = ( isset( $imagesize['mime'] ) ) ? $imagesize['mime'] : false;
-               } else {
-                       $mime = false;
-               }
-       } catch ( Exception $e ) {
-               $mime = false;
-       }
-
-       return $mime;
-}
-
 /**
  * Retrieve list of mime types and file extensions.
  *
@@ -2558,13 +2533,27 @@ function get_allowed_mime_types( $user = null ) {
  */
 function wp_nonce_ays( $action ) {
        if ( 'log-out' == $action ) {
-               $html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '</p><p>';
+               $html = sprintf(
+                       /* translators: %s: site name */
+                       __( 'You are attempting to log out of %s' ),
+                       get_bloginfo( 'name' )
+               );
+               $html .= '</p><p>';
                $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
-               $html .= sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url( $redirect_to ) );
+               $html .= sprintf(
+                       /* translators: %s: logout URL */
+                       __( 'Do you really want to <a href="%s">log out</a>?' ),
+                       wp_logout_url( $redirect_to )
+               );
        } else {
                $html = __( 'Are you sure you want to do this?' );
-               if ( wp_get_referer() )
-                       $html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>";
+               if ( wp_get_referer() ) {
+                       $html .= '</p><p>';
+                       $html .= sprintf( '<a href="%s">%s</a>',
+                               esc_url( remove_query_arg( 'updated', wp_get_referer() ) ),
+                               __( 'Please try again.' )
+                       );
+               }
        }
 
        wp_die( $html, __( 'WordPress Failure Notice' ), 403 );
@@ -2587,7 +2576,8 @@ function wp_nonce_ays( $action ) {
  *              an integer to be used as the response code.
  *
  * @param string|WP_Error  $message Optional. Error message. If this is a WP_Error object,
- *                                  the error's messages are used. Default empty.
+ *                                  and not an Ajax or XML-RPC request, 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.
  *                                  If `$title` is an integer, then it is treated as the response
@@ -2596,7 +2586,7 @@ function wp_nonce_ays( $action ) {
  *     Optional. Arguments to control behavior. If `$args` is an integer, then it is treated
  *     as the response code. Default empty array.
  *
- *     @type int    $response       The HTTP response code. Default 500.
+ *     @type int    $response       The HTTP response code. Default 200 for Ajax requests, 500 otherwise.
  *     @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'.
@@ -2612,7 +2602,7 @@ function wp_die( $message = '', $title = '', $args = array() ) {
                $title = '';
        }
 
-       if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
+       if ( wp_doing_ajax() ) {
                /**
                 * Filters the callback for killing WordPress execution for Ajax requests.
                 *
@@ -2653,9 +2643,9 @@ function wp_die( $message = '', $title = '', $args = array() ) {
  * @since 3.0.0
  * @access private
  *
- * @param string       $message Error message.
- * @param string       $title   Optional. Error title. Default empty.
- * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
+ * @param string|WP_Error $message Error message or WP_Error object.
+ * @param string          $title   Optional. Error title. Default empty.
+ * @param string|array    $args    Optional. Arguments to control behavior. Default empty array.
  */
 function _default_wp_die_handler( $message, $title = '', $args = array() ) {
        $defaults = array( 'response' => 500 );
@@ -2880,9 +2870,20 @@ function _xmlrpc_wp_die_handler( $message, $title = '', $args = array() ) {
  * @since 3.4.0
  * @access private
  *
- * @param string $message Optional. Response to print. Default empty.
+ * @param string       $message Error message.
+ * @param string       $title   Optional. Error title (unused). Default empty.
+ * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
  */
-function _ajax_wp_die_handler( $message = '' ) {
+function _ajax_wp_die_handler( $message, $title = '', $args = array() ) {
+       $defaults = array(
+               'response' => 200,
+       );
+       $r = wp_parse_args( $args, $defaults );
+
+       if ( ! headers_sent() && null !== $r['response'] ) {
+               status_header( $r['response'] );
+       }
+
        if ( is_scalar( $message ) )
                die( (string) $message );
        die( '0' );
@@ -3099,33 +3100,44 @@ function _wp_json_prepare_data( $data ) {
  * Send a JSON response back to an Ajax request.
  *
  * @since 3.5.0
+ * @since 4.7.0 The `$status_code` parameter was added.
  *
- * @param mixed $response Variable (usually an array or object) to encode as JSON,
- *                        then print and die.
+ * @param mixed $response    Variable (usually an array or object) to encode as JSON,
+ *                           then print and die.
+ * @param int   $status_code The HTTP status code to output.
  */
-function wp_send_json( $response ) {
+function wp_send_json( $response, $status_code = null ) {
        @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
+       if ( null !== $status_code ) {
+               status_header( $status_code );
+       }
        echo wp_json_encode( $response );
-       if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
-               wp_die();
-       else
+
+       if ( wp_doing_ajax() ) {
+               wp_die( '', '', array(
+                       'response' => null,
+               ) );
+       } else {
                die;
+       }
 }
 
 /**
  * Send a JSON response back to an Ajax request, indicating success.
  *
  * @since 3.5.0
+ * @since 4.7.0 The `$status_code` parameter was added.
  *
- * @param mixed $data Data to encode as JSON, then print and die.
+ * @param mixed $data        Data to encode as JSON, then print and die.
+ * @param int   $status_code The HTTP status code to output.
  */
-function wp_send_json_success( $data = null ) {
+function wp_send_json_success( $data = null, $status_code = null ) {
        $response = array( 'success' => true );
 
        if ( isset( $data ) )
                $response['data'] = $data;
 
-       wp_send_json( $response );
+       wp_send_json( $response, $status_code );
 }
 
 /**
@@ -3138,10 +3150,12 @@ function wp_send_json_success( $data = null ) {
  *
  * @since 3.5.0
  * @since 4.1.0 The `$data` parameter is now processed if a WP_Error object is passed in.
+ * @since 4.7.0 The `$status_code` parameter was added.
  *
- * @param mixed $data Data to encode as JSON, then print and die.
+ * @param mixed $data        Data to encode as JSON, then print and die.
+ * @param int   $status_code The HTTP status code to output.
  */
-function wp_send_json_error( $data = null ) {
+function wp_send_json_error( $data = null, $status_code = null ) {
        $response = array( 'success' => false );
 
        if ( isset( $data ) ) {
@@ -3159,7 +3173,7 @@ function wp_send_json_error( $data = null ) {
                }
        }
 
-       wp_send_json( $response );
+       wp_send_json( $response, $status_code );
 }
 
 /**
@@ -3179,7 +3193,7 @@ function wp_check_jsonp_callback( $callback ) {
                return false;
        }
 
-       $jsonp_callback = preg_replace( '/[^\w\.]/', '', $callback, -1, $illegal_char_count );
+       preg_replace( '/[^\w\.]/', '', $callback, -1, $illegal_char_count );
 
        return 0 === $illegal_char_count;
 }
@@ -3226,6 +3240,16 @@ function _config_wp_siteurl( $url = '' ) {
        return $url;
 }
 
+/**
+ * Delete the fresh site option.
+ *
+ * @since 4.7.0
+ * @access private
+ */
+function _delete_option_fresh_site() {
+       update_option( 'fresh_site', 0 );
+}
+
 /**
  * Set the localized direction for MCE plugin.
  *
@@ -3340,6 +3364,18 @@ function smilies_init() {
                );
        }
 
+       /**
+        * Filters all the smilies.
+        *
+        * This filter must be added before `smilies_init` is run, as
+        * it is normally only run once to setup the smilies regex.
+        *
+        * @since 4.7.0
+        *
+        * @param array $wpsmiliestrans List of the smilies.
+        */
+       $wpsmiliestrans = apply_filters('smilies', $wpsmiliestrans);
+
        if (count($wpsmiliestrans) == 0) {
                return;
        }
@@ -3386,9 +3422,10 @@ function smilies_init() {
  * to be merged into another array.
  *
  * @since 2.2.0
+ * @since 2.3.0 `$args` can now also be an object.
  *
- * @param string|array $args     Value to merge with $defaults
- * @param array        $defaults Optional. Array that serves as the defaults. Default empty.
+ * @param string|array|object $args     Value to merge with $defaults.
+ * @param array               $defaults Optional. Array that serves as the defaults. Default empty.
  * @return array Merged user defined values with defaults.
  */
 function wp_parse_args( $args, $defaults = '' ) {
@@ -3419,6 +3456,26 @@ function wp_parse_id_list( $list ) {
        return array_unique(array_map('absint', $list));
 }
 
+/**
+ * Clean up an array, comma- or space-separated list of slugs.
+ *
+ * @since 4.7.0
+ *
+ * @param  array|string $list List of slugs.
+ * @return array Sanitized array of slugs.
+ */
+function wp_parse_slug_list( $list ) {
+       if ( ! is_array( $list ) ) {
+               $list = preg_split( '/[\s,]+/', $list );
+       }
+
+       foreach ( $list as $key => $value ) {
+               $list[ $key ] = sanitize_title( $value );
+       }
+
+       return array_unique( $list );
+}
+
 /**
  * Extract a slice of an array, given a list of keys.
  *
@@ -3459,6 +3516,7 @@ function wp_is_numeric_array( $data ) {
  * Filters a list of objects, based on a set of key => value arguments.
  *
  * @since 3.0.0
+ * @since 4.7.0 Uses WP_List_Util class.
  *
  * @param array       $list     An array of objects to filter
  * @param array       $args     Optional. An array of key => value arguments to match
@@ -3472,21 +3530,26 @@ function wp_is_numeric_array( $data ) {
  * @return array A list of objects or object fields.
  */
 function wp_filter_object_list( $list, $args = array(), $operator = 'and', $field = false ) {
-       if ( ! is_array( $list ) )
+       if ( ! is_array( $list ) ) {
                return array();
+       }
 
-       $list = wp_list_filter( $list, $args, $operator );
+       $util = new WP_List_Util( $list );
 
-       if ( $field )
-               $list = wp_list_pluck( $list, $field );
+       $util->filter( $args, $operator );
 
-       return $list;
+       if ( $field ) {
+               $util->pluck( $field );
+       }
+
+       return $util->get_output();
 }
 
 /**
  * Filters a list of objects, based on a set of key => value arguments.
  *
  * @since 3.1.0
+ * @since 4.7.0 Uses WP_List_Util class.
  *
  * @param array  $list     An array of objects to filter.
  * @param array  $args     Optional. An array of key => value arguments to match
@@ -3498,33 +3561,12 @@ function wp_filter_object_list( $list, $args = array(), $operator = 'and', $fiel
  * @return array Array of found values.
  */
 function wp_list_filter( $list, $args = array(), $operator = 'AND' ) {
-       if ( ! is_array( $list ) )
+       if ( ! is_array( $list ) ) {
                return array();
-
-       if ( empty( $args ) )
-               return $list;
-
-       $operator = strtoupper( $operator );
-       $count = count( $args );
-       $filtered = array();
-
-       foreach ( $list as $key => $obj ) {
-               $to_match = (array) $obj;
-
-               $matched = 0;
-               foreach ( $args as $m_key => $m_value ) {
-                       if ( array_key_exists( $m_key, $to_match ) && $m_value == $to_match[ $m_key ] )
-                               $matched++;
-               }
-
-               if ( ( 'AND' == $operator && $matched == $count )
-                 || ( 'OR' == $operator && $matched > 0 )
-                 || ( 'NOT' == $operator && 0 == $matched ) ) {
-                       $filtered[$key] = $obj;
-               }
        }
 
-       return $filtered;
+       $util = new WP_List_Util( $list );
+       return $util->filter( $args, $operator );
 }
 
 /**
@@ -3535,6 +3577,7 @@ function wp_list_filter( $list, $args = array(), $operator = 'AND' ) {
  *
  * @since 3.1.0
  * @since 4.0.0 $index_key parameter added.
+ * @since 4.7.0 Uses WP_List_Util class.
  *
  * @param array      $list      List of objects or arrays
  * @param int|string $field     Field from the object to place instead of the entire object
@@ -3545,43 +3588,30 @@ function wp_list_filter( $list, $args = array(), $operator = 'AND' ) {
  *               `$list` will be preserved in the results.
  */
 function wp_list_pluck( $list, $field, $index_key = null ) {
-       if ( ! $index_key ) {
-               /*
-                * This is simple. Could at some point wrap array_column()
-                * if we knew we had an array of arrays.
-                */
-               foreach ( $list as $key => $value ) {
-                       if ( is_object( $value ) ) {
-                               $list[ $key ] = $value->$field;
-                       } else {
-                               $list[ $key ] = $value[ $field ];
-                       }
-               }
-               return $list;
-       }
+       $util = new WP_List_Util( $list );
+       return $util->pluck( $field, $index_key );
+}
 
-       /*
-        * When index_key is not set for a particular item, push the value
-        * to the end of the stack. This is how array_column() behaves.
-        */
-       $newlist = array();
-       foreach ( $list as $value ) {
-               if ( is_object( $value ) ) {
-                       if ( isset( $value->$index_key ) ) {
-                               $newlist[ $value->$index_key ] = $value->$field;
-                       } else {
-                               $newlist[] = $value->$field;
-                       }
-               } else {
-                       if ( isset( $value[ $index_key ] ) ) {
-                               $newlist[ $value[ $index_key ] ] = $value[ $field ];
-                       } else {
-                               $newlist[] = $value[ $field ];
-                       }
-               }
+/**
+ * Sorts a list of objects, based on one or more orderby arguments.
+ *
+ * @since 4.7.0
+ *
+ * @param array        $list          An array of objects to filter.
+ * @param string|array $orderby       Optional. Either the field name to order by or an array
+ *                                    of multiple orderby fields as $orderby => $order.
+ * @param string       $order         Optional. Either 'ASC' or 'DESC'. Only used if $orderby
+ *                                    is a string.
+ * @param bool         $preserve_keys Optional. Whether to preserve keys. Default false.
+ * @return array The sorted array.
+ */
+function wp_list_sort( $list, $orderby = array(), $order = 'ASC', $preserve_keys = false ) {
+       if ( ! is_array( $list ) ) {
+               return array();
        }
 
-       return $newlist;
+       $util = new WP_List_Util( $list );
+       return $util->sort( $orderby, $order, $preserve_keys );
 }
 
 /**
@@ -3748,15 +3778,19 @@ function _deprecated_function( $function, $version, $replacement = null ) {
         */
        if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
                if ( function_exists( '__' ) ) {
-                       if ( ! is_null( $replacement ) )
+                       if ( ! is_null( $replacement ) ) {
+                               /* translators: 1: PHP function name, 2: version number, 3: alternative function name */
                                trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
-                       else
+                       } else {
+                               /* translators: 1: PHP function name, 2: version number */
                                trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
+                       }
                } else {
-                       if ( ! is_null( $replacement ) )
+                       if ( ! is_null( $replacement ) ) {
                                trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $function, $version, $replacement ) );
-                       else
+                       } else {
                                trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) );
+                       }
                }
        }
 }
@@ -3872,15 +3906,19 @@ function _deprecated_file( $file, $version, $replacement = null, $message = '' )
        if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {
                $message = empty( $message ) ? '' : ' ' . $message;
                if ( function_exists( '__' ) ) {
-                       if ( ! is_null( $replacement ) )
+                       if ( ! is_null( $replacement ) ) {
+                               /* translators: 1: PHP file name, 2: version number, 3: alternative file name */
                                trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) . $message );
-                       else
+                       } else {
+                               /* translators: 1: PHP file name, 2: version number */
                                trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) . $message );
+                       }
                } else {
-                       if ( ! is_null( $replacement ) )
+                       if ( ! is_null( $replacement ) ) {
                                trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $file, $version, $replacement ) . $message );
-                       else
+                       } else {
                                trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $file, $version ) . $message );
+                       }
                }
        }
 }
@@ -3932,15 +3970,19 @@ function _deprecated_argument( $function, $version, $message = null ) {
         */
        if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
                if ( function_exists( '__' ) ) {
-                       if ( ! is_null( $message ) )
+                       if ( ! is_null( $message ) ) {
+                               /* translators: 1: PHP function name, 2: version number, 3: optional message regarding the change */
                                trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) );
-                       else
+                       } else {
+                               /* translators: 1: PHP function name, 2: version number */
                                trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
+                       }
                } else {
-                       if ( ! is_null( $message ) )
+                       if ( ! is_null( $message ) ) {
                                trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message ) );
-                       else
+                       } else {
                                trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) );
+                       }
                }
        }
 }
@@ -3988,8 +4030,10 @@ function _deprecated_hook( $hook, $version, $replacement = null, $message = null
        if ( WP_DEBUG && apply_filters( 'deprecated_hook_trigger_error', true ) ) {
                $message = empty( $message ) ? '' : ' ' . $message;
                if ( ! is_null( $replacement ) ) {
+                       /* translators: 1: WordPress hook name, 2: version number, 3: alternative hook name */
                        trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $hook, $version, $replacement ) . $message );
                } else {
+                       /* translators: 1: WordPress hook name, 2: version number */
                        trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $hook, $version ) . $message );
                }
        }
@@ -4033,14 +4077,24 @@ function _doing_it_wrong( $function, $message, $version ) {
         */
        if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
                if ( function_exists( '__' ) ) {
-                       $version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version );
+                       if ( is_null( $version ) ) {
+                               $version = '';
+                       } else {
+                               /* translators: %s: version number */
+                               $version = sprintf( __( '(This message was added in version %s.)' ), $version );
+                       }
                        /* translators: %s: Codex URL */
                        $message .= ' ' . sprintf( __( 'Please see <a href="%s">Debugging in WordPress</a> for more information.' ),
                                __( 'https://codex.wordpress.org/Debugging_in_WordPress' )
                        );
+                       /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Version information message */
                        trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
                } else {
-                       $version = is_null( $version ) ? '' : sprintf( '(This message was added in version %s.)', $version );
+                       if ( is_null( $version ) ) {
+                               $version = '';
+                       } else {
+                               $version = sprintf( '(This message was added in version %s.)', $version );
+                       }
                        $message .= sprintf( ' Please see <a href="%s">Debugging in WordPress</a> for more information.',
                                'https://codex.wordpress.org/Debugging_in_WordPress'
                        );
@@ -4283,23 +4337,18 @@ function wp_suspend_cache_invalidation( $suspend = true ) {
  *
  * @since 3.0.0
  *
- * @global object $current_site
- *
  * @param int $site_id Optional. Site ID to test. Defaults to current site.
  * @return bool True if $site_id is the main site of the network, or if not
  *              running Multisite.
  */
 function is_main_site( $site_id = null ) {
-       // This is the current network's information; 'site' is old terminology.
-       global $current_site;
-
        if ( ! is_multisite() )
                return true;
 
        if ( ! $site_id )
                $site_id = get_current_blog_id();
 
-       return (int) $site_id === (int) $current_site->blog_id;
+       return (int) $site_id === (int) get_network()->site_id;
 }
 
 /**
@@ -4315,10 +4364,8 @@ function is_main_network( $network_id = null ) {
                return true;
        }
 
-       $current_network_id = (int) get_current_site()->id;
-
        if ( null === $network_id ) {
-               $network_id = $current_network_id;
+               $network_id = get_current_network_id();
        }
 
        $network_id = (int) $network_id;
@@ -4331,31 +4378,23 @@ function is_main_network( $network_id = null ) {
  *
  * @since 4.3.0
  *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
  * @return int The ID of the main network.
  */
 function get_main_network_id() {
-       global $wpdb;
-
        if ( ! is_multisite() ) {
                return 1;
        }
 
-       $current_site = get_current_site();
+       $current_network = get_network();
 
        if ( defined( 'PRIMARY_NETWORK_ID' ) ) {
                $main_network_id = PRIMARY_NETWORK_ID;
-       } elseif ( isset( $current_site->id ) && 1 === (int) $current_site->id ) {
+       } elseif ( isset( $current_network->id ) && 1 === (int) $current_network->id ) {
                // If the current network has an ID of 1, assume it is the main network.
                $main_network_id = 1;
        } else {
-               $main_network_id = wp_cache_get( 'primary_network_id', 'site-options' );
-
-               if ( false === $main_network_id ) {
-                       $main_network_id = (int) $wpdb->get_var( "SELECT id FROM {$wpdb->site} ORDER BY id LIMIT 1" );
-                       wp_cache_add( 'primary_network_id', $main_network_id, 'site-options' );
-               }
+               $_networks = get_networks( array( 'fields' => 'ids', 'number' => 1 ) );
+               $main_network_id = array_shift( $_networks );
        }
 
        /**
@@ -4477,21 +4516,25 @@ function _wp_timezone_choice_usort_callback( $a, $b ) {
  * Gives a nicely-formatted list of timezone strings.
  *
  * @since 2.9.0
+ * @since 4.7.0 Added the `$locale` parameter.
  *
  * @staticvar bool $mo_loaded
+ * @staticvar string $locale_loaded
  *
  * @param string $selected_zone Selected timezone.
+ * @param string $locale        Optional. Locale to load the timezones in. Default current site locale.
  * @return string
  */
-function wp_timezone_choice( $selected_zone ) {
-       static $mo_loaded = false;
+function wp_timezone_choice( $selected_zone, $locale = null ) {
+       static $mo_loaded = false, $locale_loaded = null;
 
        $continents = array( 'Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific');
 
-       // Load translations for continents and cities
-       if ( !$mo_loaded ) {
-               $locale = get_locale();
-               $mofile = WP_LANG_DIR . '/continents-cities-' . $locale . '.mo';
+       // Load translations for continents and cities.
+       if ( ! $mo_loaded || $locale !== $locale_loaded ) {
+               $locale_loaded = $locale ? $locale : get_locale();
+               $mofile = WP_LANG_DIR . '/continents-cities-' . $locale_loaded . '.mo';
+               unload_textdomain( 'continents-cities' );
                load_textdomain( 'continents-cities', $mofile );
                $mo_loaded = true;
        }
@@ -4935,6 +4978,7 @@ function send_frame_options_header() {
  *
  * @since 3.3.0
  * @since 4.3.0 Added 'webcal' to the protocols array.
+ * @since 4.7.0 Added 'urn' to the protocols array.
  *
  * @see wp_kses()
  * @see esc_url()
@@ -4943,13 +4987,13 @@ function send_frame_options_header() {
  *
  * @return array Array of allowed protocols. Defaults to an array containing 'http', 'https',
  *               'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet',
- *               'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', and 'webcal'.
+ *               'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'.
  */
 function wp_allowed_protocols() {
        static $protocols = array();
 
        if ( empty( $protocols ) ) {
-               $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal' );
+               $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' );
 
                /**
                 * Filters the list of protocols allowed in HTML attributes.
@@ -5238,13 +5282,15 @@ function get_tag_regex( $tag ) {
  * @return string The canonical form of the charset.
  */
 function _canonical_charset( $charset ) {
-       if ( 'UTF-8' === $charset || 'utf-8' === $charset || 'utf8' === $charset ||
-               'UTF8' === $charset )
+       if ( 'utf-8' === strtolower( $charset ) || 'utf8' === strtolower( $charset) ) {
+
                return 'UTF-8';
+       }
+
+       if ( 'iso-8859-1' === strtolower( $charset ) || 'iso8859-1' === strtolower( $charset ) ) {
 
-       if ( 'ISO-8859-1' === $charset || 'iso-8859-1' === $charset ||
-               'iso8859-1' === $charset || 'ISO8859-1' === $charset )
                return 'ISO-8859-1';
+       }
 
        return $charset;
 }
@@ -5509,3 +5555,40 @@ function wp_raise_memory_limit( $context = 'admin' ) {
 
        return false;
 }
+
+/**
+ * Generate a random UUID (version 4).
+ *
+ * @since 4.7.0
+ *
+ * @return string UUID.
+ */
+function wp_generate_uuid4() {
+       return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
+               mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
+               mt_rand( 0, 0xffff ),
+               mt_rand( 0, 0x0fff ) | 0x4000,
+               mt_rand( 0, 0x3fff ) | 0x8000,
+               mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
+       );
+}
+
+/**
+ * Get last changed date for the specified cache group.
+ *
+ * @since 4.7.0
+ *
+ * @param $group Where the cache contents are grouped.
+ *
+ * @return string $last_changed UNIX timestamp with microseconds representing when the group was last changed.
+ */
+function wp_cache_get_last_changed( $group ) {
+       $last_changed = wp_cache_get( 'last_changed', $group );
+
+       if ( ! $last_changed ) {
+               $last_changed = microtime();
+               wp_cache_set( 'last_changed', $last_changed, $group );
+       }
+
+       return $last_changed;
+}
index 767d995d673af6c9e8191488cb517704c9a5807d..dccaaf262a954bfdc79fce428984fd2dd5699fce 100644 (file)
@@ -34,11 +34,12 @@ function wp_scripts() {
  * @param string $function Function name.
  */
 function _wp_scripts_maybe_doing_it_wrong( $function ) {
-       if ( did_action( 'init' ) ) {
+       if ( did_action( 'init' ) || did_action( 'admin_enqueue_scripts' ) || did_action( 'wp_enqueue_scripts' ) || did_action( 'login_enqueue_scripts' ) ) {
                return;
        }
 
        _doing_it_wrong( $function, sprintf(
+               /* translators: 1: wp_enqueue_scripts, 2: admin_enqueue_scripts, 3: login_enqueue_scripts */
                __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
                '<code>wp_enqueue_scripts</code>',
                '<code>admin_enqueue_scripts</code>',
@@ -224,8 +225,12 @@ 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>' );
+                       $message = sprintf(
+                               /* translators: 1: script name, 2: wp_enqueue_scripts */
+                               __( '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.0' );
                        return;
                }
@@ -247,6 +252,7 @@ function wp_deregister_script( $handle ) {
  *
  * @param string           $handle    Name of the script. Should be unique.
  * @param string           $src       Full URL of the script, or path of the script relative to the WordPress root directory.
+ *                                    Default empty.
  * @param array            $deps      Optional. An array of registered script handles this script depends on. Default empty array.
  * @param string|bool|null $ver       Optional. String specifying script version number, if it has one, which is added to the URL
  *                                    as a query string for cache busting purposes. If version is set to false, a version
@@ -255,7 +261,7 @@ function wp_deregister_script( $handle ) {
  * @param bool             $in_footer Optional. Whether to enqueue the script before </body> instead of in the <head>.
  *                                    Default 'false'.
  */
-function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) {
+function wp_enqueue_script( $handle, $src = '', $deps = array(), $ver = false, $in_footer = false ) {
        $wp_scripts = wp_scripts();
 
        _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
index 5312f8233098bd40937970a97f04cf06944ad35b..db2603a9389ba5dad0295019591cd681ef60d58a 100644 (file)
@@ -151,6 +151,7 @@ function wp_deregister_style( $handle ) {
  *
  * @param string           $handle Name of the stylesheet. Should be unique.
  * @param string           $src    Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
+ *                                 Default empty.
  * @param array            $deps   Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array.
  * @param string|bool|null $ver    Optional. String specifying stylesheet version number, if it has one, which is added to the URL
  *                                 as a query string for cache busting purposes. If version is set to false, a version
@@ -160,7 +161,7 @@ function wp_deregister_style( $handle ) {
  *                                 Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
  *                                 '(orientation: portrait)' and '(max-width: 640px)'.
  */
-function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
+function wp_enqueue_style( $handle, $src = '', $deps = array(), $ver = false, $media = 'all' ) {
        _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
 
        $wp_styles = wp_styles();
index a5d5ea7dbaa74a10b99ce817a2681443724d0049..ed91e5bd176a8f20b1bd3ae5d6e88201eed8cfe3 100644 (file)
@@ -30,7 +30,7 @@ function get_header( $name = null ) {
         * @since 2.1.0
         * @since 2.8.0 $name parameter added.
         *
-        * @param string $name Name of the specific header file to use.
+        * @param string|null $name Name of the specific header file to use. null for the default header.
         */
        do_action( 'get_header', $name );
 
@@ -69,7 +69,7 @@ function get_footer( $name = null ) {
         * @since 2.1.0
         * @since 2.8.0 $name parameter added.
         *
-        * @param string $name Name of the specific footer file to use.
+        * @param string|null $name Name of the specific footer file to use. null for the default footer.
         */
        do_action( 'get_footer', $name );
 
@@ -108,7 +108,7 @@ function get_sidebar( $name = null ) {
         * @since 2.2.0
         * @since 2.8.0 $name parameter added.
         *
-        * @param string $name Name of the specific sidebar file to use.
+        * @param string|null $name Name of the specific sidebar file to use. null for the default sidebar.
         */
        do_action( 'get_sidebar', $name );
 
@@ -152,8 +152,8 @@ function get_template_part( $slug, $name = null ) {
         *
         * @since 3.0.0
         *
-        * @param string $slug The slug name for the generic template.
-        * @param string $name The name of the specialized template.
+        * @param string      $slug The slug name for the generic template.
+        * @param string|null $name The name of the specialized template.
         */
        do_action( "get_template_part_{$slug}", $slug, $name );
 
@@ -383,7 +383,7 @@ function wp_registration_url() {
  *     @type string $redirect       URL to redirect to. Must be absolute, as in "https://example.com/mypage/".
  *                                  Default is to redirect back to the request URI.
  *     @type string $form_id        ID attribute value for the form. Default 'loginform'.
- *     @type string $label_username Label for the username or email address field. Default 'Username or Email'.
+ *     @type string $label_username Label for the username or email address field. Default 'Username or Email Address'.
  *     @type string $label_password Label for the password field. Default 'Password'.
  *     @type string $label_remember Label for the remember field. Default 'Remember Me'.
  *     @type string $label_log_in   Label for the submit button. Default 'Log In'.
@@ -405,7 +405,7 @@ function wp_login_form( $args = array() ) {
                // Default 'redirect' value takes the user back to the request URI.
                'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'],
                'form_id' => 'loginform',
-               'label_username' => __( 'Username or Email' ),
+               'label_username' => __( 'Username or Email Address' ),
                'label_password' => __( 'Password' ),
                'label_remember' => __( 'Remember Me' ),
                'label_log_in' => __( 'Log In' ),
@@ -481,7 +481,7 @@ function wp_login_form( $args = array() ) {
                        ' . $login_form_middle . '
                        ' . ( $args['remember'] ? '<p class="login-remember"><label><input name="rememberme" type="checkbox" id="' . esc_attr( $args['id_remember'] ) . '" value="forever"' . ( $args['value_remember'] ? ' checked="checked"' : '' ) . ' /> ' . esc_html( $args['label_remember'] ) . '</label></p>' : '' ) . '
                        <p class="login-submit">
-                               <input type="submit" name="wp-submit" id="' . esc_attr( $args['id_submit'] ) . '" class="button-primary" value="' . esc_attr( $args['label_log_in'] ) . '" />
+                               <input type="submit" name="wp-submit" id="' . esc_attr( $args['id_submit'] ) . '" class="button button-primary" value="' . esc_attr( $args['label_log_in'] ) . '" />
                                <input type="hidden" name="redirect_to" value="' . esc_url( $args['redirect'] ) . '" />
                        </p>
                        ' . $login_form_bottom . '
@@ -783,8 +783,11 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
  * @return string Site Icon URL.
  */
 function get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) {
-       if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) {
+       $switched_blog = false;
+
+       if ( is_multisite() && ! empty( $blog_id ) && (int) $blog_id !== get_current_blog_id() ) {
                switch_to_blog( $blog_id );
+               $switched_blog = true;
        }
 
        $site_icon_id = get_option( 'site_icon' );
@@ -798,7 +801,7 @@ function get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) {
                $url = wp_get_attachment_image_url( $site_icon_id, $size_data );
        }
 
-       if ( is_multisite() && ms_is_switched() ) {
+       if ( $switched_blog ) {
                restore_current_blog();
        }
 
@@ -848,13 +851,16 @@ function has_site_icon( $blog_id = 0 ) {
  * @return bool Whether the site has a custom logo or not.
  */
 function has_custom_logo( $blog_id = 0 ) {
-       if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) {
+       $switched_blog = false;
+
+       if ( is_multisite() && ! empty( $blog_id ) && (int) $blog_id !== get_current_blog_id() ) {
                switch_to_blog( $blog_id );
+               $switched_blog = true;
        }
 
        $custom_logo_id = get_theme_mod( 'custom_logo' );
 
-       if ( is_multisite() && ms_is_switched() ) {
+       if ( $switched_blog ) {
                restore_current_blog();
        }
 
@@ -871,9 +877,11 @@ function has_custom_logo( $blog_id = 0 ) {
  */
 function get_custom_logo( $blog_id = 0 ) {
        $html = '';
+       $switched_blog = false;
 
-       if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) {
+       if ( is_multisite() && ! empty( $blog_id ) && (int) $blog_id !== get_current_blog_id() ) {
                switch_to_blog( $blog_id );
+               $switched_blog = true;
        }
 
        $custom_logo_id = get_theme_mod( 'custom_logo' );
@@ -896,7 +904,7 @@ function get_custom_logo( $blog_id = 0 ) {
                );
        }
 
-       if ( is_multisite() && ms_is_switched() ) {
+       if ( $switched_blog ) {
                restore_current_blog();
        }
 
@@ -1453,16 +1461,22 @@ function the_archive_title( $before = '', $after = '' ) {
  */
 function get_the_archive_title() {
        if ( is_category() ) {
+               /* translators: Category archive title. 1: Category name */
                $title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) );
        } elseif ( is_tag() ) {
+               /* translators: Tag archive title. 1: Tag name */
                $title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) );
        } elseif ( is_author() ) {
+               /* translators: Author archive title. 1: Author name */
                $title = sprintf( __( 'Author: %s' ), '<span class="vcard">' . get_the_author() . '</span>' );
        } elseif ( is_year() ) {
+               /* translators: Yearly archive title. 1: Year */
                $title = sprintf( __( 'Year: %s' ), get_the_date( _x( 'Y', 'yearly archives date format' ) ) );
        } elseif ( is_month() ) {
+               /* translators: Monthly archive title. 1: Month name and year */
                $title = sprintf( __( 'Month: %s' ), get_the_date( _x( 'F Y', 'monthly archives date format' ) ) );
        } elseif ( is_day() ) {
+               /* translators: Daily archive title. 1: Date */
                $title = sprintf( __( 'Day: %s' ), get_the_date( _x( 'F j, Y', 'daily archives date format' ) ) );
        } elseif ( is_tax( 'post_format' ) ) {
                if ( is_tax( 'post_format', 'post-format-aside' ) ) {
@@ -1485,10 +1499,11 @@ function get_the_archive_title() {
                        $title = _x( 'Chats', 'post format archive title' );
                }
        } elseif ( is_post_type_archive() ) {
+               /* translators: Post type archive title. 1: Post type name */
                $title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) );
        } elseif ( is_tax() ) {
                $tax = get_taxonomy( get_queried_object()->taxonomy );
-               /* translators: 1: Taxonomy singular name, 2: Current taxonomy term */
+               /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term */
                $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) );
        } else {
                $title = __( 'Archives' );
@@ -1505,7 +1520,7 @@ function get_the_archive_title() {
 }
 
 /**
- * Display category, tag, or term description.
+ * Display category, tag, term, or author description.
  *
  * @since 4.1.0
  *
@@ -1522,23 +1537,30 @@ function the_archive_description( $before = '', $after = '' ) {
 }
 
 /**
- * Retrieve category, tag, or term description.
+ * Retrieve category, tag, term, or author description.
  *
  * @since 4.1.0
+ * @since 4.7.0 Added support for author archives.
+ *
+ * @see term_description()
  *
  * @return string Archive description.
  */
 function get_the_archive_description() {
+       if ( is_author() ) {
+               $description = get_the_author_meta( 'description' );
+       } else {
+               $description = term_description();
+       }
+
        /**
         * Filters the archive description.
         *
         * @since 4.1.0
         *
-        * @see term_description()
-        *
         * @param string $description Archive description to be displayed.
         */
-       return apply_filters( 'get_the_archive_description', term_description() );
+       return apply_filters( 'get_the_archive_description', $description );
 }
 
 /**
@@ -1698,11 +1720,7 @@ function wp_get_archives( $args = '' ) {
 
        $output = '';
 
-       $last_changed = wp_cache_get( 'last_changed', 'posts' );
-       if ( ! $last_changed ) {
-               $last_changed = microtime();
-               wp_cache_set( 'last_changed', $last_changed, 'posts' );
-       }
+       $last_changed = wp_cache_get_last_changed( 'posts' );
 
        $limit = $r['limit'];
 
@@ -2040,6 +2058,7 @@ function get_calendar( $initial = true, $echo = true ) {
                if ( in_array( $day, $daywithpost ) ) {
                        // any posts today?
                        $date_format = date( _x( 'F j, Y', 'daily archives date format' ), strtotime( "{$thisyear}-{$thismonth}-{$day}" ) );
+                       /* translators: Post calendar label. 1: Date */
                        $label = sprintf( __( 'Posts published on %s' ), $date_format );
                        $calendar_output .= sprintf(
                                '<a href="%s" aria-label="%s">%s</a>',
@@ -2765,12 +2784,26 @@ function wp_site_icon() {
                return;
        }
 
-       $meta_tags = array(
-               sprintf( '<link rel="icon" href="%s" sizes="32x32" />', esc_url( get_site_icon_url( 32 ) ) ),
-               sprintf( '<link rel="icon" href="%s" sizes="192x192" />', esc_url( get_site_icon_url( 192 ) ) ),
-               sprintf( '<link rel="apple-touch-icon-precomposed" href="%s" />', esc_url( get_site_icon_url( 180 ) ) ),
-               sprintf( '<meta name="msapplication-TileImage" content="%s" />', esc_url( get_site_icon_url( 270 ) ) ),
-       );
+       $meta_tags = array();
+       $icon_32 = get_site_icon_url( 32 );
+       if ( empty( $icon_32 ) && is_customize_preview() ) {
+               $icon_32 = '/favicon.ico'; // Serve default favicon URL in customizer so element can be updated for preview.
+       }
+       if ( $icon_32 ) {
+               $meta_tags[] = sprintf( '<link rel="icon" href="%s" sizes="32x32" />', esc_url( $icon_32 ) );
+       }
+       $icon_192 = get_site_icon_url( 192 );
+       if ( $icon_192 ) {
+               $meta_tags[] = sprintf( '<link rel="icon" href="%s" sizes="192x192" />', esc_url( $icon_192 ) );
+       }
+       $icon_180 = get_site_icon_url( 180 );
+       if ( $icon_180 ) {
+               $meta_tags[] = sprintf( '<link rel="apple-touch-icon-precomposed" href="%s" />', esc_url( $icon_180 ) );
+       }
+       $icon_270 = get_site_icon_url( 270 );
+       if ( $icon_270 ) {
+               $meta_tags[] = sprintf( '<meta name="msapplication-TileImage" content="%s" />', esc_url( $icon_270 ) );
+       }
 
        /**
         * Filters the site icon meta tags, so Plugins can add their own.
@@ -2812,9 +2845,11 @@ function wp_resource_hints() {
         * 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/' );
+       $hints['dns-prefetch'][] = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2.2.1/svg/' );
 
        foreach ( $hints as $relation_type => $urls ) {
+               $unique_urls = array();
+
                /**
                 * Filters domains and URLs for resource hints of relation type.
                 *
@@ -2826,16 +2861,31 @@ function wp_resource_hints() {
                $urls = apply_filters( 'wp_resource_hints', $urls, $relation_type );
 
                foreach ( $urls as $key => $url ) {
+                       $atts = array();
+
+                       if ( is_array( $url ) ) {
+                               if ( isset( $url['href'] ) ) {
+                                       $atts = $url;
+                                       $url  = $url['href'];
+                               } else {
+                                       continue;
+                               }
+                       }
+
                        $url = esc_url( $url, array( 'http', 'https' ) );
+
                        if ( ! $url ) {
-                               unset( $urls[ $key ] );
+                               continue;
+                       }
+
+                       if ( isset( $unique_urls[ $url ] ) ) {
                                continue;
                        }
 
                        if ( in_array( $relation_type, array( 'preconnect', 'dns-prefetch' ) ) ) {
                                $parsed = wp_parse_url( $url );
+
                                if ( empty( $parsed['host'] ) ) {
-                                       unset( $urls[ $key ] );
                                        continue;
                                }
 
@@ -2847,13 +2897,34 @@ function wp_resource_hints() {
                                }
                        }
 
-                       $urls[ $key ] = $url;
+                       $atts['rel'] = $relation_type;
+                       $atts['href'] = $url;
+
+                       $unique_urls[ $url ] = $atts;
                }
 
-               $urls = array_unique( $urls );
+               foreach ( $unique_urls as $atts ) {
+                       $html = '';
+
+                       foreach ( $atts as $attr => $value ) {
+                               if ( ! is_scalar( $value ) ||
+                                    ( ! in_array( $attr, array( 'as', 'crossorigin', 'href', 'pr', 'rel', 'type' ), true ) && ! is_numeric( $attr ))
+                               ) {
+                                       continue;
+                               }
+
+                               $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
+
+                               if ( ! is_string( $attr ) ) {
+                                       $html .= " $value";
+                               } else {
+                                       $html .= " $attr='$value'";
+                               }
+                       }
+
+                       $html = trim( $html );
 
-               foreach ( $urls as $url ) {
-                       printf( "<link rel='%s' href='%s' />\n", $relation_type, $url );
+                       echo "<link $html />\n";
                }
        }
 }
@@ -2892,21 +2963,21 @@ function wp_dependencies_unique_hosts() {
 }
 
 /**
- * Whether the user should have a WYSIWIG editor.
+ * Whether the user can access the visual editor.
  *
- * Checks that the user requires a WYSIWIG editor and that the editor is
- * supported in the users browser.
+ * Checks if the user can access the visual editor and that it's supported by the user's browser.
  *
  * @since 2.0.0
  *
- * @global bool $wp_rich_edit
- * @global bool $is_gecko
- * @global bool $is_opera
- * @global bool $is_safari
- * @global bool $is_chrome
- * @global bool $is_IE
+ * @global bool $wp_rich_edit Whether the user can access the visual editor.
+ * @global bool $is_gecko     Whether the browser is Gecko-based.
+ * @global bool $is_opera     Whether the browser is Opera.
+ * @global bool $is_safari    Whether the browser is Safari.
+ * @global bool $is_chrome    Whether the browser is Chrome.
+ * @global bool $is_IE        Whether the browser is Internet Explorer.
+ * @global bool $is_edge      Whether the browser is Microsoft Edge.
  *
- * @return bool
+ * @return bool True if the user can access the visual editor, false otherwise.
  */
 function user_can_richedit() {
        global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE, $is_edge;
@@ -2924,11 +2995,11 @@ function user_can_richedit() {
        }
 
        /**
-        * Filters whether the user can access the rich (Visual) editor.
+        * Filters whether the user can access the visual editor.
         *
         * @since 2.1.0
         *
-        * @param bool $wp_rich_edit Whether the user can access to the rich (Visual) editor.
+        * @param bool $wp_rich_edit Whether the user can access the visual editor.
         */
        return apply_filters( 'user_can_richedit', $wp_rich_edit );
 }
@@ -2955,7 +3026,7 @@ function wp_default_editor() {
         *
         * @since 2.5.0
         *
-        * @param array $r An array of editors. Accepts 'tinymce', 'html', 'test'.
+        * @param string $r Which editor should be displayed by default. Either 'tinymce', 'html', or 'test'.
         */
        return apply_filters( 'wp_default_editor', $r );
 }
@@ -2982,7 +3053,6 @@ function wp_default_editor() {
 function wp_editor( $content, $editor_id, $settings = array() ) {
        if ( ! class_exists( '_WP_Editors', false ) )
                require( ABSPATH . WPINC . '/class-wp-editor.php' );
-
        _WP_Editors::editor($content, $editor_id, $settings);
 }
 
@@ -3149,8 +3219,8 @@ function language_attributes( $doctype = 'html' ) {
  *                                      Default 1.
  *     @type int    $mid_size           How many numbers to either side of the current pages. Default 2.
  *     @type bool   $prev_next          Whether to include the previous and next links in the list. Default true.
- *     @type bool   $prev_text          The previous page text. Default '« Previous'.
- *     @type bool   $next_text          The next page text. Default '« Previous'.
+ *     @type bool   $prev_text          The previous page text. Default '&laquo; Previous'.
+ *     @type bool   $next_text          The next page text. Default 'Next &raquo;'.
  *     @type string $type               Controls format of the returned value. Possible values are 'plain',
  *                                      'array' and 'list'. Default is 'plain'.
  *     @type array  $add_args           An array of query args to add. Default false.
@@ -3276,7 +3346,7 @@ function paginate_links( $args = '' ) {
                        endif;
                endif;
        endfor;
-       if ( $args['prev_next'] && $current && ( $current < $total || -1 == $total ) ) :
+       if ( $args['prev_next'] && $current && $current < $total ) :
                $link = str_replace( '%_%', $args['format'], $args['base'] );
                $link = str_replace( '%#%', $current + 1, $link );
                if ( $add_args )
@@ -3347,8 +3417,6 @@ function wp_admin_css_color( $key, $name, $url, $colors = array(), $icons = arra
  * Registers the default Admin color schemes
  *
  * @since 3.0.0
- *
- * @global string $wp_version
  */
 function register_admin_color_schemes() {
        $suffix = is_rtl() ? '-rtl' : '';
@@ -3361,8 +3429,9 @@ function register_admin_color_schemes() {
        );
 
        // Other color schemes are not available when running out of src
-       if ( false !== strpos( $GLOBALS['wp_version'], '-src' ) )
+       if ( false !== strpos( get_bloginfo( 'version' ), '-src' ) ) {
                return;
+       }
 
        wp_admin_css_color( 'light', _x( 'Light', 'admin color scheme' ),
                admin_url( "css/colors/light/colors$suffix.css" ),
index 130eae3c37ccbd8b167afd021683cf3e14e37d58..862e456ae375a55a36a2383574dc1c0ddc65df74 100644 (file)
@@ -208,9 +208,12 @@ function wp_remote_head($url, $args = array()) {
  * Retrieve only the headers from the raw response.
  *
  * @since 2.7.0
+ * @since 4.6.0 Return value changed from an array to an Requests_Utility_CaseInsensitiveDictionary instance.
+ *
+ * @see \Requests_Utility_CaseInsensitiveDictionary
  *
  * @param array $response HTTP response.
- * @return array The headers of the response. Empty array if incorrect parameter given.
+ * @return array|\Requests_Utility_CaseInsensitiveDictionary 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'] ) ) {
@@ -614,7 +617,7 @@ function ms_allowed_http_request_hosts( $is_external, $host ) {
        static $queried = array();
        if ( $is_external )
                return $is_external;
-       if ( $host === get_current_site()->domain )
+       if ( $host === get_network()->domain )
                return true;
        if ( isset( $queried[ $host ] ) )
                return $queried[ $host ];
@@ -623,47 +626,118 @@ function ms_allowed_http_request_hosts( $is_external, $host ) {
 }
 
 /**
- * A wrapper for PHP's parse_url() function that handles edgecases in < PHP 5.4.7
+ * A wrapper for PHP's parse_url() function that handles consistency in the return
+ * values across PHP versions.
  *
  * PHP 5.4.7 expanded parse_url()'s ability to handle non-absolute url's, including
- * schemeless and relative url's with :// in the path, this works around those
- * limitations providing a standard output on PHP 5.2~5.4+.
+ * schemeless and relative url's with :// in the path. This function works around
+ * those limitations providing a standard output on PHP 5.2~5.4+.
+ *
+ * Secondly, across various PHP versions, schemeless URLs starting containing a ":"
+ * in the query are being handled inconsistently. This function works around those
+ * differences as well.
  *
  * Error suppression is used as prior to PHP 5.3.3, an E_WARNING would be generated
  * when URL parsing failed.
  *
  * @since 4.4.0
- *
- * @param string $url The URL to parse.
- * @return bool|array False on failure; Array of URL components on success;
- *                    See parse_url()'s return values.
+ * @since 4.7.0 The $component parameter was added for parity with PHP's parse_url().
+ *
+ * @param string $url       The URL to parse.
+ * @param int    $component The specific component to retrieve. Use one of the PHP
+ *                          predefined constants to specify which one.
+ *                          Defaults to -1 (= return all parts as an array).
+ *                          @see http://php.net/manual/en/function.parse-url.php
+ * @return mixed False on parse failure; Array of URL components on success;
+ *               When a specific component has been requested: null if the component
+ *               doesn't exist in the given URL; a sting or - in the case of
+ *               PHP_URL_PORT - integer when it does. See parse_url()'s return values.
  */
-function wp_parse_url( $url ) {
+function wp_parse_url( $url, $component = -1 ) {
+       $to_unset = array();
+       $url = strval( $url );
+
+       if ( '//' === substr( $url, 0, 2 ) ) {
+               $to_unset[] = 'scheme';
+               $url = 'placeholder:' . $url;
+       } elseif ( '/' === substr( $url, 0, 1 ) ) {
+               $to_unset[] = 'scheme';
+               $to_unset[] = 'host';
+               $url = 'placeholder://placeholder' . $url;
+       }
+
        $parts = @parse_url( $url );
-       if ( ! $parts ) {
-               // < PHP 5.4.7 compat, trouble with relative paths including a scheme break in the path
-               if ( '/' == $url[0] && false !== strpos( $url, '://' ) ) {
-                       // Since we know it's a relative path, prefix with a scheme/host placeholder and try again
-                       if ( ! $parts = @parse_url( 'placeholder://placeholder' . $url ) ) {
-                               return $parts;
-                       }
-                       // Remove the placeholder values
-                       unset( $parts['scheme'], $parts['host'] );
-               } else {
-                       return $parts;
-               }
+
+       if ( false === $parts ) {
+               // Parsing failure.
+               return $parts;
        }
 
-       // < PHP 5.4.7 compat, doesn't detect schemeless URL's host field
-       if ( '//' == substr( $url, 0, 2 ) && ! isset( $parts['host'] ) ) {
-               $path_parts = explode( '/', substr( $parts['path'], 2 ), 2 );
-               $parts['host'] = $path_parts[0];
-               if ( isset( $path_parts[1] ) ) {
-                       $parts['path'] = '/' . $path_parts[1];
-               } else {
-                       unset( $parts['path'] );
-               }
+       // Remove the placeholder values.
+       foreach ( $to_unset as $key ) {
+               unset( $parts[ $key ] );
        }
 
-       return $parts;
+       return _get_component_from_parsed_url_array( $parts, $component );
+}
+
+/**
+ * Retrieve a specific component from a parsed URL array.
+ *
+ * @internal
+ *
+ * @since 4.7.0
+ *
+ * @param array|false $url_parts The parsed URL. Can be false if the URL failed to parse.
+ * @param int    $component The specific component to retrieve. Use one of the PHP
+ *                          predefined constants to specify which one.
+ *                          Defaults to -1 (= return all parts as an array).
+ *                          @see http://php.net/manual/en/function.parse-url.php
+ * @return mixed False on parse failure; Array of URL components on success;
+ *               When a specific component has been requested: null if the component
+ *               doesn't exist in the given URL; a sting or - in the case of
+ *               PHP_URL_PORT - integer when it does. See parse_url()'s return values.
+ */
+function _get_component_from_parsed_url_array( $url_parts, $component = -1 ) {
+       if ( -1 === $component ) {
+               return $url_parts;
+       }
+
+       $key = _wp_translate_php_url_constant_to_key( $component );
+       if ( false !== $key && is_array( $url_parts ) && isset( $url_parts[ $key ] ) ) {
+               return $url_parts[ $key ];
+       } else {
+               return null;
+       }
+}
+
+/**
+ * Translate a PHP_URL_* constant to the named array keys PHP uses.
+ *
+ * @internal
+ *
+ * @since 4.7.0
+ *
+ * @see   http://php.net/manual/en/url.constants.php
+ *
+ * @param int $constant PHP_URL_* constant.
+ * @return string|bool The named key or false.
+ */
+function _wp_translate_php_url_constant_to_key( $constant ) {
+       $translation = array(
+               PHP_URL_SCHEME   => 'scheme',
+               PHP_URL_HOST     => 'host',
+               PHP_URL_PORT     => 'port',
+               PHP_URL_USER     => 'user',
+               PHP_URL_PASS     => 'pass',
+               PHP_URL_PATH     => 'path',
+               PHP_URL_QUERY    => 'query',
+               PHP_URL_FRAGMENT => 'fragment',
+       );
+
+       if ( isset( $translation[ $constant ] ) ) {
+               return $translation[ $constant ];
+       } else {
+               return false;
+       }
 }
index b5a8c6c0e66f7a8fa7ff25a350b23aaa3f82df49..e88943d6d482dbc76f1278cec552c2ca5c1caafb 100644 (file)
@@ -315,7 +315,8 @@ window.autosave = function() {
                                var content, post_title, excerpt, $notice,
                                        postData = getSavedPostData(),
                                        cookie = wpCookies.get( 'wp-saving-post' ),
-                                       $newerAutosaveNotice = $( '#has-newer-autosave' ).parent( '.notice' );
+                                       $newerAutosaveNotice = $( '#has-newer-autosave' ).parent( '.notice' ),
+                                       $headerEnd = $( '.wp-header-end' );
 
                                if ( cookie === post_id + '-saved' ) {
                                        wpCookies.remove( 'wp-saving-post' );
@@ -338,8 +339,16 @@ window.autosave = function() {
                                        return;
                                }
 
+                               /*
+                                * If '.wp-header-end' is found, append the notices after it otherwise
+                                * after the first h1 or h2 heading found within the main content.
+                                */
+                               if ( ! $headerEnd.length ) {
+                                       $headerEnd = $( '.wrap h1, .wrap h2' ).first();
+                               }
+
                                $notice = $( '#local-storage-notice' )
-                                       .insertAfter( $( '.wrap h1, .wrap h2' ).first() )
+                                       .insertAfter( $headerEnd )
                                        .addClass( 'notice-warning' );
 
                                if ( $newerAutosaveNotice.length ) {
index f4a01657e1dc9b114c8c9e3742b62d5138b75883..f88edf4bf3f96f1e4a7c10356cc48bf4f9f36d19 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(),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
+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"),j=a(".wp-header-end");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)||(j.length||(j=a(".wrap h1, .wrap h2").first()),e=a("#local-storage-notice").insertAfter(j).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 e59f926594e3a02869746279e0974bfa30e6ff28..a1528de4ff20d414155a1a03390d1ea422dc4f1f 100644 (file)
@@ -165,7 +165,7 @@ window.wp = window.wp || {};
        /**
         * Observable values that support two-way binding.
         *
-        * @constuctor
+        * @constructor
         */
        api.Value = api.Class.extend({
                /**
@@ -304,7 +304,7 @@ window.wp = window.wp || {};
        /**
         * A collection of observable values.
         *
-        * @constuctor
+        * @constructor
         * @augments wp.customize.Class
         * @mixes wp.customize.Events
         */
@@ -520,7 +520,7 @@ window.wp = window.wp || {};
         *
         * Handles inputs, selects, and textareas by default.
         *
-        * @constuctor
+        * @constructor
         * @augments wp.customize.Value
         * @augments wp.customize.Class
         */
@@ -617,7 +617,7 @@ window.wp = window.wp || {};
        /**
         * A communicator for sending data from one window to another over postMessage.
         *
-        * @constuctor
+        * @constructor
         * @augments wp.customize.Class
         * @mixes wp.customize.Events
         */
@@ -637,22 +637,25 @@ window.wp = window.wp || {};
                /**
                 * Initialize Messenger.
                 *
-                * @param  {object} params        Parameters to configure the messenger.
-                *         {string} .url          The URL to communicate with.
-                *         {window} .targetWindow The window instance to communicate with. Default window.parent.
-                *         {string} .channel      If provided, will send the channel with each message and only accept messages a matching channel.
-                * @param  {object} options       Extend any instance parameter or method with this object.
+                * @param  {object} params - Parameters to configure the messenger.
+                *         {string} params.url - The URL to communicate with.
+                *         {window} params.targetWindow - The window instance to communicate with. Default window.parent.
+                *         {string} params.channel - If provided, will send the channel with each message and only accept messages a matching channel.
+                * @param  {object} options - Extend any instance parameter or method with this object.
                 */
                initialize: function( params, options ) {
                        // Target the parent frame by default, but only if a parent frame exists.
-                       var defaultTarget = window.parent == window ? null : window.parent;
+                       var defaultTarget = window.parent === window ? null : window.parent;
 
                        $.extend( this, options || {} );
 
                        this.add( 'channel', params.channel );
                        this.add( 'url', params.url || '' );
                        this.add( 'origin', this.url() ).link( this.url ).setter( function( to ) {
-                               return to.replace( /([^:]+:\/\/[^\/]+).*/, '$1' );
+                               var urlParser = document.createElement( 'a' );
+                               urlParser.href = to;
+                               // Port stripping needed by IE since it adds to host but not to event.origin.
+                               return urlParser.protocol + '//' + urlParser.host.replace( /:80$/, '' );
                        });
 
                        // first add with no value
@@ -762,18 +765,30 @@ window.wp = window.wp || {};
         * @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.
+        * @param {string}  code - The error code.
+        * @param {object}  params - Params.
+        * @param {string}  params.message=null - The error message.
+        * @param {string}  [params.type=error] - The notification type.
+        * @param {boolean} [params.fromServer=false] - Whether the notification was server-sent.
+        * @param {string}  [params.setting=null] - The setting ID that the notification is related to.
+        * @param {*}       [params.data=null] - Any additional data.
         */
        api.Notification = api.Class.extend({
                initialize: function( code, params ) {
+                       var _params;
                        this.code = code;
-                       this.message = params.message;
-                       this.type = params.type || 'error';
-                       this.data = params.data || null;
+                       _params = _.extend(
+                               {
+                                       message: null,
+                                       type: 'error',
+                                       fromServer: false,
+                                       data: null,
+                                       setting: null
+                               },
+                               params
+                       );
+                       delete _params.code;
+                       _.extend( this, _params );
                }
        });
 
@@ -795,6 +810,40 @@ window.wp = window.wp || {};
                return result;
        };
 
+       /**
+        * Utility function namespace
+        */
+       api.utils = {};
+
+       /**
+        * Parse query string.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param {string} queryString Query string.
+        * @returns {object} Parsed query string.
+        */
+       api.utils.parseQueryString = function parseQueryString( queryString ) {
+               var queryParams = {};
+               _.each( queryString.split( '&' ), function( pair ) {
+                       var parts, key, value;
+                       parts = pair.split( '=', 2 );
+                       if ( ! parts[0] ) {
+                               return;
+                       }
+                       key = decodeURIComponent( parts[0].replace( /\+/g, ' ' ) );
+                       key = key.replace( / /g, '_' ); // What PHP does.
+                       if ( _.isUndefined( parts[1] ) ) {
+                               value = null;
+                       } else {
+                               value = decodeURIComponent( parts[1].replace( /\+/g, ' ' ) );
+                       }
+                       queryParams[ key ] = value;
+               } );
+               return queryParams;
+       };
+
        // Expose the API publicly on window.wp.customize
        exports.customize = api;
 })( wp, jQuery );
index ba6e4acb175445848bd41881679310149c11ef25..0a2ce9ff043f36b8203a849add86ecf3c586d00f 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){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
+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){var b=document.createElement("a");return b.href=a,b.protocol+"//"+b.host.replace(/:80$/,"")}),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){var c;this.code=a,c=_.extend({message:null,type:"error",fromServer:!1,data:null,setting:null},b),delete c.code,_.extend(this,c)}}),e=b.extend(new e.Values,e),e.get=function(){var a={};return this.each(function(b,c){a[c]=b.get()}),a},e.utils={},e.utils.parseQueryString=function(a){var b={};return _.each(a.split("&"),function(a){var c,d,e;c=a.split("=",2),c[0]&&(d=decodeURIComponent(c[0].replace(/\+/g," ")),d=d.replace(/ /g,"_"),e=_.isUndefined(c[1])?null:decodeURIComponent(c[1].replace(/\+/g," ")),b[d]=e)}),b},a.customize=e}(wp,jQuery);
\ No newline at end of file
index e7b411df308a0064a90d22d5ae6fa7be86223863..1990d1a24dc8f20f76bff8d13a0d6476e06bab84 100644 (file)
@@ -132,6 +132,19 @@ window.wp = window.wp || {};
                                targetWindow: this.iframe[0].contentWindow
                        });
 
+                       // Expose the changeset UUID on the parent window's URL so that the customized state can survive a refresh.
+                       if ( history.replaceState ) {
+                               this.messenger.bind( 'changeset-uuid', function( changesetUuid ) {
+                                       var urlParser = document.createElement( 'a' );
+                                       urlParser.href = location.href;
+                                       urlParser.search = $.param( _.extend(
+                                               api.utils.parseQueryString( urlParser.search.substr( 1 ) ),
+                                               { changeset_uuid: changesetUuid }
+                                       ) );
+                                       history.replaceState( { customize: urlParser.href }, '', urlParser.href );
+                               } );
+                       }
+
                        // Wait for the connection from the iframe before sending any postMessage events.
                        this.messenger.bind( 'ready', function() {
                                Loader.messenger.send( 'back' );
@@ -183,11 +196,11 @@ window.wp = window.wp || {};
                 * Callback after the Customizer has been opened.
                 */
                opened: function() {
-                       Loader.body.addClass( 'customize-active full-overlay-active' );
+                       Loader.body.addClass( 'customize-active full-overlay-active' ).attr( 'aria-busy', 'true' );
                },
 
                /**
-                * Close the Customizer overlay and return focus to the link that opened it.
+                * Close the Customizer overlay.
                 */
                close: function() {
                        if ( ! this.active ) {
@@ -209,11 +222,6 @@ window.wp = window.wp || {};
                        if ( this.originalDocumentTitle ) {
                                document.title = this.originalDocumentTitle;
                        }
-
-                       // Return focus to link that was originally clicked.
-                       if ( this.link ) {
-                               this.link.focus();
-                       }
                },
 
                /**
@@ -227,13 +235,20 @@ window.wp = window.wp || {};
                        Loader.saved     = null;
                        Loader.body.removeClass( 'customize-active full-overlay-active' ).removeClass( 'customize-loading' );
                        $( window ).off( 'beforeunload', Loader.beforeunload );
+                       /*
+                        * Return focus to the link that opened the Customizer overlay after
+                        * the body element visibility is restored.
+                        */
+                       if ( Loader.link ) {
+                               Loader.link.focus();
+                       }
                },
 
                /**
                 * Callback for the `load` event on the Customizer iframe.
                 */
                loaded: function() {
-                       Loader.body.removeClass('customize-loading');
+                       Loader.body.removeClass( 'customize-loading' ).attr( 'aria-busy', 'false' );
                },
 
                /**
index c4a05134c7ef43f8fb53bb3cc077948a89c826d8..1f09e05a28a285b9037aed5682dfd35e5621ddcb 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(){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
+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}),history.replaceState&&this.messenger.bind("changeset-uuid",function(a){var c=document.createElement("a");c.href=location.href,c.search=b.param(_.extend(d.utils.parseQueryString(c.search.substr(1)),{changeset_uuid:a})),history.replaceState({customize:c.href},"",c.href)}),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").attr("aria-busy","true")},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)}},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),c.link&&c.link.focus()},loaded:function(){c.body.removeClass("customize-loading").attr("aria-busy","false")},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 bd42f5e0817e38878cc468bca393671cda4bfbde..27c525107bcf31044f4cf411bba5d6992082b179 100644 (file)
@@ -15,7 +15,19 @@ wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function(
         * Initialize nav menus preview.
         */
        self.init = function() {
-               var self = this;
+               var self = this, synced = false;
+
+               /*
+                * Keep track of whether we synced to determine whether or not bindSettingListener
+                * should also initially fire the listener. This initial firing needs to wait until
+                * after all of the settings have been synced from the pane in order to prevent
+                * an infinite selective fallback-refresh. Note that this sync handler will be
+                * added after the sync handler in customize-preview.js, so it will be triggered
+                * after all of the settings are added.
+                */
+               api.preview.bind( 'sync', function() {
+                       synced = true;
+               } );
 
                if ( api.selectiveRefresh ) {
                        // Listen for changes to settings related to nav menus.
@@ -23,7 +35,17 @@ wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function(
                                self.bindSettingListener( setting );
                        } );
                        api.bind( 'add', function( setting ) {
-                               self.bindSettingListener( setting, { fire: true } );
+
+                               /*
+                                * Handle case where an invalid nav menu item (one for which its associated object has been deleted)
+                                * is synced from the controls into the preview. Since invalid nav menu items are filtered out from
+                                * being exported to the frontend by the _is_valid_nav_menu_item filter in wp_get_nav_menu_items(),
+                                * the customizer controls will have a nav_menu_item setting where the preview will have none, and
+                                * this can trigger an infinite fallback refresh when the nav menu item lacks any valid items.
+                                */
+                               if ( setting.get() && ! setting.get()._invalid ) {
+                                       self.bindSettingListener( setting, { fire: synced } );
+                               }
                        } );
                        api.bind( 'remove', function( setting ) {
                                self.unbindSettingListener( setting );
@@ -106,7 +128,7 @@ wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function(
                         * @returns {boolean}
                         */
                        isRelatedSetting: function( setting, newValue, oldValue ) {
-                               var partial = this, navMenuLocationSetting, navMenuId, isNavMenuItemSetting;
+                               var partial = this, navMenuLocationSetting, navMenuId, isNavMenuItemSetting, _newValue, _oldValue, urlParser;
                                if ( _.isString( setting ) ) {
                                        setting = api( setting );
                                }
@@ -123,9 +145,29 @@ wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function(
                                 */
                                isNavMenuItemSetting = /^nav_menu_item\[/.test( setting.id );
                                if ( isNavMenuItemSetting && _.isObject( newValue ) && _.isObject( oldValue ) ) {
-                                       delete newValue.type_label;
-                                       delete oldValue.type_label;
-                                       if ( _.isEqual( oldValue, newValue ) ) {
+                                       _newValue = _.clone( newValue );
+                                       _oldValue = _.clone( oldValue );
+                                       delete _newValue.type_label;
+                                       delete _oldValue.type_label;
+
+                                       // Normalize URL scheme when parent frame is HTTPS to prevent selective refresh upon initial page load.
+                                       if ( 'https' === api.preview.scheme.get() ) {
+                                               urlParser = document.createElement( 'a' );
+                                               urlParser.href = _newValue.url;
+                                               urlParser.protocol = 'https:';
+                                               _newValue.url = urlParser.href;
+                                               urlParser.href = _oldValue.url;
+                                               urlParser.protocol = 'https:';
+                                               _oldValue.url = urlParser.href;
+                                       }
+
+                                       // Prevent original_title differences from causing refreshes if title is present.
+                                       if ( newValue.title ) {
+                                               delete _oldValue.original_title;
+                                               delete _newValue.original_title;
+                                       }
+
+                                       if ( _.isEqual( _oldValue, _newValue ) ) {
                                                return false;
                                        }
                                }
@@ -365,6 +407,11 @@ wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function(
        self.highlightControls = function() {
                var selector = '.menu-item';
 
+               // Skip adding highlights if not in the customizer preview iframe.
+               if ( ! api.settings.channel ) {
+                       return;
+               }
+
                // Focus on the menu item control when shift+clicking the menu item.
                $( document ).on( 'click', selector, function( e ) {
                        var navMenuItemParts;
index e321da1662d196cf40d07c1fdc6cb7d765004e9e..6cbdd0ea4a4e2950ba644b12976dd6a849a4d1a1 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))},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
+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,c=!1;d.preview.bind("sync",function(){c=!0}),d.selectiveRefresh&&(d.each(function(b){a.bindSettingListener(b)}),d.bind("add",function(b){b.get()&&!b.get()._invalid&&a.bindSettingListener(b,{fire:c})}),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,j,k,l=this;if(b.isString(a)&&(a=d(a)),h=/^nav_menu_item\[/.test(a.id),h&&b.isObject(c)&&b.isObject(e)&&(i=b.clone(c),j=b.clone(e),delete i.type_label,delete j.type_label,"https"===d.preview.scheme.get()&&(k=document.createElement("a"),k.href=i.url,k.protocol="https:",i.url=k.href,k.href=j.url,k.protocol="https:",j.url=k.href),c.title&&(delete j.original_title,delete i.original_title),b.isEqual(j,i)))return!1;if(l.params.navMenuArgs.theme_location){if("nav_menu_locations["+l.params.navMenuArgs.theme_location+"]"===a.id)return!0;f=d("nav_menu_locations["+l.params.navMenuArgs.theme_location+"]")}return g=l.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";d.settings.channel&&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 47972784f9101769a42f91368ac83a13ad585453..6c05e894317f289a45f26c9877a8574f0555d66b 100644 (file)
@@ -357,7 +357,6 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
                                widgetPartial = new self.WidgetPartial( partialId, {
                                        params: {}
                                } );
-                               api.selectiveRefresh.partial.add( widgetPartial.id, widgetPartial );
                        }
 
                        // Make sure that there is a container element for the widget in the sidebar, if at least a placeholder.
@@ -400,6 +399,8 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
                                wasInserted = true;
                        } );
 
+                       api.selectiveRefresh.partial.add( widgetPartial.id, widgetPartial );
+
                        if ( wasInserted ) {
                                sidebarPartial.reflowWidgets();
                        }
@@ -537,7 +538,9 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
                        // 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, '' );
-                       widgetSelector += '.' + widgetClasses.split( /\s+/ ).join( '.' );
+                       if ( widgetClasses ) {
+                               widgetSelector += '.' + widgetClasses.split( /\s+/ ).join( '.' );
+                       }
                        self.widgetSelectors.push( widgetSelector );
                });
        };
@@ -570,6 +573,11 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
                var self = this,
                        selector = this.widgetSelectors.join( ',' );
 
+               // Skip adding highlights if not in the customizer preview iframe.
+               if ( ! api.settings.channel ) {
+                       return;
+               }
+
                $( selector ).attr( 'title', this.l10n.widgetTooltip );
 
                $( document ).on( 'mouseenter', selector, function() {
index 8a8e2bb7dbca180057ac18e742aca20bdcfff633..567dafc72f9247987d23ad26e848ba976494f2b1 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}),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
+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:{}})),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))}),d.selectiveRefresh.partial.add(f.id,f),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,""),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(",");d.settings.channel&&(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 f5569ed13d05a3a827f03ee673de3a23cd43e526..a4cb196dc10fbd287a7f8db1c3bcc5f448674ed4 100644 (file)
@@ -3,7 +3,68 @@
  */
 (function( exports, $ ){
        var api = wp.customize,
-               debounce;
+               debounce,
+               currentHistoryState = {};
+
+       /*
+        * Capture the state that is passed into history.replaceState() and history.pushState()
+        * and also which is returned in the popstate event so that when the changeset_uuid
+        * gets updated when transitioning to a new changeset there the current state will
+        * be supplied in the call to history.replaceState().
+        */
+       ( function( history ) {
+               var injectUrlWithState;
+
+               if ( ! history.replaceState ) {
+                       return;
+               }
+
+               /**
+                * Amend the supplied URL with the customized state.
+                *
+                * @since 4.7.0
+                * @access private
+                *
+                * @param {string} url URL.
+                * @returns {string} URL with customized state.
+                */
+               injectUrlWithState = function( url ) {
+                       var urlParser, oldQueryParams, newQueryParams;
+                       urlParser = document.createElement( 'a' );
+                       urlParser.href = url;
+                       oldQueryParams = api.utils.parseQueryString( location.search.substr( 1 ) );
+                       newQueryParams = api.utils.parseQueryString( urlParser.search.substr( 1 ) );
+
+                       newQueryParams.customize_changeset_uuid = oldQueryParams.customize_changeset_uuid;
+                       if ( oldQueryParams.customize_theme ) {
+                               newQueryParams.customize_theme = oldQueryParams.customize_theme;
+                       }
+                       if ( oldQueryParams.customize_messenger_channel ) {
+                               newQueryParams.customize_messenger_channel = oldQueryParams.customize_messenger_channel;
+                       }
+                       urlParser.search = $.param( newQueryParams );
+                       return urlParser.href;
+               };
+
+               history.replaceState = ( function( nativeReplaceState ) {
+                       return function historyReplaceState( data, title, url ) {
+                               currentHistoryState = data;
+                               return nativeReplaceState.call( history, data, title, injectUrlWithState( url ) );
+                       };
+               } )( history.replaceState );
+
+               history.pushState = ( function( nativePushState ) {
+                       return function historyPushState( data, title, url ) {
+                               currentHistoryState = data;
+                               return nativePushState.call( history, data, title, injectUrlWithState( url ) );
+                       };
+               } )( history.pushState );
+
+               window.addEventListener( 'popstate', function( event ) {
+                       currentHistoryState = event.state;
+               } );
+
+       }( history ) );
 
        /**
         * Returns a debounced version of the function.
                 * @param {object} options - Extend any instance parameter or method with this object.
                 */
                initialize: function( params, options ) {
-                       var self = this;
+                       var preview = this, urlParser = document.createElement( 'a' );
+
+                       api.Messenger.prototype.initialize.call( preview, params, options );
+
+                       urlParser.href = preview.origin();
+                       preview.add( 'scheme', urlParser.protocol.replace( /:$/, '' ) );
+
+                       preview.body = $( document.body );
+                       preview.window = $( window );
+
+                       if ( api.settings.channel ) {
+
+                               // If in an iframe, then intercept the link clicks and form submissions.
+                               preview.body.on( 'click.preview', 'a', function( event ) {
+                                       preview.handleLinkClick( event );
+                               } );
+                               preview.body.on( 'submit.preview', 'form', function( event ) {
+                                       preview.handleFormSubmit( event );
+                               } );
+
+                               preview.window.on( 'scroll.preview', debounce( function() {
+                                       preview.send( 'scroll', preview.window.scrollTop() );
+                               }, 200 ) );
+
+                               preview.bind( 'scroll', function( distance ) {
+                                       preview.window.scrollTop( distance );
+                               });
+                       }
+               },
+
+               /**
+                * Handle link clicks in preview.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @param {jQuery.Event} event Event.
+                */
+               handleLinkClick: function( event ) {
+                       var preview = this, link, isInternalJumpLink;
+                       link = $( event.target );
+
+                       // No-op if the anchor is not a link.
+                       if ( _.isUndefined( link.attr( 'href' ) ) ) {
+                               return;
+                       }
+
+                       isInternalJumpLink = ( '#' === link.attr( 'href' ).substr( 0, 1 ) );
 
-                       api.Messenger.prototype.initialize.call( this, params, options );
+                       // Allow internal jump links to behave normally without preventing default.
+                       if ( isInternalJumpLink ) {
+                               return;
+                       }
 
-                       this.body = $( document.body );
-                       this.body.on( 'click.preview', 'a', function( event ) {
-                               var link, isInternalJumpLink;
-                               link = $( this );
-                               isInternalJumpLink = ( '#' === link.attr( 'href' ).substr( 0, 1 ) );
+                       // If the link is not previewable, prevent the browser from navigating to it.
+                       if ( ! api.isLinkPreviewable( link[0] ) ) {
+                               wp.a11y.speak( api.settings.l10n.linkUnpreviewable );
                                event.preventDefault();
+                               return;
+                       }
+
+                       // Prevent initiating navigating from click and instead rely on sending url message to pane.
+                       event.preventDefault();
+
+                       /*
+                        * Note the shift key is checked so shift+click on widgets or
+                        * nav menu items can just result on focusing on the corresponding
+                        * control instead of also navigating to the URL linked to.
+                        */
+                       if ( event.shiftKey ) {
+                               return;
+                       }
+
+                       // Note: It's not relevant to send scroll because sending url message will have the same effect.
+                       preview.send( 'url', link.prop( 'href' ) );
+               },
+
+               /**
+                * Handle form submit.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @param {jQuery.Event} event Event.
+                */
+               handleFormSubmit: function( event ) {
+                       var preview = this, urlParser, form;
+                       urlParser = document.createElement( 'a' );
+                       form = $( event.target );
+                       urlParser.href = form.prop( 'action' );
+
+                       // If the link is not previewable, prevent the browser from navigating to it.
+                       if ( 'GET' !== form.prop( 'method' ).toUpperCase() || ! api.isLinkPreviewable( urlParser ) ) {
+                               wp.a11y.speak( api.settings.l10n.formUnpreviewable );
+                               event.preventDefault();
+                               return;
+                       }
+
+                       /*
+                        * If the default wasn't prevented already (in which case the form
+                        * submission is already being handled by JS), and if it has a GET
+                        * request method, then take the serialized form data and add it as
+                        * a query string to the action URL and send this in a url message
+                        * to the customizer pane so that it will be loaded. If the form's
+                        * action points to a non-previewable URL, the customizer pane's
+                        * previewUrl setter will reject it so that the form submission is
+                        * a no-op, which is the same behavior as when clicking a link to an
+                        * external site in the preview.
+                        */
+                       if ( ! event.isDefaultPrevented() ) {
+                               if ( urlParser.search.length > 1 ) {
+                                       urlParser.search += '&';
+                               }
+                               urlParser.search += form.serialize();
+                               preview.send( 'url', urlParser.href );
+                       }
+
+                       // Prevent default since navigation should be done via sending url message or via JS submit handler.
+                       event.preventDefault();
+               }
+       });
+
+       /**
+        * Inject the changeset UUID into links in the document.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @access private
+        * @returns {void}
+        */
+       api.addLinkPreviewing = function addLinkPreviewing() {
+               var linkSelectors = 'a[href], area';
+
+               // Inject links into initial document.
+               $( document.body ).find( linkSelectors ).each( function() {
+                       api.prepareLinkPreview( this );
+               } );
 
-                               if ( isInternalJumpLink && '#' !== link.attr( 'href' ) ) {
-                                       $( link.attr( 'href' ) ).each( function() {
-                                               this.scrollIntoView();
+               // Inject links for new elements added to the page.
+               if ( 'undefined' !== typeof MutationObserver ) {
+                       api.mutationObserver = new MutationObserver( function( mutations ) {
+                               _.each( mutations, function( mutation ) {
+                                       $( mutation.target ).find( linkSelectors ).each( function() {
+                                               api.prepareLinkPreview( this );
                                        } );
+                               } );
+                       } );
+                       api.mutationObserver.observe( document.documentElement, {
+                               childList: true,
+                               subtree: true
+                       } );
+               } else {
+
+                       // If mutation observers aren't available, fallback to just-in-time injection.
+                       $( document.documentElement ).on( 'click focus mouseover', linkSelectors, function() {
+                               api.prepareLinkPreview( this );
+                       } );
+               }
+       };
+
+       /**
+        * Should the supplied link is previewable.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param {HTMLAnchorElement|HTMLAreaElement} element Link element.
+        * @param {string} element.search Query string.
+        * @param {string} element.pathname Path.
+        * @param {string} element.host Host.
+        * @param {object} [options]
+        * @param {object} [options.allowAdminAjax=false] Allow admin-ajax.php requests.
+        * @returns {boolean} Is appropriate for changeset link.
+        */
+       api.isLinkPreviewable = function isLinkPreviewable( element, options ) {
+               var matchesAllowedUrl, parsedAllowedUrl, args;
+
+               args = _.extend( {}, { allowAdminAjax: false }, options || {} );
+
+               if ( 'javascript:' === element.protocol ) { // jshint ignore:line
+                       return true;
+               }
+
+               // Only web URLs can be previewed.
+               if ( 'https:' !== element.protocol && 'http:' !== element.protocol ) {
+                       return false;
+               }
+
+               parsedAllowedUrl = document.createElement( 'a' );
+               matchesAllowedUrl = ! _.isUndefined( _.find( api.settings.url.allowed, function( allowedUrl ) {
+                       parsedAllowedUrl.href = allowedUrl;
+                       return parsedAllowedUrl.protocol === element.protocol && parsedAllowedUrl.host === element.host && 0 === element.pathname.indexOf( parsedAllowedUrl.pathname.replace( /\/$/, '' ) );
+               } ) );
+               if ( ! matchesAllowedUrl ) {
+                       return false;
+               }
+
+               // Skip wp login and signup pages.
+               if ( /\/wp-(login|signup)\.php$/.test( element.pathname ) ) {
+                       return false;
+               }
+
+               // Allow links to admin ajax as faux frontend URLs.
+               if ( /\/wp-admin\/admin-ajax\.php$/.test( element.pathname ) ) {
+                       return args.allowAdminAjax;
+               }
+
+               // Disallow links to admin, includes, and content.
+               if ( /\/wp-(admin|includes|content)(\/|$)/.test( element.pathname ) ) {
+                       return false;
+               }
+
+               return true;
+       };
+
+       /**
+        * Inject the customize_changeset_uuid query param into links on the frontend.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param {HTMLAnchorElement|HTMLAreaElement} element Link element.
+        * @param {string} element.search Query string.
+        * @param {string} element.host Host.
+        * @param {string} element.protocol Protocol.
+        * @returns {void}
+        */
+       api.prepareLinkPreview = function prepareLinkPreview( element ) {
+               var queryParams;
+
+               // Skip links in admin bar.
+               if ( $( element ).closest( '#wpadminbar' ).length ) {
+                       return;
+               }
+
+               // Ignore links with href="#" or href="#id".
+               if ( '#' === $( element ).attr( 'href' ).substr( 0, 1 ) ) {
+                       return;
+               }
+
+               // Make sure links in preview use HTTPS if parent frame uses HTTPS.
+               if ( api.settings.channel && 'https' === api.preview.scheme.get() && 'http:' === element.protocol && -1 !== api.settings.url.allowedHosts.indexOf( element.host ) ) {
+                       element.protocol = 'https:';
+               }
+
+               if ( ! api.isLinkPreviewable( element ) ) {
+
+                       // Style link as unpreviewable only if previewing in iframe; if previewing on frontend, links will be allowed to work normally.
+                       if ( api.settings.channel ) {
+                               $( element ).addClass( 'customize-unpreviewable' );
+                       }
+                       return;
+               }
+               $( element ).removeClass( 'customize-unpreviewable' );
+
+               queryParams = api.utils.parseQueryString( element.search.substring( 1 ) );
+               queryParams.customize_changeset_uuid = api.settings.changeset.uuid;
+               if ( ! api.settings.theme.active ) {
+                       queryParams.customize_theme = api.settings.theme.stylesheet;
+               }
+               if ( api.settings.channel ) {
+                       queryParams.customize_messenger_channel = api.settings.channel;
+               }
+               element.search = $.param( queryParams );
+
+               // Prevent links from breaking out of preview iframe.
+               if ( api.settings.channel ) {
+                       element.target = '_self';
+               }
+       };
+
+       /**
+        * Inject the changeset UUID into Ajax requests.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return {void}
+        */
+       api.addRequestPreviewing = function addRequestPreviewing() {
+
+               /**
+                * Rewrite Ajax requests to inject customizer state.
+                *
+                * @param {object} options Options.
+                * @param {string} options.type Type.
+                * @param {string} options.url URL.
+                * @param {object} originalOptions Original options.
+                * @param {XMLHttpRequest} xhr XHR.
+                * @returns {void}
+                */
+               var prefilterAjax = function( options, originalOptions, xhr ) {
+                       var urlParser, queryParams, requestMethod, dirtyValues = {};
+                       urlParser = document.createElement( 'a' );
+                       urlParser.href = options.url;
+
+                       // Abort if the request is not for this site.
+                       if ( ! api.isLinkPreviewable( urlParser, { allowAdminAjax: true } ) ) {
+                               return;
+                       }
+                       queryParams = api.utils.parseQueryString( urlParser.search.substring( 1 ) );
+
+                       // Note that _dirty flag will be cleared with changeset updates.
+                       api.each( function( setting ) {
+                               if ( setting._dirty ) {
+                                       dirtyValues[ setting.id ] = setting.get();
                                }
+                       } );
 
-                               /*
-                                * Note the shift key is checked so shift+click on widgets or
-                                * nav menu items can just result on focusing on the corresponding
-                                * control instead of also navigating to the URL linked to.
-                                */
-                               if ( event.shiftKey || isInternalJumpLink ) {
-                                       return;
+                       if ( ! _.isEmpty( dirtyValues ) ) {
+                               requestMethod = options.type.toUpperCase();
+
+                               // Override underlying request method to ensure unsaved changes to changeset can be included (force Backbone.emulateHTTP).
+                               if ( 'POST' !== requestMethod ) {
+                                       xhr.setRequestHeader( 'X-HTTP-Method-Override', requestMethod );
+                                       queryParams._method = requestMethod;
+                                       options.type = 'POST';
                                }
-                               self.send( 'scroll', 0 );
-                               self.send( 'url', link.prop( 'href' ) );
-                       });
 
-                       // You cannot submit forms.
-                       // @todo: Allow form submissions by mixing $_POST data with the customize setting $_POST data.
-                       this.body.on( 'submit.preview', 'form', function( event ) {
-                               event.preventDefault();
-                       });
+                               // Amend the post data with the customized values.
+                               if ( options.data ) {
+                                       options.data += '&';
+                               } else {
+                                       options.data = '';
+                               }
+                               options.data += $.param( {
+                                       customized: JSON.stringify( dirtyValues )
+                               } );
+                       }
 
-                       this.window = $( window );
-                       this.window.on( 'scroll.preview', debounce( function() {
-                               self.send( 'scroll', self.window.scrollTop() );
-                       }, 200 ));
+                       // Include customized state query params in URL.
+                       queryParams.customize_changeset_uuid = api.settings.changeset.uuid;
+                       if ( ! api.settings.theme.active ) {
+                               queryParams.customize_theme = api.settings.theme.stylesheet;
+                       }
+                       urlParser.search = $.param( queryParams );
+                       options.url = urlParser.href;
+               };
 
-                       this.bind( 'scroll', function( distance ) {
-                               self.window.scrollTop( distance );
-                       });
+               $.ajaxPrefilter( prefilterAjax );
+       };
+
+       /**
+        * Inject changeset UUID into forms, allowing preview to persist through submissions.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @returns {void}
+        */
+       api.addFormPreviewing = function addFormPreviewing() {
+
+               // Inject inputs for forms in initial document.
+               $( document.body ).find( 'form' ).each( function() {
+                       api.prepareFormPreview( this );
+               } );
+
+               // Inject inputs for new forms added to the page.
+               if ( 'undefined' !== typeof MutationObserver ) {
+                       api.mutationObserver = new MutationObserver( function( mutations ) {
+                               _.each( mutations, function( mutation ) {
+                                       $( mutation.target ).find( 'form' ).each( function() {
+                                               api.prepareFormPreview( this );
+                                       } );
+                               } );
+                       } );
+                       api.mutationObserver.observe( document.documentElement, {
+                               childList: true,
+                               subtree: true
+                       } );
                }
-       });
+       };
+
+       /**
+        * Inject changeset into form inputs.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param {HTMLFormElement} form Form.
+        * @returns {void}
+        */
+       api.prepareFormPreview = function prepareFormPreview( form ) {
+               var urlParser, stateParams = {};
+
+               if ( ! form.action ) {
+                       form.action = location.href;
+               }
+
+               urlParser = document.createElement( 'a' );
+               urlParser.href = form.action;
+
+               // Make sure forms in preview use HTTPS if parent frame uses HTTPS.
+               if ( api.settings.channel && 'https' === api.preview.scheme.get() && 'http:' === urlParser.protocol && -1 !== api.settings.url.allowedHosts.indexOf( urlParser.host ) ) {
+                       urlParser.protocol = 'https:';
+                       form.action = urlParser.href;
+               }
+
+               if ( 'GET' !== form.method.toUpperCase() || ! api.isLinkPreviewable( urlParser ) ) {
+
+                       // Style form as unpreviewable only if previewing in iframe; if previewing on frontend, all forms will be allowed to work normally.
+                       if ( api.settings.channel ) {
+                               $( form ).addClass( 'customize-unpreviewable' );
+                       }
+                       return;
+               }
+               $( form ).removeClass( 'customize-unpreviewable' );
+
+               stateParams.customize_changeset_uuid = api.settings.changeset.uuid;
+               if ( ! api.settings.theme.active ) {
+                       stateParams.customize_theme = api.settings.theme.stylesheet;
+               }
+               if ( api.settings.channel ) {
+                       stateParams.customize_messenger_channel = api.settings.channel;
+               }
+
+               _.each( stateParams, function( value, name ) {
+                       var input = $( form ).find( 'input[name="' + name + '"]' );
+                       if ( input.length ) {
+                               input.val( value );
+                       } else {
+                               $( form ).prepend( $( '<input>', {
+                                       type: 'hidden',
+                                       name: name,
+                                       value: value
+                               } ) );
+                       }
+               } );
+
+               // Prevent links from breaking out of preview iframe.
+               if ( api.settings.channel ) {
+                       form.target = '_self';
+               }
+       };
+
+       /**
+        * Watch current URL and send keep-alive (heartbeat) messages to the parent.
+        *
+        * Keep the customizer pane notified that the preview is still alive
+        * and that the user hasn't navigated to a non-customized URL.
+        *
+        * @since 4.7.0
+        * @access protected
+        */
+       api.keepAliveCurrentUrl = ( function() {
+               var previousPathName = location.pathname,
+                       previousQueryString = location.search.substr( 1 ),
+                       previousQueryParams = null,
+                       stateQueryParams = [ 'customize_theme', 'customize_changeset_uuid', 'customize_messenger_channel' ];
+
+               return function keepAliveCurrentUrl() {
+                       var urlParser, currentQueryParams;
+
+                       // Short-circuit with keep-alive if previous URL is identical (as is normal case).
+                       if ( previousQueryString === location.search.substr( 1 ) && previousPathName === location.pathname ) {
+                               api.preview.send( 'keep-alive' );
+                               return;
+                       }
+
+                       urlParser = document.createElement( 'a' );
+                       if ( null === previousQueryParams ) {
+                               urlParser.search = previousQueryString;
+                               previousQueryParams = api.utils.parseQueryString( previousQueryString );
+                               _.each( stateQueryParams, function( name ) {
+                                       delete previousQueryParams[ name ];
+                               } );
+                       }
+
+                       // Determine if current URL minus customized state params and URL hash.
+                       urlParser.href = location.href;
+                       currentQueryParams = api.utils.parseQueryString( urlParser.search.substr( 1 ) );
+                       _.each( stateQueryParams, function( name ) {
+                               delete currentQueryParams[ name ];
+                       } );
+
+                       if ( previousPathName !== location.pathname || ! _.isEqual( previousQueryParams, currentQueryParams ) ) {
+                               urlParser.search = $.param( currentQueryParams );
+                               urlParser.hash = '';
+                               api.settings.url.self = urlParser.href;
+                               api.preview.send( 'ready', {
+                                       currentUrl: api.settings.url.self,
+                                       activePanels: api.settings.activePanels,
+                                       activeSections: api.settings.activeSections,
+                                       activeControls: api.settings.activeControls,
+                                       settingValidities: api.settings.settingValidities
+                               } );
+                       } else {
+                               api.preview.send( 'keep-alive' );
+                       }
+                       previousQueryParams = currentQueryParams;
+                       previousQueryString = location.search.substr( 1 );
+                       previousPathName = location.pathname;
+               };
+       } )();
+
+       api.settingPreviewHandlers = {
+
+               /**
+                * Preview changes to custom logo.
+                *
+                * @param {number} attachmentId Attachment ID for custom logo.
+                * @returns {void}
+                */
+               custom_logo: function( attachmentId ) {
+                       $( 'body' ).toggleClass( 'wp-custom-logo', !! attachmentId );
+               },
+
+               /**
+                * Preview changes to custom css.
+                *
+                * @param {string} value Custom CSS..
+                * @returns {void}
+                */
+               custom_css: function( value ) {
+                       $( '#wp-custom-css' ).text( value );
+               },
+
+               /**
+                * Preview changes to any of the background settings.
+                *
+                * @returns {void}
+                */
+               background: function() {
+                       var css = '', settings = {};
+
+                       _.each( ['color', 'image', 'preset', 'position_x', 'position_y', 'size', 'repeat', 'attachment'], function( prop ) {
+                               settings[ prop ] = api( 'background_' + prop );
+                       } );
+
+                       /*
+                        * The body will support custom backgrounds if either the color or image are set.
+                        *
+                        * See get_body_class() in /wp-includes/post-template.php
+                        */
+                       $( document.body ).toggleClass( 'custom-background', !! ( settings.color() || settings.image() ) );
+
+                       if ( settings.color() ) {
+                               css += 'background-color: ' + settings.color() + ';';
+                       }
+
+                       if ( settings.image() ) {
+                               css += 'background-image: url("' + settings.image() + '");';
+                               css += 'background-size: ' + settings.size() + ';';
+                               css += 'background-position: ' + settings.position_x() + ' ' + settings.position_y() + ';';
+                               css += 'background-repeat: ' + settings.repeat() + ';';
+                               css += 'background-attachment: ' + settings.attachment() + ';';
+                       }
+
+                       $( '#custom-background-css' ).text( 'body.custom-background { ' + css + ' }' );
+               }
+       };
 
        $( function() {
                var bg, setValue;
                        channel: api.settings.channel
                });
 
+               api.addLinkPreviewing();
+               api.addRequestPreviewing();
+               api.addFormPreviewing();
+
                /**
                 * Create/update a setting value.
                 *
                });
 
                api.preview.bind( 'sync', function( events ) {
+
+                       /*
+                        * Delete any settings that already exist locally which haven't been
+                        * modified in the controls while the preview was loading. This prevents
+                        * situations where the JS value being synced from the pane may differ
+                        * from the PHP-sanitized JS value in the preview which causes the
+                        * non-sanitized JS value to clobber the PHP-sanitized value. This
+                        * is particularly important for selective refresh partials that
+                        * have a fallback refresh behavior since infinite refreshing would
+                        * result.
+                        */
+                       if ( events.settings && events['settings-modified-while-loading'] ) {
+                               _.each( _.keys( events.settings ), function( syncedSettingId ) {
+                                       if ( api.has( syncedSettingId ) && ! events['settings-modified-while-loading'][ syncedSettingId ] ) {
+                                               delete events.settings[ syncedSettingId ];
+                                       }
+                               } );
+                       }
+
                        $.each( events, function( event, args ) {
                                api.preview.trigger( event, args );
                        });
                        api.preview.send( 'nonce', api.settings.nonce );
 
                        api.preview.send( 'documentTitle', document.title );
+
+                       // Send scroll in case of loading via non-refresh.
+                       api.preview.send( 'scroll', $( window ).scrollTop() );
                });
 
                api.preview.bind( 'saved', function( response ) {
+
+                       if ( response.next_changeset_uuid ) {
+                               api.settings.changeset.uuid = response.next_changeset_uuid;
+
+                               // Update UUIDs in links and forms.
+                               $( document.body ).find( 'a[href], area' ).each( function() {
+                                       api.prepareLinkPreview( this );
+                               } );
+                               $( document.body ).find( 'form' ).each( function() {
+                                       api.prepareFormPreview( this );
+                               } );
+
+                               /*
+                                * Replace the UUID in the URL. Note that the wrapped history.replaceState()
+                                * will handle injecting the current api.settings.changeset.uuid into the URL,
+                                * so this is merely to trigger that logic.
+                                */
+                               if ( history.replaceState ) {
+                                       history.replaceState( currentHistoryState, '', location.href );
+                               }
+                       }
+
                        api.trigger( 'saved', response );
                } );
 
-               api.bind( 'saved', function() {
-                       api.each( function( setting ) {
-                               setting._dirty = false;
+               /*
+                * Clear dirty flag for settings when saved to changeset so that they
+                * won't be needlessly included in selective refresh or ajax requests.
+                */
+               api.preview.bind( 'changeset-saved', function( data ) {
+                       _.each( data.saved_changeset_values, function( value, settingId ) {
+                               var setting = api( settingId );
+                               if ( setting && _.isEqual( setting.get(), value ) ) {
+                                       setting._dirty = false;
+                               }
                        } );
                } );
 
                 * containers and controls are active.
                 */
                api.preview.send( 'ready', {
+                       currentUrl: api.settings.url.self,
                        activePanels: api.settings.activePanels,
                        activeSections: api.settings.activeSections,
                        activeControls: api.settings.activeControls,
                        settingValidities: api.settings.settingValidities
                } );
 
+               // Send ready when URL changes via JS.
+               setInterval( api.keepAliveCurrentUrl, api.settings.timeouts.keepAliveSend );
+
                // Display a loading indicator when preview is reloading, and remove on failure.
                api.preview.bind( 'loading-initiated', function () {
                        $( 'body' ).addClass( 'wp-customizer-unloading' );
                });
 
                /* Custom Backgrounds */
-               bg = $.map(['color', 'image', 'position_x', 'repeat', 'attachment'], function( prop ) {
+               bg = $.map( ['color', 'image', 'preset', 'position_x', 'position_y', 'size', 'repeat', 'attachment'], function( prop ) {
                        return 'background_' + prop;
-               });
-
-               api.when.apply( api, bg ).done( function( color, image, position_x, repeat, attachment ) {
-                       var body = $(document.body),
-                               head = $('head'),
-                               style = $('#custom-background-css'),
-                               update;
-
-                       update = function() {
-                               var css = '';
-
-                               // The body will support custom backgrounds if either
-                               // the color or image are set.
-                               //
-                               // See get_body_class() in /wp-includes/post-template.php
-                               body.toggleClass( 'custom-background', !! ( color() || image() ) );
-
-                               if ( color() )
-                                       css += 'background-color: ' + color() + ';';
-
-                               if ( image() ) {
-                                       css += 'background-image: url("' + image() + '");';
-                                       css += 'background-position: top ' + position_x() + ';';
-                                       css += 'background-repeat: ' + repeat() + ';';
-                                       css += 'background-attachment: ' + attachment() + ';';
-                               }
-
-                               // Refresh the stylesheet by removing and recreating it.
-                               style.remove();
-                               style = $('<style type="text/css" id="custom-background-css">body.custom-background { ' + css + ' }</style>').appendTo( head );
-                       };
+               } );
 
+               api.when.apply( api, bg ).done( function() {
                        $.each( arguments, function() {
-                               this.bind( update );
+                               this.bind( api.settingPreviewHandlers.background );
                        });
                });
 
                 *
                 * @since 4.5.0
                 */
-               api( 'custom_logo', function( setting ) {
-                       $( 'body' ).toggleClass( 'wp-custom-logo', !! setting.get() );
-                       setting.bind( function( attachmentId ) {
-                               $( 'body' ).toggleClass( 'wp-custom-logo', !! attachmentId );
-                       } );
+               api( 'custom_logo', function ( setting ) {
+                       api.settingPreviewHandlers.custom_logo.call( setting, setting.get() );
+                       setting.bind( api.settingPreviewHandlers.custom_logo );
+               } );
+
+               api( 'custom_css[' + api.settings.theme.stylesheet + ']', function( setting ) {
+                       setting.bind( api.settingPreviewHandlers.custom_css );
                } );
 
                api.trigger( 'preview-ready' );
index e8413394e98d0fe814045f8fb9114e46c3869059..964a7a8086bbbbd815a2ae3e4eb9513bb0b642aa 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,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
+!function(a,b){var c,d=wp.customize,e={};!function(a){var c;a.replaceState&&(c=function(a){var c,e,f;return c=document.createElement("a"),c.href=a,e=d.utils.parseQueryString(location.search.substr(1)),f=d.utils.parseQueryString(c.search.substr(1)),f.customize_changeset_uuid=e.customize_changeset_uuid,e.customize_theme&&(f.customize_theme=e.customize_theme),e.customize_messenger_channel&&(f.customize_messenger_channel=e.customize_messenger_channel),c.search=b.param(f),c.href},a.replaceState=function(b){return function(d,f,g){return e=d,b.call(a,d,f,c(g))}}(a.replaceState),a.pushState=function(b){return function(d,f,g){return e=d,b.call(a,d,f,c(g))}}(a.pushState),window.addEventListener("popstate",function(a){e=a.state}))}(history),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,g=document.createElement("a");d.Messenger.prototype.initialize.call(f,a,e),g.href=f.origin(),f.add("scheme",g.protocol.replace(/:$/,"")),f.body=b(document.body),f.window=b(window),d.settings.channel&&(f.body.on("click.preview","a",function(a){f.handleLinkClick(a)}),f.body.on("submit.preview","form",function(a){f.handleFormSubmit(a)}),f.window.on("scroll.preview",c(function(){f.send("scroll",f.window.scrollTop())},200)),f.bind("scroll",function(a){f.window.scrollTop(a)}))},handleLinkClick:function(a){var c,e,f=this;if(c=b(a.target),!_.isUndefined(c.attr("href"))&&(e="#"===c.attr("href").substr(0,1),!e)){if(!d.isLinkPreviewable(c[0]))return wp.a11y.speak(d.settings.l10n.linkUnpreviewable),void a.preventDefault();a.preventDefault(),a.shiftKey||f.send("url",c.prop("href"))}},handleFormSubmit:function(a){var c,e,f=this;return c=document.createElement("a"),e=b(a.target),c.href=e.prop("action"),"GET"===e.prop("method").toUpperCase()&&d.isLinkPreviewable(c)?(a.isDefaultPrevented()||(c.search.length>1&&(c.search+="&"),c.search+=e.serialize(),f.send("url",c.href)),void a.preventDefault()):(wp.a11y.speak(d.settings.l10n.formUnpreviewable),void a.preventDefault())}}),d.addLinkPreviewing=function(){var a="a[href], area";b(document.body).find(a).each(function(){d.prepareLinkPreview(this)}),"undefined"!=typeof MutationObserver?(d.mutationObserver=new MutationObserver(function(c){_.each(c,function(c){b(c.target).find(a).each(function(){d.prepareLinkPreview(this)})})}),d.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0})):b(document.documentElement).on("click focus mouseover",a,function(){d.prepareLinkPreview(this)})},d.isLinkPreviewable=function(a,b){var c,e,f;return f=_.extend({},{allowAdminAjax:!1},b||{}),"javascript:"===a.protocol||("https:"===a.protocol||"http:"===a.protocol)&&(e=document.createElement("a"),c=!_.isUndefined(_.find(d.settings.url.allowed,function(b){return e.href=b,e.protocol===a.protocol&&e.host===a.host&&0===a.pathname.indexOf(e.pathname.replace(/\/$/,""))})),!!c&&(!/\/wp-(login|signup)\.php$/.test(a.pathname)&&(/\/wp-admin\/admin-ajax\.php$/.test(a.pathname)?f.allowAdminAjax:!/\/wp-(admin|includes|content)(\/|$)/.test(a.pathname))))},d.prepareLinkPreview=function(a){var c;if(!b(a).closest("#wpadminbar").length&&"#"!==b(a).attr("href").substr(0,1)){if(d.settings.channel&&"https"===d.preview.scheme.get()&&"http:"===a.protocol&&-1!==d.settings.url.allowedHosts.indexOf(a.host)&&(a.protocol="https:"),!d.isLinkPreviewable(a))return void(d.settings.channel&&b(a).addClass("customize-unpreviewable"));b(a).removeClass("customize-unpreviewable"),c=d.utils.parseQueryString(a.search.substring(1)),c.customize_changeset_uuid=d.settings.changeset.uuid,d.settings.theme.active||(c.customize_theme=d.settings.theme.stylesheet),d.settings.channel&&(c.customize_messenger_channel=d.settings.channel),a.search=b.param(c),d.settings.channel&&(a.target="_self")}},d.addRequestPreviewing=function(){var a=function(a,c,e){var f,g,h,i={};f=document.createElement("a"),f.href=a.url,d.isLinkPreviewable(f,{allowAdminAjax:!0})&&(g=d.utils.parseQueryString(f.search.substring(1)),d.each(function(a){a._dirty&&(i[a.id]=a.get())}),_.isEmpty(i)||(h=a.type.toUpperCase(),"POST"!==h&&(e.setRequestHeader("X-HTTP-Method-Override",h),g._method=h,a.type="POST"),a.data?a.data+="&":a.data="",a.data+=b.param({customized:JSON.stringify(i)})),g.customize_changeset_uuid=d.settings.changeset.uuid,d.settings.theme.active||(g.customize_theme=d.settings.theme.stylesheet),f.search=b.param(g),a.url=f.href)};b.ajaxPrefilter(a)},d.addFormPreviewing=function(){b(document.body).find("form").each(function(){d.prepareFormPreview(this)}),"undefined"!=typeof MutationObserver&&(d.mutationObserver=new MutationObserver(function(a){_.each(a,function(a){b(a.target).find("form").each(function(){d.prepareFormPreview(this)})})}),d.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0}))},d.prepareFormPreview=function(a){var c,e={};return a.action||(a.action=location.href),c=document.createElement("a"),c.href=a.action,d.settings.channel&&"https"===d.preview.scheme.get()&&"http:"===c.protocol&&-1!==d.settings.url.allowedHosts.indexOf(c.host)&&(c.protocol="https:",a.action=c.href),"GET"===a.method.toUpperCase()&&d.isLinkPreviewable(c)?(b(a).removeClass("customize-unpreviewable"),e.customize_changeset_uuid=d.settings.changeset.uuid,d.settings.theme.active||(e.customize_theme=d.settings.theme.stylesheet),d.settings.channel&&(e.customize_messenger_channel=d.settings.channel),_.each(e,function(c,d){var e=b(a).find('input[name="'+d+'"]');e.length?e.val(c):b(a).prepend(b("<input>",{type:"hidden",name:d,value:c}))}),void(d.settings.channel&&(a.target="_self"))):void(d.settings.channel&&b(a).addClass("customize-unpreviewable"))},d.keepAliveCurrentUrl=function(){var a=location.pathname,c=location.search.substr(1),e=null,f=["customize_theme","customize_changeset_uuid","customize_messenger_channel"];return function(){var g,h;return c===location.search.substr(1)&&a===location.pathname?void d.preview.send("keep-alive"):(g=document.createElement("a"),null===e&&(g.search=c,e=d.utils.parseQueryString(c),_.each(f,function(a){delete e[a]})),g.href=location.href,h=d.utils.parseQueryString(g.search.substr(1)),_.each(f,function(a){delete h[a]}),a===location.pathname&&_.isEqual(e,h)?d.preview.send("keep-alive"):(g.search=b.param(h),g.hash="",d.settings.url.self=g.href,d.preview.send("ready",{currentUrl:d.settings.url.self,activePanels:d.settings.activePanels,activeSections:d.settings.activeSections,activeControls:d.settings.activeControls,settingValidities:d.settings.settingValidities})),e=h,c=location.search.substr(1),void(a=location.pathname))}}(),d.settingPreviewHandlers={custom_logo:function(a){b("body").toggleClass("wp-custom-logo",!!a)},custom_css:function(a){b("#wp-custom-css").text(a)},background:function(){var a="",c={};_.each(["color","image","preset","position_x","position_y","size","repeat","attachment"],function(a){c[a]=d("background_"+a)}),b(document.body).toggleClass("custom-background",!(!c.color()&&!c.image())),c.color()&&(a+="background-color: "+c.color()+";"),c.image()&&(a+='background-image: url("'+c.image()+'");',a+="background-size: "+c.size()+";",a+="background-position: "+c.position_x()+" "+c.position_y()+";",a+="background-repeat: "+c.repeat()+";",a+="background-attachment: "+c.attachment()+";"),b("#custom-background-css").text("body.custom-background { "+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}),d.addLinkPreviewing(),d.addRequestPreviewing(),d.addFormPreviewing(),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){a.settings&&a["settings-modified-while-loading"]&&_.each(_.keys(a.settings),function(b){d.has(b)&&!a["settings-modified-while-loading"][b]&&delete a.settings[b]}),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.send("scroll",b(window).scrollTop())}),d.preview.bind("saved",function(a){a.next_changeset_uuid&&(d.settings.changeset.uuid=a.next_changeset_uuid,b(document.body).find("a[href], area").each(function(){d.prepareLinkPreview(this)}),b(document.body).find("form").each(function(){d.prepareFormPreview(this)}),history.replaceState&&history.replaceState(e,"",location.href)),d.trigger("saved",a)}),d.preview.bind("changeset-saved",function(a){_.each(a.saved_changeset_values,function(a,b){var c=d(b);c&&_.isEqual(c.get(),a)&&(c._dirty=!1)})}),d.preview.bind("nonce-refresh",function(a){b.extend(d.settings.nonce,a)}),d.preview.send("ready",{currentUrl:d.settings.url.self,activePanels:d.settings.activePanels,activeSections:d.settings.activeSections,activeControls:d.settings.activeControls,settingValidities:d.settings.settingValidities}),setInterval(d.keepAliveCurrentUrl,d.settings.timeouts.keepAliveSend),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","preset","position_x","position_y","size","repeat","attachment"],function(a){return"background_"+a}),d.when.apply(d,a).done(function(){b.each(arguments,function(){this.bind(d.settingPreviewHandlers.background)})}),d("custom_logo",function(a){d.settingPreviewHandlers.custom_logo.call(a,a.get()),a.bind(d.settingPreviewHandlers.custom_logo)}),d("custom_css["+d.settings.theme.stylesheet+"]",function(a){a.bind(d.settingPreviewHandlers.custom_css)}),d.trigger("preview-ready"))})}(wp,jQuery);
\ No newline at end of file
index ec51058ec4fabda3dc2f463542421edace99cff8..f6dfa0b9d803494f85dda064cbfc47f1253cb93f 100644 (file)
@@ -6,13 +6,13 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
 
        self = {
                ready: $.Deferred(),
+               editShortcutVisibility: new api.Value(),
                data: {
                        partials: {},
                        renderQueryVar: '',
                        l10n: {
                                shiftClickToEdit: ''
-                       },
-                       refreshBuffer: 250
+                       }
                },
                currentRequest: null
        };
@@ -43,7 +43,7 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
 
                id: null,
 
-                /**
+               /**
                 * Constructor.
                 *
                 * @since 4.5.0
@@ -83,8 +83,9 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
                 */
                ready: function() {
                        var partial = this;
-                       _.each( _.pluck( partial.placements(), 'container' ), function( container ) {
-                               $( container ).attr( 'title', self.data.l10n.shiftClickToEdit );
+                       _.each( partial.placements(), function( placement ) {
+                               $( placement.container ).attr( 'title', self.data.l10n.shiftClickToEdit );
+                               partial.createEditShortcutForPlacement( placement );
                        } );
                        $( document ).on( 'click', partial.params.selector, function( e ) {
                                if ( ! e.shiftKey ) {
@@ -99,6 +100,141 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
                        } );
                },
 
+               /**
+                * Create and show the edit shortcut for a given partial placement container.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @param {Placement} placement The placement container element.
+                * @returns {void}
+                */
+               createEditShortcutForPlacement: function( placement ) {
+                       var partial = this, $shortcut, $placementContainer, illegalAncestorSelector, illegalContainerSelector;
+                       if ( ! placement.container ) {
+                               return;
+                       }
+                       $placementContainer = $( placement.container );
+                       illegalAncestorSelector = 'head';
+                       illegalContainerSelector = 'area, audio, base, bdi, bdo, br, button, canvas, col, colgroup, command, datalist, embed, head, hr, html, iframe, img, input, keygen, label, link, map, math, menu, meta, noscript, object, optgroup, option, param, progress, rp, rt, ruby, script, select, source, style, svg, table, tbody, textarea, tfoot, thead, title, tr, track, video, wbr';
+                       if ( ! $placementContainer.length || $placementContainer.is( illegalContainerSelector ) || $placementContainer.closest( illegalAncestorSelector ).length ) {
+                               return;
+                       }
+                       $shortcut = partial.createEditShortcut();
+                       partial.addEditShortcutToPlacement( placement, $shortcut );
+                       $shortcut.on( 'click', function( event ) {
+                               event.preventDefault();
+                               event.stopPropagation();
+                               partial.showControl();
+                       } );
+               },
+
+               /**
+                * Add an edit shortcut to the placement container.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @param {Placement} placement The placement for the partial.
+                * @param {jQuery} $editShortcut The shortcut element as a jQuery object.
+                * @returns {void}
+                */
+               addEditShortcutToPlacement: function( placement, $editShortcut ) {
+                       var $placementContainer = $( placement.container );
+                       $placementContainer.prepend( $editShortcut );
+                       if ( ! $placementContainer.is( ':visible' ) || 'none' === $placementContainer.css( 'display' ) ) {
+                               $editShortcut.addClass( 'customize-partial-edit-shortcut-hidden' );
+                       }
+               },
+
+               /**
+                * Return the unique class name for the edit shortcut button for this partial.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @return {string} Partial ID converted into a class name for use in shortcut.
+                */
+               getEditShortcutClassName: function() {
+                       var partial = this, cleanId;
+                       cleanId = partial.id.replace( /]/g, '' ).replace( /\[/g, '-' );
+                       return 'customize-partial-edit-shortcut-' + cleanId;
+               },
+
+               /**
+                * Return the appropriate translated string for the edit shortcut button.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @return {string} Tooltip for edit shortcut.
+                */
+               getEditShortcutTitle: function() {
+                       var partial = this, l10n = self.data.l10n;
+                       switch ( partial.getType() ) {
+                               case 'widget':
+                                       return l10n.clickEditWidget;
+                               case 'blogname':
+                                       return l10n.clickEditTitle;
+                               case 'blogdescription':
+                                       return l10n.clickEditTitle;
+                               case 'nav_menu':
+                                       return l10n.clickEditMenu;
+                               default:
+                                       return l10n.clickEditMisc;
+                       }
+               },
+
+               /**
+                * Return the type of this partial
+                *
+                * Will use `params.type` if set, but otherwise will try to infer type from settingId.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @return {string} Type of partial derived from type param or the related setting ID.
+                */
+               getType: function() {
+                       var partial = this, settingId;
+                       settingId = partial.params.primarySetting || _.first( partial.settings() ) || 'unknown';
+                       if ( partial.params.type ) {
+                               return partial.params.type;
+                       }
+                       if ( settingId.match( /^nav_menu_instance\[/ ) ) {
+                               return 'nav_menu';
+                       }
+                       if ( settingId.match( /^widget_.+\[\d+]$/ ) ) {
+                               return 'widget';
+                       }
+                       return settingId;
+               },
+
+               /**
+                * Create an edit shortcut button for this partial.
+                *
+                * @since 4.7.0
+                * @access public
+                *
+                * @return {jQuery} The edit shortcut button element.
+                */
+               createEditShortcut: function() {
+                       var partial = this, shortcutTitle, $buttonContainer, $button, $image;
+                       shortcutTitle = partial.getEditShortcutTitle();
+                       $buttonContainer = $( '<span>', {
+                               'class': 'customize-partial-edit-shortcut ' + partial.getEditShortcutClassName()
+                       } );
+                       $button = $( '<button>', {
+                               'aria-label': shortcutTitle,
+                               'title': shortcutTitle,
+                               'class': 'customize-partial-edit-shortcut-button'
+                       } );
+                       $image = $( '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"/></svg>' );
+                       $button.append( $image );
+                       $buttonContainer.append( $button );
+                       return $buttonContainer;
+               },
+
                /**
                 * Find all placements for this partial int he document.
                 *
@@ -176,10 +312,16 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
                 * @since 4.5.0
                 */
                showControl: function() {
-                       var partial = this, settingId = partial.params.primarySetting;
+                       var partial = this, settingId = partial.params.primarySetting, menuSlug;
                        if ( ! settingId ) {
                                settingId = _.first( partial.settings() );
                        }
+                       if ( partial.getType() === 'nav_menu' ) {
+                               menuSlug = partial.params.navMenuArgs.theme_location;
+                               if ( menuSlug ) {
+                                       settingId = 'nav_menu_locations[' + menuSlug + ']';
+                               }
+                       }
                        api.preview.send( 'focus-control-for-setting', settingId );
                },
 
@@ -320,6 +462,7 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
                        self.orginalDocumentWrite = null;
                        /* jshint ignore:end */
 
+                       partial.createEditShortcutForPlacement( placement );
                        placement.container.removeClass( 'customize-partial-refreshing' );
 
                        // Prevent placement container from being being re-triggered as being rendered among nested partials.
@@ -485,8 +628,9 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
                return {
                        wp_customize: 'on',
                        nonce: api.settings.nonce.preview,
-                       theme: api.settings.theme.stylesheet,
-                       customized: JSON.stringify( dirtyCustomized )
+                       customize_theme: api.settings.theme.stylesheet,
+                       customized: JSON.stringify( dirtyCustomized ),
+                       customize_changeset_uuid: api.settings.changeset.uuid
                };
        };
 
@@ -668,7 +812,7 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
                                        self._pendingPartialRequests = {};
                                } );
                        },
-                       self.data.refreshBuffer
+                       api.settings.timeouts.selectiveRefresh
                );
 
                return partialRequest.deferred.promise();
@@ -745,11 +889,6 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
        api.bind( 'preview-ready', function() {
                var handleSettingChange, watchSettingChange, unwatchSettingChange;
 
-               // Polyfill for IE8 to support the document.head attribute.
-               if ( ! document.head ) {
-                       document.head = $( 'head:first' )[0];
-               }
-
                _.extend( self.data, _customizePartialRefreshExports );
 
                // Create the partial JS models.
@@ -859,6 +998,17 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
                        }
                } );
 
+               api.preview.bind( 'edit-shortcut-visibility', function( visibility ) {
+                       api.selectiveRefresh.editShortcutVisibility.set( visibility );
+               } );
+               api.selectiveRefresh.editShortcutVisibility.bind( function( visibility ) {
+                       var body = $( document.body ), shouldAnimateHide;
+
+                       shouldAnimateHide = ( 'hidden' === visibility && body.hasClass( 'customize-partial-edit-shortcuts-shown' ) && ! body.hasClass( 'customize-partial-edit-shortcuts-hidden' ) );
+                       body.toggleClass( 'customize-partial-edit-shortcuts-hidden', shouldAnimateHide );
+                       body.toggleClass( 'customize-partial-edit-shortcuts-shown', 'visible' === visibility );
+               } );
+
                api.preview.bind( 'active', function() {
 
                        // Make all partials ready.
index d84e66fb77daacf5ba09714b90ec073237240dd8..599120ce7802a6d49586bc625f65faa4ad4e0c55 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)},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
+wp.customize.selectiveRefresh=function(a,b){"use strict";var c,d,e;return c={ready:a.Deferred(),editShortcutVisibility:new b.Value,data:{partials:{},renderQueryVar:"",l10n:{shiftClickToEdit:""}},currentRequest:null},_.extend(c,b.Events),d=c.Partial=b.Class.extend({id:null,initialize:function(b,c){var d=this;c=c||{},d.id=b,d.params=_.extend({selector:null,settings:[],primarySetting:null,containerInclusive:!1,fallbackRefresh:!0},c.params||{}),d.deferred={},d.deferred.ready=a.Deferred(),d.deferred.ready.done(function(){d.ready()})},ready:function(){var b=this;_.each(b.placements(),function(d){a(d.container).attr("title",c.data.l10n.shiftClickToEdit),b.createEditShortcutForPlacement(d)}),a(document).on("click",b.params.selector,function(c){c.shiftKey&&(c.preventDefault(),_.each(b.placements(),function(d){a(d.container).is(c.currentTarget)&&b.showControl()}))})},createEditShortcutForPlacement:function(b){var c,d,e,f,g=this;b.container&&(d=a(b.container),e="head",f="area, audio, base, bdi, bdo, br, button, canvas, col, colgroup, command, datalist, embed, head, hr, html, iframe, img, input, keygen, label, link, map, math, menu, meta, noscript, object, optgroup, option, param, progress, rp, rt, ruby, script, select, source, style, svg, table, tbody, textarea, tfoot, thead, title, tr, track, video, wbr",!d.length||d.is(f)||d.closest(e).length||(c=g.createEditShortcut(),g.addEditShortcutToPlacement(b,c),c.on("click",function(a){a.preventDefault(),a.stopPropagation(),g.showControl()})))},addEditShortcutToPlacement:function(b,c){var d=a(b.container);d.prepend(c),d.is(":visible")&&"none"!==d.css("display")||c.addClass("customize-partial-edit-shortcut-hidden")},getEditShortcutClassName:function(){var a,b=this;return a=b.id.replace(/]/g,"").replace(/\[/g,"-"),"customize-partial-edit-shortcut-"+a},getEditShortcutTitle:function(){var a=this,b=c.data.l10n;switch(a.getType()){case"widget":return b.clickEditWidget;case"blogname":return b.clickEditTitle;case"blogdescription":return b.clickEditTitle;case"nav_menu":return b.clickEditMenu;default:return b.clickEditMisc}},getType:function(){var a,b=this;return a=b.params.primarySetting||_.first(b.settings())||"unknown",b.params.type?b.params.type:a.match(/^nav_menu_instance\[/)?"nav_menu":a.match(/^widget_.+\[\d+]$/)?"widget":a},createEditShortcut:function(){var b,c,d,e,f=this;return b=f.getEditShortcutTitle(),c=a("<span>",{"class":"customize-partial-edit-shortcut "+f.getEditShortcutClassName()}),d=a("<button>",{"aria-label":b,title:b,"class":"customize-partial-edit-shortcut-button"}),e=a('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"/></svg>'),d.append(e),c.append(d),c},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,c=this,d=c.params.primarySetting;d||(d=_.first(c.settings())),"nav_menu"===c.getType()&&(a=c.params.navMenuArgs.theme_location,a&&(d="nav_menu_locations["+a+"]")),b.preview.send("focus-control-for-setting",d)},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,f.createEditShortcutForPlacement(b),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,customize_theme:b.settings.theme.stylesheet,customized:JSON.stringify(a),customize_changeset_uuid:b.settings.changeset.uuid}},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={})})},b.settings.timeouts.selectiveRefresh),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;_.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("edit-shortcut-visibility",function(a){b.selectiveRefresh.editShortcutVisibility.set(a)}),b.selectiveRefresh.editShortcutVisibility.bind(function(b){var c,d=a(document.body);c="hidden"===b&&d.hasClass("customize-partial-edit-shortcuts-shown")&&!d.hasClass("customize-partial-edit-shortcuts-hidden"),d.toggleClass("customize-partial-edit-shortcuts-hidden",c),d.toggleClass("customize-partial-edit-shortcuts-shown","visible"===b)}),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 9867ceb1d6f9b901f0dcdeecf74e2e815fcd3ea5..6c5e8d151b71bb0650558e077d1ac7fdb5a3ac9c 100644 (file)
                                // Needed for some hosts that cannot handle frequent requests and the user may exceed the allocated server CPU time, etc.
                                // The minimal interval can be up to 600 sec. however setting it to longer than 120 sec. will limit or disable
                                // some of the functionality (like post locks).
-                               // Once set at initialization, minimalInterval cannot be changed/overriden.
+                               // Once set at initialization, minimalInterval cannot be changed/overridden.
                                if ( options.minimalInterval ) {
                                        options.minimalInterval = parseInt( options.minimalInterval, 10 );
                                        settings.minimalInterval = options.minimalInterval > 0 && options.minimalInterval <= 600 ? options.minimalInterval * 1000 : 0;
index 3d2616d7852eb1b9c4661e0a2fb11d4b222f2ae9..8c8de56a0ef98ff306f27392bbfc965b298b7215 100644 (file)
 
                        text = tinymce.DOM.decode( text );
 
+                       if ( text.indexOf( '[' ) !== -1 && text.indexOf( ']' ) !== -1 ) {
+                               // Looks like a shortcode? Remove any line breaks from inside of shortcodes
+                               // or autop will replace them with <p> and <br> later and the string won't match.
+                               text = text.replace( /\[[^\]]+\]/g, function( match ) {
+                                       return match.replace( /[\r\n]/g, '' );
+                               });
+                       }
+
                        if ( ! force ) {
                                instance = this.getInstance( text );
 
                 */
                render: function( force ) {
                        _.each( instances, function( instance ) {
-                               instance.render( force );
+                               instance.render( null, force );
                        } );
                },
 
                initialize: function() {},
 
                /**
-                * Retuns the content to render in the view node.
+                * Returns the content to render in the view node.
                 *
                 * @return {*}
                 */
                                var dom = editor.dom,
                                        styles = '',
                                        bodyClasses = editor.getBody().className || '',
-                                       editorHead = editor.getDoc().getElementsByTagName( 'head' )[0];
+                                       editorHead = editor.getDoc().getElementsByTagName( 'head' )[0],
+                                       iframe, iframeWin, iframeDoc, MutationObserver, observer, i, block;
 
                                tinymce.each( dom.$( 'link[rel="stylesheet"]', editorHead ), function( link ) {
                                        if ( link.href && link.href.indexOf( 'skins/lightgray/content.min.css' ) === -1 &&
                                        }, '\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, iframeWin, iframeDoc, MutationObserver, observer, i, block;
+                               editor.undoManager.transact( function() {
+                                       node.innerHTML = '';
 
-                                       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( 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
-                                               } );
+                                       dom.add( node, 'span', { 'class': 'mce-shim' } );
+                                       dom.add( node, 'span', { 'class': 'wpview-end' } );
+                               } );
 
-                                               dom.add( node, 'span', { 'class': 'mce-shim' } );
-                                               dom.add( node, 'span', { 'class': 'wpview-end' } );
-                                       } );
+                               // 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(
+                                       '<!DOCTYPE html>' +
+                                       '<html>' +
+                                               '<head>' +
+                                                       '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' +
+                                                       head +
+                                                       styles +
+                                                       '<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="' + bodyClasses + '">' +
+                                                       body +
+                                               '</body>' +
+                                       '</html>'
+                               );
+
+                               iframeDoc.close();
 
-                                       // 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 ) {
+                               function resize() {
+                                       var $iframe;
+
+                                       if ( block ) {
                                                return;
                                        }
 
-                                       iframeWin = iframe.contentWindow;
-                                       iframeDoc = iframeWin.document;
-                                       iframeDoc.open();
-
-                                       iframeDoc.write(
-                                               '<!DOCTYPE html>' +
-                                               '<html>' +
-                                                       '<head>' +
-                                                               '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' +
-                                                               head +
-                                                               styles +
-                                                               '<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="' + bodyClasses + '">' +
-                                                               body +
-                                                       '</body>' +
-                                               '</html>'
-                                       );
-
-                                       iframeDoc.close();
-
-                                       function resize() {
-                                               var $iframe;
-
-                                               if ( block ) {
-                                                       return;
-                                               }
-
-                                               // Make sure the iframe still exists.
-                                               if ( iframe.contentWindow ) {
-                                                       $iframe = $( iframe );
-                                                       self.iframeHeight = $( iframeDoc.body ).height();
+                                       // Make sure the iframe still exists.
+                                       if ( iframe.contentWindow ) {
+                                               $iframe = $( iframe );
+                                               self.iframeHeight = $( iframeDoc.body ).height();
 
-                                                       if ( $iframe.height() !== self.iframeHeight ) {
-                                                               $iframe.height( self.iframeHeight );
-                                                               editor.nodeChanged();
-                                                       }
+                                               if ( $iframe.height() !== self.iframeHeight ) {
+                                                       $iframe.height( self.iframeHeight );
+                                                       editor.nodeChanged();
                                                }
                                        }
+                               }
 
-                                       if ( self.iframeHeight ) {
-                                               block = true;
+                               if ( self.iframeHeight ) {
+                                       block = true;
 
-                                               setTimeout( function() {
-                                                       block = false;
-                                                       resize();
-                                               }, 3000 );
-                                       }
+                                       setTimeout( function() {
+                                               block = false;
+                                               resize();
+                                       }, 3000 );
+                               }
+
+                               function reload() {
+                                       $( node ).data( 'rendered', null );
 
-                                       $( iframeWin ).on( 'load', resize );
+                                       setTimeout( function() {
+                                               wp.mce.views.render();
+                                       } );
+                               }
 
-                                       MutationObserver = iframeWin.MutationObserver || iframeWin.WebKitMutationObserver || iframeWin.MozMutationObserver;
+                               $( iframeWin ).on( 'load', resize ).on( 'unload', reload );
 
-                                       if ( MutationObserver ) {
-                                               observer = new MutationObserver( _.debounce( resize, 100 ) );
+                               MutationObserver = iframeWin.MutationObserver || iframeWin.WebKitMutationObserver || iframeWin.MozMutationObserver;
 
-                                               observer.observe( iframeDoc.body, {
-                                                       attributes: true,
-                                                       childList: true,
-                                                       subtree: true
-                                               } );
-                                       } else {
-                                               for ( i = 1; i < 6; i++ ) {
-                                                       setTimeout( resize, i * 700 );
-                                               }
+                               if ( MutationObserver ) {
+                                       observer = new MutationObserver( _.debounce( resize, 100 ) );
+
+                                       observer.observe( iframeDoc.body, {
+                                               attributes: true,
+                                               childList: true,
+                                               subtree: true
+                                       } );
+                               } else {
+                                       for ( i = 1; i < 6; i++ ) {
+                                               setTimeout( resize, i * 700 );
                                        }
+                               }
 
-                                       callback && callback.call( self, editor, node );
-                               }, 50 );
+                               callback && callback.call( self, editor, node );
                        }, rendered );
                },
 
                /**
                 * Sets a loader for all view nodes tied to this view instance.
                 */
-               setLoader: function() {
+               setLoader: function( dashicon ) {
                        this.setContent(
                                '<div class="loading-placeholder">' +
-                                       '<div class="dashicons dashicons-admin-media"></div>' +
+                                       '<div class="dashicons dashicons-' + ( dashicon || 'admin-media' ) + '"></div>' +
                                        '<div class="wpview-loading"><ins></ins></div>' +
                                '</div>'
                        );
index 055253af00232ba1634738b7f5df35904eca6690..ac22c1c66d5b3b97c9bdc37666bfc7524c98c87c 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){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
+!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),b.indexOf("[")!==-1&&b.indexOf("]")!==-1&&(b=b.replace(/\[[^\]]+\]/g,function(a){return a.replace(/[\r\n]/g,"")})),!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(null,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,c,e,f){var g=this;this.getNodes(function(f,h){function i(){var a;q||k.contentWindow&&(a=d(k),g.iframeHeight=d(m.body).height(),a.height()!==g.iframeHeight&&(a.height(g.iframeHeight),f.nodeChanged()))}function j(){d(h).data("rendered",null),setTimeout(function(){b.mce.views.render()})}var k,l,m,n,o,p,q,r=f.dom,s="",t=f.getBody().className||"",u=f.getDoc().getElementsByTagName("head")[0];if(tinymce.each(r.$('link[rel="stylesheet"]',u),function(a){a.href&&a.href.indexOf("skins/lightgray/content.min.css")===-1&&a.href.indexOf("skins/wordpress/wp-content.css")===-1&&(s+=r.getOuterHTML(a))}),g.iframeHeight&&r.add(h,"span",{"data-mce-bogus":1,style:{display:"block",width:"100%",height:g.iframeHeight}},"\u200b"),f.undoManager.transact(function(){h.innerHTML="",k=r.add(h,"iframe",{src:tinymce.Env.ie?'javascript:""':"",frameBorder:"0",allowTransparency:"true",scrolling:"no","class":"wpview-sandbox",style:{width:"100%",display:"block"},height:g.iframeHeight}),r.add(h,"span",{"class":"mce-shim"}),r.add(h,"span",{"class":"wpview-end"})}),k.contentWindow){if(l=k.contentWindow,m=l.document,m.open(),m.write('<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'+a+s+'<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="'+t+'">'+c+"</body></html>"),m.close(),g.iframeHeight&&(q=!0,setTimeout(function(){q=!1,i()},3e3)),d(l).on("load",i).on("unload",j),n=l.MutationObserver||l.WebKitMutationObserver||l.MozMutationObserver)o=new n(_.debounce(i,100)),o.observe(m.body,{attributes:!0,childList:!0,subtree:!0});else for(p=1;p<6;p++)setTimeout(i,700*p);e&&e.call(g,f,h)}},f)},setLoader:function(a){this.setContent('<div class="loading-placeholder"><div class="dashicons dashicons-'+(a||"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 aa407466d0688aaf8378df10b801915bc19bbd6f..3852543aa4eb1797ff50c8cf0553512b695c0434 100644 (file)
                 * @returns {Object} Joined props
                 */
                props: function( props, attachment ) {
-                       var link, linkUrl, size, sizes, fallbacks,
+                       var link, linkUrl, size, sizes,
                                defaultProps = wp.media.view.settings.defaultProps;
 
-                       // Final fallbacks run after all processing has been completed.
-                       fallbacks = function( props ) {
-                               // Generate alt fallbacks and strip tags.
-                               if ( 'image' === props.type && ! props.alt ) {
-                                       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, ' ' );
-                               }
-
-                               return props;
-                       };
-
                        props = props ? _.clone( props ) : {};
 
                        if ( attachment && attachment.type ) {
@@ -87,7 +68,7 @@
 
                        // All attachment-specific settings follow.
                        if ( ! attachment ) {
-                               return fallbacks( props );
+                               return props;
                        }
 
                        props.title = props.title || attachment.title;
                                props.rel = props.rel || 'attachment wp-att-' + attachment.id;
                        }
 
-                       return fallbacks( props );
+                       return props;
                },
                /**
                 * Create link markup that is suitable for passing to the editor
 
                                        event.preventDefault();
 
-                                       // Remove focus from the `.insert-media` button.
-                                       // Prevents Opera from showing the outline of the button
-                                       // above the modal.
-                                       //
-                                       // See: https://core.trac.wordpress.org/ticket/22445
-                                       elem.blur();
-
                                        if ( elem.hasClass( 'gallery' ) ) {
                                                options.state = 'gallery';
                                                options.title = wp.media.view.l10n.createGalleryTitle;
index 1d5c1ce3be007970052aacde80d52ab9f28f2b65..8dabed61ab80f164d1e9672b0abbb005700c234d 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.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
+!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=wp.media.view.settings.defaultProps;return a=a?b.clone(a):{},c&&c.type&&(a.type=c.type),"image"===a.type&&(a=b.defaults(a||{},{align:h.align||getUserSetting("align","none"),size:h.size||getUserSetting("imgsize","medium"),url:"",classes:[]})),c?(a.title=a.title||c.title,d=a.link||h.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),a):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.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 5cc7597872b9efa8a30a05108c242b42da6e48c7..f5683a939e305de7aad74f3c08d5d10c4f20dab5 100644 (file)
@@ -696,7 +696,7 @@ var Attachments = Backbone.Collection.extend({
                delete this.mirroring;
        },
        /**
-        * Retrive more attachments from the server for the collection.
+        * Retrieve more attachments from the server for the collection.
         *
         * Only works if the collection is mirroring a Query Attachments collection,
         * and forwards to its `more` method. This collection class doesn't have
index e8a8202d59e11f921f8cb9ebea55b632e5ad9a52..b421158fc2c65fe49ec9be0ccea1b402af469c58 100644 (file)
@@ -3588,7 +3588,7 @@ Attachments = View.extend({
        initSortable: function() {
                var collection = this.collection;
 
-               if ( wp.media.isTouchDevice || ! this.options.sortable || ! $.fn.sortable ) {
+               if ( ! this.options.sortable || ! $.fn.sortable ) {
                        return;
                }
 
@@ -3647,7 +3647,7 @@ Attachments = View.extend({
        },
 
        refreshSortable: function() {
-               if ( wp.media.isTouchDevice || ! this.options.sortable || ! $.fn.sortable ) {
+               if ( ! this.options.sortable || ! $.fn.sortable ) {
                        return;
                }
 
@@ -6698,6 +6698,8 @@ Modal = wp.media.View.extend({
                'keydown': 'keydown'
        },
 
+       clickedOpenerEl: null,
+
        initialize: function() {
                _.defaults( this.options, {
                        container: document.body,
@@ -6765,6 +6767,8 @@ Modal = wp.media.View.extend({
                        return this;
                }
 
+               this.clickedOpenerEl = document.activeElement;
+
                if ( ! this.views.attached ) {
                        this.attach();
                }
@@ -6815,8 +6819,12 @@ Modal = wp.media.View.extend({
                // Hide modal and remove restricted media modal tab focus once it's closed
                this.$el.hide().undelegate( 'keydown' );
 
-               // Put focus back in useful location once modal is closed
-               $('#wpbody-content').focus();
+               // Put focus back in useful location once modal is closed.
+               if ( null !== this.clickedOpenerEl ) {
+                       this.clickedOpenerEl.focus();
+               } else {
+                       $( '#wpbody-content' ).focus();
+               }
 
                this.propagate('close');
 
@@ -7061,7 +7069,7 @@ Search = wp.media.View.extend({
 
        attributes: {
                type:        'search',
-               placeholder: l10n.search
+               placeholder: l10n.searchMediaPlaceholder
        },
 
        events: {
index f0fdbefcacaab0ec91e4d27921794a92513b291b..8e3da4a5fd730aaeade57a4464f45cd9e7fc0bdf 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(){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
+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;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(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"},clickedOpenerEl:null,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.clickedOpenerEl=document.activeElement,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"),null!==this.clickedOpenerEl?this.clickedOpenerEl.focus():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.searchMediaPlaceholder},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 9c950d4ed7fffda61430389fb39eade3f26ed627..444f5546c31ad02acac1e63d7c4b7569082cf4e5 100644 (file)
@@ -3,7 +3,7 @@
  *
  * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/,  http://www.vinterwebb.se/
  *
- * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzn and Mammon Media and is released under the MIT License:
+ * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
  * http://www.opensource.org/licenses/mit-license.php
  *
  * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
index 90de9383cac98c522f824bbca95cffc11391ba01..a233ace71069e7ceafcf077b4cb5c4227990381d 100644 (file)
@@ -354,9 +354,13 @@ tinymce.PluginManager.add('charmap', function(editor) {
                                var index = y * width + x;
                                if (index < charmap.length) {
                                        var chr = charmap[index];
+                                       var chrText = chr ? String.fromCharCode(parseInt(chr[0], 10)) : '&nbsp;';
 
-                                       gridHtml += '<td title="' + chr[1] + '"><div tabindex="-1" title="' + chr[1] + '" role="button">' +
-                                               (chr ? String.fromCharCode(parseInt(chr[0], 10)) : '&nbsp;') + '</div></td>';
+                                       gridHtml += (
+                                               '<td title="' + chr[1] + '"><div tabindex="-1" title="' + chr[1] + '" role="button" data-chr="' + chrText + '">' +
+                                                       chrText +
+                                               '</div></td>'
+                                       );
                                } else {
                                        gridHtml += '<td />';
                                }
@@ -375,7 +379,7 @@ tinymce.PluginManager.add('charmap', function(editor) {
 
                                if (/^(TD|DIV)$/.test(target.nodeName)) {
                                        if (getParentTd(target).firstChild) {
-                                               insertChar(tinymce.trim(target.innerText || target.textContent));
+                                               insertChar(target.getAttribute('data-chr'));
 
                                                if (!e.ctrlKey) {
                                                        win.close();
@@ -459,4 +463,4 @@ tinymce.PluginManager.add('charmap', function(editor) {
                getCharMap: getCharMap,
                insertChar: insertChar
        };
-});
+});
\ No newline at end of file
index 9bf1e9fcd85f4968f089884dd0f4163c57a833e4..cf818074ed6c8cc2a0c0fffa1cbde1c577d21943 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"],["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
+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],n=m?String.fromCharCode(parseInt(m[0],10)):"&nbsp;";c+='<td title="'+m[1]+'"><div tabindex="-1" title="'+m[1]+'" role="button" data-chr="'+n+'">'+n+"</div></td>"}else c+="<td />"}c+="</tr>"}c+="</tbody></table>";var o={type:"container",html:c,onclick:function(a){var c=a.target;/^(TD|DIV)$/.test(c.nodeName)&&b(c).firstChild&&(g(c.getAttribute("data-chr")),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:[o,{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 59efa5510e16d705141416eee50059bc6586304a..19086860218805335aa3a19504266b007c25334f 100644 (file)
@@ -135,7 +135,7 @@ tinymce.PluginManager.add('fullscreen', function(editor) {
 
        editor.addButton('fullscreen', {
                tooltip: 'Fullscreen',
-               shortcut: 'Ctrl+Alt+F',
+               shortcut: 'Ctrl+Shift+F',
                onClick: toggleFullscreen,
                onPostRender: function() {
                        var self = this;
index 675d6fd415c25ae813029d174b11736d83ebcffc..8edbe1329b8543eb0b925fe3db27cc2f09cd7f37 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:"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
+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+Shift+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 4a778ff05b98ba2a415973ca23ba47bf11957ada..ae9a22976aea1449ae9f24ad80ed6144259b3f68 100644 (file)
@@ -26,6 +26,10 @@ tinymce.PluginManager.add('lists', function(editor) {
                return node && (/^(OL|UL|DL)$/).test(node.nodeName) && isChildOfBody(node);
        }
 
+       function isListItemNode(node) {
+               return node && /^(LI|DT|DD)$/.test(node.nodeName);
+       }
+
        function isFirstChild(node) {
                return node.parentNode.firstChild == node;
        }
@@ -42,6 +46,33 @@ tinymce.PluginManager.add('lists', function(editor) {
                return elm === editor.getBody();
        }
 
+       function isTextNode(node) {
+               return node && node.nodeType === 3;
+       }
+
+       function getNormalizedEndPoint(container, offset) {
+               var node = tinymce.dom.RangeUtils.getNode(container, offset);
+
+               if (isListItemNode(container) && isTextNode(node)) {
+                       var textNodeOffset = offset >= container.childNodes.length ? node.data.length : 0;
+                       return {container: node, offset: textNodeOffset};
+               }
+
+               return {container: container, offset: offset};
+       }
+
+       function normalizeRange(rng) {
+               var outRng = rng.cloneRange();
+
+               var rangeStart = getNormalizedEndPoint(rng.startContainer, rng.startOffset);
+               outRng.setStart(rangeStart.container, rangeStart.offset);
+
+               var rangeEnd = getNormalizedEndPoint(rng.endContainer, rng.endOffset);
+               outRng.setEnd(rangeEnd.container, rangeEnd.offset);
+
+               return outRng;
+       }
+
        editor.on('init', function() {
                var dom = editor.dom, selection = editor.selection;
 
@@ -163,7 +194,7 @@ tinymce.PluginManager.add('lists', function(editor) {
                                rng.setEnd(bookmark.endContainer, bookmark.endOffset);
                        }
 
-                       selection.setRng(rng);
+                       selection.setRng(normalizeRange(rng));
                }
 
                function createNewTextBlock(contentNode, blockName) {
@@ -224,7 +255,7 @@ tinymce.PluginManager.add('lists', function(editor) {
 
                function getSelectedListItems() {
                        return tinymce.grep(selection.getSelectedBlocks(), function(block) {
-                               return /^(LI|DT|DD)$/.test(block.nodeName);
+                               return isListItemNode(block);
                        });
                }
 
@@ -298,33 +329,34 @@ tinymce.PluginManager.add('lists', function(editor) {
                        }
                }
 
-               /**
-                * Normalizes the all lists in the specified element.
-                */
-               function normalizeList(element) {
-                       tinymce.each(tinymce.grep(dom.select('ol,ul', element)), function(ul) {
-                               var sibling, parentNode = ul.parentNode;
-
-                               // Move UL/OL to previous LI if it's the only child of a LI
-                               if (parentNode.nodeName == 'LI' && parentNode.firstChild == ul) {
-                                       sibling = parentNode.previousSibling;
-                                       if (sibling && sibling.nodeName == 'LI') {
-                                               sibling.appendChild(ul);
-
-                                               if (isEmpty(parentNode)) {
-                                                       dom.remove(parentNode);
-                                               }
+               function normalizeLists(element) {
+                       tinymce.each(tinymce.grep(dom.select('ol,ul', element)), normalizeList);
+               }
+
+               function normalizeList(ul) {
+                       var sibling, parentNode = ul.parentNode;
+
+                       // Move UL/OL to previous LI if it's the only child of a LI
+                       if (parentNode.nodeName == 'LI' && parentNode.firstChild == ul) {
+                               sibling = parentNode.previousSibling;
+                               if (sibling && sibling.nodeName == 'LI') {
+                                       sibling.appendChild(ul);
+
+                                       if (isEmpty(parentNode)) {
+                                               dom.remove(parentNode);
                                        }
+                               } else {
+                                       dom.setStyle(parentNode, 'listStyleType', 'none');
                                }
+                       }
 
-                               // Append OL/UL to previous LI if it's in a parent OL/UL i.e. old HTML4
-                               if (isListNode(parentNode)) {
-                                       sibling = parentNode.previousSibling;
-                                       if (sibling && sibling.nodeName == 'LI') {
-                                               sibling.appendChild(ul);
-                                       }
+                       // Append OL/UL to previous LI if it's in a parent OL/UL i.e. old HTML4
+                       if (isListNode(parentNode)) {
+                               sibling = parentNode.previousSibling;
+                               if (sibling && sibling.nodeName == 'LI') {
+                                       sibling.appendChild(ul);
                                }
-                       });
+                       }
                }
 
                function outdent(li) {
@@ -394,7 +426,7 @@ tinymce.PluginManager.add('lists', function(editor) {
                        }
 
                        splitList(ul, li, newBlock);
-                       normalizeList(ul.parentNode);
+                       normalizeLists(ul.parentNode);
 
                        return true;
                }
@@ -664,6 +696,7 @@ tinymce.PluginManager.add('lists', function(editor) {
                                }
 
                                splitList(rootList, li);
+                               normalizeLists(rootList.parentNode);
                        });
 
                        moveToBookmark(bookmark);
@@ -711,118 +744,135 @@ tinymce.PluginManager.add('lists', function(editor) {
                        return false;
                }
 
-               self.backspaceDelete = function(isForward) {
-                       function findNextCaretContainer(rng, isForward) {
-                               var node = rng.startContainer, offset = rng.startOffset;
-                               var nonEmptyBlocks, walker;
+               function findNextCaretContainer(rng, isForward) {
+                       var node = rng.startContainer, offset = rng.startOffset;
+                       var nonEmptyBlocks, walker;
 
-                               if (node.nodeType == 3 && (isForward ? offset < node.data.length : offset > 0)) {
-                                       return node;
-                               }
+                       if (node.nodeType == 3 && (isForward ? offset < node.data.length : offset > 0)) {
+                               return node;
+                       }
 
-                               nonEmptyBlocks = editor.schema.getNonEmptyElements();
-                               if (node.nodeType == 1) {
-                                       node = tinymce.dom.RangeUtils.getNode(node, offset);
-                               }
+                       nonEmptyBlocks = editor.schema.getNonEmptyElements();
+                       if (node.nodeType == 1) {
+                               node = tinymce.dom.RangeUtils.getNode(node, offset);
+                       }
 
-                               walker = new tinymce.dom.TreeWalker(node, editor.getBody());
+                       walker = new tinymce.dom.TreeWalker(node, editor.getBody());
 
-                               // Delete at <li>|<br></li> then jump over the bogus br
-                               if (isForward) {
-                                       if (isBogusBr(node)) {
-                                               walker.next();
-                                       }
+                       // Delete at <li>|<br></li> then jump over the bogus br
+                       if (isForward) {
+                               if (isBogusBr(node)) {
+                                       walker.next();
                                }
+                       }
 
-                               while ((node = walker[isForward ? 'next' : 'prev2']())) {
-                                       if (node.nodeName == 'LI' && !node.hasChildNodes()) {
-                                               return node;
-                                       }
+                       while ((node = walker[isForward ? 'next' : 'prev2']())) {
+                               if (node.nodeName == 'LI' && !node.hasChildNodes()) {
+                                       return node;
+                               }
 
-                                       if (nonEmptyBlocks[node.nodeName]) {
-                                               return node;
-                                       }
+                               if (nonEmptyBlocks[node.nodeName]) {
+                                       return node;
+                               }
 
-                                       if (node.nodeType == 3 && node.data.length > 0) {
-                                               return node;
-                                       }
+                               if (node.nodeType == 3 && node.data.length > 0) {
+                                       return node;
                                }
                        }
+               }
 
-                       function mergeLiElements(fromElm, toElm) {
-                               var node, listNode, ul = fromElm.parentNode;
+               function mergeLiElements(fromElm, toElm) {
+                       var node, listNode, ul = fromElm.parentNode;
 
-                               if (!isChildOfBody(fromElm) || !isChildOfBody(toElm)) {
-                                       return;
-                               }
+                       if (!isChildOfBody(fromElm) || !isChildOfBody(toElm)) {
+                               return;
+                       }
 
-                               if (isListNode(toElm.lastChild)) {
-                                       listNode = toElm.lastChild;
-                               }
+                       if (isListNode(toElm.lastChild)) {
+                               listNode = toElm.lastChild;
+                       }
 
-                               if (ul == toElm.lastChild) {
-                                       if (isBr(ul.previousSibling)) {
-                                               dom.remove(ul.previousSibling);
-                                       }
+                       if (ul == toElm.lastChild) {
+                               if (isBr(ul.previousSibling)) {
+                                       dom.remove(ul.previousSibling);
                                }
+                       }
 
-                               node = toElm.lastChild;
-                               if (node && isBr(node) && fromElm.hasChildNodes()) {
-                                       dom.remove(node);
-                               }
+                       node = toElm.lastChild;
+                       if (node && isBr(node) && fromElm.hasChildNodes()) {
+                               dom.remove(node);
+                       }
 
-                               if (isEmpty(toElm, true)) {
-                                       dom.$(toElm).empty();
-                               }
+                       if (isEmpty(toElm, true)) {
+                               dom.$(toElm).empty();
+                       }
 
-                               if (!isEmpty(fromElm, true)) {
-                                       while ((node = fromElm.firstChild)) {
-                                               toElm.appendChild(node);
-                                       }
+                       if (!isEmpty(fromElm, true)) {
+                               while ((node = fromElm.firstChild)) {
+                                       toElm.appendChild(node);
                                }
+                       }
 
-                               if (listNode) {
-                                       toElm.appendChild(listNode);
-                               }
+                       if (listNode) {
+                               toElm.appendChild(listNode);
+                       }
 
-                               dom.remove(fromElm);
+                       dom.remove(fromElm);
 
-                               if (isEmpty(ul) && !isEditorBody(ul)) {
-                                       dom.remove(ul);
-                               }
+                       if (isEmpty(ul) && !isEditorBody(ul)) {
+                               dom.remove(ul);
                        }
+               }
 
-                       if (selection.isCollapsed()) {
-                               var li = dom.getParent(selection.getStart(), 'LI'), ul, rng, otherLi;
+               function backspaceDeleteCaret(isForward) {
+                       var li = dom.getParent(selection.getStart(), 'LI'), ul, rng, otherLi;
 
-                               if (li) {
-                                       ul = li.parentNode;
-                                       if (isEditorBody(ul) && dom.isEmpty(ul)) {
-                                               return true;
-                                       }
+                       if (li) {
+                               ul = li.parentNode;
+                               if (isEditorBody(ul) && dom.isEmpty(ul)) {
+                                       return true;
+                               }
 
-                                       rng = selection.getRng(true);
-                                       otherLi = dom.getParent(findNextCaretContainer(rng, isForward), 'LI');
+                               rng = normalizeRange(selection.getRng(true));
+                               otherLi = dom.getParent(findNextCaretContainer(rng, isForward), 'LI');
 
-                                       if (otherLi && otherLi != li) {
-                                               var bookmark = createBookmark(rng);
+                               if (otherLi && otherLi != li) {
+                                       var bookmark = createBookmark(rng);
 
-                                               if (isForward) {
-                                                       mergeLiElements(otherLi, li);
-                                               } else {
-                                                       mergeLiElements(li, otherLi);
-                                               }
+                                       if (isForward) {
+                                               mergeLiElements(otherLi, li);
+                                       } else {
+                                               mergeLiElements(li, otherLi);
+                                       }
 
-                                               moveToBookmark(bookmark);
+                                       moveToBookmark(bookmark);
 
+                                       return true;
+                               } else if (!otherLi) {
+                                       if (!isForward && removeList(ul.nodeName)) {
                                                return true;
-                                       } else if (!otherLi) {
-                                               if (!isForward && removeList(ul.nodeName)) {
-                                                       return true;
-                                               }
                                        }
                                }
                        }
+               }
+
+               function backspaceDeleteRange() {
+                       var startListParent = editor.dom.getParent(editor.selection.getStart(), 'LI,DT,DD');
+
+                       if (startListParent || getSelectedListItems().length > 0) {
+                               editor.undoManager.transact(function() {
+                                       editor.execCommand('Delete');
+                                       normalizeLists(editor.getBody());
+                               });
+
+                               return true;
+                       }
+
+                       return false;
+               }
+
+               self.backspaceDelete = function(isForward) {
+                       return selection.isCollapsed() ? backspaceDeleteCaret(isForward) : backspaceDeleteRange();
                };
 
                editor.on('BeforeExecCommand', function(e) {
index cf72080a1d60e3b91119fb52e3f90e6245abc0d8..69b00ba794bc59c833fe14f871900af499236b47 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&&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
+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&&/^(LI|DT|DD)$/.test(a.nodeName)}function f(a){return a.parentNode.firstChild==a}function g(a){return a.parentNode.lastChild==a}function h(b){return b&&!!a.schema.getTextBlockElements()[b.nodeName]}function i(b){return b===a.getBody()}function j(a){return a&&3===a.nodeType}function k(a,b){var c=tinymce.dom.RangeUtils.getNode(a,b);if(e(a)&&j(c)){var d=b>=a.childNodes.length?c.data.length:0;return{container:c,offset:d}}return{container:a,offset:b}}function l(a){var b=a.cloneRange(),c=k(a.startContainer,a.startOffset);b.setStart(c.container,c.offset);var d=k(a.endContainer,a.endOffset);return b.setEnd(d.container,d.offset),b}var m=this;a.on("init",function(){function j(a,b){var c=H.isEmpty(a);return b&&H.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=H.create("span",{"data-mce-type":"bookmark"}),e.hasChildNodes()?(f=Math.min(f,e.childNodes.length-1),b?e.insertBefore(d,e.childNodes[f]):H.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 n(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,H.remove(f)),a[b?"startContainer":"endContainer"]=d,a[b?"startOffset":"endOffset"]=e)}b(!0),b();var c=H.createRng();c.setStart(a.startContainer,a.startOffset),a.endContainer&&c.setEnd(a.endContainer,a.endOffset),I.setRng(l(c))}function o(b,c){var d,e,f,g=H.createFragment(),h=a.schema.getBlockElements();if(a.settings.forced_root_block&&(c=c||a.settings.forced_root_block),c&&(e=H.create(c),e.tagName===a.settings.forced_root_block&&H.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=H.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(H.create("br",{"data-mce-bogus":"1"})):g.appendChild(H.create("br")),g}function p(){return tinymce.grep(I.getSelectedBlocks(),function(a){return e(a)})}function q(a,b,c){function d(a){tinymce.each(g,function(c){a.parentNode.insertBefore(c,b.parentNode)}),H.remove(a)}var e,f,g,h;for(g=H.select('span[data-mce-type="bookmark"]',a),c=c||o(b),e=H.createRng(),e.setStartAfter(b),e.setEndAfter(a),f=e.extractContents(),h=f.firstChild;h;h=h.firstChild)if("LI"==h.nodeName&&H.isEmpty(h)){H.remove(h);break}H.isEmpty(f)||H.insertAfter(f,a),H.insertAfter(c,a),j(b.parentNode)&&d(b.parentNode),H.remove(b),j(a)&&H.remove(a)}function r(a){var b,c;if(b=a.nextSibling,b&&d(b)&&b.nodeName==a.nodeName&&J(a,b)){for(;c=b.firstChild;)a.appendChild(c);H.remove(b)}if(b=a.previousSibling,b&&d(b)&&b.nodeName==a.nodeName&&J(a,b)){for(;c=b.firstChild;)a.insertBefore(c,a.firstChild);H.remove(b)}}function s(a){tinymce.each(tinymce.grep(H.select("ol,ul",a)),t)}function t(a){var b,c=a.parentNode;"LI"==c.nodeName&&c.firstChild==a&&(b=c.previousSibling,b&&"LI"==b.nodeName?(b.appendChild(a),j(c)&&H.remove(c)):H.setStyle(c,"listStyleType","none")),d(c)&&(b=c.previousSibling,b&&"LI"==b.nodeName&&b.appendChild(a))}function u(a){function b(a){j(a)&&H.remove(a)}var c,e=a.parentNode,h=e.parentNode;return i(e)?!0:"DD"==a.nodeName?(H.rename(a,"DT"),!0):f(a)&&g(a)?("LI"==h.nodeName?(H.insertAfter(a,h),b(h),H.remove(e)):d(h)?H.remove(e,!0):(h.insertBefore(o(a),e),H.remove(e)),!0):f(a)?("LI"==h.nodeName?(H.insertAfter(a,h),a.appendChild(e),b(h)):d(h)?h.insertBefore(a,e):(h.insertBefore(o(a),e),H.remove(a)),!0):g(a)?("LI"==h.nodeName?H.insertAfter(a,h):d(h)?H.insertAfter(a,e):(H.insertAfter(o(a),e),H.remove(a)),!0):("LI"==h.nodeName?(e=h,c=o(a,"LI")):c=d(h)?o(a,"LI"):o(a),q(e,a,c),s(e.parentNode),!0)}function v(a){function b(b,c){var e;if(d(b)){for(;e=a.lastChild.firstChild;)c.appendChild(e);H.remove(b)}}var c,e,f;return"DT"==a.nodeName?(H.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=H.create(a.parentNode.nodeName),f=H.getStyle(a.parentNode,"listStyleType"),f&&H.setStyle(e,"listStyleType",f),c.appendChild(e),e.appendChild(a),b(a.lastChild,e),!0):!1)))}function w(){var b=p();if(b.length){for(var c=k(I.getRng(!0)),d=0;d<b.length&&(v(b[d])||0!==d);d++);return n(c),a.nodeChanged(),!0}}function x(){var b=p();if(b.length){var c,d,e=k(I.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&&(u(b[c])||0!==c);c++);return n(e),a.nodeChanged(),!0}}function y(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(h(b))return b;if(/^(TD|TH)$/.test(b.parentNode.nodeName))return b;b=b.parentNode}return b}for(var d,e=[],f=a.getBody(),g=b(!0),j=b(),k=[],l=g;l&&(k.push(l),l!=j);l=l.nextSibling);return tinymce.each(k,function(a){if(h(a))return e.push(a),void(d=null);if(H.isBlock(a)||c(a))return c(a)&&H.remove(a),void(d=null);var b=a.nextSibling;return tinymce.dom.BookmarkManager.isBookmarkNode(a)&&(h(b)||!b&&a.parentNode==f)?void(d=null):(d||(d=H.create("p"),a.parentNode.insertBefore(d,a),e.push(d)),void d.appendChild(a))}),e}var g,i=I.getRng(!0),j="LI";"false"!==H.getContentEditable(I.getNode())&&(b=b.toUpperCase(),"DL"==b&&(j="DT"),g=k(i),tinymce.each(f(),function(a){var c,f,g=function(a){var b=H.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=H.rename(a,j),f.appendChild(a)):(c=H.create(b),a.parentNode.insertBefore(c,a),c.appendChild(a),a=H.rename(a,j)),K(c,e),r(c)}),n(g))}function z(){var b=k(I.getRng(!0)),c=a.getBody();tinymce.each(p(),function(a){var b,e;if(!i(a.parentNode)){if(j(a))return void u(a);for(b=a;b&&b!=c;b=b.parentNode)d(b)&&(e=b);q(e,a),s(e.parentNode)}}),n(b)}function A(a,b){var c=H.getParent(I.getStart(),"OL,UL,DL");if(!i(c))if(c)if(c.nodeName==a)z(a);else{var d=k(I.getRng(!0));K(c,b),r(H.rename(c,a)),n(d)}else y(a,b)}function B(b){return function(){var c=H.getParent(a.selection.getStart(),"UL,OL,DL");return c&&c.nodeName==b}}function C(a){return c(a)?!(!H.isBlock(a.nextSibling)||c(a.previousSibling)):!1}function D(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&&C(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 E(a,e){var f,g,h=a.parentNode;if(b(a)&&b(e)){if(d(e.lastChild)&&(g=e.lastChild),h==e.lastChild&&c(h.previousSibling)&&H.remove(h.previousSibling),f=e.lastChild,f&&c(f)&&a.hasChildNodes()&&H.remove(f),j(e,!0)&&H.$(e).empty(),!j(a,!0))for(;f=a.firstChild;)e.appendChild(f);g&&e.appendChild(g),H.remove(a),j(h)&&!i(h)&&H.remove(h)}}function F(a){var b,c,d,e=H.getParent(I.getStart(),"LI");if(e){if(b=e.parentNode,i(b)&&H.isEmpty(b))return!0;if(c=l(I.getRng(!0)),d=H.getParent(D(c,a),"LI"),d&&d!=e){var f=k(c);return a?E(d,e):E(e,d),n(f),!0}if(!d&&!a&&z(b.nodeName))return!0}}function G(){var b=a.dom.getParent(a.selection.getStart(),"LI,DT,DD");return b||p().length>0?(a.undoManager.transact(function(){a.execCommand("Delete"),s(a.getBody())}),!0):!1}var H=a.dom,I=a.selection,J=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},K=function(a,b){H.setStyle(a,"list-style-type",b?b["list-style-type"]:null)};m.backspaceDelete=function(a){return I.isCollapsed()?F(a):G()},a.on("BeforeExecCommand",function(b){var c,d=b.command.toLowerCase();return"indent"==d?w()&&(c=!0):"outdent"==d&&x()&&(c=!0),c?(a.fire("ExecCommand",{command:b.command}),b.preventDefault(),!0):void 0}),a.addCommand("InsertUnorderedList",function(a,b){A("UL",b)}),a.addCommand("InsertOrderedList",function(a,b){A("OL",b)}),a.addCommand("InsertDefinitionList",function(a,b){A("DL",b)}),a.addQueryStateHandler("InsertUnorderedList",B("UL")),a.addQueryStateHandler("InsertOrderedList",B("OL")),a.addQueryStateHandler("InsertDefinitionList",B("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?x():w())})}),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,e=0,g=c.length;!d&&g>e;e++){var h=c[e].nodeName;d="LI"==h&&f(c[e])||"UL"==h||"OL"==h||"DD"==h}b.disabled(d)})}}),a.on("keydown",function(a){a.keyCode==tinymce.util.VK.BACKSPACE?m.backspaceDelete()&&a.preventDefault():a.keyCode==tinymce.util.VK.DELETE&&m.backspaceDelete(!0)&&a.preventDefault()})});
\ No newline at end of file
index 8839e9ad4486934e993cb2ee66356692bbf299f7..7d2a71e5998bbbff64106b675b595a01b933dfb6 100644 (file)
@@ -264,7 +264,7 @@ define("tinymce/pasteplugin/SmartPaste", [
        "tinymce/util/Tools"
 ], function (Tools) {
        var isAbsoluteUrl = function (url) {
-               return /^https?:\/\/[\w\?\-\/+=.&%]+$/i.test(url);
+               return /^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(url);
        };
 
        var isImageUrl = function (url) {
@@ -1766,6 +1766,15 @@ define("tinymce/pasteplugin/Plugin", [
                        editor.focus();
                }
 
+               // draw back if power version is requested and registered
+               if (/(^|[ ,])powerpaste([, ]|$)/.test(settings.plugins) && PluginManager.get('powerpaste')) {
+                       /*eslint no-console:0 */
+                       if (typeof console !== "undefined" && console.log) {
+                               console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option.");
+                       }
+                       return;
+               }
+
                self.clipboard = clipboard = new Clipboard(editor);
                self.quirks = new Quirks(editor);
                self.wordFilter = new WordFilter(editor);
index 207f84d7d551f28e89a73be954d84f50188a7932..e639da521dd0be4855da149e3c22e4934eb2ccab 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/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
+!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(f){function g(){return e||f.settings.paste_plaintext_inform===!1}function h(){if("text"==i.pasteFormat)this.active(!1),i.pasteFormat="html",f.fire("PastePlainTextToggle",{state:!1});else if(i.pasteFormat="text",this.active(!0),!g()){var a=f.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");f.notificationManager.open({text:a,type:"info"}),e=!0,f.fire("PastePlainTextToggle",{state:!0})}f.focus()}var i,j=this,k=f.settings;return/(^|[ ,])powerpaste([, ]|$)/.test(k.plugins)&&a.get("powerpaste")?void("undefined"!=typeof console&&console.log&&console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option.")):(j.clipboard=i=new b(f),j.quirks=new d(f),j.wordFilter=new c(f),f.settings.paste_as_text&&(j.clipboard.pasteFormat="text"),k.paste_preprocess&&f.on("PastePreProcess",function(a){k.paste_preprocess.call(j,j,a)}),k.paste_postprocess&&f.on("PastePostProcess",function(a){k.paste_postprocess.call(j,j,a)}),f.addCommand("mceInsertClipboardContent",function(a,b){b.content&&j.clipboard.pasteHtml(b.content),b.text&&j.clipboard.pasteText(b.text)}),f.settings.paste_block_drop&&f.on("dragend dragover draggesture dragdrop drop drag",function(a){a.preventDefault(),a.stopPropagation()}),f.settings.paste_data_images||f.on("drop",function(a){var b=a.dataTransfer;b&&b.files&&b.files.length>0&&a.preventDefault()}),f.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:h,active:"text"==j.clipboard.pasteFormat}),void f.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:i.pasteFormat,onclick:h}))})}),f(["tinymce/pasteplugin/Utils"])}(this);
\ No newline at end of file
index b930e921f209f8208a7d1e6004fb2ed71eb43215..a38a26d3d404125cf274cf6b6a5df23a52131fa2 100644 (file)
@@ -131,10 +131,9 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
                        }
 
                        // Remove spaces from empty paragraphs.
-                       // Avoid backtracking, can freeze the editor. See #35890.
-                       // (This is also quite faster than using only one regex.)
+                       // Try to avoid a lot of backtracking, can freeze the editor. See #35890 and #38294.
                        event.content = event.content.replace( /<p>([^<>]+)<\/p>/gi, function( tag, text ) {
-                               if ( /^(&nbsp;|\s|\u00a0|\ufeff)+$/i.test( text ) ) {
+                               if ( text === '&nbsp;' || ! /\S/.test( text ) ) {
                                        return '<p><br /></p>';
                                }
 
@@ -231,48 +230,75 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
                        meta = tinymce.Env.mac ? __( 'Cmd + letter:' ) : __( 'Ctrl + letter:' ),
                        table1 = [],
                        table2 = [],
+                       row1 = {},
+                       row2 = {},
+                       i1 = 0,
+                       i2 = 0,
+                       labels = editor.settings.wp_shortcut_labels,
                        header, html, dialog, $wrap;
 
-               each( [
-                       { c: 'Copy',      x: 'Cut'              },
-                       { v: 'Paste',     a: 'Select all'       },
-                       { z: 'Undo',      y: 'Redo'             },
-                       { b: 'Bold',      i: 'Italic'           },
-                       { u: 'Underline', k: 'Insert/edit link' }
-               ], function( row ) {
-                       table1.push( tr( row ) );
-               } );
-
-               each( [
-                       { 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( row ) {
-                       table2.push( tr( row ) );
-               } );
+               if ( ! labels ) {
+                       return;
+               }
 
-               function tr( row ) {
+               function tr( row, columns ) {
                        var out = '<tr>';
+                       var i = 0;
+
+                       columns = columns || 1;
 
                        each( row, function( text, key ) {
-                               if ( ! text ) {
-                                       out += '<td></td><td></td>';
-                               } else {
-                                       out += '<td><kbd>' + key + '</kbd></td><td>' + __( text ) + '</td>';
-                               }
+                               out += '<td><kbd>' + key + '</kbd></td><td>' + __( text ) + '</td>';
+                               i++;
                        });
 
+                       while ( i < columns ) {
+                               out += '<td></td><td></td>';
+                               i++;
+                       }
+
                        return out + '</tr>';
                }
 
+               each ( labels, function( label, name ) {
+                       var letter;
+
+                       if ( label.indexOf( 'meta' ) !== -1 ) {
+                               i1++;
+                               letter = label.replace( 'meta', '' ).toLowerCase();
+
+                               if ( letter ) {
+                                       row1[ letter ] = name;
+
+                                       if ( i1 % 2 === 0 ) {
+                                               table1.push( tr( row1, 2 ) );
+                                               row1 = {};
+                                       }
+                               }
+                       } else if ( label.indexOf( 'access' ) !== -1 ) {
+                               i2++;
+                               letter = label.replace( 'access', '' ).toLowerCase();
+
+                               if ( letter ) {
+                                       row2[ letter ] = name;
+
+                                       if ( i2 % 2 === 0 ) {
+                                               table2.push( tr( row2, 2 ) );
+                                               row2 = {};
+                                       }
+                               }
+                       }
+               } );
+
+               // Add remaining single entries.
+               if ( i1 % 2 > 0 ) {
+                       table1.push( tr( row1, 2 ) );
+               }
+
+               if ( i2 % 2 > 0 ) {
+                       table2.push( tr( row2, 2 ) );
+               }
+
                header = [ __( 'Letter' ), __( 'Action' ), __( 'Letter' ), __( 'Action' ) ];
                header = '<tr><th>' + header.join( '</th><th>' ) + '</th></tr>';
 
@@ -521,6 +547,41 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
                                });
                        });
                }
+
+               if ( editor.settings.wp_shortcut_labels && editor.theme.panel ) {
+                       var labels = {};
+                       var access = 'Shift+Alt+';
+                       var meta = 'Ctrl+';
+
+                       // For Mac: ctrl = \u2303, cmd = \u2318, alt = \u2325
+
+                       if ( tinymce.Env.mac ) {
+                               access = '\u2303\u2325';
+                               meta = '\u2318';
+                       }
+
+                       each( editor.settings.wp_shortcut_labels, function( value, name ) {
+                               labels[ name ] = value.replace( 'access', access ).replace( 'meta', meta );
+                       } );
+
+                       each( editor.theme.panel.find('button'), function( button ) {
+                               if ( button && button.settings.tooltip && labels.hasOwnProperty( button.settings.tooltip ) ) {
+                                       // Need to translate now. We are changing the string so it won't match and cannot be translated later.
+                                       button.settings.tooltip = editor.translate( button.settings.tooltip ) + ' (' + labels[ button.settings.tooltip ] + ')';
+                               }
+                       } );
+
+                       // listbox for the "blocks" drop-down
+                       each( editor.theme.panel.find('listbox'), function( listbox ) {
+                               if ( listbox && listbox.settings.text === 'Paragraph' ) {
+                                       each( listbox.settings.values, function( item ) {
+                                               if ( item.text && labels.hasOwnProperty( item.text ) ) {
+                                                       item.shortcut = '(' + labels[ item.text ] + ')';
+                                               }
+                                       } );
+                               }
+                       } );
+               }
        });
 
        editor.on( 'SaveContent', function( event ) {
index f06f2faabf065bcea58a91ea0eb2da18c0e9e7ae..4a81d63ae6dbdbb81d0d9c9942685141fe2615d4 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"))}}),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
+!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;"!==b&&/\S/.test(b)?a:"<p><br /></p>"}))}),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,b){var c="<tr>",d=0;for(b=b||1,h(a,function(a,b){c+="<td><kbd>"+b+"</kbd></td><td>"+i(a)+"</td>",d++});d<b;)c+="<td></td><td></td>",d++;return c+"</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=[],n={},o={},p=0,q=0,r=b.settings.wp_shortcut_labels;r&&(h(r,function(a,b){var d;a.indexOf("meta")!==-1?(p++,d=a.replace("meta","").toLowerCase(),d&&(n[d]=b,p%2===0&&(l.push(c(n,2)),n={}))):a.indexOf("access")!==-1&&(q++,d=a.replace("access","").toLowerCase(),d&&(o[d]=b,q%2===0&&(m.push(c(o,2)),o={})))}),p%2>0&&l.push(c(n,2)),q%2>0&&m.push(c(o,2)),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;if(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.settings.wp_shortcut_labels&&b.theme.panel){var g={},i="Shift+Alt+",k="Ctrl+";a.Env.mac&&(i="\u2303\u2325",k="\u2318"),h(b.settings.wp_shortcut_labels,function(a,b){g[b]=a.replace("access",i).replace("meta",k)}),h(b.theme.panel.find("button"),function(a){a&&a.settings.tooltip&&g.hasOwnProperty(a.settings.tooltip)&&(a.settings.tooltip=b.translate(a.settings.tooltip)+" ("+g[a.settings.tooltip]+")")}),h(b.theme.panel.find("listbox"),function(a){a&&"Paragraph"===a.settings.text&&h(a.settings.values,function(a){a.text&&g.hasOwnProperty(a.text)&&(a.shortcut="("+g[a.text]+")")})})}}),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 890da1c2c8828a9205cc88d94cb70842fbfb0615..25d3356265b53bf322a97f157f7544061da1ca1b 100644 (file)
@@ -1,6 +1,6 @@
 /* global tinymce */
 tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
-       var toolbar, serializer, touchOnImage,
+       var toolbar, serializer, touchOnImage, pasteInCaption,
                each = tinymce.each,
                trim = tinymce.trim,
                iOS = tinymce.Env.iOS;
@@ -181,16 +181,10 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
                return content.replace( /(?:<div [^>]+mceTemp[^>]+>)?\s*(<dl [^>]+wp-caption[^>]+>[\s\S]+?<\/dl>)\s*(?:<\/div>)?/g, function( all, dl ) {
                        var out = '';
 
-                       if ( dl.indexOf('<img ') === -1 ) {
-                               // Broken caption. The user managed to drag the image out?
-                               // Try to return the caption text as a paragraph.
-                               out = dl.match( /<dd [^>]+>([\s\S]+?)<\/dd>/i );
-
-                               if ( out && out[1] ) {
-                                       return '<p>' + out[1] + '</p>';
-                               }
-
-                               return '';
+                       if ( dl.indexOf('<img ') === -1 || dl.indexOf('</p>') !== -1 ) {
+                               // Broken caption. The user managed to drag the image out or type in the wrapper div?
+                               // Remove the <dl>, <dd> and <dt> and return the remaining text.
+                               return dl.replace( /<d[ldt]( [^>]+)?>/g, '' ).replace( /<\/d[ldt]>/g, '' );
                        }
 
                        out = dl.replace( /\s*<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi, function( a, b, c, caption ) {
@@ -630,7 +624,8 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
                                captionId = '',
                                captionAlign = '',
                                captionWidth = '',
-                               wrap, parent, node, html, imgId;
+                               imgId = null,
+                               wrap, parent, node, html;
 
                        // Temp image id so we can find the node later
                        data.id = '__wp-temp-img-id';
@@ -796,7 +791,7 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
                        }
 
                        imgNode = dom.get('__wp-temp-img-id');
-                       dom.setAttrib( imgNode, 'id', imgId );
+                       dom.setAttrib( imgNode, 'id', imgId || null );
                        event.imgData.node = imgNode;
                });
 
@@ -856,21 +851,73 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
                                }
                        });
                }
-    });
+       });
+
+       editor.on( 'pastePostProcess', function( event ) {
+               // Pasting in a caption node.
+               if ( editor.dom.getParent( editor.selection.getNode(), 'dd.wp-caption-dd' ) ) {
+                       // Remove "non-block" elements that should not be in captions.
+                       editor.$( 'img, audio, video, object, embed, iframe, script, style', event.node ).remove();
+
+                       editor.$( '*', event.node ).each( function( i, node ) {
+                               if ( editor.dom.isBlock( node ) ) {
+                                       // Insert <br> where the blocks used to be. Makes it look better after pasting in the caption.
+                                       if ( tinymce.trim( node.textContent || node.innerText ) ) {
+                                               editor.dom.insertAfter( editor.dom.create( 'br' ), node );
+                                               editor.dom.remove( node, true );
+                                       } else {
+                                               editor.dom.remove( node );
+                                       }
+                               }
+                       });
+
+                       // Trim <br> tags.
+                       editor.$( 'br',  event.node ).each( function( i, node ) {
+                               if ( ! node.nextSibling || node.nextSibling.nodeName === 'BR' ||
+                                       ! node.previousSibling || node.previousSibling.nodeName === 'BR' ) {
+
+                                       editor.dom.remove( node );
+                               }
+                       } );
+
+                       // Pasted HTML is cleaned up for inserting in the caption.
+                       pasteInCaption = true;
+               }
+       });
 
        editor.on( 'BeforeExecCommand', function( event ) {
-               var node, p, DL, align, replacement,
+               var node, p, DL, align, replacement, captionParent,
                        cmd = event.command,
                        dom = editor.dom;
 
-               if ( cmd === 'mceInsertContent' ) {
-                       // When inserting content, if the caret is inside a caption create new paragraph under
-                       // and move the caret there
-                       if ( node = dom.getParent( editor.selection.getNode(), 'div.mceTemp' ) ) {
-                               p = dom.create( 'p' );
-                               dom.insertAfter( p, node );
-                               editor.selection.setCursorLocation( p, 0 );
-                               editor.nodeChanged();
+               if ( cmd === 'mceInsertContent' || cmd === 'Indent' || cmd === 'Outdent' ) {
+                       node = editor.selection.getNode();
+                       captionParent = dom.getParent( node, 'div.mceTemp' );
+
+                       if ( captionParent ) {
+                               if ( cmd === 'mceInsertContent' ) {
+                                       if ( pasteInCaption ) {
+                                               pasteInCaption = false;
+                                               // We are in the caption element, and in 'paste' context,
+                                               // and the pasted HTML was cleaned up on 'pastePostProcess' above.
+                                               // Let it be pasted in the caption.
+                                               return;
+                                       }
+
+                                       // The paste is somewhere else in the caption DL element.
+                                       // Prevent pasting in there as it will break the caption.
+                                       // Make new paragraph under the caption DL and move the caret there.
+                                       p = dom.create( 'p' );
+                                       dom.insertAfter( p, captionParent );
+                                       editor.selection.setCursorLocation( p, 0 );
+                                       editor.nodeChanged();
+                               } else {
+                                       // Clicking Indent or Outdent while an image with a caption is selected breaks the caption.
+                                       // See #38313.
+                                       event.preventDefault();
+                                       event.stopImmediatePropagation();
+                                       return false;
+                               }
                        }
                } else if ( cmd === 'JustifyLeft' || cmd === 'JustifyRight' || cmd === 'JustifyCenter' || cmd === 'wpAlignNone' ) {
                        node = editor.selection.getNode();
@@ -976,6 +1023,12 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
                return getShortcode( content );
        };
 
+       editor.on( 'beforeGetContent', function( event ) {
+               if ( event.format !== 'raw' ) {
+                       editor.$( 'img[id="__wp-temp-img-id"]' ).attr( 'id', null );
+               }       
+       });
+
        editor.on( 'BeforeSetContent', function( event ) {
                if ( event.format !== 'raw' ) {
                        event.content = editor.wpSetImgCaption( event.content );
index 8193b11ee302a147b0e9abd433066334c3aed208..3680d53b0d6762b423a1af74d8f8cce934c9126d 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){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
+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=q(d),i=d.match(/((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i),i&&i[2]?(h=q(i[2]),i=q(i[1])):(h=q(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||b.indexOf("</p>")!==-1?b.replace(/<d[ldt]( [^>]+)?>/g,"").replace(/<\/d[ldt]>/g,""):(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,p=tinymce.each,q=tinymce.trim,r=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())}}),p({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)}),r&&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=c.imgData.data,j=c.imgData.node,k=c.imgData.wpcaption,l="",m="",n="",o=null;return i.id="__wp-temp-img-id",c.imgData.cancel=!0,i.style||(i.style=null),i.src?(k&&(k=k.replace(/\r\n|\r/g,"\n").replace(/<\/?[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),k=k.replace(/(<br[^>]*>)\s*\n\s*/g,"$1").replace(/\s*\n\s*/g,"<br />"),k=h(k)),j?(o=j.id||null,b.setAttribs(j,i),d=b.getParent(j,"dl.wp-caption"),k?d?(e=b.select("dd.wp-caption-dd",d)[0])&&(e.innerHTML=k):(j.className&&(l=j.className.match(/wp-image-([0-9]+)/),m=j.className.match(/align(left|right|center|none)/)),m?(m=m[0],j.className=j.className.replace(/align(left|right|center|none)/g,"")):m="alignnone",m=' class="wp-caption '+m+'"',l&&(l=' id="attachment_'+l[1]+'"'),n=i.width||j.clientWidth,n&&(n=parseInt(n,10),a.getParam("wpeditimage_html5_captions")||(n+=10),n=' style="width: '+n+'px"'),f=j.parentNode&&"A"===j.parentNode.nodeName?j.parentNode:j,g="<dl "+l+m+n+'><dt class="wp-caption-dt"></dt><dd class="wp-caption-dd">'+k+"</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"===j.parentNode.nodeName?b.getOuterHTML(j.parentNode):b.getOuterHTML(j),e=b.create("p",{},g),b.insertAfter(e,d.parentNode),a.selection.select(e),a.nodeChanged(),b.remove(d.parentNode))):(g=b.createHTML("img",i),k?(f=a.selection.getNode(),i.width&&(n=parseInt(i.width,10),a.getParam("wpeditimage_html5_captions")||(n+=10),n=' style="width: '+n+'px"'),g='<dl class="wp-caption alignnone"'+n+'><dt class="wp-caption-dt">'+g+'</dt><dd class="wp-caption-dd">'+k+"</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)),j=b.get("__wp-temp-img-id"),b.setAttrib(j,"id",o||null),void(c.imgData.node=j)):void(j&&((d=b.getParent(j,"div.mceTemp"))?b.remove(d):"A"===j.parentNode.nodeName?b.remove(j.parentNode):b.remove(j),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("pastePostProcess",function(b){a.dom.getParent(a.selection.getNode(),"dd.wp-caption-dd")&&(a.$("img, audio, video, object, embed, iframe, script, style",b.node).remove(),a.$("*",b.node).each(function(b,c){a.dom.isBlock(c)&&(tinymce.trim(c.textContent||c.innerText)?(a.dom.insertAfter(a.dom.create("br"),c),a.dom.remove(c,!0)):a.dom.remove(c))}),a.$("br",b.node).each(function(b,c){c.nextSibling&&"BR"!==c.nextSibling.nodeName&&c.previousSibling&&"BR"!==c.previousSibling.nodeName||a.dom.remove(c)}),o=!0)}),a.on("BeforeExecCommand",function(b){var c,d,e,f,g,h,i=b.command,j=a.dom;if("mceInsertContent"===i||"Indent"===i||"Outdent"===i){if(c=a.selection.getNode(),h=j.getParent(c,"div.mceTemp")){if("mceInsertContent"!==i)return b.preventDefault(),b.stopImmediatePropagation(),!1;if(o)return void(o=!1);d=j.create("p"),j.insertAfter(d,h),a.selection.setCursorLocation(d,0),a.nodeChanged()}}else if("JustifyLeft"===i||"JustifyRight"===i||"JustifyCenter"===i||"wpAlignNone"===i){if(c=a.selection.getNode(),f="align"+i.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=q(c.className.replace(/ ?align(left|center|right|none)/g,"")+g),a.nodeChanged(),b.preventDefault(),l&&l.reposition(),a.fire("ExecCommand",{command:i,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("beforeGetContent",function(b){"raw"!==b.format&&a.$('img[id="__wp-temp-img-id"]').attr("id",null)}),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 1ce1c926c1abc85b69c5ea18f4b325ffff32dd62..96357f2e9eb2cf728e710efa96a0b956089f4451 100644 (file)
                } );
 
                editor.addButton( 'wp_link_remove', {
-                       tooltip: 'Remove',
-                       icon: 'dashicon dashicons-no',
+                       tooltip: 'Remove link',
+                       icon: 'dashicon dashicons-editor-unlink',
                        cmd: 'wp_unlink'
                } );
 
index 8351bef21416f0aff61b6c629cc024c90fc626b4..c35e5266f6b64ae2c22f3342aabbc7f2b7938599 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\.)?/,""),(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
+!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 link",icon:"dashicon dashicons-editor-unlink",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 5f3ff1a827f88b18198653cb1e30f29b47e1b651..236775034cce381f30df6f412d795d60424971f0 100644 (file)
@@ -3,27 +3,73 @@
  *
  * @since 4.3.0
  *
- * This plugin can automatically format text patterns as you type. It includes two patterns:
+ * This plugin can automatically format text patterns as you type. It includes several groups of patterns.
+ *
+ * Start of line patterns:
+ *  As-you-type:
  *  - Unordered list (`* ` and `- `).
  *  - Ordered list (`1. ` and `1) `).
  *
+ *  On enter:
+ *  - h2 (## ).
+ *  - h3 (### ).
+ *  - h4 (#### ).
+ *  - h5 (##### ).
+ *  - h6 (###### ).
+ *  - blockquote (> ).
+ *  - hr (---).
+ *
+ * Inline patterns:
+ *  - <code> (`) (backtick).
+ *
  * If the transformation in unwanted, the user can undo the change by pressing backspace,
  * using the undo shortcut, or the undo button in the toolbar.
+ *
+ * Setting for the patterns can be overridden by plugins by using the `tiny_mce_before_init` PHP filter.
+ * The setting name is `wptextpattern` and the value is an object containing override arrays for each
+ * patterns group. There are three groups: "space", "enter", and "inline". Example (PHP):
+ *
+ * add_filter( 'tiny_mce_before_init', 'my_mce_init_wptextpattern' );
+ * function my_mce_init_wptextpattern( $init ) {
+ *   $init['wptextpattern'] = wp_json_encode( array(
+ *      'inline' => array(
+ *        array( 'delimiter' => '**', 'format' => 'bold' ),
+ *        array( 'delimiter' => '__', 'format' => 'italic' ),
+ *      ),
+ *   ) );
+ *
+ *   return $init;
+ * }
+ *
+ * Note that setting this will override the default text patterns. You will need to include them
+ * in your settings array if you want to keep them working.
  */
 ( function( tinymce, setTimeout ) {
        if ( tinymce.Env.ie && tinymce.Env.ie < 9 ) {
                return;
        }
 
+       /**
+        * Escapes characters for use in a Regular Expression.
+        *
+        * @param  {String} string Characters to escape
+        *
+        * @return {String}        Escaped characters
+        */
+       function escapeRegExp( string ) {
+               return string.replace( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&' );
+       }
+
        tinymce.PluginManager.add( 'wptextpattern', function( editor ) {
                var VK = tinymce.util.VK;
+               var settings = editor.settings.wptextpattern || {};
 
-               var spacePatterns = [
+               var spacePatterns = settings.space || [
                        { regExp: /^[*-]\s/, cmd: 'InsertUnorderedList' },
                        { regExp: /^1[.)]\s/, cmd: 'InsertOrderedList' }
                ];
 
-               var enterPatterns = [
+               var enterPatterns = settings.enter || [
                        { start: '##', format: 'h2' },
                        { start: '###', format: 'h3' },
                        { start: '####', format: 'h4' },
                        { regExp: /^(-){3,}$/, element: 'hr' }
                ];
 
-               var inlinePatterns = [
-                       { start: '`', end: '`', format: 'code' }
+               var inlinePatterns = settings.inline || [
+                       { delimiter: '`', format: 'code' }
                ];
 
                var canUndo;
-               var chars = [];
-
-               tinymce.each( inlinePatterns, function( pattern ) {
-                       tinymce.each( ( pattern.start + pattern.end ).split( '' ), function( c ) {
-                               if ( tinymce.inArray( chars, c ) === -1 ) {
-                                       chars.push( c );
-                               }
-                       } );
-               } );
 
                editor.on( 'selectionchange', function() {
                        canUndo = null;
                                event.stopImmediatePropagation();
                        }
 
-                       if ( event.keyCode === VK.ENTER && ! VK.modifierPressed( event ) ) {
-                               enter();
+                       if ( VK.metaKeyPressed( event ) ) {
+                               return;
                        }
 
+                       if ( event.keyCode === VK.ENTER ) {
+                               enter();
                        // Wait for the browser to insert the character.
-                       if ( event.keyCode === VK.SPACEBAR && ! event.ctrlKey && ! event.metaKey && ! event.altKey ) {
+                       } else if ( event.keyCode === VK.SPACEBAR ) {
                                setTimeout( space );
                        } else if ( event.keyCode > 47 && ! ( event.keyCode >= 91 && event.keyCode <= 93 ) ) {
                                setTimeout( inline );
                        var format;
                        var zero;
 
+                       // We need a non empty text node with an offset greater than zero.
                        if ( ! node || node.nodeType !== 3 || ! node.data.length || ! offset ) {
                                return;
                        }
 
-                       if ( tinymce.inArray( chars, node.data.charAt( offset - 1 ) ) === -1 ) {
-                               return;
-                       }
+                       var string = node.data.slice( 0, offset );
+                       var lastChar = node.data.charAt( offset - 1 );
 
-                       function findStart( node ) {
-                               var i = inlinePatterns.length;
-                               var offset;
+                       tinymce.each( inlinePatterns, function( p ) {
+                               // Character before selection should be delimiter.
+                               if ( lastChar !== p.delimiter.slice( -1 ) ) {
+                                       return;
+                               }
+
+                               var escDelimiter = escapeRegExp( p.delimiter );
+                               var delimiterFirstChar = p.delimiter.charAt( 0 );
+                               var regExp = new RegExp( '(.*)' + escDelimiter + '.+' + escDelimiter + '$' );
+                               var match = string.match( regExp );
 
-                               while ( i-- ) {
-                                       pattern = inlinePatterns[ i ];
-                                       offset = node.data.indexOf( pattern.end );
+                               if ( ! match ) {
+                                       return;
+                               }
 
-                                       if ( offset !== -1 ) {
-                                               return offset;
+                               startOffset = match[1].length;
+                               endOffset = offset - p.delimiter.length;
+
+                               var before = string.charAt( startOffset - 1 );
+                               var after = string.charAt( startOffset + p.delimiter.length );
+
+                               // test*test* => format applied
+                               // test *test* => applied
+                               // test* test* => not applied
+                               if ( startOffset && /\S/.test( before ) ) {
+                                       if ( /\s/.test( after ) || before === delimiterFirstChar ) {
+                                               return;
                                        }
                                }
-                       }
 
-                       startOffset = findStart( node );
-                       endOffset = node.data.lastIndexOf( pattern.end );
+                               // Do not replace when only whitespace and delimiter characters.
+                               if ( ( new RegExp( '^[\\s' + escapeRegExp( delimiterFirstChar ) + ']+$' ) ).test( string.slice( startOffset, endOffset ) ) ) {
+                                       return;
+                               }
 
-                       if ( startOffset === endOffset || endOffset === -1 ) {
-                               return;
-                       }
+                               pattern = p;
 
-                       if ( endOffset - startOffset <= pattern.start.length ) {
-                               return;
-                       }
+                               return false;
+                       } );
 
-                       if ( node.data.slice( startOffset + pattern.start.length, endOffset ).indexOf( pattern.start.slice( 0, 1 ) ) !== -1 ) {
+                       if ( ! pattern ) {
                                return;
                        }
 
                                editor.undoManager.add();
 
                                editor.undoManager.transact( function() {
-                                       node.insertData( offset, '\u200b' );
+                                       node.insertData( offset, '\uFEFF' );
 
                                        node = node.splitText( startOffset );
                                        zero = node.splitText( offset - startOffset );
 
-                                       node.deleteData( 0, pattern.start.length );
-                                       node.deleteData( node.data.length - pattern.end.length, pattern.end.length );
+                                       node.deleteData( 0, pattern.delimiter.length );
+                                       node.deleteData( node.data.length - pattern.delimiter.length, pattern.delimiter.length );
 
                                        editor.formatter.apply( pattern.format, {}, node );
 
                                                var offset;
 
                                                if ( zero ) {
-                                                       offset = zero.data.indexOf( '\u200b' );
+                                                       offset = zero.data.indexOf( '\uFEFF' );
 
                                                        if ( offset !== -1 ) {
                                                                zero.deleteData( offset, offset + 1 );
index 9de68ef33d39bf50bfb4809439d124784877e01c..c4e7cbba50607cb7483163d996accb2d562d542f 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),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
+!function(a,b){function c(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}a.Env.ie&&a.Env.ie<9||a.PluginManager.add("wptextpattern",function(d){function e(){var e,f,g,h,i,k=d.selection.getRng(),l=k.startContainer,m=k.startOffset;if(l&&3===l.nodeType&&l.data.length&&m){var n=l.data.slice(0,m),p=l.data.charAt(m-1);a.each(o,function(a){if(p===a.delimiter.slice(-1)){var b=c(a.delimiter),d=a.delimiter.charAt(0),h=new RegExp("(.*)"+b+".+"+b+"$"),i=n.match(h);if(i){e=i[1].length,f=m-a.delimiter.length;var j=n.charAt(e-1),k=n.charAt(e+a.delimiter.length);if(!(e&&/\S/.test(j)&&(/\s/.test(k)||j===d)||new RegExp("^[\\s"+c(d)+"]+$").test(n.slice(e,f))))return g=a,!1}}}),g&&(h=d.formatter.get(g.format),h&&h[0].inline&&(d.undoManager.add(),d.undoManager.transact(function(){l.insertData(m,"\ufeff"),l=l.splitText(e),i=l.splitText(m-e),l.deleteData(0,g.delimiter.length),l.deleteData(l.data.length-g.delimiter.length,g.delimiter.length),d.formatter.apply(g.format,{},l),d.selection.setCursorLocation(i,1)}),b(function(){j="space",d.once("selectionchange",function(){var a;i&&(a=i.data.indexOf("\ufeff"),a!==-1&&i.deleteData(a,a+1))})})))}}function f(a){var b,c=d.dom.getParent(a,"p");if(c){for(;(b=c.firstChild)&&3!==b.nodeType;)c=b;if(b)return b.data||(b=b.nextSibling&&3===b.nextSibling.nodeType?b.nextSibling:null),b}}function g(){var c,e,g=d.selection.getRng(),h=g.startContainer;h&&f(h)===h&&(c=h.parentNode,e=h.data,a.each(m,function(a){var f=e.match(a.regExp);if(f&&g.startOffset===f[0].length)return d.undoManager.add(),d.undoManager.transact(function(){h.deleteData(0,f[0].length),c.innerHTML||c.appendChild(document.createElement("br")),d.selection.setCursorLocation(c),d.execCommand(a.cmd)}),b(function(){j="space"}),!1}))}function h(){var c,e,g,h=d.selection.getRng(),k=h.startContainer,l=f(k),m=n.length;if(l){for(c=l.data;m--;)if(n[m].start){if(0===c.indexOf(n[m].start)){e=n[m];break}}else if(n[m].regExp&&n[m].regExp.test(c)){e=n[m];break}e&&(l===k&&a.trim(c)===e.start||d.once("keyup",function(){d.undoManager.add(),d.undoManager.transact(function(){e.format?(d.formatter.apply(e.format,{},l),l.replaceData(0,l.data.length,i(l.data.slice(e.start.length)))):e.element&&(g=l.parentNode&&l.parentNode.parentNode,g&&g.replaceChild(document.createElement(e.element),l.parentNode))}),b(function(){j="enter"})}))}}function i(a){return a?a.replace(/^\s+/,""):""}var j,k=a.util.VK,l=d.settings.wptextpattern||{},m=l.space||[{regExp:/^[*-]\s/,cmd:"InsertUnorderedList"},{regExp:/^1[.)]\s/,cmd:"InsertOrderedList"}],n=l.enter||[{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:">",format:"blockquote"},{regExp:/^(-){3,}$/,element:"hr"}],o=l.inline||[{delimiter:"`",format:"code"}];d.on("selectionchange",function(){j=null}),d.on("keydown",function(a){(j&&27===a.keyCode||"space"===j&&a.keyCode===k.BACKSPACE)&&(d.undoManager.undo(),a.preventDefault(),a.stopImmediatePropagation()),k.metaKeyPressed(a)||(a.keyCode===k.ENTER?h():a.keyCode===k.SPACEBAR?b(g):a.keyCode>47&&!(a.keyCode>=91&&a.keyCode<=93)&&b(e))},!0)})}(window.tinymce,window.setTimeout);
\ No newline at end of file
index 2fc0e4b3d858bceae3657e8a926f589ab38e8906..e131474831d2cba5c2a28d1f8c3acd36cc9660cb 100644 (file)
                } );
 
                // Replace any new markers nodes with views.
-               editor.on( 'setcontent', function() {
+               editor.on( 'setcontent', function( event ) {
+                       if ( event.load && ! event.initial && editor.quirks.refreshContentEditable ) {
+                               // Make sure there is a selection in Gecko browsers.
+                               // Or it will refresh the content internally which resets the iframes.
+                               editor.quirks.refreshContentEditable();
+                       }
+
                        wp.mce.views.render();
                } );
 
                // Empty view nodes for easier processing.
-               editor.on( 'preprocess', function( event ) {
+               editor.on( 'preprocess hide', function( event ) {
                        editor.$( 'div[data-wpview-text], p[data-wpview-marker]', event.node ).each( function( i, node ) {
                                node.innerHTML = '.';
                        } );
index 0581ce901224f50815b47d8d98b24ea4f31b0ec8..bec6f2ef78017a5544fd0672f36b62569031f789 100644 (file)
@@ -1 +1 @@
-!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
+!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(a){a.load&&!a.initial&&c.quirks.refreshContentEditable&&c.quirks.refreshContentEditable(),b.mce.views.render()}),c.on("preprocess hide",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 02adfe7e44383a3ea4eea477ab9890616a74cc66..6f52773378ddf5efdff95b701fc9e2c9001a5edd 100644 (file)
@@ -4,6 +4,11 @@ html {
        cursor: text;
 }
 
+html.ios {
+       width: 100px;
+    min-width: 100%;
+}
+
 body {
        font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
        font-size: 16px;
@@ -206,6 +211,11 @@ audio {
        visibility: hidden;
 }
 
+/* Fix for proprietary Mozilla display attribute, see #38757 */
+[_moz_abspos] {
+       outline: none;
+}
+
 a[data-wplink-url-error],
 a[data-wplink-url-error]:hover,
 a[data-wplink-url-error]:focus {
index 13152a518e9b03baaf9df94dbfec61e38bfddf89..865d7982ae418be01fb387fe17af08a9b5eb9db6 100644 (file)
@@ -81,13 +81,56 @@ 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"]
+["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/alien/EditorSettings","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/alien/Type","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);
+/**
+ * Type.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/Type', [
+], function () {
+       var isType = function (type) {
+               return function (value) {
+                       return typeof value === type;
+               };
+       };
+
+       var isArray = function (value) {
+               return Array.isArray(value);
+       };
+
+       var isNull = function (value) {
+               return value === null;
+       };
+
+       var isObject = function (predicate) {
+               return function (value) {
+                       return !isNull(value) && !isArray(value) && predicate(value);
+               };
+       };
+
+       return {
+               isString: isType("string"),
+               isNumber: isType("number"),
+               isBoolean: isType("boolean"),
+               isFunction: isType("function"),
+               isObject: isObject(isType("object")),
+               isNull: isNull,
+               isArray: isArray
+       };
+});
+
 /**
  * Toolbar.js
  *
@@ -100,8 +143,9 @@ defineGlobal("global!tinymce.DOM", tinymce.DOM);
 
 define('tinymce/inlite/ui/Toolbar', [
        'global!tinymce.util.Tools',
-       'global!tinymce.ui.Factory'
-], function (Tools, Factory) {
+       'global!tinymce.ui.Factory',
+       'tinymce/inlite/alien/Type'
+], function (Tools, Factory, Type) {
        var setActiveItem = function (item, name) {
                return function(state, args) {
                        var nodeName, i = args.parents.length;
@@ -161,6 +205,16 @@ define('tinymce/inlite/ui/Toolbar', [
                };
        };
 
+       var itemsToArray = function (items) {
+               if (Type.isArray(items)) {
+                       return items;
+               } else if (Type.isString(items)) {
+                       return items.split(/[ ,]/);
+               }
+
+               return [];
+       };
+
        var create = function (editor, name, items) {
                var toolbarItems = [], buttonGroup;
 
@@ -168,7 +222,7 @@ define('tinymce/inlite/ui/Toolbar', [
                        return;
                }
 
-               Tools.each(items.split(/[ ,]/), function(item) {
+               Tools.each(itemsToArray(items), function(item) {
                        var itemName;
 
                        if (item == '|') {
@@ -179,12 +233,12 @@ define('tinymce/inlite/ui/Toolbar', [
                                        toolbarItems.push(item);
                                        buttonGroup = null;
                                } else {
-                                       if (!buttonGroup) {
-                                               buttonGroup = {type: 'buttongroup', items: []};
-                                               toolbarItems.push(buttonGroup);
-                                       }
-
                                        if (editor.buttons[item]) {
+                                               if (!buttonGroup) {
+                                                       buttonGroup = {type: 'buttongroup', items: []};
+                                                       toolbarItems.push(buttonGroup);
+                                               }
+
                                                itemName = item;
                                                item = editor.buttons[itemName];
 
@@ -897,10 +951,88 @@ define('tinymce/inlite/core/Layout', [
                return panelRect;
        };
 
+       var defaultHandler = function (rects) {
+               return rects.panelRect;
+       };
+
        return {
                calcInsert: calcInsert,
                calc: calc,
-               userConstrain: userConstrain
+               userConstrain: userConstrain,
+               defaultHandler: defaultHandler
+       };
+});
+
+/**
+ * EditorSettings.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/EditorSettings', [
+       'tinymce/inlite/alien/Type'
+], function (Type) {
+       var validDefaultOrDie = function (value, predicate) {
+               if (predicate(value)) {
+                       return true;
+               }
+
+               throw new Error('Default value doesn\'t match requested type.');
+       };
+
+       var getByTypeOr = function (predicate) {
+               return function (editor, name, defaultValue) {
+                       var settings = editor.settings;
+                       validDefaultOrDie(defaultValue, predicate);
+                       return name in settings && predicate(settings[name]) ? settings[name] : defaultValue;
+               };
+       };
+
+       var splitNoEmpty = function (str, delim) {
+               return str.split(delim).filter(function (item) {
+                       return item.length > 0;
+               });
+       };
+
+       var itemsToArray = function (value, defaultValue) {
+               var stringToItemsArray = function (value) {
+                       return typeof value === 'string' ? splitNoEmpty(value, /[ ,]/) : value;
+               };
+
+               var boolToItemsArray = function (value, defaultValue) {
+                       return value === false ? [ ] : defaultValue;
+               };
+
+               if (Type.isArray(value)) {
+                       return value;
+               } else if (Type.isString(value)) {
+                       return stringToItemsArray(value);
+               } else if (Type.isBoolean(value)) {
+                       return boolToItemsArray(value, defaultValue);
+               }
+
+               return defaultValue;
+       };
+
+       var getToolbarItemsOr = function (predicate) {
+               return function (editor, name, defaultValue) {
+                       var value = name in editor.settings ? editor.settings[name] : defaultValue;
+                       validDefaultOrDie(defaultValue, predicate);
+                       return itemsToArray(value, defaultValue);
+               };
+       };
+
+       return {
+               // TODO: Add Option based getString, getBool if merged with core
+               getStringOr: getByTypeOr(Type.isString),
+               getBoolOr: getByTypeOr(Type.isBoolean),
+               getNumberOr: getByTypeOr(Type.isNumber),
+               getHandlerOr: getByTypeOr(Type.isFunction),
+               getToolbarItemsOr: getToolbarItemsOr(Type.isArray)
        };
 });
 
@@ -921,11 +1053,12 @@ define('tinymce/inlite/ui/Panel', [
        'tinymce/inlite/ui/Toolbar',
        'tinymce/inlite/ui/Forms',
        'tinymce/inlite/core/Measure',
-       'tinymce/inlite/core/Layout'
-], function (Tools, Factory, DOM, Toolbar, Forms, Measure, Layout) {
+       'tinymce/inlite/core/Layout',
+       'tinymce/inlite/alien/EditorSettings'
+], function (Tools, Factory, DOM, Toolbar, Forms, Measure, Layout, EditorSettings) {
        return function () {
-               var DEFAULT_TEXT_SELECTION_ITEMS = 'bold italic | quicklink h2 h3 blockquote';
-               var DEFAULT_INSERT_TOOLBAR_ITEMS = 'quickimage quicktable';
+               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) {
@@ -934,23 +1067,22 @@ define('tinymce/inlite/ui/Panel', [
                        });
                };
 
-               var getTextSelectionToolbarItems = function (settings) {
-                       var value = settings.selection_toolbar;
-                       return value ? value : DEFAULT_TEXT_SELECTION_ITEMS;
+               var getTextSelectionToolbarItems = function (editor) {
+                       return EditorSettings.getToolbarItemsOr(editor, 'selection_toolbar', DEFAULT_TEXT_SELECTION_ITEMS);
                };
 
-               var getInsertToolbarItems = function (settings) {
-                       var value = settings.insert_toolbar;
-                       return value ? value : DEFAULT_INSERT_TOOLBAR_ITEMS;
+               var getInsertToolbarItems = function (editor) {
+                       return EditorSettings.getToolbarItemsOr(editor, 'insert_toolbar', DEFAULT_INSERT_TOOLBAR_ITEMS);
                };
 
-               var create = function (editor, toolbars) {
-                       var items, settings = editor.settings;
+               var hasToolbarItems = function (toolbar) {
+                       return toolbar.items().length > 0;
+               };
 
-                       items = createToolbars(editor, toolbars);
-                       items = items.concat([
-                               Toolbar.create(editor, 'text', getTextSelectionToolbarItems(settings)),
-                               Toolbar.create(editor, 'insert', getInsertToolbarItems(settings)),
+               var create = function (editor, toolbars) {
+                       var items = createToolbars(editor, toolbars).concat([
+                               Toolbar.create(editor, 'text', getTextSelectionToolbarItems(editor)),
+                               Toolbar.create(editor, 'insert', getInsertToolbarItems(editor)),
                                Forms.createQuickLinkForm(editor, hide)
                        ]);
 
@@ -966,7 +1098,7 @@ define('tinymce/inlite/ui/Panel', [
                                autofix: true,
                                fixed: true,
                                border: 1,
-                               items: items,
+                               items: Tools.grep(items, hasToolbarItems),
                                oncancel: function() {
                                        editor.focus();
                                }
@@ -1016,7 +1148,10 @@ define('tinymce/inlite/ui/Panel', [
                        if (toolbars.length > 0) {
                                toolbars[0].show();
                                panel.reflow();
+                               return true;
                        }
+
+                       return false;
                };
 
                var showPanelAt = function (panel, id, editor, targetRect) {
@@ -1024,9 +1159,13 @@ define('tinymce/inlite/ui/Panel', [
 
                        showPanel(panel);
                        panel.items().hide();
-                       showToolbar(panel, id);
 
-                       userConstainHandler = editor.settings.inline_toolbar_position_handler;
+                       if (!showToolbar(panel, id)) {
+                               hide(panel);
+                               return;
+                       }
+
+                       userConstainHandler = EditorSettings.getHandlerOr(editor, 'inline_toolbar_position_handler', Layout.defaultHandler);
                        contentAreaRect = Measure.getContentAreaRect(editor);
                        panelRect = DOM.getRect(panel.getEl());
 
@@ -1040,7 +1179,6 @@ define('tinymce/inlite/ui/Panel', [
                                panelRect = result.rect;
                                currentRect = targetRect;
                                movePanelTo(panel, Layout.userConstrain(userConstainHandler, targetRect, contentAreaRect, panelRect));
-
                                togglePositionClass(panel, result.position);
                        } else {
                                hide(panel);
@@ -1054,7 +1192,11 @@ define('tinymce/inlite/ui/Panel', [
                var showForm = function (editor, id) {
                        if (panel) {
                                panel.items().hide();
-                               showToolbar(panel, id);
+
+                               if (!showToolbar(panel, id)) {
+                                       hide(panel);
+                                       return;
+                               }
 
                                var contentAreaRect, panelRect, result, userConstainHandler;
 
@@ -1062,7 +1204,7 @@ define('tinymce/inlite/ui/Panel', [
                                panel.items().hide();
                                showToolbar(panel, id);
 
-                               userConstainHandler = editor.settings.inline_toolbar_position_handler;
+                               userConstainHandler = EditorSettings.getHandlerOr(editor, 'inline_toolbar_position_handler', Layout.defaultHandler);
                                contentAreaRect = Measure.getContentAreaRect(editor);
                                panelRect = DOM.getRect(panel.getEl());
 
@@ -1071,7 +1213,6 @@ define('tinymce/inlite/ui/Panel', [
                                if (result) {
                                        panelRect = result.rect;
                                        movePanelTo(panel, Layout.userConstrain(userConstainHandler, currentRect, contentAreaRect, panelRect));
-
                                        togglePositionClass(panel, result.position);
                                }
                        }
@@ -1305,9 +1446,18 @@ define('tinymce/inlite/core/SkinLoader', [
                }
        };
 
-       var load = function (editor, skin, callback) {
-               var baseUrl = EditorManager.baseURL;
-               var skinUrl = baseUrl + '/skins/' + skin;
+       var urlFromName = function (name) {
+               var prefix = EditorManager.baseURL + '/skins/';
+               return name ? prefix + name : prefix + 'lightgray';
+       };
+
+       var toAbsoluteUrl = function (editor, url) {
+               return editor.documentBaseURI.toAbsolute(url);
+       };
+
+       var load = function (editor, callback) {
+               var settings = editor.settings;
+               var skinUrl = settings.skin_url ? toAbsoluteUrl(editor, settings.skin_url) : urlFromName(settings.skin);
 
                var done = function () {
                        fireSkinLoaded(editor, callback);
@@ -1544,8 +1694,9 @@ define('tinymce/inlite/Theme', [
        'tinymce/inlite/core/ElementMatcher',
        'tinymce/inlite/core/Matcher',
        'tinymce/inlite/alien/Arr',
+       'tinymce/inlite/alien/EditorSettings',
        'tinymce/inlite/core/PredicateId'
-], function(ThemeManager, Delay, Panel, Buttons, SkinLoader, SelectionMatcher, ElementMatcher, Matcher, Arr, PredicateId) {
+], function(ThemeManager, Delay, Panel, Buttons, SkinLoader, SelectionMatcher, ElementMatcher, Matcher, Arr, EditorSettings, PredicateId) {
        var getSelectionElements = function (editor) {
                var node = editor.selection.getNode();
                var elms = editor.dom.getParents(node);
@@ -1644,9 +1795,7 @@ define('tinymce/inlite/Theme', [
        };
 
        var renderInlineUI = function (editor, panel) {
-               var skinName = editor.settings.skin || 'lightgray';
-
-               SkinLoader.load(editor, skinName, function () {
+               SkinLoader.load(editor, function () {
                        bindContextualToolbarsEvents(editor, panel);
                        overrideLinkShortcut(editor, panel);
                });
index 4d3f2672f7857a14d7c4be9a481107448a07bc76..09f710042bcbed847218acc87e2d99b894ca6997 100644 (file)
@@ -1 +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
+!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("c",tinymce.util.Tools),h("d",tinymce.ui.Factory),h("e",tinymce.DOM),g("j",[],function(){var a=function(a){return function(b){return typeof b===a}},b=function(a){return Array.isArray(a)},c=function(a){return null===a},d=function(a){return function(d){return!c(d)&&!b(d)&&a(d)}};return{isString:a("string"),isNumber:a("number"),isBoolean:a("boolean"),isFunction:a("function"),isObject:d(a("object")),isNull:c,isArray:b}}),g("f",["c","d","j"],function(a,b,c){var d=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)}},e=function(a,b){var c=function(a,b){return{selector:a,handler:b}},e=function(a){b.active(a)},f=function(a){b.disabled(a)};return"bullist"==a?c("ul > li",d(b,"UL")):"numlist"==a?c("ol > li",d(b,"OL")):b.settings.stateSelector?c(b.settings.stateSelector,e):b.settings.disabledStateSelector?c(b.settings.disabledStateSelector,f):null},f=function(a,b,c){return function(){var d=e(b,c);null!==d&&a.selection.selectorChanged(d.selector,d.handler)}},g=function(a){return c.isArray(a)?a:c.isString(a)?a.split(/[ ,]/):[]},h=function(c,d,e){var h,i=[];if(e)return a.each(g(e),function(a){var d;"|"==a?h=null:b.has(a)?(a={type:a},i.push(a),h=null):c.buttons[a]&&(h||(h={type:"buttongroup",items:[]},i.push(h)),d=a,a=c.buttons[d],"function"==typeof a&&(a=a()),a.type=a.type||"button",a=b.create(a),a.on("postRender",f(c,d,a)),h.items.push(a))}),b.create({type:"toolbar",layout:"flow",name:d,items:i})};return{create:h}}),h("o",tinymce.util.Promise),g("p",[],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("u",[],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("v",tinymce.dom.TreeWalker),h("w",tinymce.dom.RangeUtils),g("q",["u","c","v","w"],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("m",["p","q"],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("r",[],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("g",["c","d","o","m","r"],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("s",tinymce.geom.Rect),g("t",[],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("h",["e","s","t"],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("i",["s","t"],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},i=function(a){return a.panelRect};return{calcInsert:f,calc:g,userConstrain:h,defaultHandler:i}}),g("a",["j"],function(a){var b=function(a,b){if(b(a))return!0;throw new Error("Default value doesn't match requested type.")},c=function(a){return function(c,d,e){var f=c.settings;return b(e,a),d in f&&a(f[d])?f[d]:e}},d=function(a,b){return a.split(b).filter(function(a){return a.length>0})},e=function(b,c){var e=function(a){return"string"==typeof a?d(a,/[ ,]/):a},f=function(a,b){return a===!1?[]:b};return a.isArray(b)?b:a.isString(b)?e(b):a.isBoolean(b)?f(b,c):c},f=function(a){return function(c,d,f){var g=d in c.settings?c.settings[d]:f;return b(f,a),e(g,f)}};return{getStringOr:c(a.isString),getBoolOr:c(a.isBoolean),getNumberOr:c(a.isNumber),getHandlerOr:c(a.isFunction),getToolbarItemsOr:f(a.isArray)}}),g("3",["c","d","e","f","g","h","i","a"],function(a,b,c,d,e,f,g,h){return function(){var i,j,k=["bold","italic","|","quicklink","h2","h3","blockquote"],l=["quickimage","quicktable"],m=function(b,c){return a.map(c,function(a){return d.create(b,a.id,a.items)})},n=function(a){return h.getToolbarItemsOr(a,"selection_toolbar",k)},o=function(a){return h.getToolbarItemsOr(a,"insert_toolbar",l)},p=function(a){return a.items().length>0},q=function(c,f){var g=m(c,f).concat([d.create(c,"text",n(c)),d.create(c,"insert",o(c)),e.createQuickLinkForm(c,z)]);return 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:a.grep(g,p),oncancel:function(){c.focus()}})},r=function(a){a&&a.show()},s=function(a,b){a.moveTo(b.x,b.y)},t=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))})},u=function(a,b){var c=a.items().filter("#"+b);return c.length>0?(c[0].show(),a.reflow(),!0):!1},v=function(a,b,d,e){var i,k,l,m;return r(a),a.items().hide(),u(a,b)?(m=h.getHandlerOr(d,"inline_toolbar_position_handler",g.defaultHandler),i=f.getContentAreaRect(d),k=c.getRect(a.getEl()),l="insert"===b?g.calcInsert(e,i,k):g.calc(e,i,k),void(l?(k=l.rect,j=e,s(a,g.userConstrain(m,e,i,k)),t(a,l.position)):z(a))):void z(a)},w=function(){return i.items().filter("form:visible").length>0},x=function(a,b){if(i){if(i.items().hide(),!u(i,b))return void z(i);var d,e,k,l;r(i),i.items().hide(),u(i,b),l=h.getHandlerOr(a,"inline_toolbar_position_handler",g.defaultHandler),d=f.getContentAreaRect(a),e=c.getRect(i.getEl()),k=g.calc(j,d,e),k&&(e=k.rect,s(i,g.userConstrain(l,j,d,e)),t(i,k.position))}},y=function(a,b,c,d){i||(i=q(a,d),i.renderTo(document.body).reflow().moveTo(c.x,c.y),a.nodeChanged()),v(i,b,a,c)},z=function(){i&&i.hide()},A=function(){i&&i.find("toolbar:visible").eq(0).each(function(a){a.focus(!0)})},B=function(){i&&(i.remove(),i=null)},C=function(){return i&&i.visible()&&w()};return{show:y,showForm:x,inForm:C,hide:z,focus:A,remove:B}}}),g("k",["o"],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("l",["o"],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","k","l","m"],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("n",tinymce.EditorManager),g("5",["n","e"],function(a,b){var c=function(a,b){var c=function(){a.fire("SkinLoaded"),b()};a.initialized?c():a.on("init",c)},d=function(b){var c=a.baseURL+"/skins/";return b?c+b:c+"lightgray"},e=function(a,b){return a.documentBaseURI.toAbsolute(b)},f=function(a,f){var g=a.settings,h=g.skin_url?e(a,g.skin_url):d(g.skin),i=function(){c(a,f)};b.styleSheetLoader.load(h+"/skin.min.css",i),a.contentCSS.push(h+"/content.inline.min.css")};return{load:f}}),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","h"],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","h"],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("b",["c"],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","b"],function(a,b,c,d,e,f,g,h,i,j,k){var l=function(a){var b=a.selection.getNode(),c=a.dom.getParents(b);return c},m=function(a,b,c,d){var e=function(c){return a.dom.is(c,b)};return{predicate:e,id:c,items:d}},n=function(a){var b=a.contextToolbars;return i.flatten([b?b:[],m(a,"img","image","alignleft aligncenter alignright")])},o=function(a,b){var c,d,e;return d=l(a),e=k.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},p=function(a,b){var c=function(){var c=n(a),d=o(a,c);d?b.show(a,d.id,d.rect,c):b.hide()};return function(){a.removed||c()}},q=function(a,b){return function(){a.inForm()||b()}},r=function(a,c){var d=b.throttle(p(a,c),0),e=b.throttle(q(c,p(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)},s=function(a,b){a.shortcuts.remove("meta+k"),a.shortcuts.add("meta+k","",function(){var c=n(a),d=d=h.match(a,[f.textSelection("quicklink")]);d&&b.show(a,d.id,d.rect,c)})},t=function(a,b){return e.load(a,function(){r(a,b),s(a,b)}),{}},u=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?t(a,b):u("inlite theme only supports inline mode.")};return{renderUI:e}}),function(){}}),d("0")()}();
\ No newline at end of file
index ddd85f7bfe0955a860bda26062b14a71e816d38f..fafccbab8cc4f7858fb95321945fd3be2da56918 100644 (file)
@@ -1,13 +1,14 @@
-// 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
+// 4.4.3 (2016-09-01)
+!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",O="tinymce/dom/Serializer",H="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",Oe="tinymce/dom/NodePath",He="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/dom/MousePosition",Qe="tinymce/DragDropOverrides",Ze="tinymce/SelectionOverrides",et="tinymce/util/Uuid",tt="tinymce/Editor",nt="tinymce/util/I18n",rt="tinymce/FocusManager",it="tinymce/EditorManager",ot="tinymce/LegacyInput",at="tinymce/util/XHR",st="tinymce/util/JSON",lt="tinymce/util/JSONRequest",ct="tinymce/util/JSONP",ut="tinymce/util/LocalStorage",dt="tinymce/Compat",ft="tinymce/ui/Layout",ht="tinymce/ui/AbsoluteLayout",pt="tinymce/ui/Button",mt="tinymce/ui/ButtonGroup",gt="tinymce/ui/Checkbox",vt="tinymce/ui/ComboBox",yt="tinymce/ui/ColorBox",bt="tinymce/ui/PanelButton",Ct="tinymce/ui/ColorButton",xt="tinymce/util/Color",wt="tinymce/ui/ColorPicker",Nt="tinymce/ui/Path",Et="tinymce/ui/ElementPath",_t="tinymce/ui/FormItem",St="tinymce/ui/Form",kt="tinymce/ui/FieldSet",Tt="tinymce/ui/FilePicker",Rt="tinymce/ui/FitLayout",At="tinymce/ui/FlexLayout",Bt="tinymce/ui/FlowLayout",Dt="tinymce/ui/FormatControls",Lt="tinymce/ui/GridLayout",Mt="tinymce/ui/Iframe",Pt="tinymce/ui/InfoBox",Ot="tinymce/ui/Label",Ht="tinymce/ui/Toolbar",It="tinymce/ui/MenuBar",Ft="tinymce/ui/MenuButton",zt="tinymce/ui/MenuItem",Ut="tinymce/ui/Throbber",Wt="tinymce/ui/Menu",Vt="tinymce/ui/ListBox",$t="tinymce/ui/Radio",qt="tinymce/ui/ResizeHandle",jt="tinymce/ui/SelectBox",Yt="tinymce/ui/Slider",Xt="tinymce/ui/Spacer",Kt="tinymce/ui/SplitButton",Gt="tinymce/ui/StackLayout",Jt="tinymce/ui/TabPanel",Qt="tinymce/ui/TextBox",Zt="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,canHaveCSP:o===!1||o>11,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,O,H,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},O=[],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(H=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){x.disconnectedMatch=H.call(e,"div"),H.call(e,"[s!='']:x"),O.push("!=",ae)}),P=P.length&&new RegExp(P.join("|")),O=O.length&&new RegExp(O.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&&(!O||!O.test(n))&&(!P||!P.test(n)))try{var r=H.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(O)}function g(){return E(H)}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!=H&&(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!=H&&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!=H&&(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!=H&&(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!=H&&(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!=H&&(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!=H&&(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==H?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,O=0,H=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="\ufeff";return{isZwsp:e,ZWSP:n,trim:t}}),r(k,[_,S],function(e,t){function n(e){return p(e)&&(e=e.parentNode),h(e)&&e.hasAttribute("data-mce-caret")}function r(e){return p(e)&&t.isZwsp(e.data)}function i(e){return n(e)||r(e)}function o(e){var t=e.parentNode;t&&t.removeChild(e)}function a(e){try{return e.nodeValue}catch(t){return""}}function s(e,t){0===t.length?o(e):e.nodeValue=t}function l(e,n){var r,o,a,s;if(r=e.ownerDocument,a=r.createTextNode(t.ZWSP),s=e.parentNode,n){if(o=e.previousSibling,p(o)){if(i(o))return o;if(f(o))return o.splitText(o.data.length-1)}s.insertBefore(a,e)}else{if(o=e.nextSibling,p(o)){if(i(o))return o;if(d(o))return o.splitText(1),o}e.nextSibling?s.insertBefore(a,e.nextSibling):s.appendChild(a)}return a}function c(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 u(e){if(h(e)&&i(e)&&("&nbsp;"!=e.innerHTML?e.removeAttribute("data-mce-caret"):o(e)),p(e)){var n=t.trim(a(e));s(e,n)}}function d(e){return p(e)&&e.data[0]==t.ZWSP}function f(e){return p(e)&&e.data[e.data.length-1]==t.ZWSP}var h=e.isElement,p=e.isText;return{isCaretContainer:i,isCaretContainerBlock:n,isCaretContainerInline:r,insertInline:l,insertBlock:c,remove:u,startsWithCaretContainer:d,endsWithCaretContainer:f}}),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,O,H,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"),O=/([\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,H=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(O,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=H[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,O,H,I;if(o=o||{},h={},p={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlockElements()),H=l.getNonEmptyElements(),O=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=O[b.name],s&&O[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(H))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(O,[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=document.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(H,[],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]+H,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+(H-U)),B[3]<0&&T.clientHeight<=W&&_.setStyle(T,"top",O+(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:H,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,O=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,H=k.clientWidth,I=k.clientHeight,F=I/H,B=e,e.startPos={x:o*e[0]+P,y:a*e[1]+O},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:O,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"},H+" &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]+O-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,O,H,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,H,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&&0!==i.indexOf("data-")&&(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(H(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(H(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=H(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=O(t,"span",{id:"_start","data-mce-type":"bookmark"}),l(t),void(t=u(re));t=O(t,"span",{id:"_start","data-mce-type":"bookmark"}),n=O(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 O(e,t,n){var r=Y.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function H(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++){var s=o[i].nodeName;if(0!==s.indexOf("_")&&0!==s.indexOf("data-"))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=O(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=H(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=H(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"),H=W?C(W):a.create("BR"),e(!0)&&e()?"LI"==n?a.insertAfter(H,t()):a.replace(H,F):e(!0)?"LI"==n?(a.insertAfter(H,t()),H.appendChild(a.doc.createTextNode(" ")),H.appendChild(F)):F.parentNode.insertBefore(H,F):e()?(a.insertAfter(H,t()),m(H)):(F=t(),A=R.cloneRange(),A.setStartAfter(M),A.setEndAfter(F),I=A.extractContents(),"LI"==W&&"LI"==I.firstChild.nodeName?(H=I.firstChild,a.insertAfter(I,F)):(a.insertAfter(I,F),a.insertAfter(H,F))),a.remove(M),v(H),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(){H=/^(H[1-6]|PRE|FIGURE)$/.test(z)&&"HGROUP"!=U?C(W):C(),l.end_container_on_empty_block&&h(F)&&a.isEmpty(M)?H=a.split(F,M):a.insertAfter(H,M),v(H)}var R,A,B,D,L,M,P,O,H,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,O=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&&!O||E());if((W&&!O||!W&&O)&&(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&&O)return void E();if(a.isEmpty(M))return void N()}if("PRE"==z&&l.br_in_pre!==!1){if(!O)return void E()}else if(!W&&!O&&"LI"!=z||W&&O)return void E();W&&M===i.getBody()||(W=W||"P",x()?T():x(!0)?(H=M.parentNode.insertBefore(C(),M),m(H),v(M)):(A=R.cloneRange(),A.setEndAfter(M),I=A.extractContents(),_(I),H=I.firstChild,a.insertAfter(I,M),g(H),k(M),a.isEmpty(M)&&b(M),H.normalize(),a.isEmpty(H)?(a.remove(H),T()):v(H)),a.setAttrib(H,"id",""),i.fire("NewBlock",{newBlock:H}),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 O={context:x.nodeName.toLowerCase(),data:u.data};if(N=b.parse(c,O),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),O.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,[d,m,w],function(e,t,n){var r=0,i={id:function(){return"mceu_"+r++},create:function(e,r,i){var o=document.createElement(e);return n.DOM.setAttribs(o,r),"string"==typeof i?o.innerHTML=i:t.each(i,function(e){e.nodeType&&o.appendChild(e)}),o},createFragment:function(e){return n.DOM.createFragment(e)},getWindowSize:function(){return n.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,t){return n.DOM.getPos(e,t||i.getContainer())},getContainer:function(){return e.container?e.container:document.body},getViewPort:function(e){return n.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,t){return n.DOM.addClass(e,t)},removeClass:function(e,t){return n.DOM.removeClass(e,t)},hasClass:function(e,t){return n.DOM.hasClass(e,t)},toggleClass:function(e,t,r){return n.DOM.toggleClass(e,t,r)},css:function(e,t,r){return n.DOM.setStyle(e,t,r)},getRuntimeStyle:function(e,t){return n.DOM.getStyle(e,t,!0)},on:function(e,t,r,i){return n.DOM.bind(e,t,r,i)},off:function(e,t,r){return n.DOM.unbind(e,t,r)},fire:function(e,t,r){return n.DOM.fire(e,t,r)},innerHtml:function(e,t){n.DOM.setHTML(e,t)}};return i}),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 o.getContainer()},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(Oe,[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(He,[I,T,y,Oe,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 O(){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 H(){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(),O(),H(),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,[],function(){var e=function(e){var t,n,r,i;return i=e.getBoundingClientRect(),t=e.ownerDocument,n=t.documentElement,r=t.defaultView,{top:i.top+r.pageYOffset-n.clientTop,left:i.left+r.pageXOffset-n.clientLeft}},t=function(t){return t.inline?e(t.getBody()):{left:0,top:0}},n=function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}},r=function(e){var t=e.getBody(),n=e.getDoc().documentElement,r={left:t.scrollLeft,top:t.scrollTop},i={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?r:i},i=function(t,n){if(n.target.ownerDocument!==t.getDoc()){var i=e(t.getContentAreaContainer()),o=r(t);return{left:n.pageX-i.left+o.left,top:n.pageY-i.top+o.top}}return{left:n.pageX,top:n.pageY}},o=function(e,t,n){return{pageX:n.left-e.left+t.left,pageY:n.top-e.top+t.top}},a=function(e,r){return o(t(e),n(e),i(e,r))};return{calc:a}}),r(Qe,[_,p,z,u,w,Je],function(e,t,n,r,i,o){var a=e.isContentEditableFalse,s=e.isContentEditableTrue,l=function(e){return a(e)},c=function(e,t,n){return t===n||e.dom.isChildOf(t,n)?!1:!a(t)},u=function(e){var t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t},d=function(e,t,n,r){var i=t.cloneNode(!0);e.dom.setStyles(i,{width:n,height:r}),e.dom.setAttrib(i,"data-mce-selected",null);var o=e.dom.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(o,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(i,{margin:0,boxSizing:"border-box"}),o.appendChild(i),o},f=function(e,t){e.parentNode!==t&&t.appendChild(e)},h=function(e,t,n,r,i,o){var a=0,s=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>i&&(a=t.pageX+n-i),
+t.pageY+r>o&&(s=t.pageY+r-o),e.style.width=n-a+"px",e.style.height=r-s+"px"},p=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},m=function(e){return 0===e.button},g=function(e){return e.element},v=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}},y=function(e,r){return function(i){if(m(i)){var o=t.find(r.dom.getParents(i.target),n.or(a,s));if(l(o)){var c=r.dom.getPos(o),u=r.getBody(),f=r.getDoc().documentElement;e.element=o,e.screenX=i.screenX,e.screenY=i.screenY,e.maxX=(r.inline?u.scrollWidth:f.offsetWidth)-2,e.maxY=(r.inline?u.scrollHeight:f.offsetHeight)-2,e.relX=i.pageX-c.x,e.relY=i.pageY-c.y,e.width=o.offsetWidth,e.height=o.offsetHeight,e.ghost=d(r,o,e.width,e.height)}}}},b=function(e,t){var n=r.throttle(function(e,n){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(e,n)},0);return function(r){var i=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(g(e)&&!e.dragging&&i>10){var a=t.fire("dragstart",{target:e.element});if(a.isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){var s=v(e,o.calc(t,r));f(e.ghost,t.getBody()),h(e.ghost,s,e.width,e.height,e.maxX,e.maxY),n(r.clientX,r.clientY)}}},C=function(e,t){return function(n){if(e.dragging&&c(t,t.selection.getNode(),e.element)){var r=u(e.element),i=t.fire("drop",{targetClone:r,clientX:n.clientX,clientY:n.clientY});i.isDefaultPrevented()||(r=i.targetClone,t.undoManager.transact(function(){p(e.element),t.insertContent(t.dom.getOuterHTML(r)),t._selectionOverrides.hideFakeCaret()}))}w(e)}},x=function(e,t){return function(){w(e),e.dragging&&t.fire("dragend")}},w=function(e){e.dragging=!1,e.element=null,p(e.ghost)},N=function(e){var t={},n,r,o,a,s,l;n=i.DOM,l=document,r=y(t,e),o=b(t,e),a=C(t,e),s=x(t,e),e.on("mousedown",r),e.on("mousemove",o),e.on("mouseup",a),n.bind(l,"mousemove",o),n.bind(l,"mouseup",s),e.on("remove",function(){n.unbind(l,"mousemove",o),n.unbind(l,"mouseup",s)})},E=function(e){e.on("drop",function(t){var n="undefined"!=typeof t.clientX?e.getDoc().elementFromPoint(t.clientX,t.clientY):null;(a(n)||a(e.dom.getContentEditableParent(n)))&&t.preventDefault()})},_=function(e){N(e),E(e)};return{init:_}}),r(Ze,[d,ne,$,k,te,Ye,Ke,Ge,_,T,W,I,z,p,u,Qe,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(){var e=c.dom.get(le);return e?e.getElementsByTagName("*")[0]:e}function S(e){return c.dom.isBlock(e)}function k(e){e&&c.selection.setRng(e)}function T(){return c.selection.getRng()}function R(e,t){c.selection.scrollIntoView(e,t)}function A(e,t,n){var r;return r=c.fire("ShowCaret",{target:t,direction:e,before:n}),r.isDefaultPrevented()?null:(R(t,-1===e),se.show(n,t))}function B(e){var t;return se.hide(),t=c.fire("BeforeObjectSelected",{target:e}),t.isDefaultPrevented()?null:D(e)}function D(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}function L(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,re,t),-1==e?n.fromRangeStart(t):n.fromRangeEnd(t)}function P(e){return r.isCaretContainerBlock(e.startContainer)}function O(e,t,n,r){var i,o,a,s;return!r.collapsed&&(i=_(r),x(i))?A(e,i,-1==e):(s=P(r),o=M(e,r),n(o)?B(o.getNode(-1==e)):(o=t(o))?n(o)?A(e,o.getNode(-1==e),1==e):(a=t(o),n(a)&&L(o,a)?A(e,a.getNode(-1==e),1==e):s?$(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(re,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),A(e,l.node,f>d);if(p){var m=a.positionsUntil(e,re,a.isAboveLine(1),p);if(l=s.findClosestClientRect(h.filter(m,a.isLine(1)),u))return $(l.position.toRange());if(l=h.last(h.filter(m,a.isLine(0))))return $(l.position.toRange())}}function I(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?oe(n.fromRangeStart(r)):ae(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 F(e,t,n,r){var i;return(i=O(e,t,n,r))?i:(i=I(e,r),i?i:null)}function z(e,t,n){var r;return(r=H(e,t,n))?r:(r=I(e,n),r?r:null)}function U(){return ue("*[data-mce-caret]")[0]}function W(e){e=ue(e),e.attr("data-mce-caret")&&(se.hide(),e.removeAttr("data-mce-caret"),e.removeAttr("data-mce-bogus"),e.removeAttr("style"),k(T()),R(e[0]))}function V(e){var t,r;return e=i.normalizeRange(1,re,e),t=n.fromRangeStart(e),x(t.getNode())?A(1,t.getNode(),!t.isAtEnd()):x(t.getNode(!0))?A(1,t.getNode(!0),!1):(r=c.dom.getParent(t.getNode(),f.or(x,C)),x(r)?A(1,r,!1):(se.hide(),null))}function $(e){var t;return e&&e.collapsed?(t=V(e),t?t:e):e}function q(e){var t,i,o,a;return x(e)?(x(e.previousSibling)&&(o=e.previousSibling),i=ae(n.before(e)),i||(t=oe(n.after(e))),t&&w(t.getNode())&&(a=t.getNode()),r.remove(e.previousSibling),r.remove(e.nextSibling),c.dom.remove(e),ee(),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 j(e){var t=c.schema.getTextBlockElements();return e.nodeName in t}function Y(e){return c.dom.isEmpty(e)}function X(e,t,r){var i=c.dom,o,a,s,l;if(o=i.getParent(t.getNode(),i.isBlock),a=i.getParent(r.getNode(),i.isBlock),-1===e){if(l=r.getNode(!0),N(r)&&S(l))return j(o)?(Y(o)&&i.remove(o),n.after(l).toRange()):q(r.getNode(!0))}else if(l=t.getNode(),E(t)&&S(l))return j(a)?(Y(a)&&i.remove(a),n.before(l).toRange()):q(t.getNode());if(o===a||!j(o)||!j(a))return null;for(;s=o.firstChild;)a.appendChild(s);return c.dom.remove(o),r.toRange()}function K(e,t,n,i){var o,a,s,l;return!i.collapsed&&(o=_(i),x(o))?$(q(o)):(a=M(e,i),n(a)&&r.isCaretContainerBlock(i.startContainer)?(l=-1==e?ie.prev(a):ie.next(a),l?$(l.toRange()):i):t(a)?$(q(a.getNode(-1==e))):(s=-1==e?ie.prev(a):ie.next(a),t(s)?-1===e?X(e,a,s):X(e,s,a):void 0))}function G(){function r(e,t){var n=t(T());n&&!e.isDefaultPrevented()&&(e.preventDefault(),k(n))}function i(e){for(var t=c.getBody();e&&e!=t;){if(C(e)||x(e))return e;e=e.parentNode}return null}function o(e,t,n){return n.collapsed?!1:h.reduce(n.getClientRects(),function(n,r){return n||u.containsXY(r,e,t)},!1)}function l(e){var t=!1;e.on("touchstart",function(){t=!1}),e.on("touchmove",function(){t=!0}),e.on("touchend",function(e){var n=i(e.target);x(n)?t||(e.preventDefault(),Z(B(n))):ee()})}function f(){var e,t=i(c.selection.getNode());C(t)&&S(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 g(e){var t=U();if(t)return"compositionstart"==e.type?(e.preventDefault(),e.stopPropagation(),void W(t)):void("&nbsp;"!=t.innerHTML&&W(t))}function v(e){var t;switch(e.keyCode){case d.DELETE:t=f();break;case d.BACKSPACE:t=f()}t&&e.preventDefault()}var w=b(F,1,oe,E),_=b(F,-1,ae,N),R=b(K,1,E,N),D=b(K,-1,N,E),L=b(z,-1,a.upUntil),M=b(z,1,a.downUntil);c.on("mouseup",function(){var e=T();e.collapsed&&k(V(e))}),c.on("click",function(e){var t;t=i(e.target),t&&x(t)&&(e.preventDefault(),c.focus())});var P=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)},O=function(e,t){var n=c.dom.getParent(e,c.dom.isBlock),r=c.dom.getParent(t,c.dom.isBlock);return n===r},H=function(e,t){var n=c.dom.getParent(e,c.dom.isBlock),r=c.dom.getParent(t,c.dom.isBlock);return n&&!O(n,r)&&P(n)};l(c),c.on("mousedown",function(e){var t;if(t=i(e.target))x(t)?(e.preventDefault(),Z(B(t))):(ee(),o(e.clientX,e.clientY,c.selection.getRng())||c.selection.placeCaretAt(e.clientX,e.clientY));else{ee(),se.hide();var n=s.closestCaret(re,e.clientX,e.clientY);n&&(H(e.target,n.node)||(e.preventDefault(),c.getBody().focus(),k(A(1,n.node,n.before))))}}),c.on("keydown",function(e){if(!d.modifierPressed(e))switch(e.keyCode){case d.RIGHT:r(e,w);break;case d.DOWN:r(e,M);break;case d.LEFT:r(e,_);break;case d.UP:r(e,L);break;case d.DELETE:r(e,R);break;case d.BACKSPACE:r(e,D);break;default:x(c.selection.getNode())&&e.preventDefault()}}),c.on("keyup compositionstart",function(e){g(e),v(e)},!0),c.on("cut",function(){var e=c.selection.getNode();x(e)&&p.setEditorTimeout(c,function(){k($(q(e)))})}),c.on("getSelectionRange",function(e){var t=e.range;if(ce){if(!ce.parentNode)return void(ce=null);t=t.cloneRange(),t.selectNode(ce),e.range=t}}),c.on("setSelectionRange",function(e){var t;t=Z(e.range),t&&(e.range=t)}),c.on("focus",function(){p.setEditorTimeout(c,function(){c.selection.setRng($(c.selection.getRng()))},0)}),c.on("copy",function(t){var n=t.clipboardData;if(!t.isDefaultPrevented()&&t.clipboardData&&!e.ie){var r=y();r&&(t.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),m.init(c)}function J(){var e=c.contentStyles,t=".mce-content-body";e.push(se.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")}function Q(e){return r.isCaretContainer(e.startContainer)||r.isCaretContainer(e.endContainer)}function Z(t){var n,r=c.$,i=c.dom,o,a,s,l,u,d,f,h,p;if(!t)return ee(),null;if(t.collapsed){if(ee(),!Q(t)){if(f=M(1,t),x(f.getNode()))return A(1,f.getNode(),!f.isAtEnd());if(x(f.getNode(!0)))return A(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?(ee(),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()?(ee(),null):(h=d.targetClone,o=r("#"+le),0===o.length&&(o=r('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",le),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),ce=n,t)):(ee(),null))}function ee(){ce&&(ce.removeAttribute("data-mce-selected"),c.$("#"+le).remove(),ce=null)}function te(){se.destroy(),ce=null}function ne(){se.hide()}var re=c.getBody(),ie=new t(re),oe=b(v,ie.next),ae=b(v,ie.prev),se=new o(c.getBody(),S),le="sel-"+c.dom.uniqueId(),ce,ue=c.$;return e.ceFalse&&(G(),J()),{showBlockCaretContainer:W,hideFakeCaret:ne,destroy:te}}var b=f.curry,C=l.isContentEditableTrue,x=l.isContentEditableFalse,w=l.isElement,N=i.isAfterContentEditableFalse,E=i.isBeforeContentEditableFalse,_=c.getSelectedNode;return y}),r(et,[],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(tt,[w,g,E,R,A,O,P,Y,J,Q,Z,ee,oe,ae,N,f,Ae,Pe,B,L,He,d,m,u,Ie,Fe,ze,je,Ze,et],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,O=N.each,H=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(" ")),O(r.external_plugins,function(e,t){M.load(t,e),r.plugins+=" "+t}),O(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);O(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(O(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(t.rtl=n.rtl_ui||t.editorManager.i18n.rtl,t.editorManager.i18n.setCode(n.language),n.aria_label=n.aria_label||D.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),t.fire("ScriptsLoaded"),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),O(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&&O(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="'+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){O(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="",O(n.contentStyles,function(e){m+=e+"\r\n"}),n.dom.addStyle(m)),O(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?O(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"))&&O(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(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},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),O(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(nt,[],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(rt,[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(it,[tt,g,w,ae,d,m,c,ue,nt,rt],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.3",releaseDate:"2016-09-01",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(ot,[it,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(at,[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(st,[],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(lt,[st,at,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(ct,[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(ut,[],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(dt,[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(ft,[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(ht,[ft],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(pt,[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(mt,[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(gt,[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(vt,[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(yt,[vt],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(bt,[pt,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(Ct,[bt,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(xt,[],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(wt,[De,we,pe,xt],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(Nt,[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(Et,[Nt],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(_t,[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(St,[xe,_t,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(kt,[St],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(Tt,[vt,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(Rt,[ht],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(At,[ht],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,O,H,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",O="left",M="w",D="x",L="innerW",
+P="minW",H="right",I="deltaW",F="contentW"):(S="x",E="w",_="minW",k="maxW",R="innerW",T="left",A="deltaW",B="contentW",O="top",M="h",D="y",L="innerH",P="minH",H="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[O]+p[P]+o[H],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[O],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[O]-o[H]),x[D]=o[O]):"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(Bt,[ft],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(Dt,[ye,De,ke,m,w,it,d],function(e,t,n,r,i,o,a){function s(e){e.settings.ui_container&&(a.container=i.DOM.select(e.settings.ui_container)[0])}function l(t){t.on("ScriptsLoaded",function(){t.rtl&&(e.rtl=!0)})}function c(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;u(i.parents,function(e){return u(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 u(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(){u(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&&l(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 s(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function l(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var c;c=i(),u({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(){l(n)}})}),u({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]})}),u({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:s,cmd:"mceToggleVisualAid"}),e.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),u({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:c}),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 u(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:l,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 u(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 u(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:c})}var u=r.each;o.on("AddEditor",function(e){var t=e.editor;l(t),c(t),s(t)}),e.translate=function(e){return o.translate(e)},t.tooltips=!a.iOS}),r(Lt,[ht],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 O=e.parent();O&&(O._lastRect=null,O.recalc())}}})}),r(Mt,[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(Pt,[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(Ot,[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(It,[Ht],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(Ft,[pt,be,It],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(zt,[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(Ut,[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(Wt,[ke,zt,Ut,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(Vt,[Ft,Wt],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($t,[gt],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),r(qt,[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(jt,[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(Yt,[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(Xt,[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(Kt,[Ft,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(Gt,[Bt],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),r(Jt,[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(Qt,[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(Zt,[],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,O,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,tt,nt,rt,it,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,Ot,Ht,It,Ft,zt,Ut,Wt,Vt,$t,qt,jt,Yt,Xt,Kt,Gt,Jt,Qt])}(this);
\ No newline at end of file
index 20d22c43dc4fe82a5715d371d80b7c78190785c5..4d5ca926beeeee8d56b508b394d9709a65f4d206 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 b268d7e4921ffc1fd4407266b29770ff4024b048..9033d7f65f69908d45cfd225d0ab41e876762250 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]|\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,
+    re = /\ud83d[\udc68-\udc69](?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92])|(?:\ud83c[\udfcb\udfcc]|\ud83d\udd75|\u26f9)(?:\ufe0f|\ud83c[\udffb-\udfff])\u200d[\u2640\u2642]\ufe0f|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd37-\udd39\udd3d\udd3e])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|\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\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\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\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\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|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|(?:[\u0023\u002a\u0030-\u0039])\ufe0f?\u20e3|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\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\udecc]|\ud83e[\udd18-\udd1c\udd1e\udd26\udd30\udd33-\udd39\udd3d\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\uddf3\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]|\ud800\udc00|\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\uded0-\uded2\udeeb\udeec\udef4-\udef6]|\ud83e[\udd10-\udd17\udd1d\udd20-\udd25\udd27\udd3a\udd3c\udd40-\udd45\udd47-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]|[\u23e9-\u23ec\u23f0\u23f3\u2640\u2642\u2695\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\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\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\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 78c0f6a67075bd66c93cf743ea2ffcb6ae9d6251..5fe4fe5e4aeaab6154336d9c782caf2fcef8b293 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")&&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
+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-\udc69](?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92])|(?:\ud83c[\udfcb\udfcc]|\ud83d\udd75|\u26f9)(?:\ufe0f|\ud83c[\udffb-\udfff])\u200d[\u2640\u2642]\ufe0f|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd37-\udd39\udd3d\udd3e])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|\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\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\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\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\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|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|(?:[\u0023\u002a\u0030-\u0039])\ufe0f?\u20e3|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\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\udecc]|\ud83e[\udd18-\udd1c\udd1e\udd26\udd30\udd33-\udd39\udd3d\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\uddf3\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]|\ud800\udc00|\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\uded0-\uded2\udeeb\udeec\udef4-\udef6]|\ud83e[\udd10-\udd17\udd1d\udd20-\udd25\udd27\udd3a\udd3c\udd40-\udd45\udd47-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]|[\u23e9-\u23ec\u23f0\u23f3\u2640\u2642\u2695\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\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\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\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 60c274620332c30ba38e9df2d67e5ac65bdbe5d6..d8fa7d8d22ba8c903d07103945dcf705c0e43ebf 100644 (file)
@@ -110,7 +110,7 @@ var wpCookies = {
                if ( typeof( expires ) === 'object' && expires.toGMTString ) {
                        expires = expires.toGMTString();
                } else if ( parseInt( expires, 10 ) ) {
-                       d.setTime( d.getTime() + ( parseInt( expires, 10 ) * 1000 ) ); // time must be in miliseconds
+                       d.setTime( d.getTime() + ( parseInt( expires, 10 ) * 1000 ) ); // time must be in milliseconds
                        expires = d.toGMTString();
                } else {
                        expires = '';
index d35632102b8abd7e68611b5d02c816a1f8190257..50c66525af832cde4cb02fd4316747812f4d3140 100644 (file)
@@ -56,7 +56,7 @@ var wpAjax = jQuery.extend( {
                selector = jQuery( selector );
                return !wpAjax.invalidateForm( selector.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.' } );
+}, wpAjax || { noPerm: 'Sorry, you are not allowed to do that.', broken: 'An unidentified error has occurred.' } );
 
 // Basic form validation
 jQuery(document).ready( function($){
index 51a3503ca6d4fb97afd2081e1b9f19f2184208f7..5f1ed664443ddea229b7007abd6234ce64c66390 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>"))},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:"Sorry, you are not allowed 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
diff --git a/wp-includes/js/wp-api.js b/wp-includes/js/wp-api.js
new file mode 100644 (file)
index 0000000..a14d21f
--- /dev/null
@@ -0,0 +1,1337 @@
+(function( window, undefined ) {
+
+       'use strict';
+
+       /**
+        * Initialise the WP_API.
+        */
+       function WP_API() {
+               this.models = {};
+               this.collections = {};
+               this.views = {};
+       }
+
+       window.wp            = window.wp || {};
+       wp.api               = wp.api || new WP_API();
+       wp.api.versionString = wp.api.versionString || 'wp/v2/';
+
+       // Alias _includes to _.contains, ensuring it is available if lodash is used.
+       if ( ! _.isFunction( _.includes ) && _.isFunction( _.contains ) ) {
+         _.includes = _.contains;
+       }
+
+})( window );
+
+(function( window, undefined ) {
+
+       'use strict';
+
+       var pad, r;
+
+       window.wp = window.wp || {};
+       wp.api = wp.api || {};
+       wp.api.utils = wp.api.utils || {};
+
+       /**
+        * ECMAScript 5 shim, adapted from MDN.
+        * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
+        */
+       if ( ! Date.prototype.toISOString ) {
+               pad = function( number ) {
+                       r = String( number );
+                       if ( 1 === r.length ) {
+                               r = '0' + r;
+                       }
+
+                       return r;
+               };
+
+               Date.prototype.toISOString = function() {
+                       return this.getUTCFullYear() +
+                               '-' + pad( this.getUTCMonth() + 1 ) +
+                               '-' + pad( this.getUTCDate() ) +
+                               'T' + pad( this.getUTCHours() ) +
+                               ':' + pad( this.getUTCMinutes() ) +
+                               ':' + pad( this.getUTCSeconds() ) +
+                               '.' + String( ( this.getUTCMilliseconds() / 1000 ).toFixed( 3 ) ).slice( 2, 5 ) +
+                               'Z';
+               };
+       }
+
+       /**
+        * Parse date into ISO8601 format.
+        *
+        * @param {Date} date.
+        */
+       wp.api.utils.parseISO8601 = function( date ) {
+               var timestamp, struct, i, k,
+                       minutesOffset = 0,
+                       numericKeys = [ 1, 4, 5, 6, 7, 10, 11 ];
+
+               // ES5 §15.9.4.2 states that the string should attempt to be parsed as a Date Time String Format string
+               // before falling back to any implementation-specific date parsing, so that’s what we do, even if native
+               // implementations could be faster.
+               //              1 YYYY                2 MM       3 DD           4 HH    5 mm       6 ss        7 msec        8 Z 9 ±    10 tzHH    11 tzmm
+               if ( ( struct = /^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec( date ) ) ) {
+
+                       // Avoid NaN timestamps caused by “undefined” values being passed to Date.UTC.
+                       for ( i = 0; ( k = numericKeys[i] ); ++i ) {
+                               struct[k] = +struct[k] || 0;
+                       }
+
+                       // Allow undefined days and months.
+                       struct[2] = ( +struct[2] || 1 ) - 1;
+                       struct[3] = +struct[3] || 1;
+
+                       if ( 'Z' !== struct[8]  && undefined !== struct[9] ) {
+                               minutesOffset = struct[10] * 60 + struct[11];
+
+                               if ( '+' === struct[9] ) {
+                                       minutesOffset = 0 - minutesOffset;
+                               }
+                       }
+
+                       timestamp = Date.UTC( struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7] );
+               } else {
+                       timestamp = Date.parse ? Date.parse( date ) : NaN;
+               }
+
+               return timestamp;
+       };
+
+       /**
+        * Helper function for getting the root URL.
+        * @return {[type]} [description]
+        */
+       wp.api.utils.getRootUrl = function() {
+               return window.location.origin ?
+                       window.location.origin + '/' :
+                       window.location.protocol + '/' + window.location.host + '/';
+       };
+
+       /**
+        * Helper for capitalizing strings.
+        */
+       wp.api.utils.capitalize = function( str ) {
+               if ( _.isUndefined( str ) ) {
+                       return str;
+               }
+               return str.charAt( 0 ).toUpperCase() + str.slice( 1 );
+       };
+
+       /**
+        * Extract a route part based on negative index.
+        *
+        * @param {string} route The endpoint route.
+        * @param {int}    part  The number of parts from the end of the route to retrieve. Default 1.
+        *                       Example route `/a/b/c`: part 1 is `c`, part 2 is `b`, part 3 is `a`.
+        */
+       wp.api.utils.extractRoutePart = function( route, part ) {
+               var routeParts;
+
+               part  = part || 1;
+
+               // Remove versions string from route to avoid returning it.
+               route = route.replace( wp.api.versionString, '' );
+               routeParts = route.split( '/' ).reverse();
+               if ( _.isUndefined( routeParts[ --part ] ) ) {
+                       return '';
+               }
+               return routeParts[ part ];
+       };
+
+       /**
+        * Extract a parent name from a passed route.
+        *
+        * @param {string} route The route to extract a name from.
+        */
+       wp.api.utils.extractParentName = function( route ) {
+               var name,
+                       lastSlash = route.lastIndexOf( '_id>[\\d]+)/' );
+
+               if ( lastSlash < 0 ) {
+                       return '';
+               }
+               name = route.substr( 0, lastSlash - 1 );
+               name = name.split( '/' );
+               name.pop();
+               name = name.pop();
+               return name;
+       };
+
+       /**
+        * Add args and options to a model prototype from a route's endpoints.
+        *
+        * @param {array}  routeEndpoints Array of route endpoints.
+        * @param {Object} modelInstance  An instance of the model (or collection)
+        *                                to add the args to.
+        */
+       wp.api.utils.decorateFromRoute = function( routeEndpoints, modelInstance ) {
+
+               /**
+                * Build the args based on route endpoint data.
+                */
+               _.each( routeEndpoints, function( routeEndpoint ) {
+
+                       // Add post and edit endpoints as model args.
+                       if ( _.includes( routeEndpoint.methods, 'POST' ) || _.includes( routeEndpoint.methods, 'PUT' ) ) {
+
+                               // Add any non empty args, merging them into the args object.
+                               if ( ! _.isEmpty( routeEndpoint.args ) ) {
+
+                                       // Set as default if no args yet.
+                                       if ( _.isEmpty( modelInstance.prototype.args ) ) {
+                                               modelInstance.prototype.args = routeEndpoint.args;
+                                       } else {
+
+                                               // We already have args, merge these new args in.
+                                               modelInstance.prototype.args = _.union( routeEndpoint.args, modelInstance.prototype.defaults );
+                                       }
+                               }
+                       } else {
+
+                               // Add GET method as model options.
+                               if ( _.includes( routeEndpoint.methods, 'GET' ) ) {
+
+                                       // Add any non empty args, merging them into the defaults object.
+                                       if ( ! _.isEmpty( routeEndpoint.args ) ) {
+
+                                               // Set as default if no defaults yet.
+                                               if ( _.isEmpty( modelInstance.prototype.options ) ) {
+                                                       modelInstance.prototype.options = routeEndpoint.args;
+                                               } else {
+
+                                                       // We already have options, merge these new args in.
+                                                       modelInstance.prototype.options = _.union( routeEndpoint.args, modelInstance.prototype.options );
+                                               }
+                                       }
+
+                               }
+                       }
+
+               } );
+
+       };
+
+       /**
+        * Add mixins and helpers to models depending on their defaults.
+        *
+        * @param {Backbone Model} model          The model to attach helpers and mixins to.
+        * @param {string}         modelClassName The classname of the constructed model.
+        * @param {Object}             loadingObjects An object containing the models and collections we are building.
+        */
+       wp.api.utils.addMixinsAndHelpers = function( model, modelClassName, loadingObjects ) {
+
+               var hasDate = false,
+
+                       /**
+                        * Array of parseable dates.
+                        *
+                        * @type {string[]}.
+                        */
+                       parseableDates = [ 'date', 'modified', 'date_gmt', 'modified_gmt' ],
+
+                       /**
+                        * Mixin for all content that is time stamped.
+                        *
+                        * This mixin converts between mysql timestamps and JavaScript Dates when syncing a model
+                        * to or from the server. For example, a date stored as `2015-12-27T21:22:24` on the server
+                        * gets expanded to `Sun Dec 27 2015 14:22:24 GMT-0700 (MST)` when the model is fetched.
+                        *
+                        * @type {{toJSON: toJSON, parse: parse}}.
+                        */
+                       TimeStampedMixin = {
+
+                               /**
+                                * Prepare a JavaScript Date for transmitting to the server.
+                                *
+                                * This helper function accepts a field and Date object. It converts the passed Date
+                                * to an ISO string and sets that on the model field.
+                                *
+                                * @param {Date}   date   A JavaScript date object. WordPress expects dates in UTC.
+                                * @param {string} field  The date field to set. One of 'date', 'date_gmt', 'date_modified'
+                                *                        or 'date_modified_gmt'. Optional, defaults to 'date'.
+                                */
+                               setDate: function( date, field ) {
+                                       var theField = field || 'date';
+
+                                       // Don't alter non parsable date fields.
+                                       if ( _.indexOf( parseableDates, theField ) < 0 ) {
+                                               return false;
+                                       }
+
+                                       this.set( theField, date.toISOString() );
+                               },
+
+                               /**
+                                * Get a JavaScript Date from the passed field.
+                                *
+                                * WordPress returns 'date' and 'date_modified' in the timezone of the server as well as
+                                * UTC dates as 'date_gmt' and 'date_modified_gmt'. Draft posts do not include UTC dates.
+                                *
+                                * @param {string} field  The date field to set. One of 'date', 'date_gmt', 'date_modified'
+                                *                        or 'date_modified_gmt'. Optional, defaults to 'date'.
+                                */
+                               getDate: function( field ) {
+                                       var theField   = field || 'date',
+                                               theISODate = this.get( theField );
+
+                                       // Only get date fields and non null values.
+                                       if ( _.indexOf( parseableDates, theField ) < 0 || _.isNull( theISODate ) ) {
+                                               return false;
+                                       }
+
+                                       return new Date( wp.api.utils.parseISO8601( theISODate ) );
+                               }
+                       },
+
+                       /**
+                        * Build a helper function to retrieve related model.
+                        *
+                        * @param  {string} parentModel      The parent model.
+                        * @param  {int}    modelId          The model ID if the object to request
+                        * @param  {string} modelName        The model name to use when constructing the model.
+                        * @param  {string} embedSourcePoint Where to check the embedds object for _embed data.
+                        * @param  {string} embedCheckField  Which model field to check to see if the model has data.
+                        *
+                        * @return {Deferred.promise}        A promise which resolves to the constructed model.
+                        */
+                       buildModelGetter = function( parentModel, modelId, modelName, embedSourcePoint, embedCheckField ) {
+                               var getModel, embeddeds, attributes, deferred;
+
+                               deferred  = jQuery.Deferred();
+                               embeddeds = parentModel.get( '_embedded' ) || {};
+
+                               // Verify that we have a valid object id.
+                               if ( ! _.isNumber( modelId ) || 0 === modelId ) {
+                                       deferred.reject();
+                                       return deferred;
+                               }
+
+                               // If we have embedded object data, use that when constructing the getModel.
+                               if ( embeddeds[ embedSourcePoint ] ) {
+                                       attributes = _.findWhere( embeddeds[ embedSourcePoint ], { id: modelId } );
+                               }
+
+                               // Otherwise use the modelId.
+                               if ( ! attributes ) {
+                                       attributes = { id: modelId };
+                               }
+
+                               // Create the new getModel model.
+                               getModel = new wp.api.models[ modelName ]( attributes );
+
+                               // If we didn’t have an embedded getModel, fetch the getModel data.
+                               if ( ! getModel.get( embedCheckField ) ) {
+                                       getModel.fetch( { success: function( getModel ) {
+                                               deferred.resolve( getModel );
+                                       } } );
+                               } else {
+                                       deferred.resolve( getModel );
+                               }
+
+                               // Return a promise.
+                               return deferred.promise();
+                       },
+
+                       /**
+                        * Build a helper to retrieve a collection.
+                        *
+                        * @param  {string} parentModel      The parent model.
+                        * @param  {string} collectionName   The name to use when constructing the collection.
+                        * @param  {string} embedSourcePoint Where to check the embedds object for _embed data.
+                        * @param  {string} embedIndex       An addiitonal optional index for the _embed data.
+                        *
+                        * @return {Deferred.promise}        A promise which resolves to the constructed collection.
+                        */
+                       buildCollectionGetter = function( parentModel, collectionName, embedSourcePoint, embedIndex ) {
+                               /**
+                                * Returns a promise that resolves to the requested collection
+                                *
+                                * Uses the embedded data if available, otherwises fetches the
+                                * data from the server.
+                                *
+                                * @return {Deferred.promise} promise Resolves to a wp.api.collections[ collectionName ]
+                                * collection.
+                                */
+                               var postId, embeddeds, getObjects,
+                                       classProperties = '',
+                                       properties      = '',
+                                       deferred        = jQuery.Deferred();
+
+                               postId    = parentModel.get( 'id' );
+                               embeddeds = parentModel.get( '_embedded' ) || {};
+
+                               // Verify that we have a valid post id.
+                               if ( ! _.isNumber( postId ) || 0 === postId ) {
+                                       deferred.reject();
+                                       return deferred;
+                               }
+
+                               // If we have embedded getObjects data, use that when constructing the getObjects.
+                               if ( ! _.isUndefined( embedSourcePoint ) && ! _.isUndefined( embeddeds[ embedSourcePoint ] ) ) {
+
+                                       // Some embeds also include an index offset, check for that.
+                                       if ( _.isUndefined( embedIndex ) ) {
+
+                                               // Use the embed source point directly.
+                                               properties = embeddeds[ embedSourcePoint ];
+                                       } else {
+
+                                               // Add the index to the embed source point.
+                                               properties = embeddeds[ embedSourcePoint ][ embedIndex ];
+                                       }
+                               } else {
+
+                                       // Otherwise use the postId.
+                                       classProperties = { parent: postId };
+                               }
+
+                               // Create the new getObjects collection.
+                               getObjects = new wp.api.collections[ collectionName ]( properties, classProperties );
+
+                               // If we didn’t have embedded getObjects, fetch the getObjects data.
+                               if ( _.isUndefined( getObjects.models[0] ) ) {
+                                       getObjects.fetch( { success: function( getObjects ) {
+
+                                               // Add a helper 'parent_post' attribute onto the model.
+                                               setHelperParentPost( getObjects, postId );
+                                               deferred.resolve( getObjects );
+                                       } } );
+                               } else {
+
+                                       // Add a helper 'parent_post' attribute onto the model.
+                                       setHelperParentPost( getObjects, postId );
+                                       deferred.resolve( getObjects );
+                               }
+
+                               // Return a promise.
+                               return deferred.promise();
+
+                       },
+
+                       /**
+                        * Set the model post parent.
+                        */
+                       setHelperParentPost = function( collection, postId ) {
+
+                               // Attach post_parent id to the collection.
+                               _.each( collection.models, function( model ) {
+                                       model.set( 'parent_post', postId );
+                               } );
+                       },
+
+                       /**
+                        * Add a helper function to handle post Meta.
+                        */
+                       MetaMixin = {
+                               getMeta: function() {
+                                       return buildCollectionGetter( this, 'PostMeta', 'https://api.w.org/meta' );
+                               }
+                       },
+
+                       /**
+                        * Add a helper function to handle post Revisions.
+                        */
+                       RevisionsMixin = {
+                               getRevisions: function() {
+                                       return buildCollectionGetter( this, 'PostRevisions' );
+                               }
+                       },
+
+                       /**
+                        * Add a helper function to handle post Tags.
+                        */
+                       TagsMixin = {
+
+                               /**
+                                * Get the tags for a post.
+                                *
+                                * @return {Deferred.promise} promise Resolves to an array of tags.
+                                */
+                               getTags: function() {
+                                       var tagIds = this.get( 'tags' ),
+                                               tags  = new wp.api.collections.Tags();
+
+                                       // Resolve with an empty array if no tags.
+                                       if ( _.isEmpty( tagIds ) ) {
+                                               return jQuery.Deferred().resolve( [] );
+                                       }
+
+                                       return tags.fetch( { data: { include: tagIds } } );
+                               },
+
+                               /**
+                                * Set the tags for a post.
+                                *
+                                * Accepts an array of tag slugs, or a Tags collection.
+                                *
+                                * @param {array|Backbone.Collection} tags The tags to set on the post.
+                                *
+                                */
+                               setTags: function( tags ) {
+                                       var allTags, newTag,
+                                               self = this,
+                                               newTags = [];
+
+                                       if ( _.isString( tags ) ) {
+                                               return false;
+                                       }
+
+                                       // If this is an array of slugs, build a collection.
+                                       if ( _.isArray( tags ) ) {
+
+                                               // Get all the tags.
+                                               allTags = new wp.api.collections.Tags();
+                                               allTags.fetch( {
+                                                       data:    { per_page: 100 },
+                                                       success: function( alltags ) {
+
+                                                               // Find the passed tags and set them up.
+                                                               _.each( tags, function( tag ) {
+                                                                       newTag = new wp.api.models.Tag( alltags.findWhere( { slug: tag } ) );
+
+                                                                       // Tie the new tag to the post.
+                                                                       newTag.set( 'parent_post', self.get( 'id' ) );
+
+                                                                       // Add the new tag to the collection.
+                                                                       newTags.push( newTag );
+                                                               } );
+                                                               tags = new wp.api.collections.Tags( newTags );
+                                                               self.setTagsWithCollection( tags );
+                                                       }
+                                               } );
+
+                                       } else {
+                                               this.setTagsWithCollection( tags );
+                                       }
+                               },
+
+                               /**
+                                * Set the tags for a post.
+                                *
+                                * Accepts a Tags collection.
+                                *
+                                * @param {array|Backbone.Collection} tags The tags to set on the post.
+                                *
+                                */
+                               setTagsWithCollection: function( tags ) {
+
+                                       // Pluck out the category ids.
+                                       this.set( 'tags', tags.pluck( 'id' ) );
+                                       return this.save();
+                               }
+                       },
+
+                       /**
+                        * Add a helper function to handle post Categories.
+                        */
+                       CategoriesMixin = {
+
+                               /**
+                                * Get a the categories for a post.
+                                *
+                                * @return {Deferred.promise} promise Resolves to an array of categories.
+                                */
+                               getCategories: function() {
+                                       var categoryIds = this.get( 'categories' ),
+                                               categories  = new wp.api.collections.Categories();
+
+                                       // Resolve with an empty array if no categories.
+                                       if ( _.isEmpty( categoryIds ) ) {
+                                               return jQuery.Deferred().resolve( [] );
+                                       }
+
+                                       return categories.fetch( { data: { include: categoryIds } } );
+                               },
+
+                               /**
+                                * Set the categories for a post.
+                                *
+                                * Accepts an array of category slugs, or a Categories collection.
+                                *
+                                * @param {array|Backbone.Collection} categories The categories to set on the post.
+                                *
+                                */
+                               setCategories: function( categories ) {
+                                       var allCategories, newCategory,
+                                               self = this,
+                                               newCategories = [];
+
+                                       if ( _.isString( categories ) ) {
+                                               return false;
+                                       }
+
+                                       // If this is an array of slugs, build a collection.
+                                       if ( _.isArray( categories ) ) {
+
+                                               // Get all the categories.
+                                               allCategories = new wp.api.collections.Categories();
+                                               allCategories.fetch( {
+                                                       data:    { per_page: 100 },
+                                                       success: function( allcats ) {
+
+                                                               // Find the passed categories and set them up.
+                                                               _.each( categories, function( category ) {
+                                                                       newCategory = new wp.api.models.Category( allcats.findWhere( { slug: category } ) );
+
+                                                                       // Tie the new category to the post.
+                                                                       newCategory.set( 'parent_post', self.get( 'id' ) );
+
+                                                                       // Add the new category to the collection.
+                                                                       newCategories.push( newCategory );
+                                                               } );
+                                                               categories = new wp.api.collections.Categories( newCategories );
+                                                               self.setCategoriesWithCollection( categories );
+                                                       }
+                                               } );
+
+                                       } else {
+                                               this.setCategoriesWithCollection( categories );
+                                       }
+
+                               },
+
+                               /**
+                                * Set the categories for a post.
+                                *
+                                * Accepts Categories collection.
+                                *
+                                * @param {array|Backbone.Collection} categories The categories to set on the post.
+                                *
+                                */
+                               setCategoriesWithCollection: function( categories ) {
+
+                                       // Pluck out the category ids.
+                                       this.set( 'categories', categories.pluck( 'id' ) );
+                                       return this.save();
+                               }
+                       },
+
+                       /**
+                        * Add a helper function to retrieve the author user model.
+                        */
+                       AuthorMixin = {
+                               getAuthorUser: function() {
+                                       return buildModelGetter( this, this.get( 'author' ), 'User', 'author', 'name' );
+                               }
+                       },
+
+                       /**
+                        * Add a helper function to retrieve the featured media.
+                        */
+                       FeaturedMediaMixin = {
+                               getFeaturedMedia: function() {
+                                       return buildModelGetter( this, this.get( 'featured_media' ), 'Media', 'wp:featuredmedia', 'source_url' );
+                               }
+                       };
+
+               // Exit if we don't have valid model defaults.
+               if ( _.isUndefined( model.prototype.args ) ) {
+                       return model;
+               }
+
+               // Go thru the parsable date fields, if our model contains any of them it gets the TimeStampedMixin.
+               _.each( parseableDates, function( theDateKey ) {
+                       if ( ! _.isUndefined( model.prototype.args[ theDateKey ] ) ) {
+                               hasDate = true;
+                       }
+               } );
+
+               // Add the TimeStampedMixin for models that contain a date field.
+               if ( hasDate ) {
+                       model = model.extend( TimeStampedMixin );
+               }
+
+               // Add the AuthorMixin for models that contain an author.
+               if ( ! _.isUndefined( model.prototype.args.author ) ) {
+                       model = model.extend( AuthorMixin );
+               }
+
+               // Add the FeaturedMediaMixin for models that contain a featured_media.
+               if ( ! _.isUndefined( model.prototype.args.featured_media ) ) {
+                       model = model.extend( FeaturedMediaMixin );
+               }
+
+               // Add the CategoriesMixin for models that support categories collections.
+               if ( ! _.isUndefined( model.prototype.args.categories ) ) {
+                       model = model.extend( CategoriesMixin );
+               }
+
+               // Add the MetaMixin for models that support meta collections.
+               if ( ! _.isUndefined( loadingObjects.collections[ modelClassName + 'Meta' ] ) ) {
+                       model = model.extend( MetaMixin );
+               }
+
+               // Add the TagsMixin for models that support tags collections.
+               if ( ! _.isUndefined( model.prototype.args.tags ) ) {
+                       model = model.extend( TagsMixin );
+               }
+
+               // Add the RevisionsMixin for models that support revisions collections.
+               if ( ! _.isUndefined( loadingObjects.collections[ modelClassName + 'Revisions' ] ) ) {
+                       model = model.extend( RevisionsMixin );
+               }
+
+               return model;
+       };
+
+})( window );
+
+/* global wpApiSettings:false */
+
+// Suppress warning about parse function's unused "options" argument:
+/* jshint unused:false */
+(function() {
+
+       'use strict';
+
+       var wpApiSettings = window.wpApiSettings || {};
+
+       /**
+        * Backbone base model for all models.
+        */
+       wp.api.WPApiBaseModel = Backbone.Model.extend(
+               /** @lends WPApiBaseModel.prototype  */
+               {
+                       /**
+                        * Set nonce header before every Backbone sync.
+                        *
+                        * @param {string} method.
+                        * @param {Backbone.Model} model.
+                        * @param {{beforeSend}, *} options.
+                        * @returns {*}.
+                        */
+                       sync: function( method, model, options ) {
+                               var beforeSend;
+
+                               options = options || {};
+
+                               // Remove date_gmt if null.
+                               if ( _.isNull( model.get( 'date_gmt' ) ) ) {
+                                       model.unset( 'date_gmt' );
+                               }
+
+                               // Remove slug if empty.
+                               if ( _.isEmpty( model.get( 'slug' ) ) ) {
+                                       model.unset( 'slug' );
+                               }
+
+                               if ( ! _.isUndefined( wpApiSettings.nonce ) && ! _.isNull( wpApiSettings.nonce ) ) {
+                                       beforeSend = options.beforeSend;
+
+                                       // @todo enable option for jsonp endpoints
+                                       // options.dataType = 'jsonp';
+
+                                       options.beforeSend = function( xhr ) {
+                                               xhr.setRequestHeader( 'X-WP-Nonce', wpApiSettings.nonce );
+
+                                               if ( beforeSend ) {
+                                                       return beforeSend.apply( this, arguments );
+                                               }
+                                       };
+                               }
+
+                               // Add '?force=true' to use delete method when required.
+                               if ( this.requireForceForDelete && 'delete' === method ) {
+                                       model.url = model.url() + '?force=true';
+                               }
+                               return Backbone.sync( method, model, options );
+                       },
+
+                       /**
+                        * Save is only allowed when the PUT OR POST methods are available for the endpoint.
+                        */
+                       save: function( attrs, options ) {
+
+                               // Do we have the put method, then execute the save.
+                               if ( _.includes( this.methods, 'PUT' ) || _.includes( this.methods, 'POST' ) ) {
+
+                                       // Proxy the call to the original save function.
+                                       return Backbone.Model.prototype.save.call( this, attrs, options );
+                               } else {
+
+                                       // Otherwise bail, disallowing action.
+                                       return false;
+                               }
+                       },
+
+                       /**
+                        * Delete is only allowed when the DELETE method is available for the endpoint.
+                        */
+                       destroy: function( options ) {
+
+                               // Do we have the DELETE method, then execute the destroy.
+                               if ( _.includes( this.methods, 'DELETE' ) ) {
+
+                                       // Proxy the call to the original save function.
+                                       return Backbone.Model.prototype.destroy.call( this, options );
+                               } else {
+
+                                       // Otherwise bail, disallowing action.
+                                       return false;
+                               }
+                       }
+
+               }
+       );
+
+       /**
+        * API Schema model. Contains meta information about the API.
+        */
+       wp.api.models.Schema = wp.api.WPApiBaseModel.extend(
+               /** @lends Schema.prototype  */
+               {
+                       defaults: {
+                               _links: {},
+                               namespace: null,
+                               routes: {}
+                       },
+
+                       initialize: function( attributes, options ) {
+                               var model = this;
+                               options = options || {};
+
+                               wp.api.WPApiBaseModel.prototype.initialize.call( model, attributes, options );
+
+                               model.apiRoot = options.apiRoot || wpApiSettings.root;
+                               model.versionString = options.versionString || wpApiSettings.versionString;
+                       },
+
+                       url: function() {
+                               return this.apiRoot + this.versionString;
+                       }
+               }
+       );
+})();
+
+( function() {
+
+       'use strict';
+
+       var wpApiSettings = window.wpApiSettings || {};
+
+       /**
+        * Contains basic collection functionality such as pagination.
+        */
+       wp.api.WPApiBaseCollection = Backbone.Collection.extend(
+               /** @lends BaseCollection.prototype  */
+               {
+
+                       /**
+                        * Setup default state.
+                        */
+                       initialize: function( models, options ) {
+                               this.state = {
+                                       data: {},
+                                       currentPage: null,
+                                       totalPages: null,
+                                       totalObjects: null
+                               };
+                               if ( _.isUndefined( options ) ) {
+                                       this.parent = '';
+                               } else {
+                                       this.parent = options.parent;
+                               }
+                       },
+
+                       /**
+                        * Extend Backbone.Collection.sync to add nince and pagination support.
+                        *
+                        * Set nonce header before every Backbone sync.
+                        *
+                        * @param {string} method.
+                        * @param {Backbone.Model} model.
+                        * @param {{success}, *} options.
+                        * @returns {*}.
+                        */
+                       sync: function( method, model, options ) {
+                               var beforeSend, success,
+                                       self = this;
+
+                               options    = options || {};
+                               beforeSend = options.beforeSend;
+
+                               // If we have a localized nonce, pass that along with each sync.
+                               if ( 'undefined' !== typeof wpApiSettings.nonce ) {
+                                       options.beforeSend = function( xhr ) {
+                                               xhr.setRequestHeader( 'X-WP-Nonce', wpApiSettings.nonce );
+
+                                               if ( beforeSend ) {
+                                                       return beforeSend.apply( self, arguments );
+                                               }
+                                       };
+                               }
+
+                               // When reading, add pagination data.
+                               if ( 'read' === method ) {
+                                       if ( options.data ) {
+                                               self.state.data = _.clone( options.data );
+
+                                               delete self.state.data.page;
+                                       } else {
+                                               self.state.data = options.data = {};
+                                       }
+
+                                       if ( 'undefined' === typeof options.data.page ) {
+                                               self.state.currentPage  = null;
+                                               self.state.totalPages   = null;
+                                               self.state.totalObjects = null;
+                                       } else {
+                                               self.state.currentPage = options.data.page - 1;
+                                       }
+
+                                       success = options.success;
+                                       options.success = function( data, textStatus, request ) {
+                                               if ( ! _.isUndefined( request ) ) {
+                                                       self.state.totalPages   = parseInt( request.getResponseHeader( 'x-wp-totalpages' ), 10 );
+                                                       self.state.totalObjects = parseInt( request.getResponseHeader( 'x-wp-total' ), 10 );
+                                               }
+
+                                               if ( null === self.state.currentPage ) {
+                                                       self.state.currentPage = 1;
+                                               } else {
+                                                       self.state.currentPage++;
+                                               }
+
+                                               if ( success ) {
+                                                       return success.apply( this, arguments );
+                                               }
+                                       };
+                               }
+
+                               // Continue by calling Bacckbone's sync.
+                               return Backbone.sync( method, model, options );
+                       },
+
+                       /**
+                        * Fetches the next page of objects if a new page exists.
+                        *
+                        * @param {data: {page}} options.
+                        * @returns {*}.
+                        */
+                       more: function( options ) {
+                               options = options || {};
+                               options.data = options.data || {};
+
+                               _.extend( options.data, this.state.data );
+
+                               if ( 'undefined' === typeof options.data.page ) {
+                                       if ( ! this.hasMore() ) {
+                                               return false;
+                                       }
+
+                                       if ( null === this.state.currentPage || this.state.currentPage <= 1 ) {
+                                               options.data.page = 2;
+                                       } else {
+                                               options.data.page = this.state.currentPage + 1;
+                                       }
+                               }
+
+                               return this.fetch( options );
+                       },
+
+                       /**
+                        * Returns true if there are more pages of objects available.
+                        *
+                        * @returns null|boolean.
+                        */
+                       hasMore: function() {
+                               if ( null === this.state.totalPages ||
+                                        null === this.state.totalObjects ||
+                                        null === this.state.currentPage ) {
+                                       return null;
+                               } else {
+                                       return ( this.state.currentPage < this.state.totalPages );
+                               }
+                       }
+               }
+       );
+
+} )();
+
+( function() {
+
+       'use strict';
+
+       var Endpoint, initializedDeferreds = {},
+               wpApiSettings = window.wpApiSettings || {};
+       window.wp = window.wp || {};
+       wp.api    = wp.api || {};
+
+       // If wpApiSettings is unavailable, try the default.
+       if ( _.isEmpty( wpApiSettings ) ) {
+               wpApiSettings.root = window.location.origin + '/wp-json/';
+       }
+
+       Endpoint = Backbone.Model.extend( {
+               defaults: {
+                       apiRoot: wpApiSettings.root,
+                       versionString: wp.api.versionString,
+                       schema: null,
+                       models: {},
+                       collections: {}
+               },
+
+               /**
+                * Initialize the Endpoint model.
+                */
+               initialize: function() {
+                       var model = this, deferred;
+
+                       Backbone.Model.prototype.initialize.apply( model, arguments );
+
+                       deferred = jQuery.Deferred();
+                       model.schemaConstructed = deferred.promise();
+
+                       model.schemaModel = new wp.api.models.Schema( null, {
+                               apiRoot: model.get( 'apiRoot' ),
+                               versionString: model.get( 'versionString' )
+                       } );
+
+                       // When the model loads, resolve the promise.
+                       model.schemaModel.once( 'change', function() {
+                               model.constructFromSchema();
+                               deferred.resolve( model );
+                       } );
+
+                       if ( model.get( 'schema' ) ) {
+
+                               // Use schema supplied as model attribute.
+                               model.schemaModel.set( model.schemaModel.parse( model.get( 'schema' ) ) );
+                       } else if (
+                               ! _.isUndefined( sessionStorage ) &&
+                               ( _.isUndefined( wpApiSettings.cacheSchema ) || wpApiSettings.cacheSchema ) &&
+                               sessionStorage.getItem( 'wp-api-schema-model' + model.get( 'apiRoot' ) + model.get( 'versionString' ) )
+                       ) {
+
+                               // Used a cached copy of the schema model if available.
+                               model.schemaModel.set( model.schemaModel.parse( JSON.parse( sessionStorage.getItem( 'wp-api-schema-model' + model.get( 'apiRoot' ) + model.get( 'versionString' ) ) ) ) );
+                       } else {
+                               model.schemaModel.fetch( {
+                                       /**
+                                        * When the server returns the schema model data, store the data in a sessionCache so we don't
+                                        * have to retrieve it again for this session. Then, construct the models and collections based
+                                        * on the schema model data.
+                                        */
+                                       success: function( newSchemaModel ) {
+
+                                               // Store a copy of the schema model in the session cache if available.
+                                               if ( ! _.isUndefined( sessionStorage ) && ( _.isUndefined( wpApiSettings.cacheSchema ) || wpApiSettings.cacheSchema ) ) {
+                                                       try {
+                                                               sessionStorage.setItem( 'wp-api-schema-model' + model.get( 'apiRoot' ) + model.get( 'versionString' ), JSON.stringify( newSchemaModel ) );
+                                                       } catch ( error ) {
+
+                                                               // Fail silently, fixes errors in safari private mode.
+                                                       }
+                                               }
+                                       },
+
+                                       // Log the error condition.
+                                       error: function( err ) {
+                                               window.console.log( err );
+                                       }
+                               } );
+                       }
+               },
+
+               constructFromSchema: function() {
+                       var routeModel = this, modelRoutes, collectionRoutes, schemaRoot, loadingObjects,
+
+                       /**
+                        * Set up the model and collection name mapping options. As the schema is built, the
+                        * model and collection names will be adjusted if they are found in the mapping object.
+                        *
+                        * Localizing a variable wpApiSettings.mapping will over-ride the default mapping options.
+                        *
+                        */
+                       mapping = wpApiSettings.mapping || {
+                               models: {
+                                       'Categories':      'Category',
+                                       'Comments':        'Comment',
+                                       'Pages':           'Page',
+                                       'PagesMeta':       'PageMeta',
+                                       'PagesRevisions':  'PageRevision',
+                                       'Posts':           'Post',
+                                       'PostsCategories': 'PostCategory',
+                                       'PostsRevisions':  'PostRevision',
+                                       'PostsTags':       'PostTag',
+                                       'Schema':          'Schema',
+                                       'Statuses':        'Status',
+                                       'Tags':            'Tag',
+                                       'Taxonomies':      'Taxonomy',
+                                       'Types':           'Type',
+                                       'Users':           'User'
+                               },
+                               collections: {
+                                       'PagesMeta':       'PageMeta',
+                                       'PagesRevisions':  'PageRevisions',
+                                       'PostsCategories': 'PostCategories',
+                                       'PostsMeta':       'PostMeta',
+                                       'PostsRevisions':  'PostRevisions',
+                                       'PostsTags':       'PostTags'
+                               }
+                       };
+
+                       /**
+                        * Iterate thru the routes, picking up models and collections to build. Builds two arrays,
+                        * one for models and one for collections.
+                        */
+                       modelRoutes      = [];
+                       collectionRoutes = [];
+                       schemaRoot       = routeModel.get( 'apiRoot' ).replace( wp.api.utils.getRootUrl(), '' );
+                       loadingObjects   = {};
+
+                       /**
+                        * Tracking objects for models and collections.
+                        */
+                       loadingObjects.models      = routeModel.get( 'models' );
+                       loadingObjects.collections = routeModel.get( 'collections' );
+
+                       _.each( routeModel.schemaModel.get( 'routes' ), function( route, index ) {
+
+                               // Skip the schema root if included in the schema.
+                               if ( index !== routeModel.get( ' versionString' ) &&
+                                               index !== schemaRoot &&
+                                               index !== ( '/' + routeModel.get( 'versionString' ).slice( 0, -1 ) )
+                               ) {
+
+                                       // Single items end with a regex (or the special case 'me').
+                                       if ( /(?:.*[+)]|\/me)$/.test( index ) ) {
+                                               modelRoutes.push( { index: index, route: route } );
+                                       } else {
+
+                                               // Collections end in a name.
+                                               collectionRoutes.push( { index: index, route: route } );
+                                       }
+                               }
+                       } );
+
+                       /**
+                        * Construct the models.
+                        *
+                        * Base the class name on the route endpoint.
+                        */
+                       _.each( modelRoutes, function( modelRoute ) {
+
+                               // Extract the name and any parent from the route.
+                               var modelClassName,
+                                               routeName  = wp.api.utils.extractRoutePart( modelRoute.index, 2 ),
+                                               parentName = wp.api.utils.extractRoutePart( modelRoute.index, 4 ),
+                                               routeEnd   = wp.api.utils.extractRoutePart( modelRoute.index, 1 );
+
+                               // Handle the special case of the 'me' route.
+                               if ( 'me' === routeEnd ) {
+                                       routeName = 'me';
+                               }
+
+                               // If the model has a parent in its route, add that to its class name.
+                               if ( '' !== parentName && parentName !== routeName ) {
+                                       modelClassName = wp.api.utils.capitalize( parentName ) + wp.api.utils.capitalize( routeName );
+                                       modelClassName = mapping.models[ modelClassName ] || modelClassName;
+                                       loadingObjects.models[ modelClassName ] = wp.api.WPApiBaseModel.extend( {
+
+                                               // Return a constructed url based on the parent and id.
+                                               url: function() {
+                                                       var url = routeModel.get( 'apiRoot' ) + routeModel.get( 'versionString' ) +
+                                                                       parentName +  '/' +
+                                                                       ( ( _.isUndefined( this.get( 'parent' ) ) || 0 === this.get( 'parent' ) ) ?
+                                                                               this.get( 'parent_post' ) :
+                                                                               this.get( 'parent' ) ) + '/' +
+                                                                       routeName;
+                                                       if ( ! _.isUndefined( this.get( 'id' ) ) ) {
+                                                               url +=  '/' + this.get( 'id' );
+                                                       }
+                                                       return url;
+                                               },
+
+                                               // Include a reference to the original route object.
+                                               route: modelRoute,
+
+                                               // Include a reference to the original class name.
+                                               name: modelClassName,
+
+                                               // Include the array of route methods for easy reference.
+                                               methods: modelRoute.route.methods,
+
+                                               initialize: function() {
+
+                                                       /**
+                                                        * Posts and pages support trashing, other types don't support a trash
+                                                        * and require that you pass ?force=true to actually delete them.
+                                                        *
+                                                        * @todo we should be getting trashability from the Schema, not hard coding types here.
+                                                        */
+                                                       if (
+                                                               'Posts' !== this.name &&
+                                                               'Pages' !== this.name &&
+                                                               _.includes( this.methods, 'DELETE' )
+                                                       ) {
+                                                               this.requireForceForDelete = true;
+                                                       }
+                                               }
+                                       } );
+                               } else {
+
+                                       // This is a model without a parent in its route
+                                       modelClassName = wp.api.utils.capitalize( routeName );
+                                       modelClassName = mapping.models[ modelClassName ] || modelClassName;
+                                       loadingObjects.models[ modelClassName ] = wp.api.WPApiBaseModel.extend( {
+
+                                               // Function that returns a constructed url based on the id.
+                                               url: function() {
+                                                       var url = routeModel.get( 'apiRoot' ) +
+                                                               routeModel.get( 'versionString' ) +
+                                                               ( ( 'me' === routeName ) ? 'users/me' : routeName );
+
+                                                       if ( ! _.isUndefined( this.get( 'id' ) ) ) {
+                                                               url +=  '/' + this.get( 'id' );
+                                                       }
+                                                       return url;
+                                               },
+
+                                               // Include a reference to the original route object.
+                                               route: modelRoute,
+
+                                               // Include a reference to the original class name.
+                                               name: modelClassName,
+
+                                               // Include the array of route methods for easy reference.
+                                               methods: modelRoute.route.methods
+                                       } );
+                               }
+
+                               // Add defaults to the new model, pulled form the endpoint.
+                               wp.api.utils.decorateFromRoute( modelRoute.route.endpoints, loadingObjects.models[ modelClassName ] );
+
+                       } );
+
+                       /**
+                        * Construct the collections.
+                        *
+                        * Base the class name on the route endpoint.
+                        */
+                       _.each( collectionRoutes, function( collectionRoute ) {
+
+                               // Extract the name and any parent from the route.
+                               var collectionClassName, modelClassName,
+                                               routeName  = collectionRoute.index.slice( collectionRoute.index.lastIndexOf( '/' ) + 1 ),
+                                               parentName = wp.api.utils.extractRoutePart( collectionRoute.index, 3 );
+
+                               // If the collection has a parent in its route, add that to its class name.
+                               if ( '' !== parentName && parentName !== routeName ) {
+
+                                       collectionClassName = wp.api.utils.capitalize( parentName ) + wp.api.utils.capitalize( routeName );
+                                       modelClassName      = mapping.models[ collectionClassName ] || collectionClassName;
+                                       collectionClassName = mapping.collections[ collectionClassName ] || collectionClassName;
+                                       loadingObjects.collections[ collectionClassName ] = wp.api.WPApiBaseCollection.extend( {
+
+                                               // Function that returns a constructed url passed on the parent.
+                                               url: function() {
+                                                       return routeModel.get( 'apiRoot' ) + routeModel.get( 'versionString' ) +
+                                                                       parentName + '/' + this.parent + '/' +
+                                                                       routeName;
+                                               },
+
+                                               // Specify the model that this collection contains.
+                                               model: loadingObjects.models[ modelClassName ],
+
+                                               // Include a reference to the original class name.
+                                               name: collectionClassName,
+
+                                               // Include a reference to the original route object.
+                                               route: collectionRoute,
+
+                                               // Include the array of route methods for easy reference.
+                                               methods: collectionRoute.route.methods
+                                       } );
+                               } else {
+
+                                       // This is a collection without a parent in its route.
+                                       collectionClassName = wp.api.utils.capitalize( routeName );
+                                       modelClassName      = mapping.models[ collectionClassName ] || collectionClassName;
+                                       collectionClassName = mapping.collections[ collectionClassName ] || collectionClassName;
+                                       loadingObjects.collections[ collectionClassName ] = wp.api.WPApiBaseCollection.extend( {
+
+                                               // For the url of a root level collection, use a string.
+                                               url: routeModel.get( 'apiRoot' ) + routeModel.get( 'versionString' ) + routeName,
+
+                                               // Specify the model that this collection contains.
+                                               model: loadingObjects.models[ modelClassName ],
+
+                                               // Include a reference to the original class name.
+                                               name: collectionClassName,
+
+                                               // Include a reference to the original route object.
+                                               route: collectionRoute,
+
+                                               // Include the array of route methods for easy reference.
+                                               methods: collectionRoute.route.methods
+                                       } );
+                               }
+
+                               // Add defaults to the new model, pulled form the endpoint.
+                               wp.api.utils.decorateFromRoute( collectionRoute.route.endpoints, loadingObjects.collections[ collectionClassName ] );
+                       } );
+
+                       // Add mixins and helpers for each of the models.
+                       _.each( loadingObjects.models, function( model, index ) {
+                               loadingObjects.models[ index ] = wp.api.utils.addMixinsAndHelpers( model, index, loadingObjects );
+                       } );
+
+               }
+
+       } );
+
+       wp.api.endpoints = new Backbone.Collection( {
+               model: Endpoint
+       } );
+
+       /**
+        * Initialize the wp-api, optionally passing the API root.
+        *
+        * @param {object} [args]
+        * @param {string} [args.apiRoot] The api root. Optional, defaults to wpApiSettings.root.
+        * @param {string} [args.versionString] The version string. Optional, defaults to wpApiSettings.root.
+        * @param {object} [args.schema] The schema. Optional, will be fetched from API if not provided.
+        */
+       wp.api.init = function( args ) {
+               var endpoint, attributes = {}, deferred, promise;
+
+               args                     = args || {};
+               attributes.apiRoot       = args.apiRoot || wpApiSettings.root;
+               attributes.versionString = args.versionString || wpApiSettings.versionString;
+               attributes.schema        = args.schema || null;
+               if ( ! attributes.schema && attributes.apiRoot === wpApiSettings.root && attributes.versionString === wpApiSettings.versionString ) {
+                       attributes.schema = wpApiSettings.schema;
+               }
+
+               if ( ! initializedDeferreds[ attributes.apiRoot + attributes.versionString ] ) {
+                       endpoint = wp.api.endpoints.findWhere( { apiRoot: attributes.apiRoot, versionString: attributes.versionString } );
+                       if ( ! endpoint ) {
+                               endpoint = new Endpoint( attributes );
+                               wp.api.endpoints.add( endpoint );
+                       }
+                       deferred = jQuery.Deferred();
+                       promise = deferred.promise();
+
+                       endpoint.schemaConstructed.done( function( endpoint ) {
+
+                               // Map the default endpoints, extending any already present items (including Schema model).
+                               wp.api.models      = _.extend( endpoint.get( 'models' ), wp.api.models );
+                               wp.api.collections = _.extend( endpoint.get( 'collections' ), wp.api.collections );
+                               deferred.resolveWith( wp.api, [ endpoint ] );
+                       } );
+                       initializedDeferreds[ attributes.apiRoot + attributes.versionString ] = promise;
+               }
+               return initializedDeferreds[ attributes.apiRoot + attributes.versionString ];
+       };
+
+       /**
+        * Construct the default endpoints and add to an endpoints collection.
+        */
+
+       // The wp.api.init function returns a promise that will resolve with the endpoint once it is ready.
+       wp.api.loadPromise = wp.api.init();
+
+} )();
diff --git a/wp-includes/js/wp-api.min.js b/wp-includes/js/wp-api.min.js
new file mode 100644 (file)
index 0000000..8231d1a
--- /dev/null
@@ -0,0 +1 @@
+!function(a,b){"use strict";function c(){this.models={},this.collections={},this.views={}}a.wp=a.wp||{},wp.api=wp.api||new c,wp.api.versionString=wp.api.versionString||"wp/v2/",!_.isFunction(_.includes)&&_.isFunction(_.contains)&&(_.includes=_.contains)}(window),function(a,b){"use strict";var c,d;a.wp=a.wp||{},wp.api=wp.api||{},wp.api.utils=wp.api.utils||{},Date.prototype.toISOString||(c=function(a){return d=String(a),1===d.length&&(d="0"+d),d},Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+c(this.getUTCMonth()+1)+"-"+c(this.getUTCDate())+"T"+c(this.getUTCHours())+":"+c(this.getUTCMinutes())+":"+c(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}),wp.api.utils.parseISO8601=function(a){var c,d,e,f,g=0,h=[1,4,5,6,7,10,11];if(d=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(a)){for(e=0;f=h[e];++e)d[f]=+d[f]||0;d[2]=(+d[2]||1)-1,d[3]=+d[3]||1,"Z"!==d[8]&&b!==d[9]&&(g=60*d[10]+d[11],"+"===d[9]&&(g=0-g)),c=Date.UTC(d[1],d[2],d[3],d[4],d[5]+g,d[6],d[7])}else c=Date.parse?Date.parse(a):NaN;return c},wp.api.utils.getRootUrl=function(){return a.location.origin?a.location.origin+"/":a.location.protocol+"/"+a.location.host+"/"},wp.api.utils.capitalize=function(a){return _.isUndefined(a)?a:a.charAt(0).toUpperCase()+a.slice(1)},wp.api.utils.extractRoutePart=function(a,b){var c;return b=b||1,a=a.replace(wp.api.versionString,""),c=a.split("/").reverse(),_.isUndefined(c[--b])?"":c[b]},wp.api.utils.extractParentName=function(a){var b,c=a.lastIndexOf("_id>[\\d]+)/");return c<0?"":(b=a.substr(0,c-1),b=b.split("/"),b.pop(),b=b.pop())},wp.api.utils.decorateFromRoute=function(a,b){_.each(a,function(a){_.includes(a.methods,"POST")||_.includes(a.methods,"PUT")?_.isEmpty(a.args)||(_.isEmpty(b.prototype.args)?b.prototype.args=a.args:b.prototype.args=_.union(a.args,b.prototype.defaults)):_.includes(a.methods,"GET")&&(_.isEmpty(a.args)||(_.isEmpty(b.prototype.options)?b.prototype.options=a.args:b.prototype.options=_.union(a.args,b.prototype.options)))})},wp.api.utils.addMixinsAndHelpers=function(a,b,c){var d=!1,e=["date","modified","date_gmt","modified_gmt"],f={setDate:function(a,b){var c=b||"date";return!(_.indexOf(e,c)<0)&&void this.set(c,a.toISOString())},getDate:function(a){var b=a||"date",c=this.get(b);return!(_.indexOf(e,b)<0||_.isNull(c))&&new Date(wp.api.utils.parseISO8601(c))}},g=function(a,b,c,d,e){var f,g,h,i;return i=jQuery.Deferred(),g=a.get("_embedded")||{},_.isNumber(b)&&0!==b?(g[d]&&(h=_.findWhere(g[d],{id:b})),h||(h={id:b}),f=new wp.api.models[c](h),f.get(e)?i.resolve(f):f.fetch({success:function(a){i.resolve(a)}}),i.promise()):(i.reject(),i)},h=function(a,b,c,d){var e,f,g,h="",j="",k=jQuery.Deferred();return e=a.get("id"),f=a.get("_embedded")||{},_.isNumber(e)&&0!==e?(_.isUndefined(c)||_.isUndefined(f[c])?h={parent:e}:j=_.isUndefined(d)?f[c]:f[c][d],g=new wp.api.collections[b](j,h),_.isUndefined(g.models[0])?g.fetch({success:function(a){i(a,e),k.resolve(a)}}):(i(g,e),k.resolve(g)),k.promise()):(k.reject(),k)},i=function(a,b){_.each(a.models,function(a){a.set("parent_post",b)})},j={getMeta:function(){return h(this,"PostMeta","https://api.w.org/meta")}},k={getRevisions:function(){return h(this,"PostRevisions")}},l={getTags:function(){var a=this.get("tags"),b=new wp.api.collections.Tags;return _.isEmpty(a)?jQuery.Deferred().resolve([]):b.fetch({data:{include:a}})},setTags:function(a){var b,c,d=this,e=[];return!_.isString(a)&&void(_.isArray(a)?(b=new wp.api.collections.Tags,b.fetch({data:{per_page:100},success:function(b){_.each(a,function(a){c=new wp.api.models.Tag(b.findWhere({slug:a})),c.set("parent_post",d.get("id")),e.push(c)}),a=new wp.api.collections.Tags(e),d.setTagsWithCollection(a)}})):this.setTagsWithCollection(a))},setTagsWithCollection:function(a){return this.set("tags",a.pluck("id")),this.save()}},m={getCategories:function(){var a=this.get("categories"),b=new wp.api.collections.Categories;return _.isEmpty(a)?jQuery.Deferred().resolve([]):b.fetch({data:{include:a}})},setCategories:function(a){var b,c,d=this,e=[];return!_.isString(a)&&void(_.isArray(a)?(b=new wp.api.collections.Categories,b.fetch({data:{per_page:100},success:function(b){_.each(a,function(a){c=new wp.api.models.Category(b.findWhere({slug:a})),c.set("parent_post",d.get("id")),e.push(c)}),a=new wp.api.collections.Categories(e),d.setCategoriesWithCollection(a)}})):this.setCategoriesWithCollection(a))},setCategoriesWithCollection:function(a){return this.set("categories",a.pluck("id")),this.save()}},n={getAuthorUser:function(){return g(this,this.get("author"),"User","author","name")}},o={getFeaturedMedia:function(){return g(this,this.get("featured_media"),"Media","wp:featuredmedia","source_url")}};return _.isUndefined(a.prototype.args)?a:(_.each(e,function(b){_.isUndefined(a.prototype.args[b])||(d=!0)}),d&&(a=a.extend(f)),_.isUndefined(a.prototype.args.author)||(a=a.extend(n)),_.isUndefined(a.prototype.args.featured_media)||(a=a.extend(o)),_.isUndefined(a.prototype.args.categories)||(a=a.extend(m)),_.isUndefined(c.collections[b+"Meta"])||(a=a.extend(j)),_.isUndefined(a.prototype.args.tags)||(a=a.extend(l)),_.isUndefined(c.collections[b+"Revisions"])||(a=a.extend(k)),a)}}(window),function(){"use strict";var a=window.wpApiSettings||{};wp.api.WPApiBaseModel=Backbone.Model.extend({sync:function(b,c,d){var e;return d=d||{},_.isNull(c.get("date_gmt"))&&c.unset("date_gmt"),_.isEmpty(c.get("slug"))&&c.unset("slug"),_.isUndefined(a.nonce)||_.isNull(a.nonce)||(e=d.beforeSend,d.beforeSend=function(b){if(b.setRequestHeader("X-WP-Nonce",a.nonce),e)return e.apply(this,arguments)}),this.requireForceForDelete&&"delete"===b&&(c.url=c.url()+"?force=true"),Backbone.sync(b,c,d)},save:function(a,b){return!(!_.includes(this.methods,"PUT")&&!_.includes(this.methods,"POST"))&&Backbone.Model.prototype.save.call(this,a,b)},destroy:function(a){return!!_.includes(this.methods,"DELETE")&&Backbone.Model.prototype.destroy.call(this,a)}}),wp.api.models.Schema=wp.api.WPApiBaseModel.extend({defaults:{_links:{},namespace:null,routes:{}},initialize:function(b,c){var d=this;c=c||{},wp.api.WPApiBaseModel.prototype.initialize.call(d,b,c),d.apiRoot=c.apiRoot||a.root,d.versionString=c.versionString||a.versionString},url:function(){return this.apiRoot+this.versionString}})}(),function(){"use strict";var a=window.wpApiSettings||{};wp.api.WPApiBaseCollection=Backbone.Collection.extend({initialize:function(a,b){this.state={data:{},currentPage:null,totalPages:null,totalObjects:null},_.isUndefined(b)?this.parent="":this.parent=b.parent},sync:function(b,c,d){var e,f,g=this;return d=d||{},e=d.beforeSend,"undefined"!=typeof a.nonce&&(d.beforeSend=function(b){if(b.setRequestHeader("X-WP-Nonce",a.nonce),e)return e.apply(g,arguments)}),"read"===b&&(d.data?(g.state.data=_.clone(d.data),delete g.state.data.page):g.state.data=d.data={},"undefined"==typeof d.data.page?(g.state.currentPage=null,g.state.totalPages=null,g.state.totalObjects=null):g.state.currentPage=d.data.page-1,f=d.success,d.success=function(a,b,c){if(_.isUndefined(c)||(g.state.totalPages=parseInt(c.getResponseHeader("x-wp-totalpages"),10),g.state.totalObjects=parseInt(c.getResponseHeader("x-wp-total"),10)),null===g.state.currentPage?g.state.currentPage=1:g.state.currentPage++,f)return f.apply(this,arguments)}),Backbone.sync(b,c,d)},more:function(a){if(a=a||{},a.data=a.data||{},_.extend(a.data,this.state.data),"undefined"==typeof a.data.page){if(!this.hasMore())return!1;null===this.state.currentPage||this.state.currentPage<=1?a.data.page=2:a.data.page=this.state.currentPage+1}return this.fetch(a)},hasMore:function(){return null===this.state.totalPages||null===this.state.totalObjects||null===this.state.currentPage?null:this.state.currentPage<this.state.totalPages}})}(),function(){"use strict";var a,b={},c=window.wpApiSettings||{};window.wp=window.wp||{},wp.api=wp.api||{},_.isEmpty(c)&&(c.root=window.location.origin+"/wp-json/"),a=Backbone.Model.extend({defaults:{apiRoot:c.root,versionString:wp.api.versionString,schema:null,models:{},collections:{}},initialize:function(){var a,b=this;Backbone.Model.prototype.initialize.apply(b,arguments),a=jQuery.Deferred(),b.schemaConstructed=a.promise(),b.schemaModel=new wp.api.models.Schema(null,{apiRoot:b.get("apiRoot"),versionString:b.get("versionString")}),b.schemaModel.once("change",function(){b.constructFromSchema(),a.resolve(b)}),b.get("schema")?b.schemaModel.set(b.schemaModel.parse(b.get("schema"))):!_.isUndefined(sessionStorage)&&(_.isUndefined(c.cacheSchema)||c.cacheSchema)&&sessionStorage.getItem("wp-api-schema-model"+b.get("apiRoot")+b.get("versionString"))?b.schemaModel.set(b.schemaModel.parse(JSON.parse(sessionStorage.getItem("wp-api-schema-model"+b.get("apiRoot")+b.get("versionString"))))):b.schemaModel.fetch({success:function(a){if(!_.isUndefined(sessionStorage)&&(_.isUndefined(c.cacheSchema)||c.cacheSchema))try{sessionStorage.setItem("wp-api-schema-model"+b.get("apiRoot")+b.get("versionString"),JSON.stringify(a))}catch(d){}},error:function(a){window.console.log(a)}})},constructFromSchema:function(){var a,b,d,e,f=this,g=c.mapping||{models:{Categories:"Category",Comments:"Comment",Pages:"Page",PagesMeta:"PageMeta",PagesRevisions:"PageRevision",Posts:"Post",PostsCategories:"PostCategory",PostsRevisions:"PostRevision",PostsTags:"PostTag",Schema:"Schema",Statuses:"Status",Tags:"Tag",Taxonomies:"Taxonomy",Types:"Type",Users:"User"},collections:{PagesMeta:"PageMeta",PagesRevisions:"PageRevisions",PostsCategories:"PostCategories",PostsMeta:"PostMeta",PostsRevisions:"PostRevisions",PostsTags:"PostTags"}};a=[],b=[],d=f.get("apiRoot").replace(wp.api.utils.getRootUrl(),""),e={},e.models=f.get("models"),e.collections=f.get("collections"),_.each(f.schemaModel.get("routes"),function(c,e){e!==f.get(" versionString")&&e!==d&&e!=="/"+f.get("versionString").slice(0,-1)&&(/(?:.*[+)]|\/me)$/.test(e)?a.push({index:e,route:c}):b.push({index:e,route:c}))}),_.each(a,function(a){var b,c=wp.api.utils.extractRoutePart(a.index,2),d=wp.api.utils.extractRoutePart(a.index,4),h=wp.api.utils.extractRoutePart(a.index,1);"me"===h&&(c="me"),""!==d&&d!==c?(b=wp.api.utils.capitalize(d)+wp.api.utils.capitalize(c),b=g.models[b]||b,e.models[b]=wp.api.WPApiBaseModel.extend({url:function(){var a=f.get("apiRoot")+f.get("versionString")+d+"/"+(_.isUndefined(this.get("parent"))||0===this.get("parent")?this.get("parent_post"):this.get("parent"))+"/"+c;return _.isUndefined(this.get("id"))||(a+="/"+this.get("id")),a},route:a,name:b,methods:a.route.methods,initialize:function(){"Posts"!==this.name&&"Pages"!==this.name&&_.includes(this.methods,"DELETE")&&(this.requireForceForDelete=!0)}})):(b=wp.api.utils.capitalize(c),b=g.models[b]||b,e.models[b]=wp.api.WPApiBaseModel.extend({url:function(){var a=f.get("apiRoot")+f.get("versionString")+("me"===c?"users/me":c);return _.isUndefined(this.get("id"))||(a+="/"+this.get("id")),a},route:a,name:b,methods:a.route.methods})),wp.api.utils.decorateFromRoute(a.route.endpoints,e.models[b])}),_.each(b,function(a){var b,c,d=a.index.slice(a.index.lastIndexOf("/")+1),h=wp.api.utils.extractRoutePart(a.index,3);""!==h&&h!==d?(b=wp.api.utils.capitalize(h)+wp.api.utils.capitalize(d),c=g.models[b]||b,b=g.collections[b]||b,e.collections[b]=wp.api.WPApiBaseCollection.extend({url:function(){return f.get("apiRoot")+f.get("versionString")+h+"/"+this.parent+"/"+d},model:e.models[c],name:b,route:a,methods:a.route.methods})):(b=wp.api.utils.capitalize(d),c=g.models[b]||b,b=g.collections[b]||b,e.collections[b]=wp.api.WPApiBaseCollection.extend({url:f.get("apiRoot")+f.get("versionString")+d,model:e.models[c],name:b,route:a,methods:a.route.methods})),wp.api.utils.decorateFromRoute(a.route.endpoints,e.collections[b])}),_.each(e.models,function(a,b){e.models[b]=wp.api.utils.addMixinsAndHelpers(a,b,e)})}}),wp.api.endpoints=new Backbone.Collection({model:a}),wp.api.init=function(d){var e,f,g,h={};return d=d||{},h.apiRoot=d.apiRoot||c.root,h.versionString=d.versionString||c.versionString,h.schema=d.schema||null,h.schema||h.apiRoot!==c.root||h.versionString!==c.versionString||(h.schema=c.schema),b[h.apiRoot+h.versionString]||(e=wp.api.endpoints.findWhere({apiRoot:h.apiRoot,versionString:h.versionString}),e||(e=new a(h),wp.api.endpoints.add(e)),f=jQuery.Deferred(),g=f.promise(),e.schemaConstructed.done(function(a){wp.api.models=_.extend(a.get("models"),wp.api.models),wp.api.collections=_.extend(a.get("collections"),wp.api.collections),f.resolveWith(wp.api,[a])}),b[h.apiRoot+h.versionString]=g),b[h.apiRoot+h.versionString]},wp.api.loadPromise=wp.api.init()}();
\ No newline at end of file
diff --git a/wp-includes/js/wp-custom-header.js b/wp-includes/js/wp-custom-header.js
new file mode 100644 (file)
index 0000000..b2979f1
--- /dev/null
@@ -0,0 +1,450 @@
+/* global YT */
+(function( window, settings ) {
+
+       var NativeHandler, YouTubeHandler;
+
+       window.wp = window.wp || {};
+
+       // Fail gracefully in unsupported browsers.
+       if ( ! ( 'addEventListener' in window ) ) {
+               return;
+       }
+
+       /**
+        * Trigger an event.
+        *
+        * @param {Element} target HTML element to dispatch the event on.
+        * @param {string} name Event name.
+        */
+       function trigger( target, name ) {
+               var evt;
+
+               if ( 'function' === typeof window.Event ) {
+                       evt = new Event( name );
+               } else {
+                       evt = document.createEvent( 'Event' );
+                       evt.initEvent( name, true, true );
+               }
+
+               target.dispatchEvent( evt );
+       }
+
+       /**
+        * Create a custom header instance.
+        *
+        * @class CustomHeader
+        */
+       function CustomHeader() {
+               this.handlers = {
+                       nativeVideo: new NativeHandler(),
+                       youtube: new YouTubeHandler()
+               };
+       }
+
+       CustomHeader.prototype = {
+               /**
+                * Initalize the custom header.
+                *
+                * If the environment supports video, loops through registered handlers
+                * until one is found that can handle the video.
+                */
+               initialize: function() {
+                       if ( this.supportsVideo() ) {
+                               for ( var id in this.handlers ) {
+                                       var handler = this.handlers[ id ];
+
+                                       if ( 'test' in handler && handler.test( settings ) ) {
+                                               this.activeHandler = handler.initialize.call( handler, settings );
+
+                                               // Dispatch custom event when the video is loaded.
+                                               trigger( document, 'wp-custom-header-video-loaded' );
+                                               break;
+                                       }
+                               }
+                       }
+               },
+
+               /**
+                * Determines if the current environment supports video.
+                *
+                * Themes and plugins can override this method to change the criteria.
+                *
+                * @return {boolean}
+                */
+               supportsVideo: function() {
+                       // Don't load video on small screens. @todo: consider bandwidth and other factors.
+                       if ( window.innerWidth < settings.minWidth || window.innerHeight < settings.minHeight ) {
+                               return false;
+                       }
+
+                       return true;
+               },
+
+               /**
+                * Base handler for custom handlers to extend.
+                *
+                * @type {BaseHandler}
+                */
+               BaseVideoHandler: BaseHandler
+       };
+
+       /**
+        * Create a video handler instance.
+        *
+        * @class BaseHandler
+        */
+       function BaseHandler() {}
+
+       BaseHandler.prototype = {
+               /**
+                * Initialize the video handler.
+                *
+                * @param {object} settings Video settings.
+                */
+               initialize: function( settings ) {
+                       var handler = this,
+                               button = document.createElement( 'button' );
+
+                       this.settings = settings;
+                       this.container = document.getElementById( 'wp-custom-header' );
+                       this.button = button;
+
+                       button.setAttribute( 'type', 'button' );
+                       button.setAttribute( 'id', 'wp-custom-header-video-button' );
+                       button.setAttribute( 'class', 'wp-custom-header-video-button wp-custom-header-video-play' );
+                       button.innerHTML = settings.l10n.play;
+
+                       // Toggle video playback when the button is clicked.
+                       button.addEventListener( 'click', function() {
+                               if ( handler.isPaused() ) {
+                                       handler.play();
+                               } else {
+                                       handler.pause();
+                               }
+                       });
+
+                       // Update the button class and text when the video state changes.
+                       this.container.addEventListener( 'play', function() {
+                               button.className = 'wp-custom-header-video-button wp-custom-header-video-play';
+                               button.innerHTML = settings.l10n.pause;
+                               if ( 'a11y' in window.wp ) {
+                                       window.wp.a11y.speak( settings.l10n.playSpeak);
+                               }
+                       });
+
+                       this.container.addEventListener( 'pause', function() {
+                               button.className = 'wp-custom-header-video-button wp-custom-header-video-pause';
+                               button.innerHTML = settings.l10n.play;
+                               if ( 'a11y' in window.wp ) {
+                                       window.wp.a11y.speak( settings.l10n.pauseSpeak);
+                               }
+                       });
+
+                       this.ready();
+               },
+
+               /**
+                * Ready method called after a handler is initialized.
+                *
+                * @abstract
+                */
+               ready: function() {},
+
+               /**
+                * Whether the video is paused.
+                *
+                * @abstract
+                * @return {boolean}
+                */
+               isPaused: function() {},
+
+               /**
+                * Pause the video.
+                *
+                * @abstract
+                */
+               pause: function() {},
+
+               /**
+                * Play the video.
+                *
+                * @abstract
+                */
+               play: function() {},
+
+               /**
+                * Append a video node to the header container.
+                *
+                * @param {Element} node HTML element.
+                */
+               setVideo: function( node ) {
+                       var editShortcutNode,
+                               editShortcut = this.container.getElementsByClassName( 'customize-partial-edit-shortcut' );
+
+                       if ( editShortcut.length ) {
+                               editShortcutNode = this.container.removeChild( editShortcut[0] );
+                       }
+
+                       this.container.innerHTML = '';
+                       this.container.appendChild( node );
+
+                       if ( editShortcutNode ) {
+                               this.container.appendChild( editShortcutNode );
+                       }
+               },
+
+               /**
+                * Show the video controls.
+                *
+                * Appends a play/pause button to header container.
+                */
+               showControls: function() {
+                       if ( ! this.container.contains( this.button ) ) {
+                               this.container.appendChild( this.button );
+                       }
+               },
+
+               /**
+                * Whether the handler can process a video.
+                *
+                * @abstract
+                * @param {object} settings Video settings.
+                * @return {boolean}
+                */
+               test: function() {
+                       return false;
+               },
+
+               /**
+                * Trigger an event on the header container.
+                *
+                * @param {string} name Event name.
+                */
+               trigger: function( name ) {
+                       trigger( this.container, name );
+               }
+       };
+
+       /**
+        * Create a custom handler.
+        *
+        * @param {object} protoProps Properties to apply to the prototype.
+        * @return CustomHandler The subclass.
+        */
+       BaseHandler.extend = function( protoProps ) {
+               var prop;
+
+               function CustomHandler() {
+                       var result = BaseHandler.apply( this, arguments );
+                       return result;
+               }
+
+               CustomHandler.prototype = Object.create( BaseHandler.prototype );
+               CustomHandler.prototype.constructor = CustomHandler;
+
+               for ( prop in protoProps ) {
+                       CustomHandler.prototype[ prop ] = protoProps[ prop ];
+               }
+
+               return CustomHandler;
+       };
+
+       /**
+        * Native video handler.
+        *
+        * @class NativeHandler
+        */
+       NativeHandler = BaseHandler.extend({
+               /**
+                * Whether the native handler supports a video.
+                *
+                * @param {object} settings Video settings.
+                * @return {boolean}
+                */
+               test: function( settings ) {
+                       var video = document.createElement( 'video' );
+                       return video.canPlayType( settings.mimeType );
+               },
+
+               /**
+                * Set up a native video element.
+                */
+               ready: function() {
+                       var handler = this,
+                               video = document.createElement( 'video' );
+
+                       video.id = 'wp-custom-header-video';
+                       video.autoplay = 'autoplay';
+                       video.loop = 'loop';
+                       video.muted = 'muted';
+                       video.width = this.settings.width;
+                       video.height = this.settings.height;
+
+                       video.addEventListener( 'play', function() {
+                               handler.trigger( 'play' );
+                       });
+
+                       video.addEventListener( 'pause', function() {
+                               handler.trigger( 'pause' );
+                       });
+
+                       video.addEventListener( 'canplay', function() {
+                               handler.showControls();
+                       });
+
+                       this.video = video;
+                       handler.setVideo( video );
+                       video.src = this.settings.videoUrl;
+               },
+
+               /**
+                * Whether the video is paused.
+                *
+                * @return {boolean}
+                */
+               isPaused: function() {
+                       return this.video.paused;
+               },
+
+               /**
+                * Pause the video.
+                */
+               pause: function() {
+                       this.video.pause();
+               },
+
+               /**
+                * Play the video.
+                */
+               play: function() {
+                       this.video.play();
+               }
+       });
+
+       /**
+        * YouTube video handler.
+        *
+        * @class YouTubeHandler
+        */
+       YouTubeHandler = BaseHandler.extend({
+               /**
+                * Whether the handler supports a video.
+                *
+                * @param {object} settings Video settings.
+                * @return {boolean}
+                */
+               test: function( settings ) {
+                       return 'video/x-youtube' === settings.mimeType;
+               },
+
+               /**
+                * Set up a YouTube iframe.
+                *
+                * Loads the YouTube IFrame API if the 'YT' global doesn't exist.
+                */
+               ready: function() {
+                       var handler = this;
+
+                       if ( 'YT' in window ) {
+                               YT.ready( handler.loadVideo.bind( handler ) );
+                       } else {
+                               var tag = document.createElement( 'script' );
+                               tag.src = 'https://www.youtube.com/iframe_api';
+                               tag.onload = function () {
+                                       YT.ready( handler.loadVideo.bind( handler ) );
+                               };
+
+                               document.getElementsByTagName( 'head' )[0].appendChild( tag );
+                       }
+               },
+
+               /**
+                * Load a YouTube video.
+                */
+               loadVideo: function() {
+                       var handler = this,
+                               video = document.createElement( 'div' ),
+                               // @link http://stackoverflow.com/a/27728417
+                               VIDEO_ID_REGEX = /^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/;
+
+                       video.id = 'wp-custom-header-video';
+                       handler.setVideo( video );
+
+                       handler.player = new YT.Player( video, {
+                               height: this.settings.height,
+                               width: this.settings.width,
+                               videoId: this.settings.videoUrl.match( VIDEO_ID_REGEX )[1],
+                               events: {
+                                       onReady: function( e ) {
+                                               e.target.mute();
+                                               handler.showControls();
+                                       },
+                                       onStateChange: function( e ) {
+                                               if ( YT.PlayerState.PLAYING === e.data ) {
+                                                       handler.trigger( 'play' );
+                                               } else if ( YT.PlayerState.PAUSED === e.data ) {
+                                                       handler.trigger( 'pause' );
+                                               } else if ( YT.PlayerState.ENDED === e.data ) {
+                                                       e.target.playVideo();
+                                               }
+                                       }
+                               },
+                               playerVars: {
+                                       autoplay: 1,
+                                       controls: 0,
+                                       disablekb: 1,
+                                       fs: 0,
+                                       iv_load_policy: 3,
+                                       loop: 1,
+                                       modestbranding: 1,
+                                       playsinline: 1,
+                                       rel: 0,
+                                       showinfo: 0
+                               }
+                       });
+               },
+
+               /**
+                * Whether the video is paused.
+                *
+                * @return {boolean}
+                */
+               isPaused: function() {
+                       return YT.PlayerState.PAUSED === this.player.getPlayerState();
+               },
+
+               /**
+                * Pause the video.
+                */
+               pause: function() {
+                       this.player.pauseVideo();
+               },
+
+               /**
+                * Play the video.
+                */
+               play: function() {
+                       this.player.playVideo();
+               }
+       });
+
+       // Initialize the custom header when the DOM is ready.
+       window.wp.customHeader = new CustomHeader();
+       document.addEventListener( 'DOMContentLoaded', window.wp.customHeader.initialize.bind( window.wp.customHeader ), false );
+
+       // Selective refresh support in the Customizer.
+       if ( 'customize' in window.wp ) {
+               window.wp.customize.selectiveRefresh.bind( 'render-partials-response', function( response ) {
+                       if ( 'custom_header_settings' in response ) {
+                               settings = response.custom_header_settings;
+                       }
+               });
+
+               window.wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) {
+                       if ( 'custom_header' === placement.partial.id ) {
+                               window.wp.customHeader.initialize();
+                       }
+               });
+       }
+
+})( window, window._wpCustomHeaderSettings || {} );
diff --git a/wp-includes/js/wp-custom-header.min.js b/wp-includes/js/wp-custom-header.min.js
new file mode 100644 (file)
index 0000000..22bd491
--- /dev/null
@@ -0,0 +1 @@
+!function(a,b){function c(b,c){var d;"function"==typeof a.Event?d=new Event(c):(d=document.createEvent("Event"),d.initEvent(c,!0,!0)),b.dispatchEvent(d)}function d(){this.handlers={nativeVideo:new f,youtube:new g}}function e(){}var f,g;a.wp=a.wp||{},"addEventListener"in a&&(d.prototype={initialize:function(){if(this.supportsVideo())for(var a in this.handlers){var d=this.handlers[a];if("test"in d&&d.test(b)){this.activeHandler=d.initialize.call(d,b),c(document,"wp-custom-header-video-loaded");break}}},supportsVideo:function(){return!(a.innerWidth<b.minWidth||a.innerHeight<b.minHeight)},BaseVideoHandler:e},e.prototype={initialize:function(b){var c=this,d=document.createElement("button");this.settings=b,this.container=document.getElementById("wp-custom-header"),this.button=d,d.setAttribute("type","button"),d.setAttribute("id","wp-custom-header-video-button"),d.setAttribute("class","wp-custom-header-video-button wp-custom-header-video-play"),d.innerHTML=b.l10n.play,d.addEventListener("click",function(){c.isPaused()?c.play():c.pause()}),this.container.addEventListener("play",function(){d.className="wp-custom-header-video-button wp-custom-header-video-play",d.innerHTML=b.l10n.pause,"a11y"in a.wp&&a.wp.a11y.speak(b.l10n.playSpeak)}),this.container.addEventListener("pause",function(){d.className="wp-custom-header-video-button wp-custom-header-video-pause",d.innerHTML=b.l10n.play,"a11y"in a.wp&&a.wp.a11y.speak(b.l10n.pauseSpeak)}),this.ready()},ready:function(){},isPaused:function(){},pause:function(){},play:function(){},setVideo:function(a){var b,c=this.container.getElementsByClassName("customize-partial-edit-shortcut");c.length&&(b=this.container.removeChild(c[0])),this.container.innerHTML="",this.container.appendChild(a),b&&this.container.appendChild(b)},showControls:function(){this.container.contains(this.button)||this.container.appendChild(this.button)},test:function(){return!1},trigger:function(a){c(this.container,a)}},e.extend=function(a){function b(){var a=e.apply(this,arguments);return a}var c;b.prototype=Object.create(e.prototype),b.prototype.constructor=b;for(c in a)b.prototype[c]=a[c];return b},f=e.extend({test:function(a){var b=document.createElement("video");return b.canPlayType(a.mimeType)},ready:function(){var a=this,b=document.createElement("video");b.id="wp-custom-header-video",b.autoplay="autoplay",b.loop="loop",b.muted="muted",b.width=this.settings.width,b.height=this.settings.height,b.addEventListener("play",function(){a.trigger("play")}),b.addEventListener("pause",function(){a.trigger("pause")}),b.addEventListener("canplay",function(){a.showControls()}),this.video=b,a.setVideo(b),b.src=this.settings.videoUrl},isPaused:function(){return this.video.paused},pause:function(){this.video.pause()},play:function(){this.video.play()}}),g=e.extend({test:function(a){return"video/x-youtube"===a.mimeType},ready:function(){var b=this;if("YT"in a)YT.ready(b.loadVideo.bind(b));else{var c=document.createElement("script");c.src="https://www.youtube.com/iframe_api",c.onload=function(){YT.ready(b.loadVideo.bind(b))},document.getElementsByTagName("head")[0].appendChild(c)}},loadVideo:function(){var a=this,b=document.createElement("div"),c=/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/;b.id="wp-custom-header-video",a.setVideo(b),a.player=new YT.Player(b,{height:this.settings.height,width:this.settings.width,videoId:this.settings.videoUrl.match(c)[1],events:{onReady:function(b){b.target.mute(),a.showControls()},onStateChange:function(b){YT.PlayerState.PLAYING===b.data?a.trigger("play"):YT.PlayerState.PAUSED===b.data?a.trigger("pause"):YT.PlayerState.ENDED===b.data&&b.target.playVideo()}},playerVars:{autoplay:1,controls:0,disablekb:1,fs:0,iv_load_policy:3,loop:1,modestbranding:1,playsinline:1,rel:0,showinfo:0}})},isPaused:function(){return YT.PlayerState.PAUSED===this.player.getPlayerState()},pause:function(){this.player.pauseVideo()},play:function(){this.player.playVideo()}}),a.wp.customHeader=new d,document.addEventListener("DOMContentLoaded",a.wp.customHeader.initialize.bind(a.wp.customHeader),!1),"customize"in a.wp&&(a.wp.customize.selectiveRefresh.bind("render-partials-response",function(a){"custom_header_settings"in a&&(b=a.custom_header_settings)}),a.wp.customize.selectiveRefresh.bind("partial-content-rendered",function(b){"custom_header"===b.partial.id&&a.wp.customHeader.initialize()})))}(window,window._wpCustomHeaderSettings||{});
\ No newline at end of file
index 966a41f74af6d5ac53e354a0ddd7f7deb6b18ec3..3be0dc724531bbeede20bede5650f8f13e45573a 100644 (file)
                for ( i = 0; i < iframes.length; i++ ) {
                        source = iframes[ i ];
 
-                       if ( source.getAttribute( 'data-secret' ) ) {
-                               continue;
+                       if ( ! source.getAttribute( 'data-secret' ) ) {
+                               /* Add secret to iframe */
+                               secret = Math.random().toString( 36 ).substr( 2, 10 );
+                               source.src += '#?secret=' + secret;
+                               source.setAttribute( 'data-secret', secret );
                        }
 
-                       /* Add secret to iframe */
-                       secret = Math.random().toString( 36 ).substr( 2, 10 );
-                       source.src += '#?secret=' + secret;
-                       source.setAttribute( 'data-secret', secret );
-
                        /* Remove security attribute from iframes in IE10 and IE11. */
                        if ( ( isIE10 || isIE11 ) ) {
                                iframeClone = source.cloneNode( true );
index 0292141492d5ade3101397bd612d3669a12071fb..69c1f01c58f2e506f528c503f5d56cbd27b2a4c1 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(~~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
+!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"))f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f);if(g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}}}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 ff73a885c91fd612b2f5eccbc205d9a647309ede..0b474f83ff878620c27260aa175ef21802c70a05 100644 (file)
@@ -1,25 +1,33 @@
 ( function( window, document, settings ) {
        var src, ready, ii, tests;
 
+       /*
+        * Create a canvas element for testing native browser support
+        * of emoji.
+        */
+       var canvas = document.createElement( 'canvas' );
+       var context = canvas.getContext && canvas.getContext( '2d' );
+
        /**
         * Detect if the browser supports rendering emoji or flag emoji. Flag emoji are a single glyph
         * made of two characters, so some browsers (notably, Firefox OS X) don't support them.
         *
         * @since 4.2.0
         *
-        * @param type {String} Whether to test for support of "simple", "flag", "diversity" or "unicode8" emoji.
+        * @param type {String} Whether to test for support of "flag" or "emoji4" emoji.
         * @return {Boolean} True if the browser can render emoji, false if it cannot.
         */
        function browserSupportsEmoji( type ) {
-               var canvas = document.createElement( 'canvas' ),
-                       context = canvas.getContext && canvas.getContext( '2d' ),
-                       stringFromCharCode = String.fromCharCode,
-                       flag, flag2, tonedata, tone, tone2;
+               var stringFromCharCode = String.fromCharCode,
+                       flag, flag2, technologist, technologist2;
 
                if ( ! context || ! context.fillText ) {
                        return false;
                }
 
+               // Cleanup from previous test.
+               context.clearRect( 0, 0, canvas.width, canvas.height );
+
                /*
                 * Chrome on OS X added native emoji rendering in M41. Unfortunately,
                 * it doesn't work when the font is bolder than 500 weight. So, we
                                /*
                                 * This works because the image will be one of three things:
                                 * - Two empty squares, if the browser doesn't render emoji
-                                * - Two squares with 'A' and 'U' in them, if the browser doesn't render flag emoji
-                                * - The Australian flag
+                                * - Two squares with 'U' and 'N' in them, if the browser doesn't render flag emoji
+                                * - The United Nations flag
                                 *
                                 * The first two will encode to small images (1-2KB data URLs), the third will encode
                                 * to a larger image (4-5KB data URL).
                                 */
-                               context.fillText( stringFromCharCode( 55356, 56806, 55356, 56826 ), 0, 0 );
+                               context.fillText( stringFromCharCode( 55356, 56826, 55356, 56819 ), 0, 0 );
                                if ( canvas.toDataURL().length < 3000 ) {
                                        return false;
                                }
                                flag2 = canvas.toDataURL();
 
                                return flag !== flag2;
-                       case 'diversity':
-                               /*
-                                * This tests if the browser supports the Emoji Diversity specification, by rendering an
-                                * emoji with no skin tone specified (in this case, Santa). It then adds a skin tone, and
-                                * compares if the emoji rendering has changed.
-                                */
-                               context.fillText( stringFromCharCode( 55356, 57221 ), 0, 0 );
-                               tonedata = context.getImageData( 16, 16, 1, 1 ).data;
-                               tone = tonedata[0] + ',' + tonedata[1] + ',' + tonedata[2] + ',' + tonedata[3];
-
-                               context.fillText( stringFromCharCode( 55356, 57221, 55356, 57343 ), 0, 0 );
-                               // Chrome has issues comparing arrays, and Safari has issues converting arrays to strings.
-                               // So, we create our own string and compare that, instead.
-                               tonedata = context.getImageData( 16, 16, 1, 1 ).data;
-                               tone2 = tonedata[0] + ',' + tonedata[1] + ',' + tonedata[2] + ',' + tonedata[3];
-
-                               return tone !== tone2;
-                       case 'simple':
-                               /*
-                                * This creates a smiling emoji, and checks to see if there is any image data in the
-                                * center pixel. In browsers that don't support emoji, the character will be rendered
-                                * as an empty square, so the center pixel will be blank.
-                                */
-                               context.fillText( stringFromCharCode( 55357, 56835 ), 0, 0 );
-                               return context.getImageData( 16, 16, 1, 1 ).data[0] !== 0;
-                       case 'unicode8':
+                       case 'emoji4':
                                /*
-                                * To check for Unicode 8 support, let's try rendering the most important advancement
-                                * that the Unicode Consortium have made in years: the burrito.
-                                */
-                               context.fillText( stringFromCharCode( 55356, 57135 ), 0, 0 );
-                               return context.getImageData( 16, 16, 1, 1 ).data[0] !== 0;
-                       case 'unicode9':
-                               /*
-                                * Do Unicode 9 emoji render?
-                                * ¯\_(ツ)_/¯
+                                * Emoji 4 has the best technologists. So does WordPress!
+                                *
+                                * To test for support, try to render a new emoji (woman technologist: medium skin tone),
+                                * then compare it to how it would look if the browser doesn't render it correctly
+                                * (woman technologist: medium skin tone + personal computer).
                                 */
-                               context.fillText( stringFromCharCode( 55358, 56631 ), 0, 0 );
-                               return context.getImageData( 16, 16, 1, 1 ).data[0] !== 0;
+                               context.fillText( stringFromCharCode( 55357, 56425, 55356, 57341, 8205, 55357, 56507), 0, 0 );
+                               technologist = canvas.toDataURL();
+
+                               context.clearRect( 0, 0, canvas.width, canvas.height );
+
+                               context.fillText( stringFromCharCode( 55357, 56425, 55356, 57341, 55357, 56507), 0, 0 );
+                               technologist2 = canvas.toDataURL();
+
+                               return technologist !== technologist2;
                }
 
                return false;
                var script = document.createElement( 'script' );
 
                script.src = src;
-               script.type = 'text/javascript';
+               script.defer = script.type = 'text/javascript';
                document.getElementsByTagName( 'head' )[0].appendChild( script );
        }
 
-       tests = Array( 'simple', 'flag', 'unicode8', 'diversity', 'unicode9' );
+       tests = Array( 'flag', 'emoji4' );
 
        settings.supports = {
                everything: true,
index 8ad29f7103c41a76d4e7d236abf0858f1ea3634a..86442dcdfaeb17d5e4f23ba6ed41321df7064515 100644 (file)
@@ -1 +1 @@
-!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
+!function(a,b,c){function d(a){var b,c,d,e,f=String.fromCharCode;if(!k||!k.fillText)return!1;switch(k.clearRect(0,0,j.width,j.height),k.textBaseline="top",k.font="600 32px Arial",a){case"flag":return k.fillText(f(55356,56826,55356,56819),0,0),!(j.toDataURL().length<3e3)&&(k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,65039,8205,55356,57096),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,55356,57096),0,0),c=j.toDataURL(),b!==c);case"emoji4":return k.fillText(f(55357,56425,55356,57341,8205,55357,56507),0,0),d=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55357,56425,55356,57341,55357,56507),0,0),e=j.toDataURL(),d!==e}return!1}function e(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i,j=b.createElement("canvas"),k=j.getContext&&j.getContext("2d");for(i=Array("flag","emoji4"),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 ef72bc4f3685f88ef0e49dc96c7b616546fc301a..c2faec0ad987289c291192dba758a6aa49e098ad 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")&&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}();
+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-\udc69](?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92])|(?:\ud83c[\udfcb\udfcc]|\ud83d\udd75|\u26f9)(?:\ufe0f|\ud83c[\udffb-\udfff])\u200d[\u2640\u2642]\ufe0f|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd37-\udd39\udd3d\udd3e])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|\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\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\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\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\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|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|(?:[\u0023\u002a\u0030-\u0039])\ufe0f?\u20e3|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\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\udecc]|\ud83e[\udd18-\udd1c\udd1e\udd26\udd30\udd33-\udd39\udd3d\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\uddf3\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]|\ud800\udc00|\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\uded0-\uded2\udeeb\udeec\udef4-\udef6]|\ud83e[\udd10-\udd17\udd1d\udd20-\udd25\udd27\udd3a\udd3c\udd40-\udd45\udd47-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]|[\u23e9-\u23ec\u23f0\u23f3\u2640\u2642\u2695\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\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\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\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(){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 2b8e51339bff79fddf2665d6654397b3ea771684..c73471dbcb824d4f2ea895a777d1fe9ad0bccd3b 100644 (file)
 /* global ajaxurl, wpAjax */
-(function($) {
-var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}, wpList;
 
+/**
+ * @param {jQuery} $ jQuery object.
+ */
+( function( $ ) {
+var functions = {
+       add:     'ajaxAdd',
+       del:     'ajaxDel',
+       dim:     'ajaxDim',
+       process: 'process',
+       recolor: 'recolor'
+}, wpList;
+
+/**
+ * @namespace
+ */
 wpList = {
+
+       /**
+        * @member {object}
+        */
        settings: {
-               url: ajaxurl, type: 'POST',
+
+               /**
+                * URL for Ajax requests.
+                *
+                * @member {string}
+                */
+               url: ajaxurl,
+
+               /**
+                * The HTTP method to use for Ajax requests.
+                *
+                * @member {string}
+                */
+               type: 'POST',
+
+               /**
+                * ID of the element the parsed Ajax response will be stored in.
+                *
+                * @member {string}
+                */
                response: 'ajax-response',
 
+               /**
+                * The type of list.
+                *
+                * @member {string}
+                */
                what: '',
-               alt: 'alternate', altOffset: 0,
-               addColor: null, delColor: null, dimAddColor: null, dimDelColor: null,
 
+               /**
+                * CSS class name for alternate styling.
+                *
+                * @member {string}
+                */
+               alt: 'alternate',
+
+               /**
+                * Offset to start alternate styling from.
+                *
+                * @member {number}
+                */
+               altOffset: 0,
+
+               /**
+                * Color used in animation when adding an element.
+                *
+                * Can be 'none' to disable the animation.
+                *
+                * @member {string}
+                */
+               addColor: '#ffff33',
+
+               /**
+                * Color used in animation when deleting an element.
+                *
+                * Can be 'none' to disable the animation.
+                *
+                * @member {string}
+                */
+               delColor: '#faafaa',
+
+               /**
+                * Color used in dim add animation.
+                *
+                * Can be 'none' to disable the animation.
+                *
+                * @member {string}
+                */
+               dimAddColor: '#ffff33',
+
+               /**
+                * Color used in dim delete animation.
+                *
+                * Can be 'none' to disable the animation.
+                *
+                * @member {string}
+                */
+               dimDelColor: '#ff3333',
+
+               /**
+                * Callback that's run before a request is made.
+                *
+                * @callback wpList~confirm
+                * @param {object}      this
+                * @param {HTMLElement} list            The list DOM element.
+                * @param {object}      settings        Settings for the current list.
+                * @param {string}      action          The type of action to perform: 'add', 'delete', or 'dim'.
+                * @param {string}      backgroundColor Background color of the list's DOM element.
+                * @returns {boolean} Whether to proceed with the action or not.
+                */
                confirm: null,
-               addBefore: null, addAfter: null,
-               delBefore: null, delAfter: null,
-               dimBefore: null, dimAfter: null
+
+               /**
+                * Callback that's run before an item gets added to the list.
+                *
+                * Allows to cancel the request.
+                *
+                * @callback wpList~addBefore
+                * @param {object} settings Settings for the Ajax request.
+                * @returns {object|boolean} Settings for the Ajax request or false to abort.
+                */
+               addBefore: null,
+
+               /**
+                * Callback that's run after an item got added to the list.
+                *
+                * @callback wpList~addAfter
+                * @param {XML}    returnedResponse Raw response returned from the server.
+                * @param {object} settings         Settings for the Ajax request.
+                * @param {jqXHR}  settings.xml     jQuery XMLHttpRequest object.
+                * @param {string} settings.status  Status of the request: 'success', 'notmodified', 'nocontent', 'error',
+                *                                  'timeout', 'abort', or 'parsererror'.
+                * @param {object} settings.parsed  Parsed response object.
+                */
+               addAfter: null,
+
+               /**
+                * Callback that's run before an item gets deleted from the list.
+                *
+                * Allows to cancel the request.
+                *
+                * @callback wpList~delBefore
+                * @param {object}      settings Settings for the Ajax request.
+                * @param {HTMLElement} list     The list DOM element.
+                * @returns {object|boolean} Settings for the Ajax request or false to abort.
+                */
+               delBefore: null,
+
+               /**
+                * Callback that's run after an item got deleted from the list.
+                *
+                * @callback wpList~delAfter
+                * @param {XML}    returnedResponse Raw response returned from the server.
+                * @param {object} settings         Settings for the Ajax request.
+                * @param {jqXHR}  settings.xml     jQuery XMLHttpRequest object.
+                * @param {string} settings.status  Status of the request: 'success', 'notmodified', 'nocontent', 'error',
+                *                                  'timeout', 'abort', or 'parsererror'.
+                * @param {object} settings.parsed  Parsed response object.
+                */
+               delAfter: null,
+
+               /**
+                * Callback that's run before an item gets dim'd.
+                *
+                * Allows to cancel the request.
+                *
+                * @callback wpList~dimBefore
+                * @param {object} settings Settings for the Ajax request.
+                * @returns {object|boolean} Settings for the Ajax request or false to abort.
+                */
+               dimBefore: null,
+
+               /**
+                * Callback that's run after an item got dim'd.
+                *
+                * @callback wpList~dimAfter
+                * @param {XML}    returnedResponse Raw response returned from the server.
+                * @param {object} settings         Settings for the Ajax request.
+                * @param {jqXHR}  settings.xml     jQuery XMLHttpRequest object.
+                * @param {string} settings.status  Status of the request: 'success', 'notmodified', 'nocontent', 'error',
+                *                                  'timeout', 'abort', or 'parsererror'.
+                * @param {object} settings.parsed  Parsed response object.
+                */
+               dimAfter: null
        },
 
-       nonce: function(e,s) {
-               var url = wpAjax.unserialize(e.attr('href'));
-               return s.nonce || url._ajax_nonce || $('#' + s.element + ' input[name="_ajax_nonce"]').val() || url._wpnonce || $('#' + s.element + ' input[name="_wpnonce"]').val() || 0;
+       /**
+        * Finds a nonce.
+        *
+        * 1. Nonce in settings.
+        * 2. `_ajax_nonce` value in element's href attribute.
+        * 3. `_ajax_nonce` input field that is a descendant of element.
+        * 4. `_wpnonce` value in element's href attribute.
+        * 5. `_wpnonce` input field that is a descendant of element.
+        * 6. 0 if none can be found.
+        *
+        * @param {jQuery} element  Element that triggered the request.
+        * @param {object} settings Settings for the Ajax request.
+        * @returns {string|number} Nonce
+        */
+       nonce: function( element, settings ) {
+               var url      = wpAjax.unserialize( element.attr( 'href' ) ),
+                       $element = $( '#' + settings.element );
+
+               return settings.nonce || url._ajax_nonce || $element.find( 'input[name="_ajax_nonce"]' ).val() || url._wpnonce || $element.find( 'input[name="_wpnonce"]' ).val() || 0;
        },
 
        /**
         * Extract list item data from a DOM element.
         *
-        * @param  {HTMLElement} e The DOM element.
-        * @param  {string}      t
-        * @return {array}
+        * Example 1: data-wp-lists="delete:the-comment-list:comment-{comment_ID}:66cc66:unspam=1"
+        * Example 2: data-wp-lists="dim:the-comment-list:comment-{comment_ID}:unapproved:e7e7d3:e7e7d3:new=approved"
+        *
+        * Returns an unassociated array with the following data:
+        * data[0] - Data identifier: 'list', 'add', 'delete', or 'dim'.
+        * data[1] - ID of the corresponding list. If data[0] is 'list', the type of list ('comment', 'category', etc).
+        * data[2] - ID of the parent element of all inputs necessary for the request.
+        * data[3] - Hex color to be used in this request. If data[0] is 'dim', dim class.
+        * data[4] - Additional arguments in query syntax that are added to the request. Example: 'post_id=1234'.
+        *           If data[0] is 'dim', dim add color.
+        * data[5] - Only available if data[0] is 'dim', dim delete color.
+        * data[6] - Only available if data[0] is 'dim', additional arguments in query syntax that are added to the request.
+        *
+        * Result for Example 1:
+        * data[0] - delete
+        * data[1] - the-comment-list
+        * data[2] - comment-{comment_ID}
+        * data[3] - 66cc66
+        * data[4] - unspam=1
+        *
+        * @param  {HTMLElement} element The DOM element.
+        * @param  {string}      type    The type of data to look for: 'list', 'add', 'delete', or 'dim'.
+        * @returns {Array} Extracted list item data.
         */
-       parseData: function(e,t) {
-               var d = [], wpListsData;
+       parseData: function( element, type ) {
+               var data = [], wpListsData;
 
                try {
-                       wpListsData = $(e).attr('data-wp-lists') || '';
-                       wpListsData = wpListsData.match(new RegExp(t+':[\\S]+'));
+                       wpListsData = $( element ).data( 'wp-lists' ) || '';
+                       wpListsData = wpListsData.match( new RegExp( type + ':[\\S]+' ) );
 
-                       if ( wpListsData )
-                               d = wpListsData[0].split(':');
-               } catch(r) {}
+                       if ( wpListsData ) {
+                               data = wpListsData[0].split( ':' );
+                       }
+               } catch ( error ) {}
 
-               return d;
+               return data;
        },
 
-       pre: function(e,s,a) {
-               var bg, r;
+       /**
+        * Calls a confirm callback to verify the action that is about to be performed.
+        *
+        * @param {HTMLElement} list     The DOM element.
+        * @param {object}      settings Settings for this list.
+        * @param {string}      action   The type of action to perform: 'add', 'delete', or 'dim'.
+        * @returns {object|boolean} Settings if confirmed, false if not.
+        */
+       pre: function( list, settings, action ) {
+               var $element, backgroundColor, confirmed;
 
-               s = $.extend( {}, this.wpList.settings, {
+               settings = $.extend( {}, this.wpList.settings, {
                        element: null,
-                       nonce: 0,
-                       target: e.get(0)
-               }, s || {} );
-
-               if ( $.isFunction( s.confirm ) ) {
-                       if ( 'add' != a ) {
-                               bg = $('#' + s.element).css('backgroundColor');
-                               $('#' + s.element).css('backgroundColor', '#FF9966');
+                       nonce:   0,
+                       target:  list.get( 0 )
+               }, settings || {} );
+
+               if ( $.isFunction( settings.confirm ) ) {
+                       $element = $( '#' + settings.element );
+
+                       if ( 'add' !== action ) {
+                               backgroundColor = $element.css( 'backgroundColor' );
+                               $element.css( 'backgroundColor', '#ff9966' );
                        }
-                       r = s.confirm.call(this, e, s, a, bg);
 
-                       if ( 'add' != a )
-                               $('#' + s.element).css('backgroundColor', bg );
+                       confirmed = settings.confirm.call( this, list, settings, action, backgroundColor );
 
-                       if ( !r )
+                       if ( 'add' !== action ) {
+                               $element.css( 'backgroundColor', backgroundColor );
+                       }
+
+                       if ( ! confirmed ) {
                                return false;
+                       }
                }
 
-               return s;
+               return settings;
        },
 
-       ajaxAdd: function( e, s ) {
-               e = $(e);
-               s = s || {};
-               var list = this, data = wpList.parseData(e,'add'), es, valid, formData, res, rres;
-
-               s = wpList.pre.call( list, e, s, 'add' );
+       /**
+        * Adds an item to the list via AJAX.
+        *
+        * @param {HTMLElement} element  The DOM element.
+        * @param {object}      settings Settings for this list.
+        * @returns {boolean} Whether the item was added.
+        */
+       ajaxAdd: function( element, settings ) {
+               var list     = this,
+                       $element = $( element ),
+                       data     = wpList.parseData( $element, 'add' ),
+                       formValues, formData, parsedResponse, returnedResponse;
 
-               s.element = data[2] || e.attr( 'id' ) || s.element || null;
+               settings = settings || {};
+               settings = wpList.pre.call( list, $element, settings, 'add' );
 
-               if ( data[3] )
-                       s.addColor = '#' + data[3];
-               else
-                       s.addColor = s.addColor || '#FFFF33';
+               settings.element  = data[2] || $element.prop( 'id' ) || settings.element || null;
+               settings.addColor = data[3] ? '#' + data[3] : settings.addColor;
 
-               if ( !s )
+               if ( ! settings ) {
                        return false;
+               }
 
-               if ( !e.is('[id="' + s.element + '-submit"]') )
-                       return !wpList.add.call( list, e, s );
+               if ( ! $element.is( '[id="' + settings.element + '-submit"]' ) ) {
+                       return ! wpList.add.call( list, $element, settings );
+               }
 
-               if ( !s.element )
+               if ( ! settings.element ) {
                        return true;
+               }
 
-               s.action = 'add-' + s.what;
+               settings.action = 'add-' + settings.what;
+               settings.nonce  = wpList.nonce( $element, settings );
 
-               s.nonce = wpList.nonce(e,s);
+               if ( ! wpAjax.validateForm( '#' + settings.element ) ) {
+                       return false;
+               }
 
-               es = $('#' + s.element + ' :input').not('[name="_ajax_nonce"], [name="_wpnonce"], [name="action"]');
-               valid = wpAjax.validateForm( '#' + s.element );
+               settings.data = $.param( $.extend( {
+                       _ajax_nonce: settings.nonce,
+                       action:      settings.action
+               }, wpAjax.unserialize( data[4] || '' ) ) );
 
-               if ( !valid )
-                       return false;
+               formValues = $( '#' + settings.element + ' :input' ).not( '[name="_ajax_nonce"], [name="_wpnonce"], [name="action"]' );
+               formData   = $.isFunction( formValues.fieldSerialize ) ? formValues.fieldSerialize() : formValues.serialize();
 
-               s.data = $.param( $.extend( { _ajax_nonce: s.nonce, action: s.action }, wpAjax.unserialize( data[4] || '' ) ) );
-               formData = $.isFunction(es.fieldSerialize) ? es.fieldSerialize() : es.serialize();
+               if ( formData ) {
+                       settings.data += '&' + formData;
+               }
 
-               if ( formData )
-                       s.data += '&' + formData;
+               if ( $.isFunction( settings.addBefore ) ) {
+                       settings = settings.addBefore( settings );
 
-               if ( $.isFunction(s.addBefore) ) {
-                       s = s.addBefore( s );
-                       if ( !s )
+                       if ( ! settings ) {
                                return true;
+                       }
                }
 
-               if ( !s.data.match(/_ajax_nonce=[a-f0-9]+/) )
+               if ( ! settings.data.match( /_ajax_nonce=[a-f0-9]+/ ) ) {
                        return true;
+               }
 
-               s.success = function(r) {
-                       res = wpAjax.parseAjaxResponse(r, s.response, s.element);
-
-                       rres = r;
+               settings.success = function( response ) {
+                       parsedResponse   = wpAjax.parseAjaxResponse( response, settings.response, settings.element );
+                       returnedResponse = response;
 
-                       if ( !res || res.errors )
+                       if ( ! parsedResponse || parsedResponse.errors ) {
                                return false;
+                       }
 
-                       if ( true === res )
+                       if ( true === parsedResponse ) {
                                return true;
+                       }
 
-                       jQuery.each( res.responses, function() {
-                               wpList.add.call( list, this.data, $.extend( {}, s, { // this.firstChild.nodevalue
-                                       pos: this.position || 0,
-                                       id: this.id || 0,
-                                       oldId: this.oldId || null
+                       $.each( parsedResponse.responses, function() {
+                               wpList.add.call( list, this.data, $.extend( {}, settings, { // this.firstChild.nodevalue
+                                       position: this.position || 0,
+                                       id:       this.id || 0,
+                                       oldId:    this.oldId || null
                                } ) );
                        } );
 
                        list.wpList.recolor();
-                       $(list).trigger( 'wpListAddEnd', [ s, list.wpList ] );
-                       wpList.clear.call(list,'#' + s.element);
+                       $( list ).trigger( 'wpListAddEnd', [ settings, list.wpList ] );
+                       wpList.clear.call( list, '#' + settings.element );
                };
 
-               s.complete = function(x, st) {
-                       if ( $.isFunction(s.addAfter) ) {
-                               var _s = $.extend( { xml: x, status: st, parsed: res }, s );
-                               s.addAfter( rres, _s );
+               settings.complete = function( jqXHR, status ) {
+                       if ( $.isFunction( settings.addAfter ) ) {
+                               settings.addAfter( returnedResponse, $.extend( {
+                                       xml:    jqXHR,
+                                       status: status,
+                                       parsed: parsedResponse
+                               }, settings ) );
                        }
                };
 
-               $.ajax( s );
+               $.ajax( settings );
+
                return false;
        },
 
        /**
         * Delete an item in the list via AJAX.
         *
-        * @param  {HTMLElement} e A DOM element containing item data.
-        * @param  {Object}      s
-        * @return {boolean}
+        * @param {HTMLElement} element  A DOM element containing item data.
+        * @param {object}      settings Settings for this list.
+        * @returns {boolean} Whether the item was deleted.
         */
-       ajaxDel: function( e, s ) {
-               e = $(e);
-               s = s || {};
-               var list = this, data = wpList.parseData(e,'delete'), element, res, rres;
+       ajaxDel: function( element, settings ) {
+               var list     = this,
+                       $element = $( element ),
+                       data     = wpList.parseData( $element, 'delete' ),
+                       $eventTarget, parsedResponse, returnedResponse;
 
-               s = wpList.pre.call( list, e, s, 'delete' );
+               settings = settings || {};
+               settings = wpList.pre.call( list, $element, settings, 'delete' );
 
-               s.element = data[2] || s.element || null;
+               settings.element  = data[2] || settings.element || null;
+               settings.delColor = data[3] ? '#' + data[3] : settings.delColor;
 
-               if ( data[3] )
-                       s.delColor = '#' + data[3];
-               else
-                       s.delColor = s.delColor || '#faa';
-
-               if ( !s || !s.element )
+               if ( ! settings || ! settings.element ) {
                        return false;
+               }
 
-               s.action = 'delete-' + s.what;
+               settings.action = 'delete-' + settings.what;
+               settings.nonce  = wpList.nonce( $element, settings );
 
-               s.nonce = wpList.nonce(e,s);
+               settings.data = $.extend( {
+                       _ajax_nonce: settings.nonce,
+                       action:      settings.action,
+                       id:          settings.element.split( '-' ).pop()
+               }, wpAjax.unserialize( data[4] || '' ) );
 
-               s.data = $.extend(
-                       { action: s.action, id: s.element.split('-').pop(), _ajax_nonce: s.nonce },
-                       wpAjax.unserialize( data[4] || '' )
-               );
+               if ( $.isFunction( settings.delBefore ) ) {
+                       settings = settings.delBefore( settings, list );
 
-               if ( $.isFunction(s.delBefore) ) {
-                       s = s.delBefore( s, list );
-                       if ( !s )
+                       if ( ! settings ) {
                                return true;
+                       }
                }
 
-               if ( !s.data._ajax_nonce )
+               if ( ! settings.data._ajax_nonce ) {
                        return true;
+               }
 
-               element = $('#' + s.element);
+               $eventTarget = $( '#' + settings.element );
 
-               if ( 'none' != s.delColor ) {
-                       element.css( 'backgroundColor', s.delColor ).fadeOut( 350, function(){
+               if ( 'none' !== settings.delColor ) {
+                       $eventTarget.css( 'backgroundColor', settings.delColor ).fadeOut( 350, function() {
                                list.wpList.recolor();
-                               $(list).trigger( 'wpListDelEnd', [ s, list.wpList ] );
-                       });
+                               $( list ).trigger( 'wpListDelEnd', [ settings, list.wpList ] );
+                       } );
                } else {
                        list.wpList.recolor();
-                       $(list).trigger( 'wpListDelEnd', [ s, list.wpList ] );
+                       $( list ).trigger( 'wpListDelEnd', [ settings, list.wpList ] );
                }
 
-               s.success = function(r) {
-                       res = wpAjax.parseAjaxResponse(r, s.response, s.element);
-                       rres = r;
+               settings.success = function( response ) {
+                       parsedResponse   = wpAjax.parseAjaxResponse( response, settings.response, settings.element );
+                       returnedResponse = response;
+
+                       if ( ! parsedResponse || parsedResponse.errors ) {
+                               $eventTarget.stop().stop().css( 'backgroundColor', '#faa' ).show().queue( function() {
+                                       list.wpList.recolor();
+                                       $( this ).dequeue();
+                               } );
 
-                       if ( !res || res.errors ) {
-                               element.stop().stop().css( 'backgroundColor', '#faa' ).show().queue( function() { list.wpList.recolor(); $(this).dequeue(); } );
                                return false;
                        }
                };
 
-               s.complete = function(x, st) {
-                       if ( $.isFunction(s.delAfter) ) {
-                               element.queue( function() {
-                                       var _s = $.extend( { xml: x, status: st, parsed: res }, s );
-                                       s.delAfter( rres, _s );
-                               }).dequeue();
+               settings.complete = function( jqXHR, status ) {
+                       if ( $.isFunction( settings.delAfter ) ) {
+                               $eventTarget.queue( function() {
+                                       settings.delAfter( returnedResponse, $.extend( {
+                                               xml:    jqXHR,
+                                               status: status,
+                                               parsed: parsedResponse
+                                       }, settings ) );
+                               } ).dequeue();
                        }
                };
 
-               $.ajax( s );
+               $.ajax( settings );
+
                return false;
        },
 
-       ajaxDim: function( e, s ) {
-               if ( $(e).parent().css('display') == 'none' ) // Prevent hidden links from being clicked by hotkeys
+       /**
+        * Dim an item in the list via AJAX.
+        *
+        * @param {HTMLElement} element  A DOM element containing item data.
+        * @param {object}      settings Settings for this list.
+        * @returns {boolean} Whether the item was dim'ed.
+        */
+       ajaxDim: function( element, settings ) {
+               var list     = this,
+                       $element = $( element ),
+                       data     = wpList.parseData( $element, 'dim' ),
+                       $eventTarget, isClass, color, dimColor, parsedResponse, returnedResponse;
+
+               // Prevent hidden links from being clicked by hotkeys.
+               if ( 'none' === $element.parent().css( 'display' ) ) {
                        return false;
+               }
 
-               e = $(e);
-               s = s || {};
-
-               var list = this, data = wpList.parseData(e,'dim'), element, isClass, color, dimColor, res, rres;
-
-               s = wpList.pre.call( list, e, s, 'dim' );
-
-               s.element = data[2] || s.element || null;
-               s.dimClass =  data[3] || s.dimClass || null;
-
-               if ( data[4] )
-                       s.dimAddColor = '#' + data[4];
-               else
-                       s.dimAddColor = s.dimAddColor || '#FFFF33';
+               settings = settings || {};
+               settings = wpList.pre.call( list, $element, settings, 'dim' );
 
-               if ( data[5] )
-                       s.dimDelColor = '#' + data[5];
-               else
-                       s.dimDelColor = s.dimDelColor || '#FF3333';
+               settings.element     = data[2] || settings.element || null;
+               settings.dimClass    = data[3] || settings.dimClass || null;
+               settings.dimAddColor = data[4] ? '#' + data[4] : settings.dimAddColor;
+               settings.dimDelColor = data[5] ? '#' + data[5] : settings.dimDelColor;
 
-               if ( !s || !s.element || !s.dimClass )
+               if ( ! settings || ! settings.element || ! settings.dimClass ) {
                        return true;
+               }
 
-               s.action = 'dim-' + s.what;
+               settings.action = 'dim-' + settings.what;
+               settings.nonce  = wpList.nonce( $element, settings );
 
-               s.nonce = wpList.nonce(e,s);
+               settings.data = $.extend( {
+                       _ajax_nonce: settings.nonce,
+                       action:      settings.action,
+                       id:          settings.element.split( '-' ).pop(),
+                       dimClass:    settings.dimClass
+               }, wpAjax.unserialize( data[6] || '' ) );
 
-               s.data = $.extend(
-                       { action: s.action, id: s.element.split('-').pop(), dimClass: s.dimClass, _ajax_nonce : s.nonce },
-                       wpAjax.unserialize( data[6] || '' )
-               );
+               if ( $.isFunction( settings.dimBefore ) ) {
+                       settings = settings.dimBefore( settings );
 
-               if ( $.isFunction(s.dimBefore) ) {
-                       s = s.dimBefore( s );
-                       if ( !s )
+                       if ( ! settings ) {
                                return true;
+                       }
                }
 
-               element = $('#' + s.element);
-               isClass = element.toggleClass(s.dimClass).is('.' + s.dimClass);
-               color = wpList.getColor( element );
-               element.toggleClass( s.dimClass );
-               dimColor = isClass ? s.dimAddColor : s.dimDelColor;
+               $eventTarget = $( '#' + settings.element );
+               isClass      = $eventTarget.toggleClass( settings.dimClass ).is( '.' + settings.dimClass );
+               color        = wpList.getColor( $eventTarget );
+               dimColor     = isClass ? settings.dimAddColor : settings.dimDelColor;
+               $eventTarget.toggleClass( settings.dimClass );
 
-               if ( 'none' != dimColor ) {
-                       element
+               if ( 'none' !== dimColor ) {
+                       $eventTarget
                                .animate( { backgroundColor: dimColor }, 'fast' )
-                               .queue( function() { element.toggleClass(s.dimClass); $(this).dequeue(); } )
-                               .animate( { backgroundColor: color }, { complete: function() {
-                                               $(this).css( 'backgroundColor', '' );
-                                               $(list).trigger( 'wpListDimEnd', [ s, list.wpList ] );
+                               .queue( function() {
+                                       $eventTarget.toggleClass( settings.dimClass );
+                                       $( this ).dequeue();
+                               } )
+                               .animate( { backgroundColor: color }, {
+                                       complete: function() {
+                                               $( this ).css( 'backgroundColor', '' );
+                                               $( list ).trigger( 'wpListDimEnd', [ settings, list.wpList ] );
                                        }
-                               });
+                               } );
                } else {
-                       $(list).trigger( 'wpListDimEnd', [ s, list.wpList ] );
+                       $( list ).trigger( 'wpListDimEnd', [ settings, list.wpList ] );
                }
 
-               if ( !s.data._ajax_nonce )
+               if ( ! settings.data._ajax_nonce ) {
                        return true;
+               }
 
-               s.success = function(r) {
-                       res = wpAjax.parseAjaxResponse(r, s.response, s.element);
-                       rres = r;
+               settings.success = function( response ) {
+                       parsedResponse   = wpAjax.parseAjaxResponse( response, settings.response, settings.element );
+                       returnedResponse = response;
 
-                       if ( true === res ) {
+                       if ( true === parsedResponse ) {
                                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(); } );
+                       if ( ! parsedResponse || parsedResponse.errors ) {
+                               $eventTarget.stop().stop().css( 'backgroundColor', '#ff3333' )[isClass ? 'removeClass' : 'addClass']( settings.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' );
+                       /** @property {string} comment_link Link of the comment to be dimmed. */
+                       if ( 'undefined' !== typeof parsedResponse.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 ) );
+                               if ( '' !== parsedResponse.responses[0].supplemental.comment_link ) {
+                                       $submittedOn.html( $('<a></a>').text( $submittedOn.text() ).prop( 'href', parsedResponse.responses[0].supplemental.comment_link ) );
 
                                // Comment is not approved; unlink the date field.
-                               } else if ( commentLink.length ) {
-                                       submittedOn.text( commentLink.text() );
+                               } else if ( $commentLink.length ) {
+                                       $submittedOn.text( $commentLink.text() );
                                }
                        }
                };
 
-               s.complete = function(x, st) {
-                       if ( $.isFunction(s.dimAfter) ) {
-                               element.queue( function() {
-                                       var _s = $.extend( { xml: x, status: st, parsed: res }, s );
-                                       s.dimAfter( rres, _s );
-                               }).dequeue();
+               settings.complete = function( jqXHR, status ) {
+                       if ( $.isFunction( settings.dimAfter ) ) {
+                               $eventTarget.queue( function() {
+                                       settings.dimAfter( returnedResponse, $.extend( {
+                                               xml:    jqXHR,
+                                               status: status,
+                                               parsed: parsedResponse
+                                       }, settings ) );
+                               } ).dequeue();
                        }
                };
 
-               $.ajax( s );
+               $.ajax( settings );
+
                return false;
        },
 
-       getColor: function( el ) {
-               var color = jQuery(el).css('backgroundColor');
-
-               return color || '#ffffff';
+       /**
+        * Returns the background color of the passed element.
+        *
+        * @param {jQuery|string} element Element to check.
+        * @returns {string} Background color value in HEX. Default: '#ffffff'.
+        */
+       getColor: function( element ) {
+               return $( element ).css( 'backgroundColor' ) || '#ffffff';
        },
 
-       add: function( e, s ) {
-               if ( 'string' == typeof e ) {
-                       e = $( $.trim( e ) ); // Trim leading whitespaces
-               } else {
-                       e = $( e );
+       /**
+        * Adds something.
+        *
+        * @param {HTMLElement} element  A DOM element containing item data.
+        * @param {object}      settings Settings for this list.
+        * @returns {boolean} Whether the item was added.
+        */
+       add: function( element, settings ) {
+               var $list    = $( this ),
+                       $element = $( element ),
+                       old      = false,
+                       position, reference;
+
+               if ( 'string' === typeof settings ) {
+                       settings = { what: settings };
                }
 
-               var list = $(this), old = false, _s = { pos: 0, id: 0, oldId: null }, ba, ref, color;
-
-               if ( 'string' == typeof s )
-                       s = { what: s };
-
-               s = $.extend(_s, this.wpList.settings, s);
+               settings = $.extend( { position: 0, id: 0, oldId: null }, this.wpList.settings, settings );
 
-               if ( !e.length || !s.what )
+               if ( ! $element.length || ! settings.what ) {
                        return false;
+               }
 
-               if ( s.oldId )
-                       old = $('#' + s.what + '-' + s.oldId);
+               if ( settings.oldId ) {
+                       old = $( '#' + settings.what + '-' + settings.oldId );
+               }
 
-               if ( s.id && ( s.id != s.oldId || !old || !old.length ) )
-                       $('#' + s.what + '-' + s.id).remove();
+               if ( settings.id && ( settings.id !== settings.oldId || ! old || ! old.length ) ) {
+                       $( '#' + settings.what + '-' + settings.id ).remove();
+               }
 
                if ( old && old.length ) {
-                       old.before(e);
+                       old.before( $element );
                        old.remove();
-               } else if ( isNaN(s.pos) ) {
-                       ba = 'after';
 
-                       if ( '-' == s.pos.substr(0,1) ) {
-                               s.pos = s.pos.substr(1);
-                               ba = 'before';
+               } else if ( isNaN( settings.position ) ) {
+                       position = 'after';
+
+                       if ( '-' === settings.position.substr( 0, 1 ) ) {
+                               settings.position = settings.position.substr( 1 );
+                               position = 'before';
                        }
 
-                       ref = list.find( '#' + s.pos );
+                       reference = $list.find( '#' + settings.position );
 
-                       if ( 1 === ref.length )
-                               ref[ba](e);
-                       else
-                               list.append(e);
+                       if ( 1 === reference.length ) {
+                               reference[position]( $element );
+                       } else {
+                               $list.append( $element );
+                       }
 
-               } else if ( 'comment' != s.what || 0 === $('#' + s.element).length ) {
-                       if ( s.pos < 0 ) {
-                               list.prepend(e);
+               } else if ( 'comment' !== settings.what || 0 === $( '#' + settings.element ).length ) {
+                       if ( settings.position < 0 ) {
+                               $list.prepend( $element );
                        } else {
-                               list.append(e);
+                               $list.append( $element );
                        }
                }
 
-               if ( s.alt ) {
-                       if ( ( list.children(':visible').index( e[0] ) + s.altOffset ) % 2 ) { e.removeClass( s.alt ); }
-                       else { e.addClass( s.alt ); }
+               if ( settings.alt ) {
+                       $element.toggleClass( settings.alt, ( $list.children( ':visible' ).index( $element[0] ) + settings.altOffset ) % 2 );
                }
 
-               if ( 'none' != s.addColor ) {
-                       color = wpList.getColor( e );
-                       e.css( 'backgroundColor', s.addColor ).animate( { backgroundColor: color }, { complete: function() { $(this).css( 'backgroundColor', '' ); } } );
+               if ( 'none' !== settings.addColor ) {
+                       $element.css( 'backgroundColor', settings.addColor ).animate( { backgroundColor: wpList.getColor( $element ) }, {
+                               complete: function() {
+                                       $( this ).css( 'backgroundColor', '' );
+                               }
+                       } );
                }
-               list.each( function() { this.wpList.process( e ); } );
-               return e;
-       },
 
-       clear: function(e) {
-               var list = this, t, tag;
+               // Add event handlers.
+               $list.each( function( index, list ) {
+                       list.wpList.process( $element );
+               } );
 
-               e = $(e);
+               return $element;
+       },
 
-               if ( list.wpList && e.parents( '#' + list.id ).length )
+       /**
+        * Clears all input fields within the element passed.
+        *
+        * @param {string} elementId ID of the element to check, including leading #.
+        */
+       clear: function( elementId ) {
+               var list     = this,
+                       $element = $( elementId ),
+                       type, tagName;
+
+               // Bail if we're within the list.
+               if ( list.wpList && $element.parents( '#' + list.id ).length ) {
                        return;
+               }
+
+               // Check each input field.
+               $element.find( ':input' ).each( function( index, input ) {
 
-               e.find(':input').each( function() {
-                       if ( $(this).parents('.form-no-clear').length )
+                       // Bail if the form was marked to not to be cleared.
+                       if ( $( input ).parents( '.form-no-clear' ).length ) {
                                return;
+                       }
+
+                       type    = input.type.toLowerCase();
+                       tagName = input.tagName.toLowerCase();
+
+                       if ( 'text' === type || 'password' === type || 'textarea' === tagName ) {
+                               input.value = '';
 
-                       t = this.type.toLowerCase();
-                       tag = this.tagName.toLowerCase();
+                       } else if ( 'checkbox' === type || 'radio' === type ) {
+                               input.checked = false;
 
-                       if ( 'text' == t || 'password' == t || 'textarea' == tag )
-                               this.value = '';
-                       else if ( 'checkbox' == t || 'radio' == t )
-                               this.checked = false;
-                       else if ( 'select' == tag )
-                               this.selectedIndex = null;
-               });
+                       } else if ( 'select' === tagName ) {
+                               input.selectedIndex = null;
+                       }
+               } );
        },
 
-       process: function(el) {
-               var list = this,
-                       $el = $(el || document);
+       /**
+        * Registers event handlers to add, delete, and dim items.
+        *
+        * @param {string} elementId
+        */
+       process: function( elementId ) {
+               var list     = this,
+                       $element = $( elementId || document );
 
-               $el.delegate( 'form[data-wp-lists^="add:' + list.id + ':"]', 'submit', function(){
-                       return list.wpList.add(this);
-               });
+               $element.on( 'submit', 'form[data-wp-lists^="add:' + list.id + ':"]', function() {
+                       return list.wpList.add( this );
+               } );
 
-               $el.delegate( 'a[data-wp-lists^="add:' + list.id + ':"], input[data-wp-lists^="add:' + list.id + ':"]', 'click', function(){
-                       return list.wpList.add(this);
-               });
+               $element.on( 'click', 'a[data-wp-lists^="add:' + list.id + ':"], input[data-wp-lists^="add:' + list.id + ':"]', function() {
+                       return list.wpList.add( this );
+               } );
 
-               $el.delegate( '[data-wp-lists^="delete:' + list.id + ':"]', 'click', function(){
-                       return list.wpList.del(this);
-               });
+               $element.on( 'click', '[data-wp-lists^="delete:' + list.id + ':"]', function() {
+                       return list.wpList.del( this );
+               } );
 
-               $el.delegate( '[data-wp-lists^="dim:' + list.id + ':"]', 'click', function(){
-                       return list.wpList.dim(this);
-               });
+               $element.on( 'click', '[data-wp-lists^="dim:' + list.id + ':"]', function() {
+                       return list.wpList.dim( this );
+               } );
        },
 
+       /**
+        * Updates list item background colors.
+        */
        recolor: function() {
-               var list = this, items, eo;
+               var list    = this,
+                       evenOdd = [':even', ':odd'],
+                       items;
 
-               if ( !list.wpList.settings.alt )
+               // Bail if there is no alternate class name specified.
+               if ( ! list.wpList.settings.alt ) {
                        return;
+               }
 
-               items = $('.list-item:visible', list);
-
-               if ( !items.length )
-                       items = $(list).children(':visible');
+               items = $( '.list-item:visible', list );
 
-               eo = [':even',':odd'];
+               if ( ! items.length ) {
+                       items = $( list ).children( ':visible' );
+               }
 
-               if ( list.wpList.settings.altOffset % 2 )
-                       eo.reverse();
+               if ( list.wpList.settings.altOffset % 2 ) {
+                       evenOdd.reverse();
+               }
 
-               items.filter(eo[0]).addClass(list.wpList.settings.alt).end().filter(eo[1]).removeClass(list.wpList.settings.alt);
+               items.filter( evenOdd[0] ).addClass( list.wpList.settings.alt ).end();
+               items.filter( evenOdd[1] ).removeClass( list.wpList.settings.alt );
        },
 
+       /**
+        * Sets up `process()` and `recolor()` functions.
+        */
        init: function() {
-               var lists = this;
+               var $list = this;
 
-               lists.wpList.process = function(a) {
-                       lists.each( function() {
-                               this.wpList.process(a);
+               $list.wpList.process = function( element ) {
+                       $list.each( function() {
+                               this.wpList.process( element );
                        } );
                };
 
-               lists.wpList.recolor = function() {
-                       lists.each( function() {
+               $list.wpList.recolor = function() {
+                       $list.each( function() {
                                this.wpList.recolor();
                        } );
                };
        }
 };
 
+/**
+ * Initializes wpList object.
+ *
+ * @param {Object}           settings
+ * @param {string}           settings.url         URL for ajax calls. Default: ajaxurl.
+ * @param {string}           settings.type        The HTTP method to use for Ajax requests. Default: 'POST'.
+ * @param {string}           settings.response    ID of the element the parsed ajax response will be stored in.
+ *                                                Default: 'ajax-response'.
+ *
+ * @param {string}           settings.what        Default: ''.
+ * @param {string}           settings.alt         CSS class name for alternate styling. Default: 'alternate'.
+ * @param {number}           settings.altOffset   Offset to start alternate styling from. Default: 0.
+ * @param {string}           settings.addColor    Hex code or 'none' to disable animation. Default: '#ffff33'.
+ * @param {string}           settings.delColor    Hex code or 'none' to disable animation. Default: '#faafaa'.
+ * @param {string}           settings.dimAddColor Hex code or 'none' to disable animation. Default: '#ffff33'.
+ * @param {string}           settings.dimDelColor Hex code or 'none' to disable animation. Default: '#ff3333'.
+ *
+ * @param {wpList~confirm}   settings.confirm     Callback that's run before a request is made. Default: null.
+ * @param {wpList~addBefore} settings.addBefore   Callback that's run before an item gets added to the list.
+ *                                                Default: null.
+ * @param {wpList~addAfter}  settings.addAfter    Callback that's run after an item got added to the list.
+ *                                                Default: null.
+ * @param {wpList~delBefore} settings.delBefore   Callback that's run before an item gets deleted from the list.
+ *                                                Default: null.
+ * @param {wpList~delAfter}  settings.delAfter    Callback that's run after an item got deleted from the list.
+ *                                                Default: null.
+ * @param {wpList~dimBefore} settings.dimBefore   Callback that's run before an item gets dim'd. Default: null.
+ * @param {wpList~dimAfter}  settings.dimAfter    Callback that's run after an item got dim'd. Default: null.
+ * @returns {$.fn} wpList API function.
+ */
 $.fn.wpList = function( settings ) {
-       this.each( function() {
-               var _this = this;
+       this.each( function( index, list ) {
+               list.wpList = {
+                       settings: $.extend( {}, wpList.settings, { what: wpList.parseData( list, 'list' )[1] || '' }, settings )
+               };
 
-               this.wpList = { settings: $.extend( {}, wpList.settings, { what: wpList.parseData(this,'list')[1] || '' }, settings ) };
-               $.each( fs, function(i,f) { _this.wpList[i] = function( e, s ) { return wpList[f].call( _this, e, s ); }; } );
+               $.each( functions, function( func, callback ) {
+                       list.wpList[func] = function( element, setting ) {
+                               return wpList[callback].call( list, element, setting );
+                       };
+               } );
        } );
 
-       wpList.init.call(this);
-
+       wpList.init.call( this );
        this.wpList.process();
 
        return this;
 };
-
-})(jQuery);
+} ) ( jQuery );
index 719aa1aebb96f05a58efcaefb72334087e5c09ed..4e8493a88eb471edb7fd53778f2395386c0c8479 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))&&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
+!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:"#ffff33",delColor:"#faafaa",dimAddColor:"#ffff33",dimDelColor:"#ff3333",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")),e=a("#"+c.element);return c.nonce||d._ajax_nonce||e.find('input[name="_ajax_nonce"]').val()||d._wpnonce||e.find('input[name="_wpnonce"]').val()||0},parseData:function(b,c){var d,e=[];try{d=a(b).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,g;return c=a.extend({},this.wpList.settings,{element:null,nonce:0,target:b.get(0)},c||{}),!(a.isFunction(c.confirm)&&(e=a("#"+c.element),"add"!==d&&(f=e.css("backgroundColor"),e.css("backgroundColor","#ff9966")),g=c.confirm.call(this,b,c,d,f),"add"!==d&&e.css("backgroundColor",f),!g))&&c},ajaxAdd:function(c,d){var e,f,g,h,i=this,j=a(c),k=b.parseData(j,"add");return d=d||{},d=b.pre.call(i,j,d,"add"),d.element=k[2]||j.prop("id")||d.element||null,d.addColor=k[3]?"#"+k[3]:d.addColor,!!d&&(j.is('[id="'+d.element+'-submit"]')?!d.element||(d.action="add-"+d.what,d.nonce=b.nonce(j,d),!!wpAjax.validateForm("#"+d.element)&&(d.data=a.param(a.extend({_ajax_nonce:d.nonce,action:d.action},wpAjax.unserialize(k[4]||""))),e=a("#"+d.element+" :input").not('[name="_ajax_nonce"], [name="_wpnonce"], [name="action"]'),f=a.isFunction(e.fieldSerialize)?e.fieldSerialize():e.serialize(),f&&(d.data+="&"+f),!(!a.isFunction(d.addBefore)||(d=d.addBefore(d)))||(!d.data.match(/_ajax_nonce=[a-f0-9]+/)||(d.success=function(c){return g=wpAjax.parseAjaxResponse(c,d.response,d.element),h=c,!(!g||g.errors)&&(!0===g||(a.each(g.responses,function(){b.add.call(i,this.data,a.extend({},d,{position:this.position||0,id:this.id||0,oldId:this.oldId||null}))}),i.wpList.recolor(),a(i).trigger("wpListAddEnd",[d,i.wpList]),void b.clear.call(i,"#"+d.element)))},d.complete=function(b,c){a.isFunction(d.addAfter)&&d.addAfter(h,a.extend({xml:b,status:c,parsed:g},d))},a.ajax(d),!1)))):!b.add.call(i,j,d))},ajaxDel:function(c,d){var e,f,g,h=this,i=a(c),j=b.parseData(i,"delete");return d=d||{},d=b.pre.call(h,i,d,"delete"),d.element=j[2]||d.element||null,d.delColor=j[3]?"#"+j[3]:d.delColor,!(!d||!d.element)&&(d.action="delete-"+d.what,d.nonce=b.nonce(i,d),d.data=a.extend({_ajax_nonce:d.nonce,action:d.action,id:d.element.split("-").pop()},wpAjax.unserialize(j[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(){d.delAfter(g,a.extend({xml:b,status:c,parsed:f},d))}).dequeue()},a.ajax(d),!1)))},ajaxDim:function(c,d){var e,f,g,h,i,j,k=this,l=a(c),m=b.parseData(l,"dim");return"none"!==l.parent().css("display")&&(d=d||{},d=b.pre.call(k,l,d,"dim"),d.element=m[2]||d.element||null,d.dimClass=m[3]||d.dimClass||null,d.dimAddColor=m[4]?"#"+m[4]:d.dimAddColor,d.dimDelColor=m[5]?"#"+m[5]:d.dimDelColor,!(d&&d.element&&d.dimClass)||(d.action="dim-"+d.what,d.nonce=b.nonce(l,d),d.data=a.extend({_ajax_nonce:d.nonce,action:d.action,id:d.element.split("-").pop(),dimClass:d.dimClass},wpAjax.unserialize(m[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),h=f?d.dimAddColor:d.dimDelColor,e.toggleClass(d.dimClass),"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=l.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(){d.dimAfter(j,a.extend({xml:b,status:c,parsed:i},d))}).dequeue()},a.ajax(d),!1))))},getColor:function(b){return a(b).css("backgroundColor")||"#ffffff"},add:function(c,d){var e,f,g=a(this),h=a(c),i=!1;return"string"==typeof d&&(d={what:d}),d=a.extend({position:0,id:0,oldId:null},this.wpList.settings,d),!(!h.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(h),i.remove()):isNaN(d.position)?(e="after","-"===d.position.substr(0,1)&&(d.position=d.position.substr(1),e="before"),f=g.find("#"+d.position),1===f.length?f[e](h):g.append(h)):"comment"===d.what&&0!==a("#"+d.element).length||(d.position<0?g.prepend(h):g.append(h)),d.alt&&h.toggleClass(d.alt,(g.children(":visible").index(h[0])+d.altOffset)%2),"none"!==d.addColor&&h.css("backgroundColor",d.addColor).animate({backgroundColor:b.getColor(h)},{complete:function(){a(this).css("backgroundColor","")}}),g.each(function(a,b){b.wpList.process(h)}),h)},clear:function(b){var c,d,e=this,f=a(b);e.wpList&&f.parents("#"+e.id).length||f.find(":input").each(function(b,e){a(e).parents(".form-no-clear").length||(c=e.type.toLowerCase(),d=e.tagName.toLowerCase(),"text"===c||"password"===c||"textarea"===d?e.value="":"checkbox"===c||"radio"===c?e.checked=!1:"select"===d&&(e.selectedIndex=null))})},process:function(b){var c=this,d=a(b||document);d.on("submit",'form[data-wp-lists^="add:'+c.id+':"]',function(){return c.wpList.add(this)}),d.on("click",'a[data-wp-lists^="add:'+c.id+':"], input[data-wp-lists^="add:'+c.id+':"]',function(){return c.wpList.add(this)}),d.on("click",'[data-wp-lists^="delete:'+c.id+':"]',function(){return c.wpList.del(this)}),d.on("click",'[data-wp-lists^="dim:'+c.id+':"]',function(){return c.wpList.dim(this)})},recolor:function(){var b,c=this,d=[":even",":odd"];c.wpList.settings.alt&&(b=a(".list-item:visible",c),b.length||(b=a(c).children(":visible")),c.wpList.settings.altOffset%2&&d.reverse(),b.filter(d[0]).addClass(c.wpList.settings.alt).end(),b.filter(d[1]).removeClass(c.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(e,f){f.wpList={settings:a.extend({},b.settings,{what:b.parseData(f,"list")[1]||""},d)},a.each(c,function(a,c){f.wpList[a]=function(a,d){return b[c].call(f,a,d)}})}),b.init.call(this),this.wpList.process(),this}}(jQuery);
\ No newline at end of file
index db03036fa6da025466a16b419dc28b69911131d2..1318632c03053d4bfdcf8feba1325b970cad288b 100644 (file)
@@ -125,10 +125,6 @@ var wpLink;
                                } else {
                                        editor = null;
                                }
-
-                               if ( editor && window.tinymce.isIE ) {
-                                       editor.windowManager.wplinkBookmark = editor.selection.getBookmark();
-                               }
                        }
 
                        if ( ! wpLink.isMCE() && document.selection ) {
@@ -306,10 +302,15 @@ var wpLink;
                getAttrs: function() {
                        wpLink.correctURL();
 
-                       return {
-                               href: $.trim( inputs.url.val() ),
-                               target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : ''
+                       var attrs = {
+                               href: $.trim( inputs.url.val() )
                        };
+
+                       if ( inputs.openInNewTab.prop( 'checked' ) ) {
+                               attrs.target = '_blank';
+                       }
+
+                       return attrs;
                },
 
                buildHtml: function(attrs) {
@@ -391,12 +392,7 @@ var wpLink;
 
                mceUpdate: function() {
                        var attrs = wpLink.getAttrs(),
-                               link, text;
-
-                       if ( window.tinymce.isIE && editor.windowManager.wplinkBookmark ) {
-                               editor.selection.moveToBookmark( editor.windowManager.wplinkBookmark );
-                               editor.windowManager.wplinkBookmark = null;
-                       }
+                               $link, text, hasText, $mceCaret;
 
                        if ( ! attrs.href ) {
                                editor.execCommand( 'unlink' );
@@ -404,40 +400,54 @@ var wpLink;
                                return;
                        }
 
-                       link = getLink();
-
-                       if ( inputs.wrap.hasClass( 'has-text-field' ) ) {
-                               text = inputs.text.val() || attrs.href;
-                       }
+                       $link = editor.$( getLink() );
 
-                       if ( link ) {
-                               if ( text ) {
-                                       if ( 'innerText' in link ) {
-                                               link.innerText = text;
-                                       } else {
-                                               link.textContent = text;
-                                       }
+                       editor.undoManager.transact( function() {
+                               if ( ! $link.length ) {
+                                       editor.execCommand( 'mceInsertLink', false, { href: '_wp_link_placeholder', 'data-wp-temp-link': 1 } );
+                                       $link = editor.$( 'a[data-wp-temp-link="1"]' ).removeAttr( 'data-wp-temp-link' );
+                                       hasText = $.trim( $link.text() );
                                }
 
-                               // Not editing any more
-                               attrs['data-wplink-edit'] = null;
-                               editor.dom.setAttribs( link, attrs );
-                       } else {
-                               if ( text ) {
-                                       editor.selection.setNode( editor.dom.create( 'a', attrs, editor.dom.encode( text ) ) );
+                               if ( ! $link.length ) {
+                                       editor.execCommand( 'unlink' );
                                } else {
-                                       editor.execCommand( 'mceInsertLink', false, attrs );
+                                       if ( inputs.wrap.hasClass( 'has-text-field' ) ) {
+                                               text = inputs.text.val();
+
+                                               if ( text ) {
+                                                       $link.text( text );
+                                               } else if ( ! hasText ) {
+                                                       $link.text( attrs.href );
+                                               }
+                                       }
+
+                                       attrs['data-wplink-edit'] = null;
+                                       attrs['data-mce-href'] = null; // attrs.href
+                                       $link.attr( attrs );
                                }
-                       }
+                       } );
 
                        wpLink.close( 'noReset' );
                        editor.focus();
-                       editor.nodeChanged();
 
-                       if ( link && editor.plugins.wplink ) {
-                               editor.plugins.wplink.checkLink( link );
+                       if ( $link.length ) {
+                               $mceCaret = $link.parent( '#_mce_caret' );
+
+                               if ( $mceCaret.length ) {
+                                       $mceCaret.before( $link.removeAttr( 'data-mce-bogus' ) );
+                               }
+
+                               editor.selection.select( $link[0] );
+                               editor.selection.collapse();
+
+                               if ( editor.plugins.wplink ) {
+                                       editor.plugins.wplink.checkLink( $link[0] );
+                               }
                        }
 
+                       editor.nodeChanged();
+
                        // Audible confirmation message when a link has been inserted in the Editor.
                        wp.a11y.speak( wpLinkL10n.linkInserted );
                },
index 327bcbd7c5fbe8d0ebda0bddc48507b7fd3292f2..c93abca80b50ff33b845a4f1d3e2ae0ce7606f95 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,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
+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),!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(){wpLink.correctURL();var b={href:a.trim(m.url.val())};return m.openInNewTab.prop("checked")&&(b.target="_blank"),b},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 f,g,h,i,j=wpLink.getAttrs();return j.href?(f=e.$(d()),e.undoManager.transact(function(){f.length||(e.execCommand("mceInsertLink",!1,{href:"_wp_link_placeholder","data-wp-temp-link":1}),f=e.$('a[data-wp-temp-link="1"]').removeAttr("data-wp-temp-link"),h=a.trim(f.text())),f.length?(m.wrap.hasClass("has-text-field")&&(g=m.text.val(),g?f.text(g):h||f.text(j.href)),j["data-wplink-edit"]=null,j["data-mce-href"]=null,f.attr(j)):e.execCommand("unlink")}),wpLink.close("noReset"),e.focus(),f.length&&(i=f.parent("#_mce_caret"),i.length&&i.before(f.removeAttr("data-mce-bogus")),e.selection.select(f[0]),e.selection.collapse(),e.plugins.wplink&&e.plugins.wplink.checkLink(f[0])),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(),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 8be3f79d565bfb7fc07facd73e417828bc7d32cb..4745d8d7efd8ef06450bc0788e90f04b665b98c4 100644 (file)
@@ -527,7 +527,6 @@ function wp_kses( $string, $allowed_html, $allowed_protocols = array() ) {
        if ( empty( $allowed_protocols ) )
                $allowed_protocols = wp_allowed_protocols();
        $string = wp_kses_no_null( $string, array( 'slash_zero' => 'keep' ) );
-       $string = wp_kses_js_entities($string);
        $string = wp_kses_normalize_entities($string);
        $string = wp_kses_hook($string, $allowed_html, $allowed_protocols); // WP changed the order of these funcs and added args to wp_kses_hook
        return wp_kses_split($string, $allowed_html, $allowed_protocols);
@@ -550,7 +549,6 @@ function wp_kses_one_attr( $string, $element ) {
        $allowed_html = wp_kses_allowed_html( 'post' );
        $allowed_protocols = wp_allowed_protocols();
        $string = wp_kses_no_null( $string, array( 'slash_zero' => 'keep' ) );
-       $string = wp_kses_js_entities( $string );
        
        // Preserve leading and trailing whitespace.
        $matches = array();
@@ -781,7 +779,7 @@ function wp_kses_split2($string, $allowed_html, $allowed_protocols) {
        }
        // Allow HTML comments
 
-       if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?$%', $string, $matches))
+       if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9-]+)([^>]*)>?$%', $string, $matches))
                return '';
        // It's seriously malformed
 
@@ -1295,18 +1293,6 @@ function wp_kses_array_lc($inarray) {
        return $outarray;
 }
 
-/**
- * Removes the HTML JavaScript entities found in early versions of Netscape 4.
- *
- * @since 1.0.0
- *
- * @param string $string
- * @return string
- */
-function wp_kses_js_entities($string) {
-       return preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $string);
-}
-
 /**
  * Handles parsing errors in wp_kses_hair().
  *
index c63777451cd17ad7a37ced382658a29325d8fd52..20a18f96a25886a80fa9d09cd35c071e9448848d 100644 (file)
@@ -75,6 +75,35 @@ function get_locale() {
        return apply_filters( 'locale', $locale );
 }
 
+/**
+ * Retrieves the locale of a user.
+ *
+ * If the user has a locale set to a non-empty string then it will be
+ * returned. Otherwise it returns the locale of get_locale().
+ *
+ * @since 4.7.0
+ *
+ * @param int|WP_User $user_id User's ID or a WP_User object. Defaults to current user.
+ * @return string The locale of the user.
+ */
+function get_user_locale( $user_id = 0 ) {
+       $user = false;
+       if ( 0 === $user_id && function_exists( 'wp_get_current_user' ) ) {
+               $user = wp_get_current_user();
+       } elseif ( $user_id instanceof WP_User ) {
+               $user = $user_id;
+       } elseif ( $user_id && is_numeric( $user_id ) ) {
+               $user = get_user_by( 'id', $user_id );
+       }
+
+       if ( ! $user ) {
+               return get_locale();
+       }
+
+       $locale = $user->locale;
+       return $locale ? $locale : get_locale();
+}
+
 /**
  * Retrieve the translation of $text.
  *
@@ -91,18 +120,18 @@ function get_locale() {
  */
 function translate( $text, $domain = 'default' ) {
        $translations = get_translations_for_domain( $domain );
-       $translations = $translations->translate( $text );
+       $translation  = $translations->translate( $text );
 
        /**
         * Filters text with its translation.
         *
         * @since 2.0.11
         *
-        * @param string $translations Translated text.
+        * @param string $translation  Translated text.
         * @param string $text         Text to translate.
         * @param string $domain       Text domain. Unique identifier for retrieving translated strings.
         */
-       return apply_filters( 'gettext', $translations, $text, $domain );
+       return apply_filters( 'gettext', $translation, $text, $domain );
 }
 
 /**
@@ -143,18 +172,18 @@ function before_last_bar( $string ) {
  */
 function translate_with_gettext_context( $text, $context, $domain = 'default' ) {
        $translations = get_translations_for_domain( $domain );
-       $translations = $translations->translate( $text, $context );
+       $translation  = $translations->translate( $text, $context );
        /**
         * Filters text with its translation based on context information.
         *
         * @since 2.8.0
         *
-        * @param string $translations Translated text.
+        * @param string $translation  Translated text.
         * @param string $text         Text to translate.
         * @param string $context      Context information for the translators.
         * @param string $domain       Text domain. Unique identifier for retrieving translated strings.
         */
-       return apply_filters( 'gettext_with_context', $translations, $text, $context, $domain );
+       return apply_filters( 'gettext_with_context', $translation, $text, $context, $domain );
 }
 
 /**
@@ -318,7 +347,7 @@ function esc_html_x( $text, $context, $domain = 'default' ) {
  *
  * Example:
  *
- *     $people = sprintf( _n( '%s person', '%s people', $count, 'text-domain' ), number_format_i18n( $count ) );
+ *     printf( _n( '%s person', '%s people', $count, 'text-domain' ), number_format_i18n( $count ) );
  *
  * @since 2.8.0
  *
@@ -331,7 +360,7 @@ function esc_html_x( $text, $context, $domain = 'default' ) {
  */
 function _n( $single, $plural, $number, $domain = 'default' ) {
        $translations = get_translations_for_domain( $domain );
-       $translation = $translations->translate_plural( $single, $plural, $number );
+       $translation  = $translations->translate_plural( $single, $plural, $number );
 
        /**
         * Filters the singular or plural form of a string.
@@ -355,9 +384,10 @@ function _n( $single, $plural, $number, $domain = 'default' ) {
  * Used when you want to use the appropriate form of a string with context based on whether a
  * number is singular or plural.
  *
- * Example:
+ * Example of a generic phrase which is disambiguated via the context parameter:
  *
- *     $people = sprintf( _n( '%s person', '%s people', $count, 'context', 'text-domain' ), number_format_i18n( $count ) );
+ *     printf( _nx( '%s group', '%s groups', $people, 'group of people', 'text-domain' ), number_format_i18n( $people ) );
+ *     printf( _nx( '%s group', '%s groups', $animals, 'group of animals', 'text-domain' ), number_format_i18n( $animals ) );
  *
  * @since 2.8.0
  *
@@ -371,7 +401,7 @@ function _n( $single, $plural, $number, $domain = 'default' ) {
  */
 function _nx($single, $plural, $number, $context, $domain = 'default') {
        $translations = get_translations_for_domain( $domain );
-       $translation = $translations->translate_plural( $single, $plural, $number, $context );
+       $translation  = $translations->translate_plural( $single, $plural, $number, $context );
 
        /**
         * Filters the singular or plural form of a string with gettext context.
@@ -396,13 +426,9 @@ function _nx($single, $plural, $number, $context, $domain = 'default') {
  *
  * Example:
  *
- *     $messages = array(
- *             'post' => _n_noop( '%s post', '%s posts', 'text-domain' ),
- *             'page' => _n_noop( '%s pages', '%s pages', 'text-domain' ),
- *     );
+ *     $message = _n_noop( '%s post', '%s posts', 'text-domain' );
  *     ...
- *     $message = $messages[ $type ];
- *     $usable_text = sprintf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );
+ *     printf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );
  *
  * @since 2.5.0
  *
@@ -431,15 +457,15 @@ function _n_noop( $singular, $plural, $domain = null ) {
  * Used when you want to keep structures with translatable plural
  * strings and use them later when the number is known.
  *
- * Example:
+ * Example of a generic phrase which is disambiguated via the context parameter:
  *
  *     $messages = array(
- *             'post' => _n_noop( '%s post', '%s posts', 'context', 'text-domain' ),
- *             'page' => _n_noop( '%s pages', '%s pages', 'context', 'text-domain' ),
+ *             'people'  => _nx_noop( '%s group', '%s groups', 'people', 'text-domain' ),
+ *             'animals' => _nx_noop( '%s group', '%s groups', 'animals', 'text-domain' ),
  *     );
  *     ...
  *     $message = $messages[ $type ];
- *     $usable_text = sprintf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );
+ *     printf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );
  *
  * @since 2.8.0
  *
@@ -472,13 +498,9 @@ function _nx_noop( $singular, $plural, $context, $domain = null ) {
  *
  * Example:
  *
- *     $messages = array(
- *             'post' => _n_noop( '%s post', '%s posts', 'text-domain' ),
- *             'page' => _n_noop( '%s pages', '%s pages', 'text-domain' ),
- *     );
+ *     $message = _n_noop( '%s post', '%s posts', 'text-domain' );
  *     ...
- *     $message = $messages[ $type ];
- *     $usable_text = sprintf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );
+ *     printf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );
  *
  * @since 3.1.0
  *
@@ -640,7 +662,7 @@ function unload_textdomain( $domain ) {
  */
 function load_default_textdomain( $locale = null ) {
        if ( null === $locale ) {
-               $locale = get_locale();
+               $locale = is_admin() ? get_user_locale() : get_locale();
        }
 
        // Unload previously loaded strings so we can switch translations.
@@ -674,7 +696,7 @@ function load_default_textdomain( $locale = null ) {
  * @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      Optional. Use the $plugin_rel_path parameter instead. Defaukt false.
+ * @param string $deprecated      Optional. Use the $plugin_rel_path parameter instead. Default 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.
@@ -688,7 +710,7 @@ function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path
         * @param string $locale The plugin's current locale.
         * @param string $domain Text domain. Unique identifier for retrieving translated strings.
         */
-       $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
+       $locale = apply_filters( 'plugin_locale', is_admin() ? get_user_locale() : get_locale(), $domain );
 
        $mofile = $domain . '-' . $locale . '.mo';
 
@@ -722,7 +744,7 @@ function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path
  */
 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 );
+       $locale = apply_filters( 'plugin_locale', is_admin() ? get_user_locale() : get_locale(), $domain );
 
        $mofile = $domain . '-' . $locale . '.mo';
 
@@ -761,7 +783,7 @@ function load_theme_textdomain( $domain, $path = false ) {
         * @param string $locale The theme's current locale.
         * @param string $domain Text domain. Unique identifier for retrieving translated strings.
         */
-       $locale = apply_filters( 'theme_locale', get_locale(), $domain );
+       $locale = apply_filters( 'theme_locale', is_admin() ? get_user_locale() : get_locale(), $domain );
 
        $mofile = $domain . '-' . $locale . '.mo';
 
@@ -805,8 +827,6 @@ function load_child_theme_textdomain( $domain, $path = false ) {
  * 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
  *
@@ -821,13 +841,63 @@ function _load_textdomain_just_in_time( $domain ) {
 
        $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;
        }
 
+       $translation_path = _get_path_to_translation( $domain );
+       if ( false === $translation_path ) {
+               return false;
+       }
+
+       return load_textdomain( $domain, $translation_path );
+}
+
+/**
+ * Gets the path to a translation file for loading a textdomain just in time.
+ *
+ * Caches the retrieved results internally.
+ *
+ * @since 4.7.0
+ * @access private
+ *
+ * @see _load_textdomain_just_in_time()
+ *
+ * @param string $domain Text domain. Unique identifier for retrieving translated strings.
+ * @param bool   $reset  Whether to reset the internal cache. Used by the switch to locale functionality.
+ * @return string|false The path to the translation file or false if no translation file was found.
+ */
+function _get_path_to_translation( $domain, $reset = false ) {
+       static $available_translations = array();
+
+       if ( true === $reset ) {
+               $available_translations = array();
+       }
+
+       if ( ! isset( $available_translations[ $domain ] ) ) {
+               $available_translations[ $domain ] = _get_path_to_translation_from_lang_dir( $domain );
+       }
+
+       return $available_translations[ $domain ];
+}
+
+/**
+ * Gets the path to a translation file in the languages directory for the current locale.
+ *
+ * Holds a cached list of available .mo files to improve performance.
+ *
+ * @since 4.7.0
+ * @access private
+ *
+ * @see _get_path_to_translation()
+ *
+ * @param string $domain Text domain. Unique identifier for retrieving translated strings.
+ * @return string|false The path to the translation file or false if no translation file was found.
+ */
+function _get_path_to_translation_from_lang_dir( $domain ) {
+       static $cached_mofiles = null;
+
        if ( null === $cached_mofiles ) {
                $cached_mofiles = array();
 
@@ -837,21 +907,24 @@ function _load_textdomain_just_in_time( $domain ) {
                );
 
                foreach ( $locations as $location ) {
-                       foreach ( get_available_languages( $location ) as $file ) {
-                               $cached_mofiles[] = "{$location}/{$file}.mo";
+                       $mofiles = glob( $location . '/*.mo' );
+                       if ( $mofiles ) {
+                               $cached_mofiles = array_merge( $cached_mofiles, $mofiles );
                        }
                }
        }
 
-       $locale = get_locale();
+       $locale = is_admin() ? get_user_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 );
+       $path = WP_LANG_DIR . '/plugins/' . $mofile;
+       if ( in_array( $path, $cached_mofiles ) ) {
+               return $path;
        }
 
-       if ( in_array( WP_LANG_DIR . '/themes/' . $mofile, $cached_mofiles ) ) {
-               return load_textdomain( $domain, WP_LANG_DIR . '/themes/' . $mofile );
+       $path = WP_LANG_DIR . '/themes/' . $mofile;
+       if ( in_array( $path, $cached_mofiles ) ) {
+               return $path;
        }
 
        return false;
@@ -867,7 +940,7 @@ function _load_textdomain_just_in_time( $domain ) {
  * @global array $l10n
  *
  * @param string $domain Text domain. Unique identifier for retrieving translated strings.
- * @return NOOP_Translations A Translations instance.
+ * @return Translations|NOOP_Translations A Translations instance.
  */
 function get_translations_for_domain( $domain ) {
        global $l10n;
@@ -925,6 +998,7 @@ function translate_user_role( $name ) {
  * The default directory is WP_LANG_DIR.
  *
  * @since 3.0.0
+ * @since 4.7.0 The results are now filterable with the {@see 'get_available_languages'} filter.
  *
  * @param string $dir A directory to search for language files.
  *                    Default WP_LANG_DIR.
@@ -933,7 +1007,7 @@ function translate_user_role( $name ) {
 function get_available_languages( $dir = null ) {
        $languages = array();
 
-       $lang_files = glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' );
+       $lang_files = glob( ( is_null( $dir ) ? WP_LANG_DIR : $dir ) . '/*.mo' );
        if ( $lang_files ) {
                foreach ( $lang_files as $lang_file ) {
                        $lang_file = basename( $lang_file, '.mo' );
@@ -944,7 +1018,15 @@ function get_available_languages( $dir = null ) {
                }
        }
 
-       return $languages;
+       /**
+        * Filters the list of available language codes.
+        *
+        * @since 4.7.0
+        *
+        * @param array  $languages An array of available language codes.
+        * @param string $dir       The directory where the language files were found.
+        */
+       return apply_filters( 'get_available_languages', $languages, $dir );
 }
 
 /**
@@ -1026,6 +1108,7 @@ function wp_get_pomo_file_data( $po_file ) {
  *
  * @since 4.0.0
  * @since 4.3.0 Introduced the `echo` argument.
+ * @since 4.7.0 Introduced the `show_option_site_default` argument.
  *
  * @see get_available_languages()
  * @see wp_get_available_translations()
@@ -1043,6 +1126,7 @@ function wp_get_pomo_file_data( $po_file ) {
  *     @type bool|int $echo                         Whether to echo the generated markup. Accepts 0, 1, or their
  *                                                  boolean equivalents. Default 1.
  *     @type bool     $show_available_translations  Whether to show available translations. Default true.
+ *     @type bool     $show_option_site_default     Whether to show an option to fall back to the site's locale. Default false.
  * }
  * @return string HTML content
  */
@@ -1056,8 +1140,14 @@ function wp_dropdown_languages( $args = array() ) {
                'selected'     => '',
                'echo'         => 1,
                'show_available_translations' => true,
+               'show_option_site_default'    => false,
        ) );
 
+       // English (United States) uses an empty string for the value attribute.
+       if ( 'en_US' === $args['selected'] ) {
+               $args['selected'] = '';
+       }
+
        $translations = $args['translations'];
        if ( empty( $translations ) ) {
                require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
@@ -1100,7 +1190,20 @@ function wp_dropdown_languages( $args = array() ) {
        if ( $translations_available ) {
                $structure[] = '<optgroup label="' . esc_attr_x( 'Installed', 'translations' ) . '">';
        }
-       $structure[] = '<option value="" lang="en" data-installed="1">English (United States)</option>';
+
+       if ( $args['show_option_site_default'] ) {
+               $structure[] = sprintf(
+                       '<option value="site-default" data-installed="1"%s>%s</option>',
+                       selected( 'site-default', $args['selected'], false ),
+                       _x( 'Site Default', 'default site language' )
+               );
+       }
+
+       $structure[] = sprintf(
+               '<option value="" lang="en" data-installed="1"%s>English (United States)</option>',
+               selected( '', $args['selected'], false )
+       );
+
        foreach ( $languages as $language ) {
                $structure[] = sprintf(
                        '<option value="%s" lang="%s"%s data-installed="1">%s</option>',
@@ -1139,3 +1242,85 @@ function wp_dropdown_languages( $args = array() ) {
 
        return $output;
 }
+
+/**
+ * Checks if current locale is RTL.
+ *
+ * @since 3.0.0
+ *
+ * @global WP_Locale $wp_locale
+ *
+ * @return bool Whether locale is RTL.
+ */
+function is_rtl() {
+       global $wp_locale;
+       if ( ! ( $wp_locale instanceof WP_Locale ) ) {
+               return false;
+       }
+       return $wp_locale->is_rtl();
+}
+
+/**
+ * Switches the translations according to the given locale.
+ *
+ * @since 4.7.0
+ *
+ * @global WP_Locale_Switcher $wp_locale_switcher
+ *
+ * @param string $locale The locale.
+ * @return bool True on success, false on failure.
+ */
+function switch_to_locale( $locale ) {
+       /* @var WP_Locale_Switcher $wp_locale_switcher */
+       global $wp_locale_switcher;
+
+       return $wp_locale_switcher->switch_to_locale( $locale );
+}
+
+/**
+ * Restores the translations according to the previous locale.
+ *
+ * @since 4.7.0
+ *
+ * @global WP_Locale_Switcher $wp_locale_switcher
+ *
+ * @return string|false Locale on success, false on error.
+ */
+function restore_previous_locale() {
+       /* @var WP_Locale_Switcher $wp_locale_switcher */
+       global $wp_locale_switcher;
+
+       return $wp_locale_switcher->restore_previous_locale();
+}
+
+/**
+ * Restores the translations according to the original locale.
+ *
+ * @since 4.7.0
+ *
+ * @global WP_Locale_Switcher $wp_locale_switcher
+ *
+ * @return string|false Locale on success, false on error.
+ */
+function restore_current_locale() {
+       /* @var WP_Locale_Switcher $wp_locale_switcher */
+       global $wp_locale_switcher;
+
+       return $wp_locale_switcher->restore_current_locale();
+}
+
+/**
+ * Whether switch_to_locale() is in effect.
+ *
+ * @since 4.7.0
+ *
+ * @global WP_Locale_Switcher $wp_locale_switcher
+ *
+ * @return bool True if the locale has been switched, false otherwise.
+ */
+function is_locale_switched() {
+       /* @var WP_Locale_Switcher $wp_locale_switcher */
+       global $wp_locale_switcher;
+
+       return $wp_locale_switcher->is_switched();
+}
index 9d7a5f6c04c9d8476dd5f284d1daa080452a12da..009ed06cee8381de754555f658b7e78abc681c49 100644 (file)
@@ -58,8 +58,8 @@ function user_trailingslashit($string, $type_of_url = '') {
         *
         * @param string $string      URL with or without a trailing slash.
         * @param string $type_of_url The type of URL being considered. Accepts 'single', 'single_trackback',
-        *                            'single_feed', 'single_paged', 'feed', 'category', 'page', 'year',
-        *                            'month', 'day', 'paged', 'post_type_archive'.
+        *                            'single_feed', 'single_paged', 'commentpaged', 'paged', 'home', 'feed',
+        *                            'category', 'page', 'year', 'month', 'day', 'post_type_archive'.
         */
        return apply_filters( 'user_trailingslashit', $string, $type_of_url );
 }
@@ -169,15 +169,17 @@ function get_permalink( $post = 0, $leavename = false ) {
                if ( strpos($permalink, '%category%') !== false ) {
                        $cats = get_the_category($post->ID);
                        if ( $cats ) {
-                               usort($cats, '_usort_terms_by_ID'); // order by ID
+                               $cats = wp_list_sort( $cats, array(
+                                       'term_id' => 'ASC',
+                               ) );
 
                                /**
                                 * Filters the category that gets used in the %category% permalink token.
                                 *
                                 * @since 3.5.0
                                 *
-                                * @param stdClass $cat  The category to use in the permalink.
-                                * @param array    $cats Array of all categories associated with the post.
+                                * @param WP_Term  $cat  The category to use in the permalink.
+                                * @param array    $cats Array of all categories (WP_Term objects) associated with the post.
                                 * @param WP_Post  $post The post in question.
                                 */
                                $category_object = apply_filters( 'post_link_category', $cats[0], $cats, $post );
@@ -930,7 +932,7 @@ function get_edit_term_link( $term_id, $taxonomy = '', $object_type = '' ) {
        }
 
        $tax = get_taxonomy( $term->taxonomy );
-       if ( ! $tax || ! current_user_can( $tax->cap->edit_terms ) ) {
+       if ( ! $tax || ! current_user_can( 'edit_term', $term->term_id ) ) {
                return;
        }
 
@@ -984,8 +986,9 @@ function edit_term_link( $link = '', $before = '', $after = '', $term = null, $e
                return;
 
        $tax = get_taxonomy( $term->taxonomy );
-       if ( ! current_user_can( $tax->cap->edit_terms ) )
+       if ( ! current_user_can( 'edit_term', $term->term_id ) ) {
                return;
+       }
 
        if ( empty( $link ) )
                $link = __('Edit This');
@@ -2528,8 +2531,8 @@ function get_the_posts_pagination( $args = array() ) {
        if ( $GLOBALS['wp_query']->max_num_pages > 1 ) {
                $args = wp_parse_args( $args, array(
                        'mid_size'           => 1,
-                       'prev_text'          => _x( 'Previous', 'previous post' ),
-                       'next_text'          => _x( 'Next', 'next post' ),
+                       'prev_text'          => _x( 'Previous', 'previous set of posts' ),
+                       'next_text'          => _x( 'Next', 'next set of posts' ),
                        'screen_reader_text' => __( 'Posts navigation' ),
                ) );
 
@@ -2897,20 +2900,13 @@ function the_comments_pagination( $args = array() ) {
  *
  * @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
- *
- * @return string The Press This bookmarklet link URL.
+ * @global bool          $is_IE      Whether the browser matches an Internet Explorer user agent.
  */
 function get_shortcut_link() {
-       global $is_IE, $wp_version;
+       global $is_IE;
 
        include_once( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
-       $bookmarklet_version = $GLOBALS['wp_press_this']->version;
+
        $link = '';
 
        if ( $is_IE ) {
@@ -2928,7 +2924,7 @@ function get_shortcut_link() {
 
                        $link = 'javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,' .
                                's=(e?e():(k)?k():(x?x.createRange().text:0)),f=' . $url . ',l=d.location,e=encodeURIComponent,' .
-                               'u=f+"?u="+e(l.href)+"&t="+e(d.title)+"&s="+e(s)+"&v=' . $bookmarklet_version . '";' .
+                               'u=f+"?u="+e(l.href)+"&t="+e(d.title)+"&s="+e(s)+"&v=' . WP_Press_This::VERSION . '";' .
                                'a=function(){if(!w.open(u,"t","toolbar=0,resizable=1,scrollbars=1,status=1,width=600,height=700"))l.href=u;};' .
                                'if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();void(0)';
                }
@@ -2938,7 +2934,7 @@ function get_shortcut_link() {
                $src = @file_get_contents( ABSPATH . 'wp-admin/js/bookmarklet.min.js' );
 
                if ( $src ) {
-                       $url = wp_json_encode( admin_url( 'press-this.php' ) . '?v=' . $bookmarklet_version );
+                       $url = wp_json_encode( admin_url( 'press-this.php' ) . '?v=' . WP_Press_This::VERSION );
                        $link = 'javascript:' . str_replace( 'window.pt_url', $url, $src );
                }
        }
@@ -2958,9 +2954,9 @@ function get_shortcut_link() {
 /**
  * Retrieves the URL for the current site where the front end is accessible.
  *
- * Returns the 'home' option with the appropriate protocol, 'https' if
- * is_ssl() and 'http' otherwise. If `$scheme` is 'http' or 'https',
- * `is_ssl()` is overridden.
+ * Returns the 'home' option with the appropriate protocol. The protocol will be 'https'
+ * if is_ssl() evaluates to true; otherwise, it will be the same as the 'home' option.
+ * If `$scheme` is 'http' or 'https', is_ssl() is overridden.
  *
  * @since 3.0.0
  *
@@ -2976,9 +2972,9 @@ function home_url( $path = '', $scheme = null ) {
 /**
  * Retrieves the URL for a given site where the front end is accessible.
  *
- * Returns the 'home' option with the appropriate protocol, 'https' if
- * is_ssl() and 'http' otherwise. If `$scheme` is 'http' or 'https',
- * `is_ssl()` is overridden.
+ * Returns the 'home' option with the appropriate protocol. The protocol will be 'https'
+ * if is_ssl() evaluates to true; otherwise, it will be the same as the 'home' option.
+ * If `$scheme` is 'http' or 'https', is_ssl() is overridden.
  *
  * @since 3.0.0
  *
@@ -3261,12 +3257,12 @@ function network_site_url( $path = '', $scheme = null ) {
        if ( ! is_multisite() )
                return site_url($path, $scheme);
 
-       $current_site = get_current_site();
+       $current_network = get_network();
 
        if ( 'relative' == $scheme )
-               $url = $current_site->path;
+               $url = $current_network->path;
        else
-               $url = set_url_scheme( 'http://' . $current_site->domain . $current_site->path, $scheme );
+               $url = set_url_scheme( 'http://' . $current_network->domain . $current_network->path, $scheme );
 
        if ( $path && is_string( $path ) )
                $url .= ltrim( $path, '/' );
@@ -3303,16 +3299,16 @@ function network_home_url( $path = '', $scheme = null ) {
        if ( ! is_multisite() )
                return home_url($path, $scheme);
 
-       $current_site = get_current_site();
+       $current_network = get_network();
        $orig_scheme = $scheme;
 
        if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) )
                $scheme = is_ssl() && ! is_admin() ? 'https' : 'http';
 
        if ( 'relative' == $scheme )
-               $url = $current_site->path;
+               $url = $current_network->path;
        else
-               $url = set_url_scheme( 'http://' . $current_site->domain . $current_site->path, $scheme );
+               $url = set_url_scheme( 'http://' . $current_network->domain . $current_network->path, $scheme );
 
        if ( $path && is_string( $path ) )
                $url .= ltrim( $path, '/' );
@@ -4026,3 +4022,125 @@ function get_avatar_data( $id_or_email, $args = null ) {
         */
        return apply_filters( 'get_avatar_data', $args, $id_or_email );
 }
+
+/**
+ * Retrieves the URL of a file in the theme.
+ *
+ * Searches in the stylesheet directory before the template directory so themes
+ * which inherit from a parent theme can just override one file.
+ *
+ * @since 4.7.0
+ *
+ * @param string $file Optional. File to search for in the stylesheet directory.
+ * @return string The URL of the file.
+ */
+function get_theme_file_uri( $file = '' ) {
+       $file = ltrim( $file, '/' );
+
+       if ( empty( $file ) ) {
+               $url = get_stylesheet_directory_uri();
+       } elseif ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
+               $url = get_stylesheet_directory_uri() . '/' . $file;
+       } else {
+               $url = get_template_directory_uri() . '/' . $file;
+       }
+
+       /**
+        * Filters the URL to a file in the theme.
+        *
+        * @since 4.7.0
+        *
+        * @param string $url  The file URL.
+        * @param string $file The requested file to search for.
+        */
+       return apply_filters( 'theme_file_uri', $url, $file );
+}
+
+/**
+ * Retrieves the URL of a file in the parent theme.
+ *
+ * @since 4.7.0
+ *
+ * @param string $file Optional. File to return the URL for in the template directory.
+ * @return string The URL of the file.
+ */
+function get_parent_theme_file_uri( $file = '' ) {
+       $file = ltrim( $file, '/' );
+
+       if ( empty( $file ) ) {
+               $url = get_template_directory_uri();
+       } else {
+               $url = get_template_directory_uri() . '/' . $file;
+       }
+
+       /**
+        * Filters the URL to a file in the parent theme.
+        *
+        * @since 4.7.0
+        *
+        * @param string $url  The file URL.
+        * @param string $file The requested file to search for.
+        */
+       return apply_filters( 'parent_theme_file_uri', $url, $file );
+}
+
+/**
+ * Retrieves the path of a file in the theme.
+ *
+ * Searches in the stylesheet directory before the template directory so themes
+ * which inherit from a parent theme can just override one file.
+ *
+ * @since 4.7.0
+ *
+ * @param string $file Optional. File to search for in the stylesheet directory.
+ * @return string The path of the file.
+ */
+function get_theme_file_path( $file = '' ) {
+       $file = ltrim( $file, '/' );
+
+       if ( empty( $file ) ) {
+               $path = get_stylesheet_directory();
+       } elseif ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
+               $path = get_stylesheet_directory() . '/' . $file;
+       } else {
+               $path = get_template_directory() . '/' . $file;
+       }
+
+       /**
+        * Filters the path to a file in the theme.
+        *
+        * @since 4.7.0
+        *
+        * @param string $path The file path.
+        * @param string $file The requested file to search for.
+        */
+       return apply_filters( 'theme_file_path', $path, $file );
+}
+
+/**
+ * Retrieves the path of a file in the parent theme.
+ *
+ * @since 4.7.0
+ *
+ * @param string $file Optional. File to return the path for in the template directory.
+ * @return string The path of the file.
+ */
+function get_parent_theme_file_path( $file = '' ) {
+       $file = ltrim( $file, '/' );
+
+       if ( empty( $file ) ) {
+               $path = get_template_directory();
+       } else {
+               $path = get_template_directory() . '/' . $file;
+       }
+
+       /**
+        * Filters the path to a file in the parent theme.
+        *
+        * @since 4.7.0
+        *
+        * @param string $path The file path.
+        * @param string $file The requested file to search for.
+        */
+       return apply_filters( 'parent_theme_file_path', $path, $file );
+}
index b69c0d5ea8dbcdc90d376992c4786a6682e01432..669cf65d0b93d24dbe7959359afaaf76bcd4a503 100644 (file)
@@ -2,8 +2,6 @@
 /**
  * These functions are needed to load WordPress.
  *
- * @internal This file must be parsable by PHP4.
- *
  * @package WordPress
  */
 
@@ -130,6 +128,7 @@ function wp_check_php_mysql_versions() {
                $protocol = wp_get_server_protocol();
                header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 );
                header( 'Content-Type: text/html; charset=utf-8' );
+               /* translators: 1: Current PHP version number, 2: WordPress version number, 3: Minimum required PHP version number */
                die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) );
        }
 
@@ -334,7 +333,7 @@ function wp_debug_mode() {
                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 );
        }
 
-       if ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
+       if ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) || wp_doing_ajax() ) {
                @ini_set( 'display_errors', 0 );
        }
 }
@@ -398,8 +397,9 @@ function require_wp_db() {
        if ( file_exists( WP_CONTENT_DIR . '/db.php' ) )
                require_once( WP_CONTENT_DIR . '/db.php' );
 
-       if ( isset( $wpdb ) )
+       if ( isset( $wpdb ) ) {
                return;
+       }
 
        $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
 }
@@ -470,18 +470,15 @@ function wp_using_ext_object_cache( $using = null ) {
  *
  * @since 3.0.0
  * @access private
- *
- * @global int $blog_id Blog ID.
  */
 function wp_start_object_cache() {
-       global $blog_id;
-
        $first_init = false;
        if ( ! function_exists( 'wp_cache_init' ) ) {
                if ( file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) {
                        require_once ( WP_CONTENT_DIR . '/object-cache.php' );
-                       if ( function_exists( 'wp_cache_init' ) )
+                       if ( function_exists( 'wp_cache_init' ) ) {
                                wp_using_ext_object_cache( true );
+                       }
                }
 
                $first_init = true;
@@ -495,18 +492,20 @@ function wp_start_object_cache() {
                wp_using_ext_object_cache( true );
        }
 
-       if ( ! wp_using_ext_object_cache() )
+       if ( ! wp_using_ext_object_cache() ) {
                require_once ( ABSPATH . WPINC . '/cache.php' );
+       }
 
        /*
         * If cache supports reset, reset instead of init if already
         * initialized. Reset signals to the cache that global IDs
         * have changed and it may need to update keys and cleanup caches.
         */
-       if ( ! $first_init && function_exists( 'wp_cache_switch_to_blog' ) )
-               wp_cache_switch_to_blog( $blog_id );
-       elseif ( function_exists( 'wp_cache_init' ) )
+       if ( ! $first_init && function_exists( 'wp_cache_switch_to_blog' ) ) {
+               wp_cache_switch_to_blog( get_current_blog_id() );
+       } elseif ( function_exists( 'wp_cache_init' ) ) {
                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', 'site-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites' ) );
@@ -814,8 +813,6 @@ function get_current_blog_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() {
@@ -823,13 +820,13 @@ function get_current_network_id() {
                return 1;
        }
 
-       $current_site = get_current_site();
+       $current_network = get_network();
 
-       if ( ! isset( $current_site->id ) ) {
+       if ( ! isset( $current_network->id ) ) {
                return get_main_network_id();
        }
 
-       return absint( $current_site->id );
+       return absint( $current_network->id );
 }
 
 /**
@@ -845,13 +842,12 @@ function get_current_network_id() {
  * @since 3.4.0
  * @access private
  *
- * @global string    $text_direction
- * @global WP_Locale $wp_locale      The WordPress date and time locale object.
+ * @global WP_Locale $wp_locale The WordPress date and time locale object.
  *
  * @staticvar bool $loaded
  */
 function wp_load_translations_early() {
-       global $text_direction, $wp_locale;
+       global $wp_locale;
 
        static $loaded = false;
        if ( $loaded )
@@ -867,7 +863,8 @@ function wp_load_translations_early() {
        // Translation and localization
        require_once ABSPATH . WPINC . '/pomo/mo.php';
        require_once ABSPATH . WPINC . '/l10n.php';
-       require_once ABSPATH . WPINC . '/locale.php';
+       require_once ABSPATH . WPINC . '/class-wp-locale.php';
+       require_once ABSPATH . WPINC . '/class-wp-locale-switcher.php';
 
        // General libraries
        require_once ABSPATH . WPINC . '/plugin.php';
@@ -981,8 +978,8 @@ function is_ssl() {
  * @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
+ * @link https://secure.php.net/manual/en/function.ini-get.php
+ * @link https://secure.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.
@@ -1008,7 +1005,7 @@ function wp_convert_hr_to_bytes( $value ) {
  *
  * @since 4.6.0
  *
- * @link http://php.net/manual/en/function.ini-get-all.php
+ * @link https://secure.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.
@@ -1036,3 +1033,35 @@ function wp_is_ini_value_changeable( $setting ) {
 
        return false;
 }
+
+/**
+ * Determines whether the current request is a WordPress Ajax request.
+ *
+ * @since 4.7.0
+ *
+ * @return bool True if it's a WordPress Ajax request, false otherwise.
+ */
+function wp_doing_ajax() {
+       /**
+        * Filters whether the current request is a WordPress Ajax request.
+        *
+        * @since 4.7.0
+        *
+        * @param bool $wp_doing_ajax Whether the current request is a WordPress Ajax request.
+        */
+       return apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX );
+}
+
+/**
+ * Check whether variable is a WordPress Error.
+ *
+ * Returns true if $thing is an object of the WP_Error class.
+ *
+ * @since 2.1.0
+ *
+ * @param mixed $thing Check if unknown variable is a WP_Error object.
+ * @return bool True, if WP_Error. False, if not WP_Error.
+ */
+function is_wp_error( $thing ) {
+       return ( $thing instanceof WP_Error );
+}
index b8ad4637216520d4d4dee3a4f7bfaaa86cd6ede6..6a459e3e3469d9fb08d8116f64e465edd744710f 100644 (file)
@@ -7,19 +7,4 @@
  * @since 1.2.0
  */
 
-/** WP_Locale class */
-require_once ABSPATH . WPINC . '/class-wp-locale.php';
-
-/**
- * Checks if current locale is RTL.
- *
- * @since 3.0.0
- *
- * @global WP_Locale $wp_locale
- *
- * @return bool Whether locale is RTL.
- */
-function is_rtl() {
-       global $wp_locale;
-       return $wp_locale->is_rtl();
-}
+_deprecated_file( basename( __FILE__ ), '4.7.0' );
index 7d2d2bf48b389daee87ab5c7731e85dedd6fa5b8..f12b11cff31144687c9ff4a4c8c5675d7f102516 100644 (file)
@@ -290,9 +290,9 @@ function wp_print_media_templates() {
                        <div class="thumbnail thumbnail-{{ data.type }}">
                                <# if ( data.uploading ) { #>
                                        <div class="media-progress-bar"><div></div></div>
-                               <# } else if ( 'image' === data.type && data.sizes && data.sizes.large ) { #>
+                               <# } else if ( data.sizes && data.sizes.large ) { #>
                                        <img class="details-image" src="{{ data.sizes.large.url }}" draggable="false" alt="" />
-                               <# } else if ( 'image' === data.type && data.sizes && data.sizes.full ) { #>
+                               <# } else if ( data.sizes && data.sizes.full ) { #>
                                        <img class="details-image" src="{{ data.sizes.full.url }}" draggable="false" alt="" />
                                <# } else if ( -1 === jQuery.inArray( data.type, [ 'audio', 'video' ] ) ) { #>
                                        <img class="details-image icon" src="{{ data.icon }}" draggable="false" alt="" />
@@ -325,6 +325,8 @@ function wp_print_media_templates() {
                                <div class="attachment-actions">
                                        <# if ( 'image' === data.type && ! data.uploading && data.sizes && data.can.save ) { #>
                                        <button type="button" class="button edit-attachment"><?php _e( 'Edit Image' ); ?></button>
+                                       <# } else if ( 'pdf' === data.subtype && data.sizes ) { #>
+                                       <?php _e( 'Document Preview' ); ?>
                                        <# } #>
                                </div>
                        </div>
@@ -454,6 +456,8 @@ function wp_print_media_templates() {
                                        <div class="centered">
                                                <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
                                                        <img src="{{ data.image.src }}" class="thumbnail" draggable="false" alt="" />
+                                               <# } else if ( data.sizes && data.sizes.medium ) { #>
+                                                       <img src="{{ data.sizes.medium.url }}" class="thumbnail" draggable="false" alt="" />
                                                <# } else { #>
                                                        <img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
                                                <# } #>
@@ -610,16 +614,16 @@ function wp_print_media_templates() {
                                        <# } #>>
 
                                        <option value="left">
-                                               <?php esc_attr_e('Left'); ?>
+                                               <?php esc_html_e( 'Left' ); ?>
                                        </option>
                                        <option value="center">
-                                               <?php esc_attr_e('Center'); ?>
+                                               <?php esc_html_e( 'Center' ); ?>
                                        </option>
                                        <option value="right">
-                                               <?php esc_attr_e('Right'); ?>
+                                               <?php esc_html_e( 'Right' ); ?>
                                        </option>
                                        <option value="none" selected>
-                                               <?php esc_attr_e('None'); ?>
+                                               <?php esc_html_e( 'None' ); ?>
                                        </option>
                                </select>
                        </label>
@@ -641,31 +645,31 @@ function wp_print_media_templates() {
 
                                <# if ( data.model.canEmbed ) { #>
                                        <option value="embed" selected>
-                                               <?php esc_attr_e('Embed Media Player'); ?>
+                                               <?php esc_html_e( 'Embed Media Player' ); ?>
                                        </option>
                                        <option value="file">
                                <# } else { #>
                                        <option value="none" selected>
-                                               <?php esc_attr_e('None'); ?>
+                                               <?php esc_html_e( 'None' ); ?>
                                        </option>
                                        <option value="file">
                                <# } #>
                                        <# if ( data.model.canEmbed ) { #>
-                                               <?php esc_attr_e('Link to Media File'); ?>
+                                               <?php esc_html_e( 'Link to Media File' ); ?>
                                        <# } else { #>
-                                               <?php esc_attr_e('Media File'); ?>
+                                               <?php esc_html_e( 'Media File' ); ?>
                                        <# } #>
                                        </option>
                                        <option value="post">
                                        <# if ( data.model.canEmbed ) { #>
-                                               <?php esc_attr_e('Link to Attachment Page'); ?>
+                                               <?php esc_html_e( 'Link to Attachment Page' ); ?>
                                        <# } else { #>
-                                               <?php esc_attr_e('Attachment Page'); ?>
+                                               <?php esc_html_e( 'Attachment Page' ); ?>
                                        <# } #>
                                        </option>
                                <# if ( 'image' === data.type ) { #>
                                        <option value="custom">
-                                               <?php esc_attr_e('Custom URL'); ?>
+                                               <?php esc_html_e( 'Custom URL' ); ?>
                                        </option>
                                <# } #>
                                </select>
@@ -718,13 +722,13 @@ function wp_print_media_templates() {
                                <option value="post" <# if ( ! wp.media.galleryDefaults.link || 'post' == wp.media.galleryDefaults.link ) {
                                        #>selected="selected"<# }
                                #>>
-                                       <?php esc_attr_e('Attachment Page'); ?>
+                                       <?php esc_html_e( 'Attachment Page' ); ?>
                                </option>
                                <option value="file" <# if ( 'file' == wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
-                                       <?php esc_attr_e('Media File'); ?>
+                                       <?php esc_html_e( 'Media File' ); ?>
                                </option>
                                <option value="none" <# if ( 'none' == wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
-                                       <?php esc_attr_e('None'); ?>
+                                       <?php esc_html_e( 'None' ); ?>
                                </option>
                        </select>
                </label>
@@ -841,16 +845,16 @@ function wp_print_media_templates() {
                        <span><?php _e('Align'); ?></span>
                        <div class="button-group button-large" data-setting="align">
                                <button class="button" value="left">
-                                       <?php esc_attr_e('Left'); ?>
+                                       <?php esc_html_e( 'Left' ); ?>
                                </button>
                                <button class="button" value="center">
-                                       <?php esc_attr_e('Center'); ?>
+                                       <?php esc_html_e( 'Center' ); ?>
                                </button>
                                <button class="button" value="right">
-                                       <?php esc_attr_e('Right'); ?>
+                                       <?php esc_html_e( 'Right' ); ?>
                                </button>
                                <button class="button active" value="none">
-                                       <?php esc_attr_e('None'); ?>
+                                       <?php esc_html_e( 'None' ); ?>
                                </button>
                        </div>
                </div>
@@ -859,13 +863,13 @@ function wp_print_media_templates() {
                        <span><?php _e('Link To'); ?></span>
                        <div class="button-group button-large" data-setting="link">
                                <button class="button" value="file">
-                                       <?php esc_attr_e('Image URL'); ?>
+                                       <?php esc_html_e( 'Image URL' ); ?>
                                </button>
                                <button class="button" value="custom">
-                                       <?php esc_attr_e('Custom URL'); ?>
+                                       <?php esc_html_e( 'Custom URL' ); ?>
                                </button>
                                <button class="button active" value="none">
-                                       <?php esc_attr_e('None'); ?>
+                                       <?php esc_html_e( 'None' ); ?>
                                </button>
                        </div>
                        <input type="text" class="link-to-custom" data-setting="linkUrl" />
@@ -907,16 +911,16 @@ function wp_print_media_templates() {
                                                <span><?php _e('Align'); ?></span>
                                                <div class="button-group button-large" data-setting="align">
                                                        <button class="button" value="left">
-                                                               <?php esc_attr_e('Left'); ?>
+                                                               <?php esc_html_e( 'Left' ); ?>
                                                        </button>
                                                        <button class="button" value="center">
-                                                               <?php esc_attr_e('Center'); ?>
+                                                               <?php esc_html_e( 'Center' ); ?>
                                                        </button>
                                                        <button class="button" value="right">
-                                                               <?php esc_attr_e('Right'); ?>
+                                                               <?php esc_html_e( 'Right' ); ?>
                                                        </button>
                                                        <button class="button active" value="none">
-                                                               <?php esc_attr_e('None'); ?>
+                                                               <?php esc_html_e( 'None' ); ?>
                                                        </button>
                                                </div>
                                        </div>
@@ -964,21 +968,21 @@ function wp_print_media_templates() {
                                                <select data-setting="link">
                                                <# if ( data.attachment ) { #>
                                                        <option value="file">
-                                                               <?php esc_attr_e('Media File'); ?>
+                                                               <?php esc_html_e( 'Media File' ); ?>
                                                        </option>
                                                        <option value="post">
-                                                               <?php esc_attr_e('Attachment Page'); ?>
+                                                               <?php esc_html_e( 'Attachment Page' ); ?>
                                                        </option>
                                                <# } else { #>
                                                        <option value="file">
-                                                               <?php esc_attr_e('Image URL'); ?>
+                                                               <?php esc_html_e( 'Image URL' ); ?>
                                                        </option>
                                                <# } #>
                                                        <option value="custom">
-                                                               <?php esc_attr_e('Custom URL'); ?>
+                                                               <?php esc_html_e( 'Custom URL' ); ?>
                                                        </option>
                                                        <option value="none">
-                                                               <?php esc_attr_e('None'); ?>
+                                                               <?php esc_html_e( 'None' ); ?>
                                                        </option>
                                                </select>
                                                <input type="text" class="link-to-custom" data-setting="linkUrl" />
index bc7a90ced893918263f73892385af15935c09b70..ba52555932c1861aaf933b025bf723abada8b9d8 100644 (file)
@@ -6,6 +6,23 @@
  * @subpackage Media
  */
 
+/**
+ * Retrieve additional image sizes.
+ *
+ * @since 4.7.0
+ *
+ * @global array $_wp_additional_image_sizes
+ *
+ * @return array Additional images size data.
+ */
+function wp_get_additional_image_sizes() {
+       global $_wp_additional_image_sizes;
+       if ( ! $_wp_additional_image_sizes ) {
+               $_wp_additional_image_sizes = array();
+       }
+       return $_wp_additional_image_sizes;
+}
+
 /**
  * Scale down the default size of an image.
  *
@@ -27,7 +44,6 @@
  * @since 2.5.0
  *
  * @global int   $content_width
- * @global array $_wp_additional_image_sizes
  *
  * @param int          $width   Width of the image in pixels.
  * @param int          $height  Height of the image in pixels.
@@ -39,7 +55,9 @@
  * @return array Width and height of what the result image should resize to.
  */
 function image_constrain_size_for_editor( $width, $height, $size = 'medium', $context = null ) {
-       global $content_width, $_wp_additional_image_sizes;
+       global $content_width;
+
+       $_wp_additional_image_sizes = wp_get_additional_image_sizes();
 
        if ( ! $context )
                $context = is_admin() ? 'edit' : 'display';
@@ -82,11 +100,13 @@ function image_constrain_size_for_editor( $width, $height, $size = 'medium', $co
                if ( intval($content_width) > 0 ) {
                        $max_width = min( intval($content_width), $max_width );
                }
-       } elseif ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) && in_array( $size, array_keys( $_wp_additional_image_sizes ) ) ) {
+       } elseif ( ! empty( $_wp_additional_image_sizes ) && in_array( $size, array_keys( $_wp_additional_image_sizes ) ) ) {
                $max_width = intval( $_wp_additional_image_sizes[$size]['width'] );
                $max_height = intval( $_wp_additional_image_sizes[$size]['height'] );
-               if ( intval($content_width) > 0 && 'edit' == $context ) // Only in admin. Assume that theme authors know what they're doing.
-                       $max_width = min( intval($content_width), $max_width );
+               // Only in admin. Assume that theme authors know what they're doing.
+               if ( intval( $content_width ) > 0 && 'edit' === $context ) {
+                       $max_width = min( intval( $content_width ), $max_width );
+               }
        }
        // $size == 'full' has no constraint
        else {
@@ -163,9 +183,7 @@ function image_hwstring( $width, $height ) {
  *                     the image is an intermediate size. False on failure.
  */
 function image_downsize( $id, $size = 'medium' ) {
-
-       if ( !wp_attachment_is_image($id) )
-               return false;
+       $is_image = wp_attachment_is_image( $id );
 
        /**
         * Filters whether to preempt the output of image_downsize().
@@ -190,6 +208,19 @@ function image_downsize( $id, $size = 'medium' ) {
        $is_intermediate = false;
        $img_url_basename = wp_basename($img_url);
 
+       // If the file isn't an image, attempt to replace its URL with a rendered image from its meta.
+       // Otherwise, a non-image type could be returned.
+       if ( ! $is_image ) {
+               if ( ! empty( $meta['sizes'] ) ) {
+                       $img_url = str_replace( $img_url_basename, $meta['sizes']['full']['file'], $img_url );
+                       $img_url_basename = $meta['sizes']['full']['file'];
+                       $width = $meta['sizes']['full']['width'];
+                       $height = $meta['sizes']['full']['height'];
+               } else {
+                       return false;
+               }
+       }
+
        // try for a new style intermediate size
        if ( $intermediate = image_get_intermediate_size($id, $size) ) {
                $img_url = str_replace($img_url_basename, $intermediate['file'], $img_url);
@@ -258,15 +289,12 @@ function add_image_size( $name, $width = 0, $height = 0, $crop = false ) {
  *
  * @since 3.9.0
  *
- * @global array $_wp_additional_image_sizes
- *
  * @param string $name The image size to check.
  * @return bool True if the image size exists, false if not.
  */
 function has_image_size( $name ) {
-       global $_wp_additional_image_sizes;
-
-       return isset( $_wp_additional_image_sizes[ $name ] );
+       $sizes = wp_get_additional_image_sizes();
+       return isset( $sizes[ $name ] );
 }
 
 /**
@@ -668,6 +696,11 @@ function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) {
        if ( is_array( $size ) ) {
                $candidates = array();
 
+               if ( ! isset( $imagedata['file'] ) && isset( $imagedata['sizes']['full'] ) ) {
+                       $imagedata['height'] = $imagedata['sizes']['full']['height'];
+                       $imagedata['width']  = $imagedata['sizes']['full']['width'];
+               }
+
                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] ) {
@@ -721,7 +754,7 @@ function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) {
        }
 
        // include the full filesystem path of the intermediate file
-       if ( empty($data['path']) && !empty($data['file']) ) {
+       if ( empty( $data['path'] ) && ! empty( $data['file'] ) && ! empty( $imagedata['file'] ) ) {
                $file_url = wp_get_attachment_url($post_id);
                $data['path'] = path_join( dirname($imagedata['file']), $data['file'] );
                $data['url'] = path_join( dirname($file_url), $data['file'] );
@@ -748,15 +781,14 @@ function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) {
  *
  * @since 3.0.0
  *
- * @global array $_wp_additional_image_sizes
- *
  * @return array Returns a filtered array of image size strings.
  */
 function get_intermediate_image_sizes() {
-       global $_wp_additional_image_sizes;
+       $_wp_additional_image_sizes = wp_get_additional_image_sizes();
        $image_sizes = array('thumbnail', 'medium', 'medium_large', 'large'); // Standard sizes
-       if ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) )
+       if ( ! empty( $_wp_additional_image_sizes ) ) {
                $image_sizes = array_merge( $image_sizes, array_keys( $_wp_additional_image_sizes ) );
+       }
 
        /**
         * Filters the list of intermediate image sizes.
@@ -850,18 +882,14 @@ function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = fa
                $default_attr = array(
                        'src'   => $src,
                        'class' => "attachment-$size_class size-$size_class",
-                       'alt'   => trim(strip_tags( get_post_meta($attachment_id, '_wp_attachment_image_alt', true) )), // Use Alt field first
+                       'alt'   => trim( strip_tags( get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ) ) ),
                );
-               if ( empty($default_attr['alt']) )
-                       $default_attr['alt'] = trim(strip_tags( $attachment->post_excerpt )); // If not, Use the Caption
-               if ( empty($default_attr['alt']) )
-                       $default_attr['alt'] = trim(strip_tags( $attachment->post_title )); // Finally, use the title
 
                $attr = wp_parse_args( $attr, $default_attr );
 
                // Generate 'srcset' and 'sizes' if not already present.
                if ( empty( $attr['srcset'] ) ) {
-                       $image_meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
+                       $image_meta = wp_get_attachment_metadata( $attachment_id );
 
                        if ( is_array( $image_meta ) ) {
                                $size_array = array( absint( $width ), absint( $height ) );
@@ -990,7 +1018,7 @@ function wp_get_attachment_image_srcset( $attachment_id, $size = 'medium', $imag
        }
 
        if ( ! is_array( $image_meta ) ) {
-               $image_meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
+               $image_meta = wp_get_attachment_metadata( $attachment_id );
        }
 
        $image_src = $image[0];
@@ -1206,7 +1234,7 @@ function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $image
        }
 
        if ( ! is_array( $image_meta ) ) {
-               $image_meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
+               $image_meta = wp_get_attachment_metadata( $attachment_id );
        }
 
        $image_src = $image[0];
@@ -1239,7 +1267,7 @@ function wp_calculate_image_sizes( $size, $image_src = null, $image_meta = null,
                $width = absint( $size[0] );
        } elseif ( is_string( $size ) ) {
                if ( ! $image_meta && $attachment_id ) {
-                       $image_meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
+                       $image_meta = wp_get_attachment_metadata( $attachment_id );
                }
 
                if ( is_array( $image_meta ) ) {
@@ -1314,7 +1342,7 @@ function wp_make_content_images_responsive( $content ) {
        }
 
        foreach ( $selected_images as $image => $attachment_id ) {
-               $image_meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
+               $image_meta = wp_get_attachment_metadata( $attachment_id );
                $content = str_replace( $image, wp_image_add_srcset_and_sizes( $image, $image_meta, $attachment_id ), $content );
        }
 
@@ -1549,10 +1577,10 @@ function img_caption_shortcode( $attr, $content = null ) {
        $caption_width = apply_filters( 'img_caption_shortcode_width', $width, $atts, $content );
 
        $style = '';
-       if ( $caption_width )
+       if ( $caption_width ) {
                $style = 'style="width: ' . (int) $caption_width . 'px" ';
+       }
 
-       $html = '';
        if ( $html5 ) {
                $html = '<figure ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">'
                . do_shortcode( $content ) . '<figcaption class="wp-caption-text">' . $atts['caption'] . '</figcaption></figure>';
@@ -2587,7 +2615,7 @@ function wp_video_shortcode( $attr, $content = '' ) {
 
        $width_rule = '';
        if ( ! empty( $atts['width'] ) ) {
-               $width_rule = sprintf( 'width: %dpx; ', $atts['width'] );
+               $width_rule = sprintf( 'width: %dpx;', $atts['width'] );
        }
        $output = sprintf( '<div style="%s" class="wp-video">%s</div>', $width_rule, $html );
 
@@ -2694,11 +2722,15 @@ function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false )
  * Retrieves taxonomies attached to given the attachment.
  *
  * @since 2.5.0
+ * @since 4.7.0 Introduced the `$output` parameter.
  *
  * @param int|array|object $attachment Attachment ID, data array, or data object.
+ * @param string           $output     Output type. 'names' to return an array of taxonomy names,
+ *                                     or 'objects' to return an array of taxonomy objects.
+ *                                     Default is 'names'.
  * @return array Empty array on failure. List of taxonomies on success.
  */
-function get_attachment_taxonomies( $attachment ) {
+function get_attachment_taxonomies( $attachment, $output = 'names' ) {
        if ( is_int( $attachment ) ) {
                $attachment = get_post( $attachment );
        } elseif ( is_array( $attachment ) ) {
@@ -2723,11 +2755,17 @@ function get_attachment_taxonomies( $attachment ) {
        }
 
        $taxonomies = array();
-       foreach ( $objects as $object )
-               if ( $taxes = get_object_taxonomies($object) )
-                       $taxonomies = array_merge($taxonomies, $taxes);
+       foreach ( $objects as $object ) {
+               if ( $taxes = get_object_taxonomies( $object, $output ) ) {
+                       $taxonomies = array_merge( $taxonomies, $taxes );
+               }
+       }
 
-       return array_unique($taxonomies);
+       if ( 'names' === $output ) {
+               $taxonomies = array_unique( $taxonomies );
+       }
+
+       return $taxonomies;
 }
 
 /**
@@ -2890,7 +2928,6 @@ function _wp_image_editor_choose( $args = array() ) {
        require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
        require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
        require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
-
        /**
         * Filters the list of image editing library classes.
         *
@@ -3102,7 +3139,7 @@ function wp_prepare_attachment_for_js( $attachment ) {
        if ( current_user_can( 'delete_post', $attachment->ID ) )
                $response['nonces']['delete'] = wp_create_nonce( 'delete-post_' . $attachment->ID );
 
-       if ( $meta && 'image' === $type ) {
+       if ( $meta && ( 'image' === $type || ! empty( $meta['sizes'] ) ) ) {
                $sizes = array();
 
                /** This filter is documented in wp-admin/includes/media.php */
@@ -3122,8 +3159,10 @@ function wp_prepare_attachment_for_js( $attachment ) {
 
                        /** This filter is documented in wp-includes/media.php */
                        if ( $downsize = apply_filters( 'image_downsize', false, $attachment->ID, $size ) ) {
-                               if ( ! $downsize[3] )
+                               if ( empty( $downsize[3] ) ) {
                                        continue;
+                               }
+
                                $sizes[ $size ] = array(
                                        'height'      => $downsize[2],
                                        'width'       => $downsize[1],
@@ -3150,16 +3189,29 @@ function wp_prepare_attachment_for_js( $attachment ) {
                        }
                }
 
-               $sizes['full'] = array( 'url' => $attachment_url );
+               if ( 'image' === $type ) {
+                       $sizes['full'] = array( 'url' => $attachment_url );
 
-               if ( isset( $meta['height'], $meta['width'] ) ) {
-                       $sizes['full']['height'] = $meta['height'];
-                       $sizes['full']['width'] = $meta['width'];
-                       $sizes['full']['orientation'] = $meta['height'] > $meta['width'] ? 'portrait' : 'landscape';
+                       if ( isset( $meta['height'], $meta['width'] ) ) {
+                               $sizes['full']['height'] = $meta['height'];
+                               $sizes['full']['width'] = $meta['width'];
+                               $sizes['full']['orientation'] = $meta['height'] > $meta['width'] ? 'portrait' : 'landscape';
+                       }
+
+                       $response = array_merge( $response, $sizes['full'] );
+               } elseif ( $meta['sizes']['full']['file'] ) {
+                       $sizes['full'] = array(
+                               'url'         => $base_url . $meta['sizes']['full']['file'],
+                               'height'      => $meta['sizes']['full']['height'],
+                               'width'       => $meta['sizes']['full']['width'],
+                               'orientation' => $meta['sizes']['full']['height'] > $meta['sizes']['full']['width'] ? 'portrait' : 'landscape'
+                       );
                }
 
-               $response = array_merge( $response, array( 'sizes' => $sizes ), $sizes['full'] );
-       } elseif ( $meta && 'video' === $type ) {
+               $response = array_merge( $response, array( 'sizes' => $sizes ) );
+       }
+
+       if ( $meta && 'video' === $type ) {
                if ( isset( $meta['width'] ) )
                        $response['width'] = (int) $meta['width'];
                if ( isset( $meta['height'] ) )
@@ -3395,6 +3447,7 @@ function wp_enqueue_media( $args = array() ) {
                'filterByDate'           => __( 'Filter by date' ),
                'filterByType'           => __( 'Filter by type' ),
                'searchMediaLabel'       => __( 'Search Media' ),
+               'searchMediaPlaceholder' => __( 'Search media items...' ), // placeholder (no ellipsis)
                'noMedia'                => __( 'No media files found.' ),
 
                // Library Details
@@ -3788,12 +3841,10 @@ function attachment_url_to_postid( $url ) {
  *
  * @since 4.0.0
  *
- * @global string $wp_version
- *
  * @return array The relevant CSS file URLs.
  */
 function wpview_media_sandbox_styles() {
-       $version = 'ver=' . $GLOBALS['wp_version'];
+       $version = 'ver=' . get_bloginfo( 'version' );
        $mediaelement = includes_url( "js/mediaelement/mediaelementplayer.min.css?$version" );
        $wpmediaelement = includes_url( "js/mediaelement/wp-mediaelement.css?$version" );
 
index 8833d3e987b34d95e39251f407e30d630be1ca08..cfb9d95a9e5aafaea3e8598512a288bdd71396c6 100644 (file)
@@ -567,12 +567,12 @@ function metadata_exists( $meta_type, $object_id, $meta_key ) {
 function get_metadata_by_mid( $meta_type, $meta_id ) {
        global $wpdb;
 
-       if ( ! $meta_type || ! is_numeric( $meta_id ) ) {
+       if ( ! $meta_type || ! is_numeric( $meta_id ) || floor( $meta_id ) != $meta_id ) {
                return false;
        }
 
-       $meta_id = absint( $meta_id );
-       if ( ! $meta_id ) {
+       $meta_id = intval( $meta_id );
+       if ( $meta_id <= 0 ) {
                return false;
        }
 
@@ -611,12 +611,12 @@ function update_metadata_by_mid( $meta_type, $meta_id, $meta_value, $meta_key =
        global $wpdb;
 
        // Make sure everything is valid.
-       if ( ! $meta_type || ! is_numeric( $meta_id ) ) {
+       if ( ! $meta_type || ! is_numeric( $meta_id ) || floor( $meta_id ) != $meta_id ) {
                return false;
        }
 
-       $meta_id = absint( $meta_id );
-       if ( ! $meta_id ) {
+       $meta_id = intval( $meta_id );
+       if ( $meta_id <= 0 ) {
                return false;
        }
 
@@ -702,12 +702,12 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
        global $wpdb;
 
        // Make sure everything is valid.
-       if ( ! $meta_type || ! is_numeric( $meta_id ) ) {
+       if ( ! $meta_type || ! is_numeric( $meta_id ) || floor( $meta_id ) != $meta_id ) {
                return false;
        }
 
-       $meta_id = absint( $meta_id );
-       if ( ! $meta_id ) {
+       $meta_id = intval( $meta_id );
+       if ( $meta_id <= 0 ) {
                return false;
        }
 
@@ -964,7 +964,7 @@ function sanitize_meta( $meta_key, $meta_value, $object_type ) {
  * 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
+ * @since 4.6.0 {@link https://core.trac.wordpress.org/ticket/35658 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.
  *
index ccafd047688de2830b867a17a7c10b8b53be0a5f..918875038611a4e1dd09c5bae6ba8b7f5079dc7f 100644 (file)
@@ -38,7 +38,7 @@ function wpmu_update_blogs_date() {
  * @return string Full URL of the blog if found. Empty string if not.
  */
 function get_blogaddress_by_id( $blog_id ) {
-       $bloginfo = get_blog_details( (int) $blog_id );
+       $bloginfo = get_site( (int) $blog_id );
 
        if ( empty( $bloginfo ) ) {
                return '';
@@ -72,36 +72,38 @@ function get_blogaddress_by_name( $blogname ) {
 }
 
 /**
- * Given a blog's (subdomain or directory) slug, retrieve its id.
+ * Retrieves a sites ID given its (subdomain or directory) slug.
  *
  * @since MU
+ * @since 4.7.0 Converted to use get_sites().
  *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $slug
- * @return int A blog id
+ * @param string $slug A site's slug.
+ * @return int|null The site ID, or null if no site is found for the given slug.
  */
 function get_id_from_blogname( $slug ) {
-       global $wpdb;
-
-       $current_site = get_current_site();
+       $current_network = get_network();
        $slug = trim( $slug, '/' );
 
-       $blog_id = wp_cache_get( 'get_id_from_blogname_' . $slug, 'blog-details' );
-       if ( $blog_id )
-               return $blog_id;
-
        if ( is_subdomain_install() ) {
-               $domain = $slug . '.' . $current_site->domain;
-               $path = $current_site->path;
+               $domain = $slug . '.' . preg_replace( '|^www\.|', '', $current_network->domain );
+               $path = $current_network->path;
        } else {
-               $domain = $current_site->domain;
-               $path = $current_site->path . $slug . '/';
+               $domain = $current_network->domain;
+               $path = $current_network->path . $slug . '/';
        }
 
-       $blog_id = $wpdb->get_var( $wpdb->prepare("SELECT blog_id FROM {$wpdb->blogs} WHERE domain = %s AND path = %s", $domain, $path) );
-       wp_cache_set( 'get_id_from_blogname_' . $slug, $blog_id, 'blog-details' );
-       return $blog_id;
+       $site_ids = get_sites( array(
+               'number' => 1,
+               'fields' => 'ids',
+               'domain' => $domain,
+               'path' => $path,
+       ) );
+
+       if ( empty( $site_ids ) ) {
+               return null;
+       }
+
+       return array_shift( $site_ids );
 }
 
 /**
@@ -238,10 +240,11 @@ function get_blog_details( $fields = null, $get_all = true ) {
         * Filters a blog's details.
         *
         * @since MU
+        * @deprecated 4.7.0 Use site_details
         *
         * @param object $details The blog details.
         */
-       $details = apply_filters( 'blog_details', $details );
+       $details = apply_filters_deprecated( 'blog_details', array( $details ), '4.7.0', 'site_details' );
 
        wp_cache_set( $blog_id . $all, $details, 'blog-details' );
 
@@ -264,7 +267,7 @@ function refresh_blog_details( $blog_id = 0 ) {
                $blog_id = get_current_blog_id();
        }
 
-       $details = get_blog_details( $blog_id, false );
+       $details = get_site( $blog_id );
        if ( ! $details ) {
                // Make sure clean_blog_cache() gets the blog ID
                // when the blog has been previously cached as
@@ -308,7 +311,7 @@ function update_blog_details( $blog_id, $details = array() ) {
        if ( is_object($details) )
                $details = get_object_vars($details);
 
-       $current_details = get_blog_details($blog_id, false);
+       $current_details = get_site( $blog_id );
        if ( empty($current_details) )
                return false;
 
@@ -440,7 +443,7 @@ function update_blog_details( $blog_id, $details = array() ) {
  *
  * @since 3.5.0
  *
- * @param WP_Site $blog The blog details as returned from get_blog_details()
+ * @param WP_Site $blog The site object to be cleared from cache.
  */
 function clean_blog_cache( $blog ) {
        $blog_id = $blog->blog_id;
@@ -453,7 +456,6 @@ function clean_blog_cache( $blog ) {
        wp_cache_delete(  $domain_path_key, 'blog-lookup' );
        wp_cache_delete( 'current_blog_' . $blog->domain, 'site-options' );
        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' );
 
        /**
@@ -566,10 +568,10 @@ function update_site_cache( $sites ) {
  *                                           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 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          $number            Maximum number of sites to retrieve. Default 100.
  *     @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.
@@ -579,16 +581,14 @@ function update_site_cache( $sites ) {
  *                                           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 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 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 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.
@@ -597,6 +597,8 @@ function update_site_cache( $sites ) {
  *     @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.
  * }
  * @return array List of sites.
@@ -764,19 +766,21 @@ function update_blog_option( $id, $option, $value, $deprecated = null ) {
  * @return true Always returns True.
  */
 function switch_to_blog( $new_blog, $deprecated = null ) {
-       global $wpdb;
+       global $wpdb, $wp_roles;
 
-       if ( empty( $new_blog ) )
-               $new_blog = $GLOBALS['blog_id'];
+       $blog_id = get_current_blog_id();
+       if ( empty( $new_blog ) ) {
+               $new_blog = $blog_id;
+       }
 
-       $GLOBALS['_wp_switched_stack'][] = $GLOBALS['blog_id'];
+       $GLOBALS['_wp_switched_stack'][] = $blog_id;
 
        /*
         * If we're switching to the same blog id that we're on,
         * set the right vars, do the associated actions, but skip
         * the extra unnecessary work
         */
-       if ( $new_blog == $GLOBALS['blog_id'] ) {
+       if ( $new_blog == $blog_id ) {
                /**
                 * Fires when the blog is switched.
                 *
@@ -792,7 +796,7 @@ function switch_to_blog( $new_blog, $deprecated = null ) {
 
        $wpdb->set_blog_id( $new_blog );
        $GLOBALS['table_prefix'] = $wpdb->get_blog_prefix();
-       $prev_blog_id = $GLOBALS['blog_id'];
+       $prev_blog_id = $blog_id;
        $GLOBALS['blog_id'] = $new_blog;
 
        if ( function_exists( 'wp_cache_switch_to_blog' ) ) {
@@ -800,11 +804,11 @@ function switch_to_blog( $new_blog, $deprecated = null ) {
        } else {
                global $wp_object_cache;
 
-               if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) )
+               if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) ) {
                        $global_groups = $wp_object_cache->global_groups;
-               else
+               } else {
                        $global_groups = false;
-
+               }
                wp_cache_init();
 
                if ( function_exists( 'wp_cache_add_global_groups' ) ) {
@@ -818,7 +822,7 @@ function switch_to_blog( $new_blog, $deprecated = null ) {
        }
 
        if ( did_action( 'init' ) ) {
-               wp_roles()->reinit();
+               $wp_roles = new WP_Roles();
                $current_user = wp_get_current_user();
                $current_user->for_blog( $new_blog );
        }
@@ -846,14 +850,16 @@ function switch_to_blog( $new_blog, $deprecated = null ) {
  * @return bool True on success, false if we're already on the current blog
  */
 function restore_current_blog() {
-       global $wpdb;
+       global $wpdb, $wp_roles;
 
-       if ( empty( $GLOBALS['_wp_switched_stack'] ) )
+       if ( empty( $GLOBALS['_wp_switched_stack'] ) ) {
                return false;
+       }
 
        $blog = array_pop( $GLOBALS['_wp_switched_stack'] );
+       $blog_id = get_current_blog_id();
 
-       if ( $GLOBALS['blog_id'] == $blog ) {
+       if ( $blog_id == $blog ) {
                /** This filter is documented in wp-includes/ms-blogs.php */
                do_action( 'switch_blog', $blog, $blog );
                // If we still have items in the switched stack, consider ourselves still 'switched'
@@ -862,7 +868,7 @@ function restore_current_blog() {
        }
 
        $wpdb->set_blog_id( $blog );
-       $prev_blog_id = $GLOBALS['blog_id'];
+       $prev_blog_id = $blog_id;
        $GLOBALS['blog_id'] = $blog;
        $GLOBALS['table_prefix'] = $wpdb->get_blog_prefix();
 
@@ -871,10 +877,11 @@ function restore_current_blog() {
        } else {
                global $wp_object_cache;
 
-               if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) )
+               if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) ) {
                        $global_groups = $wp_object_cache->global_groups;
-               else
+               } else {
                        $global_groups = false;
+               }
 
                wp_cache_init();
 
@@ -889,7 +896,7 @@ function restore_current_blog() {
        }
 
        if ( did_action( 'init' ) ) {
-               wp_roles()->reinit();
+               $wp_roles = new WP_Roles();
                $current_user = wp_get_current_user();
                $current_user->for_blog( $blog );
        }
@@ -1032,7 +1039,7 @@ function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) {
 function get_blog_status( $id, $pref ) {
        global $wpdb;
 
-       $details = get_blog_details( $id, false );
+       $details = get_site( $id );
        if ( $details )
                return $details->$pref;
 
index 98719f8ba5b464f5db769472a6785212866bb1bc..5a54b88dc30d91e796be94f03c7cd5eae7879213 100644 (file)
@@ -47,19 +47,19 @@ function ms_upload_constants() {
  * @since 3.0.0
  */
 function ms_cookie_constants(  ) {
-       $current_site = get_current_site();
+       $current_network = get_network();
 
        /**
         * @since 1.2.0
         */
        if ( !defined( 'COOKIEPATH' ) )
-               define( 'COOKIEPATH', $current_site->path );
+               define( 'COOKIEPATH', $current_network->path );
 
        /**
         * @since 1.5.0
         */
        if ( !defined( 'SITECOOKIEPATH' ) )
-               define( 'SITECOOKIEPATH', $current_site->path );
+               define( 'SITECOOKIEPATH', $current_network->path );
 
        /**
         * @since 2.6.0
@@ -76,10 +76,10 @@ function ms_cookie_constants(  ) {
         * @since 2.0.0
         */
        if ( !defined('COOKIE_DOMAIN') && is_subdomain_install() ) {
-               if ( !empty( $current_site->cookie_domain ) )
-                       define('COOKIE_DOMAIN', '.' . $current_site->cookie_domain);
+               if ( !empty( $current_network->cookie_domain ) )
+                       define('COOKIE_DOMAIN', '.' . $current_network->cookie_domain);
                else
-                       define('COOKIE_DOMAIN', '.' . $current_site->domain);
+                       define('COOKIE_DOMAIN', '.' . $current_network->domain);
        }
 }
 
index 7e43fccd836fb25d870814448ef11cdb31455f23..cd35f55c63509c2ac352730489c7300d60ab2723 100644 (file)
  * Dashboard blog functionality was removed in WordPress 3.1, replaced by the user admin.
  *
  * @since MU
- * @deprecated 3.1.0 Use get_blog_details()
- * @see get_blog_details()
+ * @deprecated 3.1.0 Use get_site()
+ * @see get_site()
  *
- * @return int Current site ID.
+ * @return WP_Site Current site object.
  */
 function get_dashboard_blog() {
     _deprecated_function( __FUNCTION__, '3.1.0' );
-    if ( $blog = get_site_option( 'dashboard_blog' ) )
-        return get_blog_details( $blog );
+    if ( $blog = get_site_option( 'dashboard_blog' ) ) {
+           return get_site( $blog );
+    }
 
-    return get_blog_details( $GLOBALS['current_site']->blog_id );
+    return get_site( get_network()->site_id );
 }
 
 /**
index 87fa70f4b982e7e58e530037fef59d7b72a8e3b1..e5c1db3f892dd8a8a802653255408be29a307045 100644 (file)
@@ -80,3 +80,4 @@ if ( ( $client_last_modified && $client_etag )
 
 // If we made it this far, just serve the file
 readfile( $file );
+flush();
index 3f5ee2c92a88482febebfbc23dbc61b5651de45d..2e9ca946d98aa7d168e2d3a58213874f7ead295d 100644 (file)
@@ -53,9 +53,9 @@ function get_active_blog_for_user( $user_id ) {
        if ( false !== $primary_blog ) {
                if ( ! isset( $blogs[ $primary_blog ] ) ) {
                        update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id );
-                       $primary = get_blog_details( $first_blog->userblog_id );
+                       $primary = get_site( $first_blog->userblog_id );
                } else {
-                       $primary = get_blog_details( $primary_blog );
+                       $primary = get_site( $primary_blog );
                }
        } else {
                //TODO Review this call to add_user_to_blog too - to get here the user must have a role on this blog?
@@ -71,7 +71,7 @@ function get_active_blog_for_user( $user_id ) {
                        foreach ( (array) $blogs as $blog_id => $blog ) {
                                if ( $blog->site_id != $wpdb->siteid )
                                        continue;
-                               $details = get_blog_details( $blog_id );
+                               $details = get_site( $blog_id );
                                if ( is_object( $details ) && $details->archived == 0 && $details->spam == 0 && $details->deleted == 0 ) {
                                        $ret = $blog;
                                        if ( get_user_meta( $user_id , 'primary_blog', true ) != $blog_id )
@@ -161,8 +161,8 @@ function add_user_to_blog( $blog_id, $user_id, $role ) {
 
        if ( !get_user_meta($user_id, 'primary_blog', true) ) {
                update_user_meta($user_id, 'primary_blog', $blog_id);
-               $details = get_blog_details($blog_id);
-               update_user_meta($user_id, 'source_domain', $details->domain);
+               $site = get_site( $blog_id );
+               update_user_meta( $user_id, 'source_domain', $site->domain );
        }
 
        $user->set_role($role);
@@ -546,8 +546,8 @@ function wpmu_validate_user_signup($user_name, $user_email) {
 function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
        global $wpdb, $domain;
 
-       $current_site = get_current_site();
-       $base = $current_site->path;
+       $current_network = get_network();
+       $base = $current_network->path;
 
        $blog_title = strip_tags( $blog_title );
 
@@ -580,7 +580,7 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
                $errors->add('blogname',  __( 'Site name must be at least 4 characters.' ) );
 
        // do not allow users to create a blog that conflicts with a page on the main blog.
-       if ( !is_subdomain_install() && $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM " . $wpdb->get_blog_prefix( $current_site->blog_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) )
+       if ( !is_subdomain_install() && $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM " . $wpdb->get_blog_prefix( $current_network->site_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) )
                $errors->add( 'blogname', __( 'Sorry, you may not use that site name.' ) );
 
        // all numeric?
@@ -612,7 +612,7 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
                $mydomain = "$domain";
                $path = $base.$blogname.'/';
        }
-       if ( domain_exists($mydomain, $path, $current_site->id) )
+       if ( domain_exists($mydomain, $path, $current_network->id) )
                $errors->add( 'blogname', __( 'Sorry, that site already exists!' ) );
 
        if ( username_exists( $blogname ) ) {
@@ -669,7 +669,7 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
 function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = array() )  {
        global $wpdb;
 
-       $key = substr( md5( time() . wp_rand() . $domain ), 0, 16 );
+       $key = substr( md5( time() . rand() . $domain ), 0, 16 );
        $meta = serialize($meta);
 
        $wpdb->insert( $wpdb->signups, array(
@@ -719,7 +719,7 @@ function wpmu_signup_user( $user, $user_email, $meta = array() ) {
        // Format data
        $user = preg_replace( '/\s+/', '', sanitize_user( $user, true ) );
        $user_email = sanitize_email( $user_email );
-       $key = substr( md5( time() . wp_rand() . $user_email ), 0, 16 );
+       $key = substr( md5( time() . rand() . $user_email ), 0, 16 );
        $meta = serialize($meta);
 
        $wpdb->insert( $wpdb->signups, array(
@@ -764,13 +764,13 @@ function wpmu_signup_user( $user, $user_email, $meta = array() ) {
  * @param string $domain     The new blog domain.
  * @param string $path       The new blog path.
  * @param string $title      The site title.
- * @param string $user       The user's login name.
+ * @param string $user_login The user's login name.
  * @param string $user_email The user's email address.
  * @param string $key        The activation key created in wpmu_signup_blog()
  * @param array  $meta       By default, contains the requested privacy setting and lang_id.
  * @return bool
  */
-function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_email, $key, $meta = array() ) {
+function wpmu_signup_blog_notification( $domain, $path, $title, $user_login, $user_email, $key, $meta = array() ) {
        /**
         * Filters whether to bypass the new site email notification.
         *
@@ -779,17 +779,17 @@ function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_ema
         * @param string|bool $domain     Site domain.
         * @param string      $path       Site path.
         * @param string      $title      Site title.
-        * @param string      $user       User login name.
+        * @param string      $user_login User login name.
         * @param string      $user_email User email address.
         * @param string      $key        Activation key created in wpmu_signup_blog().
         * @param array       $meta       By default, contains the requested privacy setting and lang_id.
         */
-       if ( ! apply_filters( 'wpmu_signup_blog_notification', $domain, $path, $title, $user, $user_email, $key, $meta ) ) {
+       if ( ! apply_filters( 'wpmu_signup_blog_notification', $domain, $path, $title, $user_login, $user_email, $key, $meta ) ) {
                return false;
        }
 
        // Send email with activation link.
-       if ( !is_subdomain_install() || get_current_site()->id != 1 )
+       if ( !is_subdomain_install() || get_current_network_id() != 1 )
                $activate_url = network_site_url("wp-activate.php?key=$key");
        else
                $activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; // @todo use *_url() API
@@ -800,6 +800,10 @@ function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_ema
                $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
        $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
        $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
+
+       $user = get_user_by( 'login', $user_login );
+       $switched_locale = switch_to_locale( get_user_locale( $user ) );
+
        $message = sprintf(
                /**
                 * Filters the message content of the new blog notification email.
@@ -812,14 +816,14 @@ function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_ema
                 * @param string $domain     Site domain.
                 * @param string $path       Site path.
                 * @param string $title      Site title.
-                * @param string $user       User login name.
+                * @param string $user_login User login name.
                 * @param string $user_email User email address.
                 * @param string $key        Activation key created in wpmu_signup_blog().
                 * @param array  $meta       By default, contains the requested privacy setting and lang_id.
                 */
                apply_filters( 'wpmu_signup_blog_notification_email',
                        __( "To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your site here:\n\n%s" ),
-                       $domain, $path, $title, $user, $user_email, $key, $meta
+                       $domain, $path, $title, $user_login, $user_email, $key, $meta
                ),
                $activate_url,
                esc_url( "http://{$domain}{$path}" ),
@@ -836,19 +840,25 @@ function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_ema
                 * @param string $domain     Site domain.
                 * @param string $path       Site path.
                 * @param string $title      Site title.
-                * @param string $user       User login name.
+                * @param string $user_login User login name.
                 * @param string $user_email User email address.
                 * @param string $key        Activation key created in wpmu_signup_blog().
                 * @param array  $meta       By default, contains the requested privacy setting and lang_id.
                 */
                apply_filters( 'wpmu_signup_blog_notification_subject',
-                       __( '[%1$s] Activate %2$s' ),
-                       $domain, $path, $title, $user, $user_email, $key, $meta
+                       /* translators: New site notification email subject. 1: Network name, 2: New site URL */
+                       _x( '[%1$s] Activate %2$s', 'New site notification email subject' ),
+                       $domain, $path, $title, $user_login, $user_email, $key, $meta
                ),
                $from_name,
                esc_url( 'http://' . $domain . $path )
        );
        wp_mail( $user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
+
+       if ( $switched_locale ) {
+               restore_previous_locale();
+       }
+
        return true;
 }
 
@@ -867,26 +877,29 @@ function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_ema
  *
  * @since MU
  *
- * @param string $user       The user's login name.
+ * @param string $user_login The user's login name.
  * @param string $user_email The user's email address.
  * @param string $key        The activation key created in wpmu_signup_user()
  * @param array  $meta       By default, an empty array.
  * @return bool
  */
-function wpmu_signup_user_notification( $user, $user_email, $key, $meta = array() ) {
+function wpmu_signup_user_notification( $user_login, $user_email, $key, $meta = array() ) {
        /**
         * Filters whether to bypass the email notification for new user sign-up.
         *
         * @since MU
         *
-        * @param string $user       User login name.
+        * @param string $user_login User login name.
         * @param string $user_email User email address.
         * @param string $key        Activation key created in wpmu_signup_user().
         * @param array  $meta       Signup meta data.
         */
-       if ( ! apply_filters( 'wpmu_signup_user_notification', $user, $user_email, $key, $meta ) )
+       if ( ! apply_filters( 'wpmu_signup_user_notification', $user_login, $user_email, $key, $meta ) )
                return false;
 
+       $user = get_user_by( 'login', $user_login );
+       $switched_locale = switch_to_locale( get_user_locale( $user ) );
+
        // Send email with activation link.
        $admin_email = get_site_option( 'admin_email' );
        if ( $admin_email == '' )
@@ -902,14 +915,14 @@ function wpmu_signup_user_notification( $user, $user_email, $key, $meta = array(
                 * @since MU
                 *
                 * @param string $content    Content of the notification email.
-                * @param string $user       User login name.
+                * @param string $user_login User login name.
                 * @param string $user_email User email address.
                 * @param string $key        Activation key created in wpmu_signup_user().
                 * @param array  $meta       Signup meta data.
                 */
                apply_filters( 'wpmu_signup_user_notification_email',
                        __( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login." ),
-                       $user, $user_email, $key, $meta
+                       $user_login, $user_email, $key, $meta
                ),
                site_url( "wp-activate.php?key=$key" )
        );
@@ -921,19 +934,25 @@ function wpmu_signup_user_notification( $user, $user_email, $key, $meta = array(
                 * @since MU
                 *
                 * @param string $subject    Subject of the notification email.
-                * @param string $user       User login name.
+                * @param string $user_login User login name.
                 * @param string $user_email User email address.
                 * @param string $key        Activation key created in wpmu_signup_user().
                 * @param array  $meta       Signup meta data.
                 */
                apply_filters( 'wpmu_signup_user_notification_subject',
-                       __( '[%1$s] Activate %2$s' ),
-                       $user, $user_email, $key, $meta
+                       /* translators: New user notification email subject. 1: Network name, 2: New user login */
+                       _x( '[%1$s] Activate %2$s', 'New user notification email subject' ),
+                       $user_login, $user_email, $key, $meta
                ),
                $from_name,
-               $user
+               $user_login
        );
        wp_mail( $user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
+
+       if ( $switched_locale ) {
+               restore_previous_locale();
+       }
+
        return true;
 }
 
@@ -1092,7 +1111,10 @@ function wpmu_create_user( $user_name, $password, $email ) {
  * @return int|WP_Error Returns WP_Error object on failure, int $blog_id on success
  */
 function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $site_id = 1 ) {
-       $defaults = array( 'public' => 0 );
+       $defaults = array(
+               'public' => 0,
+               'WPLANG' => get_site_option( 'WPLANG' ),
+       );
        $meta = wp_parse_args( $meta, $defaults );
 
        $domain = preg_replace( '/\s+/', '', sanitize_user( $domain, true ) );
@@ -1130,7 +1152,6 @@ function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $s
                        update_option( $key, $value );
        }
 
-       add_option( 'WPLANG', get_site_option( 'WPLANG' ) );
        update_option( 'blog_public', (int) $meta['public'] );
 
        if ( ! is_super_admin( $user_id ) && ! get_user_meta( $user_id, 'primary_blog', true ) )
@@ -1183,6 +1204,7 @@ function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) {
        $siteurl = site_url();
        restore_current_blog();
 
+       /* translators: New site notification email. 1: Site URL, 2: User IP address, 3: Settings screen URL */
        $msg = sprintf( __( 'New Site: %1$s
 URL: %2$s
 Remote IP: %3$s
@@ -1225,6 +1247,7 @@ function newuser_notify_siteadmin( $user_id ) {
        $user = get_userdata( $user_id );
 
        $options_site_url = esc_url(network_admin_url('settings.php'));
+       /* translators: New user notification email. 1: User login, 2: User IP address, 3: Settings screen URL */
        $msg = sprintf(__('New User: %1$s
 Remote IP: %2$s
 
@@ -1332,7 +1355,7 @@ function insert_blog($domain, $path, $site_id) {
  * @param string $blog_title The title of the new site.
  */
 function install_blog( $blog_id, $blog_title = '' ) {
-       global $wpdb, $wp_roles, $current_site;
+       global $wpdb, $wp_roles;
 
        // Cast for security
        $blog_id = (int) $blog_id;
@@ -1361,7 +1384,7 @@ function install_blog( $blog_id, $blog_title = '' ) {
                if ( 'https' === parse_url( get_site_option( 'siteurl' ), PHP_URL_SCHEME ) ) {
                        $siteurl = set_url_scheme( $siteurl, 'https' );
                }
-               if ( 'https' === parse_url( get_home_url( $current_site->blog_id ), PHP_URL_SCHEME ) ) {
+               if ( 'https' === parse_url( get_home_url( get_network()->site_id ), PHP_URL_SCHEME ) ) {
                        $home = set_url_scheme( $home, 'https' );
                }
 
@@ -1373,7 +1396,7 @@ function install_blog( $blog_id, $blog_title = '' ) {
        if ( get_site_option( 'ms_files_rewriting' ) )
                update_option( 'upload_path', UPLOADBLOGSDIR . "/$blog_id/files" );
        else
-               update_option( 'upload_path', get_blog_option( get_current_site()->blog_id, 'upload_path' ) );
+               update_option( 'upload_path', get_blog_option( get_network()->site_id, 'upload_path' ) );
 
        update_option( 'blogname', wp_unslash( $blog_title ) );
        update_option( 'admin_email', '' );
@@ -1428,7 +1451,7 @@ function install_blog_defaults($blog_id, $user_id) {
  * @return bool
  */
 function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta = array() ) {
-       $current_site = get_current_site();
+       $current_network = get_network();
 
        /**
         * Filters whether to bypass the welcome email after site activation.
@@ -1446,6 +1469,10 @@ function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta
        if ( ! apply_filters( 'wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta ) )
                return false;
 
+       $user = get_userdata( $user_id );
+
+       $switched_locale = switch_to_locale( get_user_locale( $user ) );
+
        $welcome_email = get_site_option( 'welcome_email' );
        if ( $welcome_email == false ) {
                /* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */
@@ -1466,9 +1493,8 @@ We hope you enjoy your new site. Thanks!
        }
 
        $url = get_blogaddress_by_id($blog_id);
-       $user = get_userdata( $user_id );
 
-       $welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );
+       $welcome_email = str_replace( 'SITE_NAME', $current_network->site_name, $welcome_email );
        $welcome_email = str_replace( 'BLOG_TITLE', $title, $welcome_email );
        $welcome_email = str_replace( 'BLOG_URL', $url, $welcome_email );
        $welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
@@ -1498,8 +1524,11 @@ We hope you enjoy your new site. Thanks!
        $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
        $message = $welcome_email;
 
-       if ( empty( $current_site->site_name ) )
-               $current_site->site_name = 'WordPress';
+       if ( empty( $current_network->site_name ) )
+               $current_network->site_name = 'WordPress';
+
+       /* translators: New site notification email subject. 1: Network name, 2: New site name */
+       $subject = __( 'New %1$s Site: %2$s' );
 
        /**
         * Filters the subject of the welcome email after site activation.
@@ -1508,8 +1537,13 @@ We hope you enjoy your new site. Thanks!
         *
         * @param string $subject Subject of the email.
         */
-       $subject = apply_filters( 'update_welcome_subject', sprintf( __( 'New %1$s Site: %2$s' ), $current_site->site_name, wp_unslash( $title ) ) );
+       $subject = apply_filters( 'update_welcome_subject', sprintf( $subject, $current_network->site_name, wp_unslash( $title ) ) );
        wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
+
+       if ( $switched_locale ) {
+               restore_previous_locale();
+       }
+
        return true;
 }
 
@@ -1529,7 +1563,7 @@ We hope you enjoy your new site. Thanks!
  * @return bool
  */
 function wpmu_welcome_user_notification( $user_id, $password, $meta = array() ) {
-       $current_site = get_current_site();
+       $current_network = get_network();
 
        /**
         * Filters whether to bypass the welcome email after user activation.
@@ -1549,6 +1583,8 @@ function wpmu_welcome_user_notification( $user_id, $password, $meta = array() )
 
        $user = get_userdata( $user_id );
 
+       $switched_locale = switch_to_locale( get_user_locale( $user ) );
+
        /**
         * Filters the content of the welcome email after user activation.
         *
@@ -1562,7 +1598,7 @@ function wpmu_welcome_user_notification( $user_id, $password, $meta = array() )
         * @param array  $meta          Signup meta data.
         */
        $welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta );
-       $welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );
+       $welcome_email = str_replace( 'SITE_NAME', $current_network->site_name, $welcome_email );
        $welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
        $welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
        $welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email );
@@ -1576,8 +1612,11 @@ function wpmu_welcome_user_notification( $user_id, $password, $meta = array() )
        $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
        $message = $welcome_email;
 
-       if ( empty( $current_site->site_name ) )
-               $current_site->site_name = 'WordPress';
+       if ( empty( $current_network->site_name ) )
+               $current_network->site_name = 'WordPress';
+
+       /* translators: New user notification email subject. 1: Network name, 2: New user login */
+       $subject = __( 'New %1$s User: %2$s' );
 
        /**
         * Filters the subject of the welcome email after user activation.
@@ -1586,8 +1625,13 @@ function wpmu_welcome_user_notification( $user_id, $password, $meta = array() )
         *
         * @param string $subject Subject of the email.
         */
-       $subject = apply_filters( 'update_welcome_user_subject', sprintf( __( 'New %1$s User: %2$s' ), $current_site->site_name, $user->user_login) );
+       $subject = apply_filters( 'update_welcome_user_subject', sprintf( $subject, $current_network->site_name, $user->user_login) );
        wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
+
+       if ( $switched_locale ) {
+               restore_previous_locale();
+       }
+
        return true;
 }
 
@@ -1760,8 +1804,8 @@ function check_upload_mimes( $mimes ) {
  *
  * WordPress MS stores a blog's post count as an option so as
  * to avoid extraneous COUNTs when a blog's details are fetched
- * with get_blog_details(). This function is called when posts
- * are published or unpublished to make sure the count stays current.
+ * with get_site(). This function is called when posts are published
+ * or unpublished to make sure the count stays current.
  *
  * @since MU
  *
@@ -1875,7 +1919,7 @@ function global_terms( $term_id, $deprecated = '' ) {
  * @return array The current site's domain
  */
 function redirect_this_site( $deprecated = '' ) {
-       return array( get_current_site()->domain );
+       return array( get_network()->domain );
 }
 
 /**
@@ -1985,15 +2029,12 @@ function maybe_add_existing_user_to_blog() {
  *
  * @since MU
  *
- * @global int $blog_id
- *
  * @param array $details
  * @return true|WP_Error|void
  */
 function add_existing_user_to_blog( $details = false ) {
-       global $blog_id;
-
        if ( is_array( $details ) ) {
+               $blog_id = get_current_blog_id();
                $result = add_user_to_blog( $blog_id, $details[ 'user_id' ], $details[ 'role' ] );
                /**
                 * Fires immediately after an existing user is added to a site.
@@ -2025,7 +2066,7 @@ function add_new_user_to_blog( $user_id, $password, $meta ) {
        if ( !empty( $meta[ 'add_to_blog' ] ) ) {
                $blog_id = $meta[ 'add_to_blog' ];
                $role = $meta[ 'new_role' ];
-               remove_user_from_blog($user_id, get_current_site()->blog_id); // remove user from main blog.
+               remove_user_from_blog($user_id, get_network()->site_id); // remove user from main blog.
                add_user_to_blog( $blog_id, $user_id, $role );
                update_user_meta( $user_id, 'primary_blog', $blog_id );
        }
@@ -2039,7 +2080,7 @@ function add_new_user_to_blog( $user_id, $password, $meta ) {
  * @param PHPMailer $phpmailer The PHPMailer instance, passed by reference.
  */
 function fix_phpmailer_messageid( $phpmailer ) {
-       $phpmailer->Hostname = get_current_site()->domain;
+       $phpmailer->Hostname = get_network()->domain;
 }
 
 /**
index 9fbaa5fa0d253e5ff7f97ee516e00f58a7b0c25b..cf564990cccfd1b974febeaa452ec3e81e063fa0 100644 (file)
@@ -84,7 +84,7 @@ function ms_site_check() {
        if ( is_super_admin() )
                return true;
 
-       $blog = get_blog_details();
+       $blog = get_site();
 
        if ( '1' == $blog->deleted ) {
                if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) )
@@ -97,7 +97,7 @@ function ms_site_check() {
                if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) {
                        return WP_CONTENT_DIR . '/blog-inactive.php';
                } else {
-                       $admin_email = str_replace( '@', ' AT ', get_site_option( 'admin_email', 'support@' . get_current_site()->domain ) );
+                       $admin_email = str_replace( '@', ' AT ', get_site_option( 'admin_email', 'support@' . get_network()->domain ) );
                        wp_die(
                                /* translators: %s: admin email link */
                                sprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact %s.' ),
@@ -134,35 +134,24 @@ function get_network_by_path( $domain, $path, $segments = null ) {
 }
 
 /**
- * Retrieve an object containing information about the requested network.
- *
- * @since 3.9.0
- *
- * @internal In 4.6.0, converted to use get_network()
+ * Retrieves the closest matching site object by its domain and path.
+ * 
+ * This will not necessarily return an exact match for a domain and path. Instead, it
+ * breaks the domain and path into pieces that are then used to match the closest
+ * possibility from a query.
  *
- * @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 ) {
-       $network = get_network( $network );
-       if ( null === $network ) {
-               return false;
-       }
-
-       return $network;
-}
-
-/**
- * Retrieve a site object by its domain and path.
+ * The intent of this method is to match a site object during bootstrap for a
+ * requested site address
  *
  * @since 3.9.0
+ * @since 4.7.0 Updated to always return a `WP_Site` object.
  *
  * @global wpdb $wpdb WordPress database abstraction object.
  *
  * @param string   $domain   Domain to check.
  * @param string   $path     Path to check.
  * @param int|null $segments Path segments to use. Defaults to null, or the full path.
- * @return object|false Site object if successful. False when no site is found.
+ * @return WP_Site|false Site object if successful. False when no site is found.
  */
 function get_site_by_path( $domain, $path, $segments = null ) {
        $path_segments = array_filter( explode( '/', trim( $path, '/' ) ) );
@@ -205,21 +194,24 @@ function get_site_by_path( $domain, $path, $segments = null ) {
         *
         * @since 3.9.0
         *
-        * @param null|bool|object $site     Site value to return by path.
-        * @param string           $domain   The requested domain.
-        * @param string           $path     The requested path, in full.
-        * @param int|null         $segments The suggested number of paths to consult.
-        *                                   Default null, meaning the entire path was to be consulted.
-        * @param array            $paths    The paths to search for, based on $path and $segments.
+        * @param null|bool|WP_Site $site     Site value to return by path.
+        * @param string            $domain   The requested domain.
+        * @param string            $path     The requested path, in full.
+        * @param int|null          $segments The suggested number of paths to consult.
+        *                                    Default null, meaning the entire path was to be consulted.
+        * @param array             $paths    The paths to search for, based on $path and $segments.
         */
        $pre = apply_filters( 'pre_get_site_by_path', null, $domain, $path, $segments, $paths );
        if ( null !== $pre ) {
+               if ( false !== $pre && ! $pre instanceof WP_Site ) {
+                       $pre = new WP_Site( $pre );
+               }
                return $pre;
        }
 
        /*
         * @todo
-        * get_blog_details(), caching, etc. Consider alternative optimization routes,
+        * caching, etc. Consider alternative optimization routes,
         * perhaps as an opt-in for plugins, rather than using the pre_* filter.
         * For example: The segments filter can expand or ignore paths.
         * If persistent caching is enabled, we could query the DB for a path <> '/'
@@ -251,7 +243,6 @@ function get_site_by_path( $domain, $path, $segments = null ) {
        $site = array_shift( $result );
 
        if ( $site ) {
-               // @todo get_blog_details()
                return $site;
        }
 
@@ -542,3 +533,26 @@ function wpmu_current_site() {
        _deprecated_function( __FUNCTION__, '3.9.0' );
        return $current_site;
 }
+
+/**
+ * Retrieve an object containing information about the requested network.
+ *
+ * @since 3.9.0
+ * @deprecated 4.7.0 Use `get_network()`
+ * @see get_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 ) {
+       _deprecated_function( __FUNCTION__, '4.7.0', 'get_network()' );
+
+       $network = get_network( $network );
+       if ( null === $network ) {
+               return false;
+       }
+
+       return $network;
+}
index 62a66d39ae1d323ce847fd6d2d82b56f13842d4a..889547698526075e825e3eea65e97b2b0d1cf8c9 100644 (file)
@@ -14,32 +14,34 @@ require_once ABSPATH . WPINC . '/class-walker-nav-menu.php';
  * Displays a navigation menu.
  *
  * @since 3.0.0
+ * @since 4.7.0 Added the `item_spacing` argument.
  *
  * @staticvar array $menu_id_slugs
  *
  * @param array $args {
  *     Optional. Array of nav menu arguments.
  *
- *     @type string        $menu            Desired menu. Accepts (matching in order) id, slug, name. Default empty.
- *     @type string        $menu_class      CSS class to use for the ul element which forms the menu. Default 'menu'.
- *     @type string        $menu_id         The ID that is applied to the ul element which forms the menu.
- *                                          Default is the menu slug, incremented.
- *     @type string        $container       Whether to wrap the ul, and what to wrap it with. Default 'div'.
- *     @type string        $container_class Class that is applied to the container. Default 'menu-{menu slug}-container'.
- *     @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 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.
- *     @type string        $theme_location  Theme location to be used. Must be registered with register_nav_menu()
- *                                          in order to be selectable by the user.
- *     @type string        $items_wrap      How the list items should be wrapped. Default is a ul with an id and class.
- *                                          Uses printf() format with numbered placeholders.
+ *     @type int|string|WP_Term $menu            Desired menu. Accepts (matching in order) id, slug, name, menu object. Default empty.
+ *     @type string             $menu_class      CSS class to use for the ul element which forms the menu. Default 'menu'.
+ *     @type string             $menu_id         The ID that is applied to the ul element which forms the menu.
+ *                                               Default is the menu slug, incremented.
+ *     @type string             $container       Whether to wrap the ul, and what to wrap it with. Default 'div'.
+ *     @type string             $container_class Class that is applied to the container. Default 'menu-{menu slug}-container'.
+ *     @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 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.
+ *     @type string             $theme_location  Theme location to be used. Must be registered with register_nav_menu()
+ *                                               in order to be selectable by the user.
+ *     @type string             $items_wrap      How the list items should be wrapped. Default is a ul with an id and class.
+ *                                               Uses printf() format with numbered placeholders.
+ *     @type string             $item_spacing    Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'. Default 'preserve'.
  * }
  * @return object|false|void Menu output if $echo is false, false if there are no items or no menu was found.
  */
@@ -47,10 +49,16 @@ function wp_nav_menu( $args = array() ) {
        static $menu_id_slugs = array();
 
        $defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '',
-       'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
+       'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'item_spacing' => 'preserve',
        'depth' => 0, 'walker' => '', 'theme_location' => '' );
 
        $args = wp_parse_args( $args, $defaults );
+
+       if ( ! in_array( $args['item_spacing'], array( 'preserve', 'discard' ), true ) ) {
+               // invalid value, fall back to default.
+               $args['item_spacing'] = $defaults['item_spacing'];
+       }
+
        /**
         * Filters the arguments used to display a navigation menu.
         *
@@ -75,7 +83,7 @@ function wp_nav_menu( $args = array() ) {
         * @see wp_nav_menu()
         *
         * @param string|null $output Nav menu output to short-circuit with. Default null.
-        * @param object      $args   An object containing wp_nav_menu() arguments.
+        * @param stdClass    $args   An object containing wp_nav_menu() arguments.
         */
        $nav_menu = apply_filters( 'pre_wp_nav_menu', null, $args );
 
@@ -175,8 +183,8 @@ function wp_nav_menu( $args = array() ) {
         *
         * @since 3.1.0
         *
-        * @param array  $sorted_menu_items The menu items, sorted by each menu item's menu order.
-        * @param object $args              An object containing wp_nav_menu() arguments.
+        * @param array    $sorted_menu_items The menu items, sorted by each menu item's menu order.
+        * @param stdClass $args              An object containing wp_nav_menu() arguments.
         */
        $sorted_menu_items = apply_filters( 'wp_nav_menu_objects', $sorted_menu_items, $args );
 
@@ -206,8 +214,8 @@ function wp_nav_menu( $args = array() ) {
         *
         * @see wp_nav_menu()
         *
-        * @param string $items The HTML list content for the menu items.
-        * @param object $args  An object containing wp_nav_menu() arguments.
+        * @param string   $items The HTML list content for the menu items.
+        * @param stdClass $args  An object containing wp_nav_menu() arguments.
         */
        $items = apply_filters( 'wp_nav_menu_items', $items, $args );
        /**
@@ -217,8 +225,8 @@ function wp_nav_menu( $args = array() ) {
         *
         * @see wp_nav_menu()
         *
-        * @param string $items The HTML list content for the menu items.
-        * @param object $args  An object containing wp_nav_menu() arguments.
+        * @param string   $items The HTML list content for the menu items.
+        * @param stdClass $args  An object containing wp_nav_menu() arguments.
         */
        $items = apply_filters( "wp_nav_menu_{$menu->slug}_items", $items, $args );
 
@@ -239,8 +247,8 @@ function wp_nav_menu( $args = array() ) {
         *
         * @see wp_nav_menu()
         *
-        * @param string $nav_menu The HTML content for the navigation menu.
-        * @param object $args     An object containing wp_nav_menu() arguments.
+        * @param string   $nav_menu The HTML content for the navigation menu.
+        * @param stdClass $args     An object containing wp_nav_menu() arguments.
         */
        $nav_menu = apply_filters( 'wp_nav_menu', $nav_menu, $args );
 
@@ -326,6 +334,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
        $possible_object_parents = array_filter( $possible_object_parents );
 
        $front_page_url = home_url();
+       $front_page_id  = (int) get_option( 'page_on_front' );
 
        foreach ( (array) $menu_items as $key => $menu_item ) {
 
@@ -336,6 +345,11 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
                $classes[] = 'menu-item-type-' . $menu_item->type;
                $classes[] = 'menu-item-object-' . $menu_item->object;
 
+               // This menu item is set as the 'Front Page'.
+               if ( 'post_type' === $menu_item->type && $front_page_id === (int) $menu_item->object_id ) {
+                       $classes[] = 'menu-item-home';
+               }
+
                // if the menu item corresponds to a taxonomy term for the currently-queried non-hierarchical post object
                if ( $wp_query->is_singular && 'taxonomy' == $menu_item->type && in_array( $menu_item->object_id, $possible_object_parents ) ) {
                        $active_parent_object_ids[] = (int) $menu_item->object_id;
@@ -368,6 +382,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
                                $classes[] = 'page-item-' . $menu_item->object_id;
                                $classes[] = 'current_page_item';
                        }
+
                        $active_parent_item_ids[] = (int) $menu_item->menu_item_parent;
                        $active_parent_object_ids[] = (int) $menu_item->post_parent;
                        $active_object = $menu_item->object;
@@ -488,10 +503,10 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
  * @uses Walker_Nav_Menu to create HTML list content.
  * @since 3.0.0
  *
- * @param array  $items
- * @param int    $depth
- * @param object $r
- * @return string
+ * @param array    $items The menu items, sorted by each menu item's menu order.
+ * @param int      $depth Depth of the item in reference to parents.
+ * @param stdClass $r     An object containing wp_nav_menu() arguments.
+ * @return string The HTML list content for the menu items.
  */
 function walk_nav_menu_tree( $items, $depth, $r ) {
        $walker = ( empty($r->walker) ) ? new Walker_Nav_Menu : $r->walker;
index ae573c5c3e9a1f8e8eae776864b0266bb9a27b74..30039f420e5d6b280e50b8e4fd389e45d5f2ba77 100644 (file)
@@ -12,8 +12,8 @@
  *
  * @since 3.0.0
  *
- * @param string $menu Menu ID, slug, or name - or the menu object.
- * @return object|false False if $menu param isn't supplied or term does not exist, menu object if successful.
+ * @param int|string|WP_Term $menu Menu ID, slug, or name - or the menu object.
+ * @return WP_Term|false False if $menu param isn't supplied or term does not exist, menu object if successful.
  */
 function wp_get_nav_menu_object( $menu ) {
        $menu_obj = false;
@@ -557,38 +557,6 @@ function wp_get_nav_menus( $args = array() ) {
        return apply_filters( 'wp_get_nav_menus', get_terms( 'nav_menu',  $args), $args );
 }
 
-/**
- * Sort menu items by the desired key.
- *
- * @since 3.0.0
- * @access private
- *
- * @global string $_menu_item_sort_prop
- *
- * @param object $a The first object to compare
- * @param object $b The second object to compare
- * @return int -1, 0, or 1 if $a is considered to be respectively less than, equal to, or greater than $b.
- */
-function _sort_nav_menu_items( $a, $b ) {
-       global $_menu_item_sort_prop;
-
-       if ( empty( $_menu_item_sort_prop ) )
-               return 0;
-
-       if ( ! isset( $a->$_menu_item_sort_prop ) || ! isset( $b->$_menu_item_sort_prop ) )
-               return 0;
-
-       $_a = (int) $a->$_menu_item_sort_prop;
-       $_b = (int) $b->$_menu_item_sort_prop;
-
-       if ( $a->$_menu_item_sort_prop == $b->$_menu_item_sort_prop )
-               return 0;
-       elseif ( $_a == $a->$_menu_item_sort_prop && $_b == $b->$_menu_item_sort_prop )
-               return $_a < $_b ? -1 : 1;
-       else
-               return strcmp( $a->$_menu_item_sort_prop, $b->$_menu_item_sort_prop );
-}
-
 /**
  * Return if a menu item is valid.
  *
@@ -682,8 +650,9 @@ function wp_get_nav_menu_items( $menu, $args = array() ) {
        }
 
        if ( ARRAY_A == $args['output'] ) {
-               $GLOBALS['_menu_item_sort_prop'] = $args['output_key'];
-               usort($items, '_sort_nav_menu_items');
+               $items = wp_list_sort( $items, array(
+                       $args['output_key'] => 'ASC',
+               ) );
                $i = 1;
                foreach ( $items as $k => $item ) {
                        $items[$k]->{$args['output_key']} = $i++;
@@ -747,6 +716,10 @@ function wp_setup_nav_menu_item( $menu_item ) {
                                        $menu_item->_invalid = true;
                                }
 
+                               if ( 'trash' === get_post_status( $menu_item->object_id ) ) {
+                                       $menu_item->_invalid = true;
+                               }
+
                                $menu_item->url = get_permalink( $menu_item->object_id );
 
                                $original_object = get_post( $menu_item->object_id );
@@ -772,7 +745,7 @@ function wp_setup_nav_menu_item( $menu_item ) {
 
                                $menu_item->type_label = __( 'Post Type Archive' );
                                $post_content = wp_trim_words( $menu_item->post_content, 200 );
-                               $post_type_description = '' == $post_content ? $post_type_description : $post_content; 
+                               $post_type_description = '' == $post_content ? $post_type_description : $post_content;
                                $menu_item->url = get_post_type_archive_link( $menu_item->object );
                        } elseif ( 'taxonomy' == $menu_item->type ) {
                                $object = get_taxonomy( $menu_item->object );
index 2f3cdd1e7527be5a3ad5a34892c9a869ff383682..ac17c2f501e1a17f6a45f9863b8621d00c0e1360 100644 (file)
@@ -49,13 +49,16 @@ function get_option( $option, $default = false ) {
         *                               Default false to skip it.
         * @param string     $option     Option name.
         */
-       $pre = apply_filters( 'pre_option_' . $option, false, $option );
+       $pre = apply_filters( "pre_option_{$option}", false, $option );
        if ( false !== $pre )
                return $pre;
 
        if ( defined( 'WP_SETUP_CONFIG' ) )
                return false;
 
+       // Distinguish between `false` as a default, and not passing one.
+       $passed_default = func_num_args() > 1;
+
        if ( ! wp_installing() ) {
                // prevent non-existent options from triggering multiple queries
                $notoptions = wp_cache_get( 'notoptions', 'options' );
@@ -67,12 +70,14 @@ function get_option( $option, $default = false ) {
                         *
                         * @since 3.4.0
                         * @since 4.4.0 The `$option` parameter was added.
+                        * @since 4.7.0 The `$passed_default` parameter was added to distinguish between a `false` value and the default parameter value.
                         *
                         * @param mixed  $default The default value to return if the option does not exist
                         *                        in the database.
                         * @param string $option  Option name.
+                        * @param bool   $passed_default Was `get_option()` passed a default value?
                         */
-                       return apply_filters( 'default_option_' . $option, $default, $option );
+                       return apply_filters( "default_option_{$option}", $default, $option, $passed_default );
                }
 
                $alloptions = wp_load_alloptions();
@@ -97,7 +102,7 @@ function get_option( $option, $default = false ) {
                                        wp_cache_set( 'notoptions', $notoptions, 'options' );
 
                                        /** This filter is documented in wp-includes/option.php */
-                                       return apply_filters( 'default_option_' . $option, $default, $option );
+                                       return apply_filters( 'default_option_' . $option, $default, $option, $passed_default );
                                }
                        }
                }
@@ -109,7 +114,7 @@ function get_option( $option, $default = false ) {
                        $value = $row->option_value;
                } else {
                        /** This filter is documented in wp-includes/option.php */
-                       return apply_filters( 'default_option_' . $option, $default, $option );
+                       return apply_filters( 'default_option_' . $option, $default, $option, $passed_default );
                }
        }
 
@@ -133,7 +138,7 @@ function get_option( $option, $default = false ) {
         *                       unserialized prior to being returned.
         * @param string $option Option name.
         */
-       return apply_filters( 'option_' . $option, maybe_unserialize( $value ), $option );
+       return apply_filters( "option_{$option}", maybe_unserialize( $value ), $option );
 }
 
 /**
@@ -277,7 +282,7 @@ function update_option( $option, $value, $autoload = null ) {
         * @param mixed  $old_value The old option value.
         * @param string $option    Option name.
         */
-       $value = apply_filters( 'pre_update_option_' . $option, $value, $old_value, $option );
+       $value = apply_filters( "pre_update_option_{$option}", $value, $old_value, $option );
 
        /**
         * Filters an option before its value is (maybe) serialized and updated.
@@ -295,7 +300,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, $option ) === $old_value ) {
+       if ( apply_filters( 'default_option_' . $option, false, $option, false ) === $old_value ) {
                // Default setting for new options is 'yes'.
                if ( null === $autoload ) {
                        $autoload = 'yes';
@@ -416,7 +421,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, $option ) !== get_option( $option ) )
+               if ( apply_filters( 'default_option_' . $option, false, $option, false ) !== get_option( $option ) )
                        return false;
 
        $serialized_value = maybe_serialize( $value );
@@ -534,7 +539,7 @@ function delete_option( $option ) {
                 *
                 * @param string $option Name of the deleted option.
                 */
-               do_action( "delete_option_$option", $option );
+               do_action( "delete_option_{$option}", $option );
 
                /**
                 * Fires after an option has been deleted.
@@ -568,7 +573,7 @@ function delete_transient( $transient ) {
         *
         * @param string $transient Transient name.
         */
-       do_action( 'delete_transient_' . $transient, $transient );
+       do_action( "delete_transient_{$transient}", $transient );
 
        if ( wp_using_ext_object_cache() ) {
                $result = wp_cache_delete( $transient, 'transient' );
@@ -624,7 +629,7 @@ function get_transient( $transient ) {
         *                              of the transient, and return the returned value.
         * @param string $transient     Transient name.
         */
-       $pre = apply_filters( 'pre_transient_' . $transient, false, $transient );
+       $pre = apply_filters( "pre_transient_{$transient}", false, $transient );
        if ( false !== $pre )
                return $pre;
 
@@ -661,7 +666,7 @@ function get_transient( $transient ) {
         * @param mixed  $value     Value of transient.
         * @param string $transient Transient name.
         */
-       return apply_filters( 'transient_' . $transient, $value, $transient );
+       return apply_filters( "transient_{$transient}", $value, $transient );
 }
 
 /**
@@ -696,7 +701,7 @@ function set_transient( $transient, $value, $expiration = 0 ) {
         * @param int    $expiration Time until expiration in seconds.
         * @param string $transient  Transient name.
         */
-       $value = apply_filters( 'pre_set_transient_' . $transient, $value, $expiration, $transient );
+       $value = apply_filters( "pre_set_transient_{$transient}", $value, $expiration, $transient );
 
        /**
         * Filters the expiration for a transient before its value is set.
@@ -709,7 +714,7 @@ function set_transient( $transient, $value, $expiration = 0 ) {
         * @param mixed  $value      New value of transient.
         * @param string $transient  Transient name.
         */
-       $expiration = apply_filters( 'expiration_of_transient_' . $transient, $expiration, $value, $transient );
+       $expiration = apply_filters( "expiration_of_transient_{$transient}", $expiration, $value, $transient );
 
        if ( wp_using_ext_object_cache() ) {
                $result = wp_cache_set( $transient, $value, 'transient', $expiration );
@@ -758,7 +763,7 @@ function set_transient( $transient, $value, $expiration = 0 ) {
                 * @param int    $expiration Time until expiration in seconds.
                 * @param string $transient  The name of the transient.
                 */
-               do_action( 'set_transient_' . $transient, $value, $expiration, $transient );
+               do_action( "set_transient_{$transient}", $value, $expiration, $transient );
 
                /**
                 * Fires after the value for a transient has been set.
@@ -786,7 +791,7 @@ function set_transient( $transient, $value, $expiration = 0 ) {
  */
 function wp_user_settings() {
 
-       if ( ! is_admin() || defined( 'DOING_AJAX' ) ) {
+       if ( ! is_admin() || wp_doing_ajax() ) {
                return;
        }
 
@@ -1069,8 +1074,7 @@ function update_site_option( $option, $value ) {
  *
  * @see get_option()
  *
- * @global wpdb   $wpdb
- * @global object $current_site
+ * @global wpdb $wpdb
  *
  * @param int      $network_id ID of the network. Can be null to default to the current network ID.
  * @param string   $option     Name of option to retrieve. Expected to not be SQL-escaped.
@@ -1078,7 +1082,7 @@ function update_site_option( $option, $value ) {
  * @return mixed Value set for the option.
  */
 function get_network_option( $network_id, $option, $default = false ) {
-       global $wpdb, $current_site;
+       global $wpdb;
 
        if ( $network_id && ! is_numeric( $network_id ) ) {
                return false;
@@ -1087,8 +1091,8 @@ function get_network_option( $network_id, $option, $default = false ) {
        $network_id = (int) $network_id;
 
        // Fallback to the current network if a network ID is not specified.
-       if ( ! $network_id && is_multisite() ) {
-               $network_id = $current_site->id;
+       if ( ! $network_id ) {
+               $network_id = get_current_network_id();
        }
 
        /**
@@ -1101,12 +1105,14 @@ function get_network_option( $network_id, $option, $default = false ) {
         *
         * @since 2.9.0 As 'pre_site_option_' . $key
         * @since 3.0.0
-        * @since 4.4.0 The `$option` parameter was added
+        * @since 4.4.0 The `$option` parameter was added.
+        * @since 4.7.0 The `$network_id` parameter was added.
         *
         * @param mixed  $pre_option The default value to return if the option does not exist.
         * @param string $option     Option name.
+        * @param int    $network_id ID of the network.
         */
-       $pre = apply_filters( 'pre_site_option_' . $option, false, $option );
+       $pre = apply_filters( "pre_site_option_{$option}", false, $option, $network_id );
 
        if ( false !== $pre ) {
                return $pre;
@@ -1125,17 +1131,19 @@ function get_network_option( $network_id, $option, $default = false ) {
                 *
                 * @since 3.4.0
                 * @since 4.4.0 The `$option` parameter was added.
+                * @since 4.7.0 The `$network_id` parameter was added.
                 *
-                * @param mixed  $default The value to return if the site option does not exist
-                *                        in the database.
-                * @param string $option  Option name.
+                * @param mixed  $default    The value to return if the site option does not exist
+                *                           in the database.
+                * @param string $option     Option name.
+                * @param int    $network_id ID of the network.
                 */
-               return apply_filters( 'default_site_option_' . $option, $default, $option );
+               return apply_filters( "default_site_option_{$option}", $default, $option, $network_id );
        }
 
        if ( ! is_multisite() ) {
                /** This filter is documented in wp-includes/option.php */
-               $default = apply_filters( 'default_site_option_' . $option, $default, $option );
+               $default = apply_filters( 'default_site_option_' . $option, $default, $option, $network_id );
                $value = get_option( $option, $default );
        } else {
                $cache_key = "$network_id:$option";
@@ -1157,7 +1165,7 @@ function get_network_option( $network_id, $option, $default = false ) {
                                wp_cache_set( $notoptions_key, $notoptions, 'site-options' );
 
                                /** This filter is documented in wp-includes/option.php */
-                               $value = apply_filters( 'default_site_option_' . $option, $default, $option );
+                               $value = apply_filters( 'default_site_option_' . $option, $default, $option, $network_id );
                        }
                }
        }
@@ -1169,12 +1177,14 @@ function get_network_option( $network_id, $option, $default = false ) {
         *
         * @since 2.9.0 As 'site_option_' . $key
         * @since 3.0.0
-        * @since 4.4.0 The `$option` parameter was added
+        * @since 4.4.0 The `$option` parameter was added.
+        * @since 4.7.0 The `$network_id` parameter was added.
         *
-        * @param mixed  $value  Value of network option.
-        * @param string $option Option name.
+        * @param mixed  $value      Value of network option.
+        * @param string $option     Option name.
+        * @param int    $network_id ID of the network.
         */
-       return apply_filters( 'site_option_' . $option, $value, $option );
+       return apply_filters( "site_option_{$option}", $value, $option, $network_id );
 }
 
 /**
@@ -1186,8 +1196,7 @@ function get_network_option( $network_id, $option, $default = false ) {
  *
  * @see add_option()
  *
- * @global wpdb   $wpdb
- * @global object $current_site
+ * @global wpdb $wpdb
  *
  * @param int    $network_id ID of the network. Can be null to default to the current network ID.
  * @param string $option     Name of option to add. Expected to not be SQL-escaped.
@@ -1195,7 +1204,7 @@ function get_network_option( $network_id, $option, $default = false ) {
  * @return bool False if option was not added and true if option was added.
  */
 function add_network_option( $network_id, $option, $value ) {
-       global $wpdb, $current_site;
+       global $wpdb;
 
        if ( $network_id && ! is_numeric( $network_id ) ) {
                return false;
@@ -1204,8 +1213,8 @@ function add_network_option( $network_id, $option, $value ) {
        $network_id = (int) $network_id;
 
        // Fallback to the current network if a network ID is not specified.
-       if ( ! $network_id && is_multisite() ) {
-               $network_id = $current_site->id;
+       if ( ! $network_id ) {
+               $network_id = get_current_network_id();
        }
 
        wp_protect_special_option( $option );
@@ -1217,12 +1226,14 @@ function add_network_option( $network_id, $option, $value ) {
         *
         * @since 2.9.0 As 'pre_add_site_option_' . $key
         * @since 3.0.0
-        * @since 4.4.0 The `$option` parameter was added
+        * @since 4.4.0 The `$option` parameter was added.
+        * @since 4.7.0 The `$network_id` parameter was added.
         *
-        * @param mixed  $value  Value of network option.
-        * @param string $option Option name.
+        * @param mixed  $value      Value of network option.
+        * @param string $option     Option name.
+        * @param int    $network_id ID of the network.
         */
-       $value = apply_filters( 'pre_add_site_option_' . $option, $value, $option );
+       $value = apply_filters( "pre_add_site_option_{$option}", $value, $option, $network_id );
 
        $notoptions_key = "$network_id:notoptions";
 
@@ -1267,21 +1278,25 @@ function add_network_option( $network_id, $option, $value ) {
                 *
                 * @since 2.9.0 As "add_site_option_{$key}"
                 * @since 3.0.0
+                * @since 4.7.0 The `$network_id` parameter was added.
                 *
-                * @param string $option Name of the network option.
-                * @param mixed  $value  Value of the network option.
+                * @param string $option     Name of the network option.
+                * @param mixed  $value      Value of the network option.
+                * @param int    $network_id ID of the network.
                 */
-               do_action( 'add_site_option_' . $option, $option, $value );
+               do_action( "add_site_option_{$option}", $option, $value, $network_id );
 
                /**
                 * Fires after a network option has been successfully added.
                 *
                 * @since 3.0.0
+                * @since 4.7.0 The `$network_id` parameter was added.
                 *
-                * @param string $option Name of the network option.
-                * @param mixed  $value  Value of the network option.
+                * @param string $option     Name of the network option.
+                * @param mixed  $value      Value of the network option.
+                * @param int    $network_id ID of the network.
                 */
-               do_action( 'add_site_option', $option, $value );
+               do_action( 'add_site_option', $option, $value, $network_id );
 
                return true;
        }
@@ -1296,15 +1311,14 @@ function add_network_option( $network_id, $option, $value ) {
  *
  * @see delete_option()
  *
- * @global wpdb   $wpdb
- * @global object $current_site
+ * @global wpdb $wpdb
  *
  * @param int    $network_id ID of the network. Can be null to default to the current network ID.
  * @param string $option     Name of option to remove. Expected to not be SQL-escaped.
  * @return bool True, if succeed. False, if failure.
  */
 function delete_network_option( $network_id, $option ) {
-       global $wpdb, $current_site;
+       global $wpdb;
 
        if ( $network_id && ! is_numeric( $network_id ) ) {
                return false;
@@ -1313,8 +1327,8 @@ function delete_network_option( $network_id, $option ) {
        $network_id = (int) $network_id;
 
        // Fallback to the current network if a network ID is not specified.
-       if ( ! $network_id && is_multisite() ) {
-               $network_id = $current_site->id;
+       if ( ! $network_id ) {
+               $network_id = get_current_network_id();
        }
 
        /**
@@ -1323,11 +1337,13 @@ function delete_network_option( $network_id, $option ) {
         * The dynamic portion of the hook name, `$option`, refers to the option name.
         *
         * @since 3.0.0
-        * @since 4.4.0 The `$option` parameter was added
+        * @since 4.4.0 The `$option` parameter was added.
+        * @since 4.7.0 The `$network_id` parameter was added.
         *
-        * @param string $option Option name.
+        * @param string $option     Option name.
+        * @param int    $network_id ID of the network.
         */
-       do_action( 'pre_delete_site_option_' . $option, $option );
+       do_action( "pre_delete_site_option_{$option}", $option, $network_id );
 
        if ( ! is_multisite() ) {
                $result = delete_option( $option );
@@ -1351,19 +1367,23 @@ function delete_network_option( $network_id, $option ) {
                 *
                 * @since 2.9.0 As "delete_site_option_{$key}"
                 * @since 3.0.0
+                * @since 4.7.0 The `$network_id` parameter was added.
                 *
-                * @param string $option Name of the network option.
+                * @param string $option     Name of the network option.
+                * @param int    $network_id ID of the network.
                 */
-               do_action( 'delete_site_option_' . $option, $option );
+               do_action( "delete_site_option_{$option}", $option, $network_id );
 
                /**
                 * Fires after a network option has been deleted.
                 *
                 * @since 3.0.0
+                * @since 4.7.0 The `$network_id` parameter was added.
                 *
-                * @param string $option Name of the network option.
+                * @param string $option     Name of the network option.
+                * @param int    $network_id ID of the network.
                 */
-               do_action( 'delete_site_option', $option );
+               do_action( 'delete_site_option', $option, $network_id );
 
                return true;
        }
@@ -1378,8 +1398,7 @@ function delete_network_option( $network_id, $option ) {
  *
  * @see update_option()
  *
- * @global wpdb   $wpdb
- * @global object $current_site
+ * @global wpdb $wpdb
  *
  * @param int      $network_id ID of the network. Can be null to default to the current network ID.
  * @param string   $option     Name of option. Expected to not be SQL-escaped.
@@ -1387,7 +1406,7 @@ function delete_network_option( $network_id, $option ) {
  * @return bool False if value was not updated and true if value was updated.
  */
 function update_network_option( $network_id, $option, $value ) {
-       global $wpdb, $current_site;
+       global $wpdb;
 
        if ( $network_id && ! is_numeric( $network_id ) ) {
                return false;
@@ -1396,8 +1415,8 @@ function update_network_option( $network_id, $option, $value ) {
        $network_id = (int) $network_id;
 
        // Fallback to the current network if a network ID is not specified.
-       if ( ! $network_id && is_multisite() ) {
-               $network_id = $current_site->id;
+       if ( ! $network_id ) {
+               $network_id = get_current_network_id();
        }
 
        wp_protect_special_option( $option );
@@ -1411,13 +1430,15 @@ function update_network_option( $network_id, $option, $value ) {
         *
         * @since 2.9.0 As 'pre_update_site_option_' . $key
         * @since 3.0.0
-        * @since 4.4.0 The `$option` parameter was added
+        * @since 4.4.0 The `$option` parameter was added.
+        * @since 4.7.0 The `$network_id` parameter was added.
         *
-        * @param mixed  $value     New value of the network option.
-        * @param mixed  $old_value Old value of the network option.
-        * @param string $option    Option name.
+        * @param mixed  $value      New value of the network option.
+        * @param mixed  $old_value  Old value of the network option.
+        * @param string $option     Option name.
+        * @param int    $network_id ID of the network.
         */
-       $value = apply_filters( 'pre_update_site_option_' . $option, $value, $old_value, $option );
+       $value = apply_filters( "pre_update_site_option_{$option}", $value, $old_value, $option, $network_id );
 
        if ( $value === $old_value ) {
                return false;
@@ -1457,23 +1478,27 @@ function update_network_option( $network_id, $option, $value ) {
                 *
                 * @since 2.9.0 As "update_site_option_{$key}"
                 * @since 3.0.0
+                * @since 4.7.0 The `$network_id` parameter was added.
                 *
-                * @param string $option    Name of the network option.
-                * @param mixed  $value     Current value of the network option.
-                * @param mixed  $old_value Old value of the network option.
+                * @param string $option     Name of the network option.
+                * @param mixed  $value      Current value of the network option.
+                * @param mixed  $old_value  Old value of the network option.
+                * @param int    $network_id ID of the network.
                 */
-               do_action( 'update_site_option_' . $option, $option, $value, $old_value );
+               do_action( "update_site_option_{$option}", $option, $value, $old_value, $network_id );
 
                /**
                 * Fires after the value of a network option has been successfully updated.
                 *
                 * @since 3.0.0
+                * @since 4.7.0 The `$network_id` parameter was added.
                 *
-                * @param string $option    Name of the network option.
-                * @param mixed  $value     Current value of the network option.
-                * @param mixed  $old_value Old value of the network option.
+                * @param string $option     Name of the network option.
+                * @param mixed  $value      Current value of the network option.
+                * @param mixed  $old_value  Old value of the network option.
+                * @param int    $network_id ID of the network.
                 */
-               do_action( 'update_site_option', $option, $value, $old_value );
+               do_action( 'update_site_option', $option, $value, $old_value, $network_id );
 
                return true;
        }
@@ -1500,7 +1525,7 @@ function delete_site_transient( $transient ) {
         *
         * @param string $transient Transient name.
         */
-       do_action( 'delete_site_transient_' . $transient, $transient );
+       do_action( "delete_site_transient_{$transient}", $transient );
 
        if ( wp_using_ext_object_cache() ) {
                $result = wp_cache_delete( $transient, 'site-transient' );
@@ -1557,7 +1582,7 @@ function get_site_transient( $transient ) {
         *                                   of the transient, and return the returned value.
         * @param string $transient          Transient name.
         */
-       $pre = apply_filters( 'pre_site_transient_' . $transient, false, $transient );
+       $pre = apply_filters( "pre_site_transient_{$transient}", false, $transient );
 
        if ( false !== $pre )
                return $pre;
@@ -1593,7 +1618,7 @@ function get_site_transient( $transient ) {
         * @param mixed  $value     Value of site transient.
         * @param string $transient Transient name.
         */
-       return apply_filters( 'site_transient_' . $transient, $value, $transient );
+       return apply_filters( "site_transient_{$transient}", $value, $transient );
 }
 
 /**
@@ -1625,7 +1650,7 @@ function set_site_transient( $transient, $value, $expiration = 0 ) {
         * @param mixed  $value     New value of site transient.
         * @param string $transient Transient name.
         */
-       $value = apply_filters( 'pre_set_site_transient_' . $transient, $value, $transient );
+       $value = apply_filters( "pre_set_site_transient_{$transient}", $value, $transient );
 
        $expiration = (int) $expiration;
 
@@ -1640,7 +1665,7 @@ function set_site_transient( $transient, $value, $expiration = 0 ) {
         * @param mixed  $value      New value of site transient.
         * @param string $transient  Transient name.
         */
-       $expiration = apply_filters( 'expiration_of_site_transient_' . $transient, $expiration, $value, $transient );
+       $expiration = apply_filters( "expiration_of_site_transient_{$transient}", $expiration, $value, $transient );
 
        if ( wp_using_ext_object_cache() ) {
                $result = wp_cache_set( $transient, $value, 'site-transient', $expiration );
@@ -1671,7 +1696,7 @@ function set_site_transient( $transient, $value, $expiration = 0 ) {
                 * @param int    $expiration Time until expiration in seconds.
                 * @param string $transient  Transient name.
                 */
-               do_action( 'set_site_transient_' . $transient, $value, $expiration, $transient );
+               do_action( "set_site_transient_{$transient}", $value, $expiration, $transient );
 
                /**
                 * Fires after the value for a site transient has been set.
@@ -1686,3 +1711,302 @@ function set_site_transient( $transient, $value, $expiration = 0 ) {
        }
        return $result;
 }
+
+/**
+ * Register default settings available in WordPress.
+ *
+ * The settings registered here are primarily useful for the REST API, so this
+ * does not encompass all settings available in WordPress.
+ *
+ * @since 4.7.0
+ */
+function register_initial_settings() {
+       register_setting( 'general', 'blogname', array(
+               'show_in_rest' => array(
+                       'name' => 'title',
+               ),
+               'type'         => 'string',
+               'description'  => __( 'Site title.' ),
+       ) );
+
+       register_setting( 'general', 'blogdescription', array(
+               'show_in_rest' => array(
+                       'name' => 'description',
+               ),
+               'type'         => 'string',
+               'description'  => __( 'Site tagline.' ),
+       ) );
+
+       if ( ! is_multisite() ) {
+               register_setting( 'general', 'siteurl', array(
+                       'show_in_rest' => array(
+                               'name'    => 'url',
+                               'schema'  => array(
+                                       'format' => 'uri',
+                               ),
+                       ),
+                       'type'         => 'string',
+                       'description'  => __( 'Site URL.' ),
+               ) );
+       }
+
+       if ( ! is_multisite() ) {
+               register_setting( 'general', 'admin_email', array(
+                       'show_in_rest' => array(
+                               'name'    => 'email',
+                               'schema'  => array(
+                                       'format' => 'email',
+                               ),
+                       ),
+                       'type'         => 'string',
+                       'description'  => __( 'This address is used for admin purposes, like new user notification.' ),
+               ) );
+       }
+
+       register_setting( 'general', 'timezone_string', array(
+               'show_in_rest' => array(
+                       'name' => 'timezone',
+               ),
+               'type'         => 'string',
+               'description'  => __( 'A city in the same timezone as you.' ),
+       ) );
+
+       register_setting( 'general', 'date_format', array(
+               'show_in_rest' => true,
+               'type'         => 'string',
+               'description'  => __( 'A date format for all date strings.' ),
+       ) );
+
+       register_setting( 'general', 'time_format', array(
+               'show_in_rest' => true,
+               'type'         => 'string',
+               'description'  => __( 'A time format for all time strings.' ),
+       ) );
+
+       register_setting( 'general', 'start_of_week', array(
+               'show_in_rest' => true,
+               'type'         => 'integer',
+               'description'  => __( 'A day number of the week that the week should start on.' ),
+       ) );
+
+       register_setting( 'general', 'WPLANG', array(
+               'show_in_rest' => array(
+                       'name' => 'language',
+               ),
+               'type'         => 'string',
+               'description'  => __( 'WordPress locale code.' ),
+               'default'      => 'en_US',
+       ) );
+
+       register_setting( 'writing', 'use_smilies', array(
+               'show_in_rest' => true,
+               'type'         => 'boolean',
+               'description'  => __( 'Convert emoticons like :-) and :-P to graphics on display.' ),
+               'default'      => true,
+       ) );
+
+       register_setting( 'writing', 'default_category', array(
+               'show_in_rest' => true,
+               'type'         => 'integer',
+               'description'  => __( 'Default post category.' ),
+       ) );
+
+       register_setting( 'writing', 'default_post_format', array(
+               'show_in_rest' => true,
+               'type'         => 'string',
+               'description'  => __( 'Default post format.' ),
+       ) );
+
+       register_setting( 'reading', 'posts_per_page', array(
+               'show_in_rest' => true,
+               'type'         => 'integer',
+               'description'  => __( 'Blog pages show at most.' ),
+               'default'      => 10,
+       ) );
+
+       register_setting( 'discussion', 'default_ping_status', array(
+               'show_in_rest' => array(
+                       'schema'   => array(
+                               'enum' => array( 'open', 'closed' ),
+                       ),
+               ),
+               'type'         => 'string',
+               'description'  => __( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.' ),
+       ) );
+
+       register_setting( 'discussion', 'default_comment_status', array(
+               'show_in_rest' => array(
+                       'schema'   => array(
+                               'enum' => array( 'open', 'closed' ),
+                       ),
+               ),
+               'type'         => 'string',
+               'description'  => __( 'Allow people to post comments on new articles.' ),
+       ) );
+
+}
+
+/**
+ * Register a setting and its data.
+ *
+ * @since 2.7.0
+ * @since 4.7.0 `$args` can be passed to set flags on the setting, similar to `register_meta()`.
+ *
+ * @global array $new_whitelist_options
+ * @global array $wp_registered_settings
+ *
+ * @param string $option_group A settings group name. Should correspond to a whitelisted option key name.
+ *     Default whitelisted option key names include "general," "discussion," and "reading," among others.
+ * @param string $option_name The name of an option to sanitize and save.
+ * @param array  $args {
+ *     Data used to describe the setting when registered.
+ *
+ *     @type string   $type              The type of data associated with this setting.
+ *     @type string   $description       A description of the data attached to this setting.
+ *     @type callable $sanitize_callback A callback function that sanitizes the option's value.
+ *     @type bool     $show_in_rest      Whether data associated with this setting should be included in the REST API.
+ *     @type mixed    $default           Default value when calling `get_option()`.
+ * }
+ */
+function register_setting( $option_group, $option_name, $args = array() ) {
+       global $new_whitelist_options, $wp_registered_settings;
+
+       $defaults = array(
+               'type'              => 'string',
+               'group'             => $option_group,
+               'description'       => '',
+               'sanitize_callback' => null,
+               'show_in_rest'      => false,
+       );
+
+       // Back-compat: old sanitize callback is added.
+       if ( is_callable( $args ) ) {
+               $args = array(
+                       'sanitize_callback' => $args,
+               );
+       }
+
+       /**
+        * Filters the registration arguments when registering a setting.
+        *
+        * @since 4.7.0
+        *
+        * @param array  $args         Array of setting registration arguments.
+        * @param array  $defaults     Array of default arguments.
+        * @param string $option_group Setting group.
+        * @param string $option_name  Setting name.
+        */
+       $args = apply_filters( 'register_setting_args', $args, $defaults, $option_group, $option_name );
+       $args = wp_parse_args( $args, $defaults );
+
+       if ( ! is_array( $wp_registered_settings ) ) {
+               $wp_registered_settings = array();
+       }
+
+       if ( 'misc' == $option_group ) {
+               _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.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
+               $option_group = 'reading';
+       }
+
+       $new_whitelist_options[ $option_group ][] = $option_name;
+       if ( ! empty( $args['sanitize_callback'] ) ) {
+               add_filter( "sanitize_option_{$option_name}", $args['sanitize_callback'] );
+       }
+       if ( array_key_exists( 'default', $args ) ) {
+               add_filter( "default_option_{$option_name}", 'filter_default_option', 10, 3 );
+       }
+
+       $wp_registered_settings[ $option_name ] = $args;
+}
+
+/**
+ * Unregister a setting.
+ *
+ * @since 2.7.0
+ * @since 4.7.0 `$sanitize_callback` was deprecated. The callback from `register_setting()` is now used instead.
+ *
+ * @global array $new_whitelist_options
+ *
+ * @param string   $option_group      The settings group name used during registration.
+ * @param string   $option_name       The name of the option to unregister.
+ * @param callable $deprecated        Deprecated.
+ */
+function unregister_setting( $option_group, $option_name, $deprecated = '' ) {
+       global $new_whitelist_options, $wp_registered_settings;
+
+       if ( 'misc' == $option_group ) {
+               _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.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
+               $option_group = 'reading';
+       }
+
+       $pos = array_search( $option_name, (array) $new_whitelist_options[ $option_group ] );
+       if ( $pos !== false ) {
+               unset( $new_whitelist_options[ $option_group ][ $pos ] );
+       }
+       if ( '' !== $deprecated ) {
+               _deprecated_argument( __FUNCTION__, '4.7.0', __( '$sanitize_callback is deprecated. The callback from register_setting() is used instead.' ) );
+               remove_filter( "sanitize_option_{$option_name}", $deprecated );
+       }
+
+       if ( isset( $wp_registered_settings[ $option_name ] ) ) {
+               // Remove the sanitize callback if one was set during registration.
+               if ( ! empty( $wp_registered_settings[ $option_name ]['sanitize_callback'] ) ) {
+                       remove_filter( "sanitize_option_{$option_name}", $wp_registered_settings[ $option_name ]['sanitize_callback'] );
+               }
+
+               unset( $wp_registered_settings[ $option_name ] );
+       }
+}
+
+/**
+ * Retrieves an array of registered settings.
+ *
+ * @since 4.7.0
+ *
+ * @return array List of registered settings, keyed by option name.
+ */
+function get_registered_settings() {
+       global $wp_registered_settings;
+
+       if ( ! is_array( $wp_registered_settings ) ) {
+               return array();
+       }
+
+       return $wp_registered_settings;
+}
+
+/**
+ * Filter the default value for the option.
+ *
+ * For settings which register a default setting in `register_setting()`, this
+ * function is added as a filter to `default_option_{$option}`.
+ *
+ * @since 4.7.0
+ *
+ * @param mixed $default Existing default value to return.
+ * @param string $option Option name.
+ * @param bool $passed_default Was `get_option()` passed a default value?
+ * @return mixed Filtered default value.
+ */
+function filter_default_option( $default, $option, $passed_default ) {
+       if ( $passed_default ) {
+               return $default;
+       }
+
+       $registered = get_registered_settings();
+       if ( empty( $registered[ $option ] ) ) {
+               return $default;
+       }
+
+       return $registered[ $option ]['default'];
+}
index 5c7747774b2d6e519bd2ad07bf445b67b49c438f..0c5106221e9ee4e6e43985cf9fb254d238b5c92f 100644 (file)
@@ -472,16 +472,17 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
        } catch ( phpmailerException $e ) {
 
                $mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
+               $mail_error_data['phpmailer_exception_code'] = $e->getCode();
 
                /**
                 * Fires after a phpmailerException is caught.
                 *
                 * @since 4.4.0
                 *
-                * @param WP_Error $error A WP_Error object with the phpmailerException code, message, and an array
+                * @param WP_Error $error A WP_Error object with the phpmailerException message, and an array
                 *                        containing the mail recipient, subject, message, headers, and attachments.
                 */
-               do_action( 'wp_mail_failed', new WP_Error( $e->getCode(), $e->getMessage(), $mail_error_data ) );
+               do_action( 'wp_mail_failed', new WP_Error( 'wp_mail_failed', $e->getMessage(), $mail_error_data ) );
 
                return false;
        }
@@ -603,7 +604,7 @@ function wp_validate_auth_cookie($cookie = '', $scheme = '') {
        $expired = $expiration = $cookie_elements['expiration'];
 
        // Allow a grace period for POST and Ajax requests
-       if ( defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD'] ) {
+       if ( wp_doing_ajax() || 'POST' == $_SERVER['REQUEST_METHOD'] ) {
                $expired += HOUR_IN_SECONDS;
        }
 
@@ -1081,6 +1082,10 @@ if ( !function_exists('check_ajax_referer') ) :
  *                   0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.
  */
 function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) {
+       if ( -1 == $action ) {
+               _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '4.7' );
+       }
+
        $nonce = '';
 
        if ( $query_arg && isset( $_REQUEST[ $query_arg ] ) )
@@ -1104,8 +1109,8 @@ function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) {
        do_action( 'check_ajax_referer', $action, $result );
 
        if ( $die && false === $result ) {
-               if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
-                       wp_die( -1 );
+               if ( wp_doing_ajax() ) {
+                       wp_die( -1, 403 );
                } else {
                        die( '-1' );
                }
@@ -1128,7 +1133,7 @@ if ( !function_exists('wp_redirect') ) :
  * 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 ) {
+ *     if ( wp_redirect( $url ) {
  *         exit;
  *     }
  *
@@ -1414,6 +1419,8 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
                $emails = array_flip( $emails );
        }
 
+       $switched_locale = switch_to_locale( get_locale() );
+
        $comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
 
        // The blogname option is escaped with esc_html on the way into the database in sanitize_option
@@ -1423,8 +1430,9 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
 
        switch ( $comment->comment_type ) {
                case 'trackback':
+                       /* translators: 1: Post title */
                        $notify_message  = sprintf( __( 'New trackback on your post "%s"' ), $post->post_title ) . "\r\n";
-                       /* translators: 1: website name, 2: website IP, 3: website hostname */
+                       /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
                        $notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
                        $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
@@ -1433,8 +1441,9 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
                        $subject = sprintf( __('[%1$s] Trackback: "%2$s"'), $blogname, $post->post_title );
                        break;
                case 'pingback':
+                       /* translators: 1: Post title */
                        $notify_message  = sprintf( __( 'New pingback on your post "%s"' ), $post->post_title ) . "\r\n";
-                       /* translators: 1: website name, 2: website IP, 3: website hostname */
+                       /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
                        $notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
                        $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
@@ -1518,6 +1527,10 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
                @wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
        }
 
+       if ( $switched_locale ) {
+               restore_previous_locale();
+       }
+
        return true;
 }
 endif;
@@ -1565,6 +1578,8 @@ function wp_notify_moderator($comment_id) {
                        $emails[] = $user->user_email;
        }
 
+       $switched_locale = switch_to_locale( get_locale() );
+
        $comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
        $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
 
@@ -1575,44 +1590,60 @@ function wp_notify_moderator($comment_id) {
 
        switch ( $comment->comment_type ) {
                case 'trackback':
+                       /* translators: 1: Post title */
                        $notify_message  = sprintf( __('A new trackback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
                        $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
-                       /* translators: 1: website name, 2: website IP, 3: website hostname */
+                       /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
                        $notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
+                       /* translators: 1: Trackback/pingback/comment author URL */
                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
                        $notify_message .= __('Trackback excerpt: ') . "\r\n" . $comment_content . "\r\n\r\n";
                        break;
                case 'pingback':
+                       /* translators: 1: Post title */
                        $notify_message  = sprintf( __('A new pingback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
                        $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
-                       /* translators: 1: website name, 2: website IP, 3: website hostname */
+                       /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
                        $notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
+                       /* translators: 1: Trackback/pingback/comment author URL */
                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
                        $notify_message .= __('Pingback excerpt: ') . "\r\n" . $comment_content . "\r\n\r\n";
                        break;
                default: // Comments
+                       /* translators: 1: Post title */
                        $notify_message  = sprintf( __('A new comment on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
                        $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
+                       /* translators: 1: Comment author name, 2: comment author's IP, 3: comment author IP's hostname */
                        $notify_message .= sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
+                       /* translators: 1: Comment author URL */
                        $notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
+                       /* translators: 1: Trackback/pingback/comment author URL */
                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
+                       /* translators: 1: Comment text */
                        $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
                        break;
        }
 
+       /* translators: Comment moderation. 1: Comment action URL */
        $notify_message .= sprintf( __( 'Approve it: %s' ), admin_url( "comment.php?action=approve&c={$comment_id}#wpbody-content" ) ) . "\r\n";
 
-       if ( EMPTY_TRASH_DAYS )
+       if ( EMPTY_TRASH_DAYS ) {
+               /* translators: Comment moderation. 1: Comment action URL */
                $notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment_id}#wpbody-content" ) ) . "\r\n";
-       else
+       } else {
+               /* translators: Comment moderation. 1: Comment action URL */
                $notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment_id}#wpbody-content" ) ) . "\r\n";
+       }
 
+       /* translators: Comment moderation. 1: Comment action URL */
        $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment_id}#wpbody-content" ) ) . "\r\n";
 
+       /* translators: Comment moderation. 1: Number of comments awaiting approval */
        $notify_message .= sprintf( _n('Currently %s comment is waiting for approval. Please visit the moderation panel:',
                'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n";
        $notify_message .= admin_url( "edit-comments.php?comment_status=moderated#wpbody-content" ) . "\r\n";
 
+       /* translators: Comment moderation notification email subject. 1: Site name, 2: Post title */
        $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), $blogname, $post->post_title );
        $message_headers = '';
 
@@ -1660,6 +1691,10 @@ function wp_notify_moderator($comment_id) {
                @wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
        }
 
+       if ( $switched_locale ) {
+               restore_previous_locale();
+       }
+
        return true;
 }
 endif;
@@ -1719,14 +1754,19 @@ function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' )
        $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
 
        if ( 'user' !== $notify ) {
+               $switched_locale = switch_to_locale( get_locale() );
                $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 );
+
+               if ( $switched_locale ) {
+                       restore_previous_locale();
+               }
        }
 
-       // `$deprecated was pre-4.3 `$plaintext_pass`. An empty `$plaintext_pass` didn't sent a user notifcation.
+       // `$deprecated was pre-4.3 `$plaintext_pass`. An empty `$plaintext_pass` didn't sent a user notification.
        if ( 'admin' === $notify || ( empty( $deprecated ) && empty( $notify ) ) ) {
                return;
        }
@@ -1739,12 +1779,13 @@ function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' )
 
        // Now insert the key, hashed, into the DB.
        if ( empty( $wp_hasher ) ) {
-               require_once ABSPATH . WPINC . '/class-phpass.php';
                $wp_hasher = new PasswordHash( 8, true );
        }
        $hashed = time() . ':' . $wp_hasher->HashPassword( $key );
        $wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
 
+       $switched_locale = switch_to_locale( get_user_locale( $user ) );
+
        $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
        $message .= __('To set your password, visit the following address:') . "\r\n\r\n";
        $message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login') . ">\r\n\r\n";
@@ -1752,6 +1793,10 @@ function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' )
        $message .= wp_login_url() . "\r\n";
 
        wp_mail($user->user_email, sprintf(__('[%s] Your username and password info'), $blogname), $message);
+
+       if ( $switched_locale ) {
+               restore_previous_locale();
+       }
 }
 endif;
 
@@ -2014,7 +2059,6 @@ function wp_hash_password($password) {
        global $wp_hasher;
 
        if ( empty($wp_hasher) ) {
-               require_once( ABSPATH . WPINC . '/class-phpass.php');
                // By default, use the portable hash from phpass
                $wp_hasher = new PasswordHash(8, true);
        }
@@ -2074,7 +2118,6 @@ function wp_check_password($password, $hash, $user_id = '') {
        // If the stored hash is longer than an MD5, presume the
        // new style phpass portable hash.
        if ( empty($wp_hasher) ) {
-               require_once( ABSPATH . WPINC . '/class-phpass.php');
                // By default, use the portable hash from phpass
                $wp_hasher = new PasswordHash(8, true);
        }
index ca4985f1f030840bde3786f62c602228a6d6ad62..86f1c3b319a481b32290e50f43d66e543578719b 100644 (file)
  * Also see the {@link https://codex.wordpress.org/Plugin_API Plugin API} for
  * more information and examples on how to use a lot of these functions.
  *
+ * This file should have no external dependencies.
+ *
  * @package WordPress
  * @subpackage Plugin
  * @since 1.5.0
  */
 
 // Initialize the filter globals.
-global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
+require( dirname( __FILE__ ) . '/class-wp-hook.php' );
+
+/** @var WP_Hook[] $wp_filter */
+global $wp_filter, $wp_actions, $wp_current_filter;
 
-if ( ! isset( $wp_filter ) )
+if ( $wp_filter ) {
+       $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
+} else {
        $wp_filter = array();
+}
 
 if ( ! isset( $wp_actions ) )
        $wp_actions = array();
 
-if ( ! isset( $merged_filters ) )
-       $merged_filters = array();
-
 if ( ! isset( $wp_current_filter ) )
        $wp_current_filter = array();
 
@@ -87,8 +92,6 @@ if ( ! isset( $wp_current_filter ) )
  * @since 0.71
  *
  * @global array $wp_filter      A multidimensional array of all hooks and the callbacks hooked to them.
- * @global array $merged_filters Tracks the tags that need to be merged for later. If the hook is added,
- *                               it doesn't need to run through that process.
  *
  * @param string   $tag             The name of the filter to hook the $function_to_add callback to.
  * @param callable $function_to_add The callback to be run when the filter is applied.
@@ -101,11 +104,11 @@ if ( ! isset( $wp_current_filter ) )
  * @return true
  */
 function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
-       global $wp_filter, $merged_filters;
-
-       $idx = _wp_filter_build_unique_id($tag, $function_to_add, $priority);
-       $wp_filter[$tag][$priority][$idx] = array('function' => $function_to_add, 'accepted_args' => $accepted_args);
-       unset( $merged_filters[ $tag ] );
+       global $wp_filter;
+       if ( ! isset( $wp_filter[ $tag ] ) ) {
+               $wp_filter[ $tag ] = new WP_Hook();
+       }
+       $wp_filter[ $tag ]->add_filter( $tag, $function_to_add, $priority, $accepted_args );
        return true;
 }
 
@@ -126,38 +129,13 @@ function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1
  *                   return value.
  */
 function has_filter($tag, $function_to_check = false) {
-       // Don't reset the internal array pointer
-       $wp_filter = $GLOBALS['wp_filter'];
-
-       $has = ! empty( $wp_filter[ $tag ] );
-
-       // Make sure at least one priority has a filter callback
-       if ( $has ) {
-               $exists = false;
-               foreach ( $wp_filter[ $tag ] as $callbacks ) {
-                       if ( ! empty( $callbacks ) ) {
-                               $exists = true;
-                               break;
-                       }
-               }
-
-               if ( ! $exists ) {
-                       $has = false;
-               }
-       }
-
-       if ( false === $function_to_check || false === $has )
-               return $has;
+       global $wp_filter;
 
-       if ( !$idx = _wp_filter_build_unique_id($tag, $function_to_check, false) )
+       if ( ! isset( $wp_filter[ $tag ] ) ) {
                return false;
-
-       foreach ( (array) array_keys($wp_filter[$tag]) as $priority ) {
-               if ( isset($wp_filter[$tag][$priority][$idx]) )
-                       return $priority;
        }
 
-       return false;
+       return $wp_filter[ $tag ]->has_filter( $tag, $function_to_check );
 }
 
 /**
@@ -188,7 +166,6 @@ function has_filter($tag, $function_to_check = false) {
  * @since 0.71
  *
  * @global array $wp_filter         Stores all of the filters.
- * @global array $merged_filters    Merges the filter hooks using this function.
  * @global array $wp_current_filter Stores the list of current filters with the current one last.
  *
  * @param string $tag     The name of the filter hook.
@@ -197,7 +174,7 @@ function has_filter($tag, $function_to_check = false) {
  * @return mixed The filtered value after all hooked functions are applied to it.
  */
 function apply_filters( $tag, $value ) {
-       global $wp_filter, $merged_filters, $wp_current_filter;
+       global $wp_filter, $wp_current_filter;
 
        $args = array();
 
@@ -217,29 +194,17 @@ function apply_filters( $tag, $value ) {
        if ( !isset($wp_filter['all']) )
                $wp_current_filter[] = $tag;
 
-       // Sort.
-       if ( !isset( $merged_filters[ $tag ] ) ) {
-               ksort($wp_filter[$tag]);
-               $merged_filters[ $tag ] = true;
-       }
-
-       reset( $wp_filter[ $tag ] );
-
        if ( empty($args) )
                $args = func_get_args();
 
-       do {
-               foreach ( (array) current($wp_filter[$tag]) as $the_ )
-                       if ( !is_null($the_['function']) ){
-                               $args[1] = $value;
-                               $value = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args']));
-                       }
+       // don't pass the tag name to WP_Hook
+       array_shift( $args );
 
-       } while ( next($wp_filter[$tag]) !== false );
+       $filtered = $wp_filter[ $tag ]->apply_filters( $value, $args );
 
        array_pop( $wp_current_filter );
 
-       return $value;
+       return $filtered;
 }
 
 /**
@@ -251,7 +216,6 @@ function apply_filters( $tag, $value ) {
  * functions hooked to `$tag` are supplied using an array.
  *
  * @global array $wp_filter         Stores all of the filters
- * @global array $merged_filters    Merges the filter hooks using this function.
  * @global array $wp_current_filter Stores the list of current filters with the current one last
  *
  * @param string $tag  The name of the filter hook.
@@ -259,7 +223,7 @@ function apply_filters( $tag, $value ) {
  * @return mixed The filtered value after all hooked functions are applied to it.
  */
 function apply_filters_ref_array($tag, $args) {
-       global $wp_filter, $merged_filters, $wp_current_filter;
+       global $wp_filter, $wp_current_filter;
 
        // Do 'all' actions first
        if ( isset($wp_filter['all']) ) {
@@ -277,24 +241,11 @@ function apply_filters_ref_array($tag, $args) {
        if ( !isset($wp_filter['all']) )
                $wp_current_filter[] = $tag;
 
-       // Sort
-       if ( !isset( $merged_filters[ $tag ] ) ) {
-               ksort($wp_filter[$tag]);
-               $merged_filters[ $tag ] = true;
-       }
-
-       reset( $wp_filter[ $tag ] );
-
-       do {
-               foreach ( (array) current($wp_filter[$tag]) as $the_ )
-                       if ( !is_null($the_['function']) )
-                               $args[0] = call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
-
-       } while ( next($wp_filter[$tag]) !== false );
+       $filtered = $wp_filter[ $tag ]->apply_filters( $args[0], $args );
 
        array_pop( $wp_current_filter );
 
-       return $args[0];
+       return $filtered;
 }
 
 /**
@@ -311,7 +262,6 @@ function apply_filters_ref_array($tag, $args) {
  * @since 1.2.0
  *
  * @global array $wp_filter         Stores all of the filters
- * @global array $merged_filters    Merges the filter hooks using this function.
  *
  * @param string   $tag                The filter hook to which the function to be removed is hooked.
  * @param callable $function_to_remove The name of the function which should be removed.
@@ -319,19 +269,14 @@ function apply_filters_ref_array($tag, $args) {
  * @return bool    Whether the function existed before it was removed.
  */
 function remove_filter( $tag, $function_to_remove, $priority = 10 ) {
-       $function_to_remove = _wp_filter_build_unique_id( $tag, $function_to_remove, $priority );
-
-       $r = isset( $GLOBALS['wp_filter'][ $tag ][ $priority ][ $function_to_remove ] );
+       global $wp_filter;
 
-       if ( true === $r ) {
-               unset( $GLOBALS['wp_filter'][ $tag ][ $priority ][ $function_to_remove ] );
-               if ( empty( $GLOBALS['wp_filter'][ $tag ][ $priority ] ) ) {
-                       unset( $GLOBALS['wp_filter'][ $tag ][ $priority ] );
+       $r = false;
+       if ( isset( $wp_filter[ $tag ] ) ) {
+               $r = $wp_filter[ $tag ]->remove_filter( $tag, $function_to_remove, $priority );
+               if ( ! $wp_filter[ $tag ]->callbacks ) {
+                       unset( $wp_filter[ $tag ] );
                }
-               if ( empty( $GLOBALS['wp_filter'][ $tag ] ) ) {
-                       $GLOBALS['wp_filter'][ $tag ] = array();
-               }
-               unset( $GLOBALS['merged_filters'][ $tag ] );
        }
 
        return $r;
@@ -342,26 +287,22 @@ function remove_filter( $tag, $function_to_remove, $priority = 10 ) {
  *
  * @since 2.7.0
  *
- * @global array $wp_filter         Stores all of the filters
- * @global array $merged_filters    Merges the filter hooks using this function.
+ * @global array $wp_filter  Stores all of the filters
  *
  * @param string   $tag      The filter to remove hooks from.
  * @param int|bool $priority Optional. The priority number to remove. Default false.
  * @return true True when finished.
  */
 function remove_all_filters( $tag, $priority = false ) {
-       global $wp_filter, $merged_filters;
+       global $wp_filter;
 
        if ( isset( $wp_filter[ $tag ]) ) {
-               if ( false === $priority ) {
-                       $wp_filter[ $tag ] = array();
-               } elseif ( isset( $wp_filter[ $tag ][ $priority ] ) ) {
-                       $wp_filter[ $tag ][ $priority ] = array();
+               $wp_filter[ $tag ]->remove_all_filters( $priority );
+               if ( ! $wp_filter[ $tag ]->has_filters() ) {
+                       unset( $wp_filter[ $tag ] );
                }
        }
 
-       unset( $merged_filters[ $tag ] );
-
        return true;
 }
 
@@ -471,7 +412,6 @@ function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1)
  *
  * @global array $wp_filter         Stores all of the filters
  * @global array $wp_actions        Increments the amount of times action was triggered.
- * @global array $merged_filters    Merges the filter hooks using this function.
  * @global array $wp_current_filter Stores the list of current filters with the current one last
  *
  * @param string $tag     The name of the action to be executed.
@@ -479,7 +419,7 @@ function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1)
  *                        functions hooked to the action. Default empty.
  */
 function do_action($tag, $arg = '') {
-       global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
+       global $wp_filter, $wp_actions, $wp_current_filter;
 
        if ( ! isset($wp_actions[$tag]) )
                $wp_actions[$tag] = 1;
@@ -510,20 +450,7 @@ function do_action($tag, $arg = '') {
        for ( $a = 2, $num = func_num_args(); $a < $num; $a++ )
                $args[] = func_get_arg($a);
 
-       // Sort
-       if ( !isset( $merged_filters[ $tag ] ) ) {
-               ksort($wp_filter[$tag]);
-               $merged_filters[ $tag ] = true;
-       }
-
-       reset( $wp_filter[ $tag ] );
-
-       do {
-               foreach ( (array) current($wp_filter[$tag]) as $the_ )
-                       if ( !is_null($the_['function']) )
-                               call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
-
-       } while ( next($wp_filter[$tag]) !== false );
+       $wp_filter[ $tag ]->do_action( $args );
 
        array_pop($wp_current_filter);
 }
@@ -556,14 +483,13 @@ function did_action($tag) {
  *                  functions hooked to $tag< are supplied using an array.
  * @global array $wp_filter         Stores all of the filters
  * @global array $wp_actions        Increments the amount of times action was triggered.
- * @global array $merged_filters    Merges the filter hooks using this function.
  * @global array $wp_current_filter Stores the list of current filters with the current one last
  *
  * @param string $tag  The name of the action to be executed.
  * @param array  $args The arguments supplied to the functions hooked to `$tag`.
  */
 function do_action_ref_array($tag, $args) {
-       global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
+       global $wp_filter, $wp_actions, $wp_current_filter;
 
        if ( ! isset($wp_actions[$tag]) )
                $wp_actions[$tag] = 1;
@@ -586,20 +512,7 @@ function do_action_ref_array($tag, $args) {
        if ( !isset($wp_filter['all']) )
                $wp_current_filter[] = $tag;
 
-       // Sort
-       if ( !isset( $merged_filters[ $tag ] ) ) {
-               ksort($wp_filter[$tag]);
-               $merged_filters[ $tag ] = true;
-       }
-
-       reset( $wp_filter[ $tag ] );
-
-       do {
-               foreach ( (array) current($wp_filter[$tag]) as $the_ )
-                       if ( !is_null($the_['function']) )
-                               call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
-
-       } while ( next($wp_filter[$tag]) !== false );
+       $wp_filter[ $tag ]->do_action( $args );
 
        array_pop($wp_current_filter);
 }
@@ -921,13 +834,7 @@ function register_uninstall_hook( $file, $callback ) {
 function _wp_call_all_hook($args) {
        global $wp_filter;
 
-       reset( $wp_filter['all'] );
-       do {
-               foreach ( (array) current($wp_filter['all']) as $the_ )
-                       if ( !is_null($the_['function']) )
-                               call_user_func_array($the_['function'], $args);
-
-       } while ( next($wp_filter['all']) !== false );
+       $wp_filter['all']->do_all_hook( $args );
 }
 
 /**
index 6bc44d614d69c899078889a62f8035ae44f8131e..47e9b6afe4a875015a7a6e347cb70f2234881fc3 100644 (file)
@@ -15,16 +15,37 @@ class MO extends Gettext_Translations {
 
        var $_nplurals = 2;
 
+       /**
+        * Loaded MO file.
+        *
+        * @var string
+        */
+       private $filename = '';
+
+       /**
+        * Returns the loaded MO file.
+        *
+        * @return string The loaded MO file.
+        */
+       public function get_filename() {
+               return $this->filename;
+       }
+
        /**
         * Fills up with the entries from MO file $filename
         *
         * @param string $filename MO file to load
         */
        function import_from_file($filename) {
-               $reader = new POMO_FileReader($filename);
-               if (!$reader->is_resource())
+               $reader = new POMO_FileReader( $filename );
+
+               if ( ! $reader->is_resource() ) {
                        return false;
-               return $this->import_from_reader($reader);
+               }
+
+               $this->filename = (string) $filename;
+
+               return $this->import_from_reader( $reader );
        }
 
        /**
@@ -299,4 +320,4 @@ class MO extends Gettext_Translations {
                return $this->_nplurals;
        }
 }
-endif;
\ No newline at end of file
+endif;
index 66971d95954a9b178516642da055c5c901f27cd3..6623a9f02af1ac062b89201184b864fc2575f444 100644 (file)
@@ -102,7 +102,7 @@ class Translations {
         * Here, in the base Translations class, the common logic for English is implemented:
         *      0 if there is one element, 1 otherwise
         *
-        * This function should be overrided by the sub-classes. For example MO/PO can derive the logic
+        * This function should be overridden by the sub-classes. For example MO/PO can derive the logic
         * from their headers.
         *
         * @param integer $count number of items
index be152523f0615a97e815fdc062a16fb1fd187dc9..ac8864334aa4e087cd7a414d3b4d3f3a1edf6513 100644 (file)
@@ -30,14 +30,14 @@ function get_the_ID() {
 }
 
 /**
- * Display or retrieve the current post title with optional content.
+ * Display or retrieve the current post title with optional markup.
  *
  * @since 0.71
  *
- * @param string $before Optional. Content to prepend to the title.
- * @param string $after  Optional. Content to append to the title.
- * @param bool   $echo   Optional, default to true.Whether to display or return.
- * @return string|void String if $echo parameter is false.
+ * @param string $before Optional. Markup to prepend to the title. Default empty.
+ * @param string $after  Optional. Markup to append to the title. Default empty.
+ * @param bool   $echo   Optional. Whether to echo or return the title. Default true for echo.
+ * @return string|void Current post title if $echo is false.
  */
 function the_title( $before = '', $after = '', $echo = true ) {
        $title = get_the_title();
@@ -247,11 +247,11 @@ function the_content( $more_link_text = null, $strip_teaser = false) {
  *
  * @since 0.71
  *
- * @global int   $page
- * @global int   $more
- * @global bool  $preview
- * @global array $pages
- * @global int   $multipage
+ * @global int   $page      Page number of a single post/page.
+ * @global int   $more      Boolean indicator for whether single post/page is being viewed.
+ * @global bool  $preview   Whether post/page is in preview mode.
+ * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
+ * @global int   $multipage Boolean indicator for whether multiple pages are in play.
  *
  * @param string $more_link_text Optional. Content for when there is more text.
  * @param bool   $strip_teaser   Optional. Strip teaser content before the more text. Default is false.
@@ -594,23 +594,40 @@ function get_body_class( $class = '' ) {
        if ( is_404() )
                $classes[] = 'error404';
 
-       if ( is_single() ) {
+       if ( is_singular() ) {
                $post_id = $wp_query->get_queried_object_id();
                $post = $wp_query->get_queried_object();
+               $post_type = $post->post_type;
 
-               $classes[] = 'single';
-               if ( isset( $post->post_type ) ) {
-                       $classes[] = 'single-' . sanitize_html_class($post->post_type, $post_id);
-                       $classes[] = 'postid-' . $post_id;
+               if ( is_page_template() ) {
+                       $classes[] = "{$post_type}-template";
 
-                       // Post Format
-                       if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
-                               $post_format = get_post_format( $post->ID );
+                       $template_slug  = get_page_template_slug( $post_id );
+                       $template_parts = explode( '/', $template_slug );
 
-                               if ( $post_format && !is_wp_error($post_format) )
-                                       $classes[] = 'single-format-' . sanitize_html_class( $post_format );
-                               else
-                                       $classes[] = 'single-format-standard';
+                       foreach ( $template_parts as $part ) {
+                               $classes[] = "{$post_type}-template-" . sanitize_html_class( str_replace( array( '.', '/' ), '-', basename( $part, '.php' ) ) );
+                       }
+                       $classes[] = "{$post_type}-template-" . sanitize_html_class( str_replace( '.', '-', $template_slug ) );
+               } else {
+                       $classes[] = "{$post_type}-template-default";
+               }
+
+               if ( is_single() ) {
+                       $classes[] = 'single';
+                       if ( isset( $post->post_type ) ) {
+                               $classes[] = 'single-' . sanitize_html_class( $post->post_type, $post_id );
+                               $classes[] = 'postid-' . $post_id;
+
+                               // Post Format
+                               if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
+                                       $post_format = get_post_format( $post->ID );
+
+                                       if ( $post_format && !is_wp_error($post_format) )
+                                               $classes[] = 'single-format-' . sanitize_html_class( $post_format );
+                                       else
+                                               $classes[] = 'single-format-standard';
+                               }
                        }
                }
 
@@ -619,6 +636,23 @@ function get_body_class( $class = '' ) {
                        $mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/', 'music/' );
                        $classes[] = 'attachmentid-' . $post_id;
                        $classes[] = 'attachment-' . str_replace( $mime_prefix, '', $mime_type );
+               } elseif ( is_page() ) {
+                       $classes[] = 'page';
+
+                       $page_id = $wp_query->get_queried_object_id();
+
+                       $post = get_post($page_id);
+
+                       $classes[] = 'page-id-' . $page_id;
+
+                       if ( get_pages( array( 'parent' => $page_id, 'number' => 1 ) ) ) {
+                               $classes[] = 'page-parent';
+                       }
+
+                       if ( $post->post_parent ) {
+                               $classes[] = 'page-child';
+                               $classes[] = 'parent-pageid-' . $post->post_parent;
+                       }
                }
        } elseif ( is_archive() ) {
                if ( is_post_type_archive() ) {
@@ -671,36 +705,6 @@ function get_body_class( $class = '' ) {
                                $classes[] = 'term-' . $term->term_id;
                        }
                }
-       } elseif ( is_page() ) {
-               $classes[] = 'page';
-
-               $page_id = $wp_query->get_queried_object_id();
-
-               $post = get_post($page_id);
-
-               $classes[] = 'page-id-' . $page_id;
-
-               if ( get_pages( array( 'parent' => $page_id, 'number' => 1 ) ) ) {
-                       $classes[] = 'page-parent';
-               }
-
-               if ( $post->post_parent ) {
-                       $classes[] = 'page-child';
-                       $classes[] = 'parent-pageid-' . $post->post_parent;
-               }
-               if ( is_page_template() ) {
-                       $classes[] = 'page-template';
-
-                       $template_slug  = get_page_template_slug( $page_id );
-                       $template_parts = explode( '/', $template_slug );
-
-                       foreach ( $template_parts as $part ) {
-                               $classes[] = 'page-template-' . sanitize_html_class( str_replace( array( '.', '/' ), '-', basename( $part, '.php' ) ) );
-                       }
-                       $classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', $template_slug ) );
-               } else {
-                       $classes[] = 'page-template-default';
-               }
        }
 
        if ( is_user_logged_in() )
@@ -779,20 +783,35 @@ function get_body_class( $class = '' ) {
 function post_password_required( $post = null ) {
        $post = get_post($post);
 
-       if ( empty( $post->post_password ) )
-               return false;
+       if ( empty( $post->post_password ) ) {
+               /** This filter is documented in wp-includes/post.php */
+               return apply_filters( 'post_password_required', false, $post );
+       }
 
-       if ( ! isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) )
-               return true;
+       if ( ! isset( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] ) ) {
+               /** This filter is documented in wp-includes/post.php */
+               return apply_filters( 'post_password_required', true, $post );
+       }
 
-       require_once ABSPATH . WPINC . '/class-phpass.php';
        $hasher = new PasswordHash( 8, true );
 
        $hash = wp_unslash( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] );
-       if ( 0 !== strpos( $hash, '$P$B' ) )
-               return true;
+       if ( 0 !== strpos( $hash, '$P$B' ) ) {
+               $required = true;
+       } else {
+               $required = ! $hasher->CheckPassword( $post->post_password, $hash );
+       }
 
-       return ! $hasher->CheckPassword( $post->post_password, $hash );
+       /**
+        * Filters whether a post requires the user to supply a password.
+        *
+        * @since 4.7.0
+        *
+        * @param bool    $required Whether the user needs to supply a password. True if password has not been
+        *                          provided or is incorrect, false if password has been supplied or is not required.
+        * @param WP_Post $post     Post data.
+        */
+       return apply_filters( 'post_password_required', $required, $post );
 }
 
 //
@@ -1110,6 +1129,7 @@ function wp_dropdown_pages( $args = '' ) {
  * Retrieve or display list of pages in list (li) format.
  *
  * @since 1.5.0
+ * @since 4.7.0 Added the `item_spacing` argument.
  *
  * @see get_pages()
  *
@@ -1118,43 +1138,57 @@ function wp_dropdown_pages( $args = '' ) {
  * @param array|string $args {
  *     Array or string of arguments. Optional.
  *
- *     @type int    $child_of     Display only the sub-pages of a single page by ID. Default 0 (all pages).
- *     @type string $authors      Comma-separated list of author IDs. Default empty (all authors).
- *     @type string $date_format  PHP date format to use for the listed pages. Relies on the 'show_date' parameter.
- *                                Default is the value of 'date_format' option.
- *     @type int    $depth        Number of levels in the hierarchy of pages to include in the generated list.
- *                                Accepts -1 (any depth), 0 (all pages), 1 (top-level pages only), and n (pages to
- *                                the given n depth). Default 0.
- *     @type bool   $echo         Whether or not to echo the list of pages. Default true.
- *     @type string $exclude      Comma-separated list of page IDs to exclude. Default empty.
- *     @type array  $include      Comma-separated list of page IDs to include. Default empty.
- *     @type string $link_after   Text or HTML to follow the page link label. Default null.
- *     @type string $link_before  Text or HTML to precede the page link label. Default null.
- *     @type string $post_type    Post type to query for. Default 'page'.
- *     @type string $post_status  Comma-separated list of post statuses to include. Default 'publish'.
- *     @type string $show_date   Whether to display the page publish or modified date for each page. Accepts
- *                                'modified' or any other value. An empty value hides the date. Default empty.
- *     @type string $sort_column  Comma-separated list of column names to sort the pages by. Accepts 'post_author',
- *                                'post_date', 'post_title', 'post_name', 'post_modified', 'post_modified_gmt',
- *                                'menu_order', 'post_parent', 'ID', 'rand', or 'comment_count'. Default 'post_title'.
- *     @type string $title_li     List heading. Passing a null or empty value will result in no heading, and the list
- *                                will not be wrapped with unordered list `<ul>` tags. Default 'Pages'.
- *     @type Walker $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
+ *     @type int          $child_of     Display only the sub-pages of a single page by ID. Default 0 (all pages).
+ *     @type string       $authors      Comma-separated list of author IDs. Default empty (all authors).
+ *     @type string       $date_format  PHP date format to use for the listed pages. Relies on the 'show_date' parameter.
+ *                                      Default is the value of 'date_format' option.
+ *     @type int          $depth        Number of levels in the hierarchy of pages to include in the generated list.
+ *                                      Accepts -1 (any depth), 0 (all pages), 1 (top-level pages only), and n (pages to
+ *                                      the given n depth). Default 0.
+ *     @type bool         $echo         Whether or not to echo the list of pages. Default true.
+ *     @type string       $exclude      Comma-separated list of page IDs to exclude. Default empty.
+ *     @type array        $include      Comma-separated list of page IDs to include. Default empty.
+ *     @type string       $link_after   Text or HTML to follow the page link label. Default null.
+ *     @type string       $link_before  Text or HTML to precede the page link label. Default null.
+ *     @type string       $post_type    Post type to query for. Default 'page'.
+ *     @type string|array $post_status  Comma-separated list or array of post statuses to include. Default 'publish'.
+ *     @type string       $show_date    Whether to display the page publish or modified date for each page. Accepts
+ *                                      'modified' or any other value. An empty value hides the date. Default empty.
+ *     @type string       $sort_column  Comma-separated list of column names to sort the pages by. Accepts 'post_author',
+ *                                      'post_date', 'post_title', 'post_name', 'post_modified', 'post_modified_gmt',
+ *                                      'menu_order', 'post_parent', 'ID', 'rand', or 'comment_count'. Default 'post_title'.
+ *     @type string       $title_li     List heading. Passing a null or empty value will result in no heading, and the list
+ *                                      will not be wrapped with unordered list `<ul>` tags. Default 'Pages'.
+ *     @type string       $item_spacing Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'.
+ *                                      Default 'preserve'.
+ *     @type Walker       $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
  * }
  * @return string|void HTML list of pages.
  */
 function wp_list_pages( $args = '' ) {
        $defaults = array(
-               'depth' => 0, 'show_date' => '',
-               'date_format' => get_option( 'date_format' ),
-               'child_of' => 0, 'exclude' => '',
-               'title_li' => __( 'Pages' ), 'echo' => 1,
-               'authors' => '', 'sort_column' => 'menu_order, post_title',
-               'link_before' => '', 'link_after' => '', 'walker' => '',
+               'depth'        => 0,
+               'show_date'    => '',
+               'date_format'  => get_option( 'date_format' ),
+               'child_of'     => 0,
+               'exclude'      => '',
+               'title_li'     => __( 'Pages' ),
+               'echo'         => 1,
+               'authors'      => '',
+               'sort_column'  => 'menu_order, post_title',
+               'link_before'  => '',
+               'link_after'   => '',
+               'item_spacing' => 'preserve',
+               'walker'       => '',
        );
 
        $r = wp_parse_args( $args, $defaults );
 
+       if ( ! in_array( $r['item_spacing'], array( 'preserve', 'discard' ), true ) ) {
+               // invalid value, fall back to default.
+               $r['item_spacing'] = $defaults['item_spacing'];
+       }
+
        $output = '';
        $current_page = 0;
 
@@ -1227,42 +1261,58 @@ function wp_list_pages( $args = '' ) {
  *
  * @since 2.7.0
  * @since 4.4.0 Added `menu_id`, `container`, `before`, `after`, and `walker` arguments.
+ * @since 4.7.0 Added the `item_spacing` argument.
  *
  * @param array|string $args {
  *     Optional. Arguments to generate a page menu. See wp_list_pages() for additional arguments.
  *
- *     @type string          $sort_column How to short the list of pages. Accepts post column names.
- *                                        Default 'menu_order, post_title'.
- *     @type string          $menu_id     ID for the div containing the page list. Default is empty string.
- *     @type string          $menu_class  Class to use for the element containing the page list. Default 'menu'.
- *     @type string          $container   Element to use for the element containing the page list. Default 'div'.
- *     @type bool            $echo        Whether to echo the list or return it. Accepts true (echo) or false (return).
- *                                        Default true.
- *     @type int|bool|string $show_home   Whether to display the link to the home page. Can just enter the text
- *                                        you'd like shown for the home link. 1|true defaults to 'Home'.
- *     @type string          $link_before The HTML or text to prepend to $show_home text. Default empty.
- *     @type string          $link_after  The HTML or text to append to $show_home text. Default empty.
- *     @type string          $before      The HTML or text to prepend to the menu. Default is '<ul>'.
- *     @type string          $after       The HTML or text to append to the menu. Default is '</ul>'.
- *     @type Walker          $walker      Walker instance to use for listing pages. Default empty (Walker_Page).
+ *     @type string          $sort_column  How to short the list of pages. Accepts post column names.
+ *                                         Default 'menu_order, post_title'.
+ *     @type string          $menu_id      ID for the div containing the page list. Default is empty string.
+ *     @type string          $menu_class   Class to use for the element containing the page list. Default 'menu'.
+ *     @type string          $container    Element to use for the element containing the page list. Default 'div'.
+ *     @type bool            $echo         Whether to echo the list or return it. Accepts true (echo) or false (return).
+ *                                         Default true.
+ *     @type int|bool|string $show_home    Whether to display the link to the home page. Can just enter the text
+ *                                         you'd like shown for the home link. 1|true defaults to 'Home'.
+ *     @type string          $link_before  The HTML or text to prepend to $show_home text. Default empty.
+ *     @type string          $link_after   The HTML or text to append to $show_home text. Default empty.
+ *     @type string          $before       The HTML or text to prepend to the menu. Default is '<ul>'.
+ *     @type string          $after        The HTML or text to append to the menu. Default is '</ul>'.
+ *     @type string          $item_spacing Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'. Default 'discard'.
+ *     @type Walker          $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
  * }
  * @return string|void HTML menu
  */
 function wp_page_menu( $args = array() ) {
        $defaults = array(
-               'sort_column' => 'menu_order, post_title',
-               'menu_id'     => '',
-               'menu_class'  => 'menu',
-               'container'   => 'div',
-               'echo'        => true,
-               'link_before' => '',
-               'link_after'  => '',
-               'before'      => '<ul>',
-               'after'       => '</ul>',
-               'walker'      => '',
+               'sort_column'  => 'menu_order, post_title',
+               'menu_id'      => '',
+               'menu_class'   => 'menu',
+               'container'    => 'div',
+               'echo'         => true,
+               'link_before'  => '',
+               'link_after'   => '',
+               'before'       => '<ul>',
+               'after'        => '</ul>',
+               'item_spacing' => 'discard',
+               'walker'       => '',
        );
        $args = wp_parse_args( $args, $defaults );
 
+       if ( ! in_array( $args['item_spacing'], array( 'preserve', 'discard' ) ) ) {
+               // invalid value, fall back to default.
+               $args['item_spacing'] = $defaults['item_spacing'];
+       }
+
+       if ( 'preserve' === $args['item_spacing'] ) {
+               $t = "\t";
+               $n = "\n";
+       } else {
+               $t = '';
+               $n = '';
+       }
+
        /**
         * Filters the arguments used to generate a page-based menu.
         *
@@ -1301,7 +1351,7 @@ function wp_page_menu( $args = array() ) {
 
        $list_args['echo'] = false;
        $list_args['title_li'] = '';
-       $menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($list_args) );
+       $menu .= wp_list_pages( $list_args );
 
        $container = sanitize_text_field( $args['container'] );
 
@@ -1316,7 +1366,7 @@ function wp_page_menu( $args = array() ) {
                if ( isset( $args['fallback_cb'] ) &&
                        'wp_page_menu' === $args['fallback_cb'] &&
                        'ul' !== $container ) {
-                       $args['before'] = '<ul>';
+                       $args['before'] = "<ul>{$n}";
                        $args['after'] = '</ul>';
                }
 
@@ -1332,7 +1382,7 @@ function wp_page_menu( $args = array() ) {
                $attrs .= ' class="' . esc_attr( $args['menu_class'] ) . '"';
        }
 
-       $menu = "<{$container}{$attrs}>" . $menu . "</{$container}>\n";
+       $menu = "<{$container}{$attrs}>" . $menu . "</{$container}>{$n}";
 
        /**
         * Filters the HTML output of a page-based menu.
@@ -1445,11 +1495,13 @@ function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $
 function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false, $attr = '' ) {
        $_post = get_post( $id );
 
-       if ( empty( $_post ) || ( 'attachment' != $_post->post_type ) || ! $url = wp_get_attachment_url( $_post->ID ) )
+       if ( empty( $_post ) || ( 'attachment' !== $_post->post_type ) || ! $url = wp_get_attachment_url( $_post->ID ) ) {
                return __( 'Missing Attachment' );
+       }
 
-       if ( $permalink )
+       if ( $permalink ) {
                $url = get_attachment_link( $_post->ID );
+       }
 
        if ( $text ) {
                $link_text = $text;
@@ -1459,9 +1511,13 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals
                $link_text = '';
        }
 
-       if ( trim( $link_text ) == '' )
+       if ( '' === trim( $link_text ) ) {
                $link_text = $_post->post_title;
+       }
 
+       if ( '' === trim( $link_text ) ) {
+               $link_text = esc_html( pathinfo( get_attached_file( $_post->ID ), PATHINFO_FILENAME ) );
+       }
        /**
         * Filters a retrieved attachment page link.
         *
@@ -1569,14 +1625,12 @@ function get_the_password_form( $post = 0 ) {
  *
  * @since 2.5.0
  * @since 4.2.0 The `$template` parameter was changed to also accept an array of page templates.
+ * @since 4.7.0 Now works with any post type, not just pages.
  *
  * @param string|array $template The specific template name or array of templates to match.
  * @return bool True on success, false on failure.
  */
 function is_page_template( $template = '' ) {
-       if ( ! is_page() )
-               return false;
-
        $page_template = get_page_template_slug( get_queried_object_id() );
 
        if ( empty( $template ) )
@@ -1597,21 +1651,28 @@ function is_page_template( $template = '' ) {
 }
 
 /**
- * Get the specific template name for a page.
+ * Get the specific template name for a given post.
  *
  * @since 3.4.0
+ * @since 4.7.0 Now works with any post type, not just pages.
  *
- * @param int $post_id Optional. The page ID to check. Defaults to the current post, when used in the loop.
+ * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
  * @return string|false Page template filename. Returns an empty string when the default page template
- *     is in use. Returns false if the post is not a page.
+ *     is in use. Returns false if the post does not exist.
  */
-function get_page_template_slug( $post_id = null ) {
-       $post = get_post( $post_id );
-       if ( ! $post || 'page' != $post->post_type )
+function get_page_template_slug( $post = null ) {
+       $post = get_post( $post );
+
+       if ( ! $post ) {
                return false;
+       }
+
        $template = get_post_meta( $post->ID, '_wp_page_template', true );
-       if ( ! $template || 'default' == $template )
+
+       if ( ! $template || 'default' == $template ) {
                return '';
+       }
+
        return $template;
 }
 
@@ -1633,10 +1694,10 @@ function wp_post_revision_title( $revision, $link = true ) {
 
        /* 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' );
-       /* translators: 1: date */
-       $currentf  = _x( '%1$s [Current Revision]', 'post revision title extra' );
+       /* translators: %s: revision date */
+       $autosavef = __( '%s [Autosave]' );
+       /* translators: %s: revision date */
+       $currentf  = __( '%s [Current Revision]' );
 
        $date = date_i18n( $datef, strtotime( $revision->post_modified ) );
        if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) )
@@ -1678,15 +1739,17 @@ function wp_post_revision_title_expanded( $revision, $link = true ) {
 
        $revision_date_author = sprintf(
                /* translators: post revision title: 1: author avatar, 2: author name, 3: time ago, 4: date */
-               _x( '%1$s %2$s, %3$s ago (%4$s)', 'post revision title' ),
+               __( '%1$s %2$s, %3$s ago (%4$s)' ),
                $gravatar,
                $author,
                human_time_diff( strtotime( $revision->post_modified ), current_time( 'timestamp' ) ),
                $date
        );
 
-       $autosavef = __( '%1$s [Autosave]' );
-       $currentf  = __( '%1$s [Current Revision]' );
+       /* translators: %s: revision date with author avatar */
+       $autosavef = __( '%s [Autosave]' );
+       /* translators: %s: revision date with author avatar */
+       $currentf  = __( '%s [Current Revision]' );
 
        if ( !wp_is_post_revision( $revision ) )
                $revision_date_author = sprintf( $currentf, $revision_date_author );
index d03317276392f05374c07dea1258b7952c3c4375..c81f5c589e769596ef8ea9cc5335ad445badbae8 100644 (file)
@@ -20,7 +20,7 @@
 function create_initial_post_types() {
        register_post_type( 'post', array(
                'labels' => array(
-                       'name_admin_bar' => _x( 'Post', 'add new on admin bar' ),
+                       'name_admin_bar' => _x( 'Post', 'add new from admin bar' ),
                ),
                'public'  => true,
                '_builtin' => true, /* internal use only. don't use this when registering your own post type. */
@@ -33,11 +33,14 @@ function create_initial_post_types() {
                'query_var' => false,
                'delete_with_user' => true,
                'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats' ),
+               'show_in_rest' => true,
+               'rest_base' => 'posts',
+               'rest_controller_class' => 'WP_REST_Posts_Controller',
        ) );
 
        register_post_type( 'page', array(
                'labels' => array(
-                       'name_admin_bar' => _x( 'Page', 'add new on admin bar' ),
+                       'name_admin_bar' => _x( 'Page', 'add new from admin bar' ),
                ),
                'public' => true,
                'publicly_queryable' => false,
@@ -51,6 +54,9 @@ function create_initial_post_types() {
                'query_var' => false,
                'delete_with_user' => true,
                'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes', 'custom-fields', 'comments', 'revisions' ),
+               'show_in_rest' => true,
+               'rest_base' => 'pages',
+               'rest_controller_class' => 'WP_REST_Posts_Controller',
        ) );
 
        register_post_type( 'attachment', array(
@@ -60,6 +66,7 @@ function create_initial_post_types() {
                        'add_new' => _x( 'Add New', 'add new media' ),
                        'edit_item' => __( 'Edit Media' ),
                        'view_item' => __( 'View Attachment Page' ),
+                       'attributes' => __( 'Attachment Attributes' ),
                ),
                'public' => true,
                'show_ui' => true,
@@ -76,6 +83,9 @@ function create_initial_post_types() {
                'show_in_nav_menus' => false,
                'delete_with_user' => true,
                'supports' => array( 'title', 'author', 'comments' ),
+               'show_in_rest' => true,
+               'rest_base' => 'media',
+               'rest_controller_class' => 'WP_REST_Attachments_Controller',
        ) );
        add_post_type_support( 'attachment:audio', 'thumbnail' );
        add_post_type_support( 'attachment:video', 'thumbnail' );
@@ -111,6 +121,80 @@ function create_initial_post_types() {
                'query_var' => false,
        ) );
 
+       register_post_type( 'custom_css', array(
+               'labels' => array(
+                       'name'          => __( 'Custom CSS' ),
+                       'singular_name' => __( 'Custom CSS' ),
+               ),
+               'public'           => false,
+               'hierarchical'     => false,
+               'rewrite'          => false,
+               'query_var'        => false,
+               'delete_with_user' => false,
+               'can_export'       => true,
+               '_builtin'         => true, /* internal use only. don't use this when registering your own post type. */
+               'supports'         => array( 'title', 'revisions' ),
+               'capabilities'     => array(
+                       'delete_posts'           => 'edit_theme_options',
+                       'delete_post'            => 'edit_theme_options',
+                       'delete_published_posts' => 'edit_theme_options',
+                       'delete_private_posts'   => 'edit_theme_options',
+                       'delete_others_posts'    => 'edit_theme_options',
+                       'edit_post'              => 'edit_css',
+                       'edit_posts'             => 'edit_css',
+                       'edit_others_posts'      => 'edit_css',
+                       'edit_published_posts'   => 'edit_css',
+                       'read_post'              => 'read',
+                       'read_private_posts'     => 'read',
+                       'publish_posts'          => 'edit_theme_options',
+               ),
+       ) );
+
+       register_post_type( 'customize_changeset', array(
+               'labels' => array(
+                       'name'               => _x( 'Changesets', 'post type general name' ),
+                       'singular_name'      => _x( 'Changeset', 'post type singular name' ),
+                       'menu_name'          => _x( 'Changesets', 'admin menu' ),
+                       'name_admin_bar'     => _x( 'Changeset', 'add new on admin bar' ),
+                       'add_new'            => _x( 'Add New', 'Customize Changeset' ),
+                       'add_new_item'       => __( 'Add New Changeset' ),
+                       'new_item'           => __( 'New Changeset' ),
+                       'edit_item'          => __( 'Edit Changeset' ),
+                       'view_item'          => __( 'View Changeset' ),
+                       'all_items'          => __( 'All Changesets' ),
+                       'search_items'       => __( 'Search Changesets' ),
+                       'not_found'          => __( 'No changesets found.' ),
+                       'not_found_in_trash' => __( 'No changesets found in Trash.' ),
+               ),
+               'public' => false,
+               '_builtin' => true, /* internal use only. don't use this when registering your own post type. */
+               'map_meta_cap' => true,
+               'hierarchical' => false,
+               'rewrite' => false,
+               'query_var' => false,
+               'can_export' => false,
+               'delete_with_user' => false,
+               'supports' => array( 'title', 'author' ),
+               'capability_type' => 'customize_changeset',
+               'capabilities' => array(
+                       'create_posts' => 'customize',
+                       'delete_others_posts' => 'customize',
+                       'delete_post' => 'customize',
+                       'delete_posts' => 'customize',
+                       'delete_private_posts' => 'customize',
+                       'delete_published_posts' => 'customize',
+                       'edit_others_posts' => 'customize',
+                       'edit_post' => 'customize',
+                       'edit_posts' => 'customize',
+                       'edit_private_posts' => 'customize',
+                       'edit_published_posts' => 'do_not_allow',
+                       'publish_posts' => 'customize',
+                       'read' => 'read',
+                       'read_post' => 'customize',
+                       'read_private_posts' => 'customize',
+               ),
+       ) );
+
        register_post_status( 'publish', array(
                'label'       => _x( 'Published', 'post status' ),
                'public'      => true,
@@ -317,8 +401,8 @@ function _wp_relative_upload_path( $path ) {
  * @global WP_Post $post
  *
  * @param mixed  $args   Optional. User defined arguments for replacing the defaults. Default empty.
- * @param string $output Optional. Constant for return type. Accepts OBJECT, ARRAY_A, ARRAY_N.
- *                       Default OBJECT.
+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                       a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
  * @return array Array of children, where the type of each element is determined by $output parameter.
  *               Empty array on failure.
  */
@@ -421,8 +505,8 @@ function get_extended( $post ) {
  * @global WP_Post $post
  *
  * @param int|WP_Post|null $post   Optional. Post ID or post object. Defaults to global $post.
- * @param string           $output Optional, default is Object. Accepts OBJECT, ARRAY_A, or ARRAY_N.
- *                                 Default OBJECT.
+ * @param string           $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                                 a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
  * @param string           $filter Optional. Type of filter to apply. Accepts 'raw', 'edit', 'db',
  *                                 or 'display'. Default 'raw'.
  * @return WP_Post|array|null Type corresponding to $output on success or null on failure.
@@ -901,6 +985,8 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
  * @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.
+ * @since 4.7.0 Introduced `show_in_rest`, 'rest_base' and 'rest_controller_class'
+ *              arguments to register the post type in REST API.
  *
  * @global array $wp_post_types List of post types.
  *
@@ -910,76 +996,79 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
  * @param array|string $args {
  *     Array or string of arguments for registering a post type.
  *
- *     @type string      $label                Name of the post type shown in the menu. Usually plural.
- *                                             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() 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
- *                                             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.
- *     @type bool        $hierarchical         Whether the post type is hierarchical (e.g. page). Default false.
- *     @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 parse_request(). Endpoints would include:
- *                                             * ?post_type={post_type_key}
- *                                             * ?{post_type_key}={single_post_slug}
- *                                             * ?{post_type_query_var}={single_post_slug}
- *                                             If not set, the default is inherited from $public.
- *     @type bool        $show_ui              Whether to generate and allow a UI for managing this post type in the
- *                                             admin. Default is value of $public.
- *     @type bool        $show_in_menu         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 value of $show_ui.
- *     @type bool        $show_in_nav_menus    Makes this post type available for selection in navigation menus.
- *                                             Default is value $public.
- *     @type bool        $show_in_admin_bar    Makes this post type available via the admin bar. Default is value
- *                                             of $show_in_menu.
- *     @type int         $menu_position        The position in the menu order the post type should appear. To work,
- *                                             $show_in_menu must be true. Default null (at the bottom).
- *     @type string      $menu_icon            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.
- *     @type string      $capability_type      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'.
- *     @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().
- *     @type bool        $map_meta_cap         Whether to use the internal default meta capability handling.
- *                                             Default false.
- *     @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 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
- *                                             $rewrite is enabled. Default false.
+ *     @type string      $label                 Name of the post type shown in the menu. Usually plural.
+ *                                              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() 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
+ *                                              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.
+ *     @type bool        $hierarchical          Whether the post type is hierarchical (e.g. page). Default false.
+ *     @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 parse_request(). Endpoints would include:
+ *                                              * ?post_type={post_type_key}
+ *                                              * ?{post_type_key}={single_post_slug}
+ *                                              * ?{post_type_query_var}={single_post_slug}
+ *                                              If not set, the default is inherited from $public.
+ *     @type bool        $show_ui               Whether to generate and allow a UI for managing this post type in the
+ *                                              admin. Default is value of $public.
+ *     @type bool        $show_in_menu          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 value of $show_ui.
+ *     @type bool        $show_in_nav_menus     Makes this post type available for selection in navigation menus.
+ *                                              Default is value $public.
+ *     @type bool        $show_in_admin_bar     Makes this post type available via the admin bar. Default is value
+ *                                              of $show_in_menu.
+ *     @type bool        $show_in_rest          Whether to add the post type route in the REST API 'wp/v2' namespace.
+ *     @type string      $rest_base             To change the base url of REST API route. Default is $post_type.
+ *     @type string      $rest_controller_class REST API Controller class name. Default is 'WP_REST_Posts_Controller'.
+ *     @type int         $menu_position         The position in the menu order the post type should appear. To work,
+ *                                              $show_in_menu must be true. Default null (at the bottom).
+ *     @type string      $menu_icon             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.
+ *     @type string      $capability_type       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'.
+ *     @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().
+ *     @type bool        $map_meta_cap          Whether to use the internal default meta capability handling.
+ *                                              Default false.
+ *     @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 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
+ *                                              $rewrite is enabled. Default false.
  *     @type bool|array  $rewrite              {
  *         Triggers the handling of rewrites for this post type. To prevent rewrite, set to false.
  *         Defaults to true, using $post_type as slug. To specify rewrite rules, an array can be
@@ -995,21 +1084,21 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
  *                                  inherits from $permalink_epmask. If not specified and permalink_epmask
  *                                  is not set, defaults to EP_PERMALINK.
  *     }
- *     @type string|bool $query_var            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.
- *     @type bool        $can_export           Whether to allow this post type to be exported. Default true.
- *     @type bool        $delete_with_user     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.
- *     @type bool        $_builtin             FOR INTERNAL USE ONLY! True if this post type is a native or
- *                                             "built-in" post_type. Default false.
- *     @type string      $_edit_link           FOR INTERNAL USE ONLY! URL segment to use for edit link of
- *                                             this post type. Default 'post.php?post=%d'.
+ *     @type string|bool $query_var             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.
+ *     @type bool        $can_export            Whether to allow this post type to be exported. Default true.
+ *     @type bool        $delete_with_user      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.
+ *     @type bool        $_builtin              FOR INTERNAL USE ONLY! True if this post type is a native or
+ *                                              "built-in" post_type. Default false.
+ *     @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 WP_Post_Type|WP_Error The registered post type object, or an error object.
  */
@@ -1234,6 +1323,7 @@ function _post_type_meta_capabilities( $capabilities = null ) {
  * - `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'.
+ * - `view_items` - Label for viewing post type archives. Default is 'View Posts' / 'View Pages'.
  * - `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' /
@@ -1242,6 +1332,7 @@ function _post_type_meta_capabilities( $capabilities = null ) {
  *                       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'.
+ * - `attributes` - Label for the attributes meta box. Default is 'Post Attributes' / 'Page Attributes'.
  * - `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'.
@@ -1267,6 +1358,7 @@ function _post_type_meta_capabilities( $capabilities = null ) {
  * @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.
+ * @since 4.7.0 Added the `view_items` and `attributes` labels.
  *
  * @access private
  *
@@ -1282,12 +1374,14 @@ function get_post_type_labels( $post_type_object ) {
                'edit_item' => array( __('Edit Post'), __('Edit Page') ),
                'new_item' => array( __('New Post'), __('New Page') ),
                'view_item' => array( __('View Post'), __('View Page') ),
+               'view_items' => array( __('View Posts'), __('View Pages') ),
                'search_items' => array( __('Search Posts'), __('Search Pages') ),
                'not_found' => array( __('No posts found.'), __('No pages found.') ),
                'not_found_in_trash' => array( __('No posts found in Trash.'), __('No pages found in Trash.') ),
                'parent_item_colon' => array( null, __('Parent Page:') ),
                'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ),
                'archives' => array( __( 'Post Archives' ), __( 'Page Archives' ) ),
+               'attributes' => array( __( 'Post Attributes' ), __( 'Page Attributes' ) ),
                'insert_into_item' => array( __( 'Insert into post' ), __( 'Insert into page' ) ),
                'uploaded_to_this_item' => array( __( 'Uploaded to this post' ), __( 'Uploaded to this page' ) ),
                'featured_image' => array( __( 'Featured Image' ), __( 'Featured Image' ) ),
@@ -2773,9 +2867,11 @@ function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array(
  *
  * @see get_posts()
  *
- * @param array  $args       Optional. Arguments to retrieve posts. Default empty array.
- * @param string $output     Optional. Type of output. Accepts ARRAY_A or ''. Default ARRAY_A.
- * @return array|false Associative array if $output equals ARRAY_A, array or false if no results.
+ * @param array  $args   Optional. Arguments to retrieve posts. Default empty array.
+ * @param string $output Optional. The required return type. One of OBJECT or ARRAY_A, which correspond to
+ *                       a WP_Post object or an associative array, respectively. Default ARRAY_A.
+ * @return array|false Array of recent posts, where the type of each element is determined by $output parameter.
+ *                     Empty array on failure.
  */
 function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
 
@@ -2866,7 +2962,7 @@ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
  *     @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.
  * }
- * @param bool  $wp_error Optional. Whether to allow return of WP_Error on failure. Default false.
+ * @param bool  $wp_error Optional. Whether to return a WP_Error on failure. Default false.
  * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure.
  */
 function wp_insert_post( $postarr, $wp_error = false ) {
@@ -2967,7 +3063,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
        }
 
        $post_status = empty( $postarr['post_status'] ) ? 'draft' : $postarr['post_status'];
-       if ( 'attachment' === $post_type && ! in_array( $post_status, array( 'inherit', 'private', 'trash' ) ) ) {
+       if ( 'attachment' === $post_type && ! in_array( $post_status, array( 'inherit', 'private', 'trash', 'auto-draft' ), true ) ) {
                $post_status = 'inherit';
        }
 
@@ -3032,7 +3128,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
        $valid_date = wp_checkdate( $mm, $jj, $aa, $post_date );
        if ( ! $valid_date ) {
                if ( $wp_error ) {
-                       return new WP_Error( 'invalid_date', __( 'Whoops, the provided date is invalid.' ) );
+                       return new WP_Error( 'invalid_date', __( 'Invalid date.' ) );
                } else {
                        return 0;
                }
@@ -3307,12 +3403,12 @@ function wp_insert_post( $postarr, $wp_error = false ) {
 
        $post = get_post( $post_ID );
 
-       if ( ! empty( $postarr['page_template'] ) && 'page' == $data['post_type'] ) {
+       if ( ! empty( $postarr['page_template'] ) ) {
                $post->page_template = $postarr['page_template'];
                $page_templates = wp_get_theme()->get_page_templates( $post );
                if ( 'default' != $postarr['page_template'] && ! isset( $page_templates[ $postarr['page_template'] ] ) ) {
                        if ( $wp_error ) {
-                               return new WP_Error('invalid_page_template', __('The page template is invalid.'));
+                               return new WP_Error( 'invalid_page_template', __( 'Invalid page template.' ) );
                        }
                        update_post_meta( $post_ID, '_wp_page_template', 'default' );
                } else {
@@ -3905,19 +4001,32 @@ function wp_transition_post_status( $new_status, $old_status, $post ) {
  * Add a URL to those already pinged.
  *
  * @since 1.5.0
+ * @since 4.7.0 $post_id can be a WP_Post object.
+ * @since 4.7.0 $uri can be an array of URIs.
  *
  * @global wpdb $wpdb WordPress database abstraction object.
  *
- * @param int    $post_id Post ID.
- * @param string $uri     Ping URI.
+ * @param int|WP_Post  $post_id Post object or ID.
+ * @param string|array $uri     Ping URI or array of URIs.
  * @return int|false How many rows were updated.
  */
 function add_ping( $post_id, $uri ) {
        global $wpdb;
-       $pung = $wpdb->get_var( $wpdb->prepare( "SELECT pinged FROM $wpdb->posts WHERE ID = %d", $post_id ));
-       $pung = trim($pung);
-       $pung = preg_split('/\s/', $pung);
-       $pung[] = $uri;
+
+       $post = get_post( $post_id );
+       if ( ! $post ) {
+               return false;
+       }
+
+       $pung = trim( $post->pinged );
+       $pung = preg_split( '/\s/', $pung );
+
+       if ( is_array( $uri ) ) {
+               $pung = array_merge( $pung, $uri );
+       }
+       else {
+               $pung[] = $uri;
+       }
        $new = implode("\n", $pung);
 
        /**
@@ -3929,9 +4038,9 @@ function add_ping( $post_id, $uri ) {
         */
        $new = apply_filters( 'add_ping', $new );
 
-       // expected_slashed ($new).
-       $new = wp_unslash($new);
-       return $wpdb->update( $wpdb->posts, array( 'pinged' => $new ), array( 'ID' => $post_id ) );
+       $return = $wpdb->update( $wpdb->posts, array( 'pinged' => $new ), array( 'ID' => $post->ID ) );
+       clean_post_cache( $post->ID );
+       return $return;
 }
 
 /**
@@ -3973,16 +4082,19 @@ function get_enclosed( $post_id ) {
  *
  * @since 1.5.0
  *
- * @global wpdb $wpdb WordPress database abstraction object.
+ * @since 4.7.0 $post_id can be a WP_Post object.
  *
- * @param int $post_id Post ID.
+ * @param int|WP_Post $post_id Post ID or object.
  * @return array
  */
 function get_pung( $post_id ) {
-       global $wpdb;
-       $pung = $wpdb->get_var( $wpdb->prepare( "SELECT pinged FROM $wpdb->posts WHERE ID = %d", $post_id ));
-       $pung = trim($pung);
-       $pung = preg_split('/\s/', $pung);
+       $post = get_post( $post_id );
+       if ( ! $post ) {
+               return false;
+       }
+
+       $pung = trim( $post->pinged );
+       $pung = preg_split( '/\s/', $pung );
 
        /**
         * Filters the list of already-pinged URLs for the given post.
@@ -3998,16 +4110,19 @@ function get_pung( $post_id ) {
  * Retrieve URLs that need to be pinged.
  *
  * @since 1.5.0
+ * @since 4.7.0 $post_id can be a WP_Post object.
  *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int $post_id Post ID
+ * @param int|WP_Post $post_id Post Object or ID
  * @return array
  */
 function get_to_ping( $post_id ) {
-       global $wpdb;
-       $to_ping = $wpdb->get_var( $wpdb->prepare( "SELECT to_ping FROM $wpdb->posts WHERE ID = %d", $post_id ));
-       $to_ping = sanitize_trackback_urls( $to_ping );
+       $post = get_post( $post_id );
+
+       if ( ! $post ) {
+               return false;
+       }
+
+       $to_ping = sanitize_trackback_urls( $post->to_ping );
        $to_ping = preg_split('/\s/', $to_ping, -1, PREG_SPLIT_NO_EMPTY);
 
        /**
@@ -4082,11 +4197,11 @@ function get_all_page_ids() {
  * @deprecated 3.5.0 Use get_post()
  *
  * @param mixed  $page   Page object or page ID. Passed by reference.
- * @param string $output Optional. What to output. Accepts OBJECT, ARRAY_A, or ARRAY_N.
- *                       Default OBJECT.
+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                       a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
  * @param string $filter Optional. How the return value should be filtered. Accepts 'raw',
  *                       'edit', 'db', 'display'. Default 'raw'.
- * @return WP_Post|array|null WP_Post on success or null on failure.
+ * @return WP_Post|array|null WP_Post (or array) on success, or null on failure.
  */
 function get_page( $page, $output = OBJECT, $filter = 'raw') {
        return get_post( $page, $output, $filter );
@@ -4100,19 +4215,15 @@ function get_page( $page, $output = OBJECT, $filter = 'raw') {
  * @global wpdb $wpdb WordPress database abstraction object.
  *
  * @param string       $page_path Page path.
- * @param string       $output    Optional. Output type. Accepts OBJECT, ARRAY_N, or ARRAY_A.
- *                                Default OBJECT.
+ * @param string       $output    Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                                a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
  * @param string|array $post_type Optional. Post type or array of post types. Default 'page'.
- * @return WP_Post|array|void WP_Post on success.
+ * @return WP_Post|array|null WP_Post (or array) on success, or null on failure.
  */
 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' );
-       }
+       $last_changed = wp_cache_get_last_changed( 'posts' );
 
        $hash = md5( $page_path . serialize( $post_type ) );
        $cache_key = "get_page_by_path:$hash:$last_changed";
@@ -4196,10 +4307,10 @@ function get_page_by_path( $page_path, $output = OBJECT, $post_type = 'page' ) {
  * @global wpdb $wpdb WordPress database abstraction object.
  *
  * @param string       $page_title Page title
- * @param string       $output     Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A.
- *                                 Default OBJECT.
+ * @param string       $output     Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                                 a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
  * @param string|array $post_type  Optional. Post type or array of post types. Default 'page'.
- * @return WP_Post|array|void WP_Post on success or null on failure
+ * @return WP_Post|array|null WP_Post (or array) on success, or null on failure.
  */
 function get_page_by_title( $page_title, $output = OBJECT, $post_type = 'page' ) {
        global $wpdb;
@@ -4396,7 +4507,7 @@ function get_page_uri( $page = 0 ) {
  *     @type int          $offset       The number of pages to skip before returning. Requires `$number`.
  *                                      Default 0.
  *     @type string       $post_type    The post type to query. Default 'page'.
- *     @type string       $post_status  A comma-separated list of post status types to include.
+ *     @type string|array $post_status  A comma-separated list or array of post statuses to include.
  *                                      Default 'publish'.
  * }
  * @return array|false List of pages matching defaults or `$args`.
@@ -4405,13 +4516,21 @@ function get_pages( $args = array() ) {
        global $wpdb;
 
        $defaults = array(
-               'child_of' => 0, 'sort_order' => 'ASC',
-               'sort_column' => 'post_title', 'hierarchical' => 1,
-               'exclude' => array(), 'include' => array(),
-               'meta_key' => '', 'meta_value' => '',
-               'authors' => '', 'parent' => -1, 'exclude_tree' => array(),
-               'number' => '', 'offset' => 0,
-               'post_type' => 'page', 'post_status' => 'publish',
+               'child_of'     => 0,
+               'sort_order'   => 'ASC',
+               'sort_column'  => 'post_title',
+               'hierarchical' => 1,
+               'exclude'      => array(),
+               'include'      => array(),
+               'meta_key'     => '',
+               'meta_value'   => '',
+               'authors'      => '',
+               'parent'       => -1,
+               'exclude_tree' => array(),
+               'number'       => '',
+               'offset'       => 0,
+               'post_type'    => 'page',
+               'post_status'  => 'publish',
        );
 
        $r = wp_parse_args( $args, $defaults );
@@ -4446,11 +4565,7 @@ function get_pages( $args = array() ) {
 
        // $args can be whatever, only use the args defined in defaults to compute the key.
        $key = md5( serialize( wp_array_slice_assoc( $r, array_keys( $defaults ) ) ) );
-       $last_changed = wp_cache_get( 'last_changed', 'posts' );
-       if ( ! $last_changed ) {
-               $last_changed = microtime();
-               wp_cache_set( 'last_changed', $last_changed, 'posts' );
-       }
+       $last_changed = wp_cache_get_last_changed( 'posts' );
 
        $cache_key = "get_pages:$key:$last_changed";
        if ( $cache = wp_cache_get( $cache_key, 'posts' ) ) {
@@ -4694,15 +4809,17 @@ function is_local_attachment($url) {
  * setting the value for the 'comment_status' key.
  *
  * @since 2.0.0
+ * @since 4.7.0 Added the `$wp_error` parameter to allow a WP_Error to be returned on failure.
  *
  * @see wp_insert_post()
  *
- * @param string|array $args   Arguments for inserting an attachment.
- * @param string       $file   Optional. Filename.
- * @param int          $parent Optional. Parent post ID.
- * @return int Attachment ID.
+ * @param string|array $args     Arguments for inserting an attachment.
+ * @param string       $file     Optional. Filename.
+ * @param int          $parent   Optional. Parent post ID.
+ * @param bool         $wp_error Optional. Whether to return a WP_Error on failure. Default false.
+ * @return int|WP_Error The attachment ID on success. The value 0 or WP_Error on failure.
  */
-function wp_insert_attachment( $args, $file = false, $parent = 0 ) {
+function wp_insert_attachment( $args, $file = false, $parent = 0, $wp_error = false ) {
        $defaults = array(
                'file'        => $file,
                'post_parent' => 0
@@ -4716,7 +4833,7 @@ function wp_insert_attachment( $args, $file = false, $parent = 0 ) {
 
        $data['post_type'] = 'attachment';
 
-       return wp_insert_post( $data );
+       return wp_insert_post( $data, $wp_error );
 }
 
 /**
@@ -5505,35 +5622,38 @@ function _get_last_post_time( $timezone, $field, $post_type = 'any' ) {
        }
 
        $date = wp_cache_get( $key, 'timeinfo' );
+       if ( false !== $date ) {
+               return $date;
+       }
 
-       if ( ! $date ) {
-               if ( 'any' === $post_type ) {
-                       $post_types = get_post_types( array( 'public' => true ) );
-                       array_walk( $post_types, array( $wpdb, 'escape_by_ref' ) );
-                       $post_types = "'" . implode( "', '", $post_types ) . "'";
-               } else {
-                       $post_types = "'" . sanitize_key( $post_type ) . "'";
-               }
+       if ( 'any' === $post_type ) {
+               $post_types = get_post_types( array( 'public' => true ) );
+               array_walk( $post_types, array( $wpdb, 'escape_by_ref' ) );
+               $post_types = "'" . implode( "', '", $post_types ) . "'";
+       } else {
+               $post_types = "'" . sanitize_key( $post_type ) . "'";
+       }
 
-               switch ( $timezone ) {
-                       case 'gmt':
-                               $date = $wpdb->get_var("SELECT post_{$field}_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt DESC LIMIT 1");
-                               break;
-                       case 'blog':
-                               $date = $wpdb->get_var("SELECT post_{$field} FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt DESC LIMIT 1");
-                               break;
-                       case 'server':
-                               $add_seconds_server = date( 'Z' );
-                               $date = $wpdb->get_var("SELECT DATE_ADD(post_{$field}_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt DESC LIMIT 1");
-                               break;
-               }
+       switch ( $timezone ) {
+               case 'gmt':
+                       $date = $wpdb->get_var("SELECT post_{$field}_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt DESC LIMIT 1");
+                       break;
+               case 'blog':
+                       $date = $wpdb->get_var("SELECT post_{$field} FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt DESC LIMIT 1");
+                       break;
+               case 'server':
+                       $add_seconds_server = date( 'Z' );
+                       $date = $wpdb->get_var("SELECT DATE_ADD(post_{$field}_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt DESC LIMIT 1");
+                       break;
+       }
 
-               if ( $date ) {
-                       wp_cache_set( $key, $date, 'timeinfo' );
-               }
+       if ( $date ) {
+               wp_cache_set( $key, $date, 'timeinfo' );
+
+               return $date;
        }
 
-       return $date;
+       return false;
 }
 
 /**
index 053bd4cac3c7900ae6b13c357ae78cdf4c5fca8c..744610f425caceccc5636a3332c6cb1d9149c1a3 100644 (file)
@@ -837,4090 +837,6 @@ function the_comment() {
        return $wp_query->the_comment();
 }
 
-/*
- * WP_Query
- */
-
-/**
- * The WordPress Query class.
- *
- * @link https://codex.wordpress.org/Function_Reference/WP_Query Codex page.
- *
- * @since 1.5.0
- * @since 4.5.0 Removed the `$comments_popup` property.
- */
-class WP_Query {
-
-       /**
-        * Query vars set by the user
-        *
-        * @since 1.5.0
-        * @access public
-        * @var array
-        */
-       public $query;
-
-       /**
-        * Query vars, after parsing
-        *
-        * @since 1.5.0
-        * @access public
-        * @var array
-        */
-       public $query_vars = array();
-
-       /**
-        * Taxonomy query, as passed to get_tax_sql()
-        *
-        * @since 3.1.0
-        * @access public
-        * @var object WP_Tax_Query
-        */
-       public $tax_query;
-
-       /**
-        * Metadata query container
-        *
-        * @since 3.2.0
-        * @access public
-        * @var object WP_Meta_Query
-        */
-       public $meta_query = false;
-
-       /**
-        * Date query container
-        *
-        * @since 3.7.0
-        * @access public
-        * @var object WP_Date_Query
-        */
-       public $date_query = false;
-
-       /**
-        * Holds the data for a single object that is queried.
-        *
-        * Holds the contents of a post, page, category, attachment.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var object|array
-        */
-       public $queried_object;
-
-       /**
-        * The ID of the queried object.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var int
-        */
-       public $queried_object_id;
-
-       /**
-        * Get post database query.
-        *
-        * @since 2.0.1
-        * @access public
-        * @var string
-        */
-       public $request;
-
-       /**
-        * List of posts.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var array
-        */
-       public $posts;
-
-       /**
-        * The amount of posts for the current query.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var int
-        */
-       public $post_count = 0;
-
-       /**
-        * Index of the current item in the loop.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var int
-        */
-       public $current_post = -1;
-
-       /**
-        * Whether the loop has started and the caller is in the loop.
-        *
-        * @since 2.0.0
-        * @access public
-        * @var bool
-        */
-       public $in_the_loop = false;
-
-       /**
-        * The current post.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var WP_Post
-        */
-       public $post;
-
-       /**
-        * The list of comments for current post.
-        *
-        * @since 2.2.0
-        * @access public
-        * @var array
-        */
-       public $comments;
-
-       /**
-        * The amount of comments for the posts.
-        *
-        * @since 2.2.0
-        * @access public
-        * @var int
-        */
-       public $comment_count = 0;
-
-       /**
-        * The index of the comment in the comment loop.
-        *
-        * @since 2.2.0
-        * @access public
-        * @var int
-        */
-       public $current_comment = -1;
-
-       /**
-        * Current comment ID.
-        *
-        * @since 2.2.0
-        * @access public
-        * @var int
-        */
-       public $comment;
-
-       /**
-        * The amount of found posts for the current query.
-        *
-        * If limit clause was not used, equals $post_count.
-        *
-        * @since 2.1.0
-        * @access public
-        * @var int
-        */
-       public $found_posts = 0;
-
-       /**
-        * The amount of pages.
-        *
-        * @since 2.1.0
-        * @access public
-        * @var int
-        */
-       public $max_num_pages = 0;
-
-       /**
-        * The amount of comment pages.
-        *
-        * @since 2.7.0
-        * @access public
-        * @var int
-        */
-       public $max_num_comment_pages = 0;
-
-       /**
-        * Set if query is single post.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_single = false;
-
-       /**
-        * Set if query is preview of blog.
-        *
-        * @since 2.0.0
-        * @access public
-        * @var bool
-        */
-       public $is_preview = false;
-
-       /**
-        * Set if query returns a page.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_page = false;
-
-       /**
-        * Set if query is an archive list.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_archive = false;
-
-       /**
-        * Set if query is part of a date.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_date = false;
-
-       /**
-        * Set if query contains a year.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_year = false;
-
-       /**
-        * Set if query contains a month.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_month = false;
-
-       /**
-        * Set if query contains a day.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_day = false;
-
-       /**
-        * Set if query contains time.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_time = false;
-
-       /**
-        * Set if query contains an author.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_author = false;
-
-       /**
-        * Set if query contains category.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_category = false;
-
-       /**
-        * Set if query contains tag.
-        *
-        * @since 2.3.0
-        * @access public
-        * @var bool
-        */
-       public $is_tag = false;
-
-       /**
-        * Set if query contains taxonomy.
-        *
-        * @since 2.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_tax = false;
-
-       /**
-        * Set if query was part of a search result.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_search = false;
-
-       /**
-        * Set if query is feed display.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_feed = false;
-
-       /**
-        * Set if query is comment feed display.
-        *
-        * @since 2.2.0
-        * @access public
-        * @var bool
-        */
-       public $is_comment_feed = false;
-
-       /**
-        * Set if query is trackback.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_trackback = false;
-
-       /**
-        * Set if query is blog homepage.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_home = false;
-
-       /**
-        * Set if query couldn't found anything.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_404 = false;
-
-       /**
-        * Set if query is embed.
-        *
-        * @since 4.4.0
-        * @access public
-        * @var bool
-        */
-       public $is_embed = false;
-
-       /**
-        * Set if query is paged
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_paged = false;
-
-       /**
-        * Set if query is part of administration page.
-        *
-        * @since 1.5.0
-        * @access public
-        * @var bool
-        */
-       public $is_admin = false;
-
-       /**
-        * Set if query is an attachment.
-        *
-        * @since 2.0.0
-        * @access public
-        * @var bool
-        */
-       public $is_attachment = false;
-
-       /**
-        * Set if is single, is a page, or is an attachment.
-        *
-        * @since 2.1.0
-        * @access public
-        * @var bool
-        */
-       public $is_singular = false;
-
-       /**
-        * Set if query is for robots.
-        *
-        * @since 2.1.0
-        * @access public
-        * @var bool
-        */
-       public $is_robots = false;
-
-       /**
-        * Set if query contains posts.
-        *
-        * Basically, the homepage if the option isn't set for the static homepage.
-        *
-        * @since 2.1.0
-        * @access public
-        * @var bool
-        */
-       public $is_posts_page = false;
-
-       /**
-        * Set if query is for a post type archive.
-        *
-        * @since 3.1.0
-        * @access public
-        * @var bool
-        */
-       public $is_post_type_archive = false;
-
-       /**
-        * Stores the ->query_vars state like md5(serialize( $this->query_vars ) ) so we know
-        * whether we have to re-parse because something has changed
-        *
-        * @since 3.1.0
-        * @access private
-        * @var bool|string
-        */
-       private $query_vars_hash = false;
-
-       /**
-        * Whether query vars have changed since the initial parse_query() call. Used to catch modifications to query vars made
-        * via pre_get_posts hooks.
-        *
-        * @since 3.1.1
-        * @access private
-        */
-       private $query_vars_changed = true;
-
-       /**
-        * Set if post thumbnails are cached
-        *
-        * @since 3.2.0
-        * @access public
-        * @var bool
-        */
-        public $thumbnails_cached = false;
-
-       /**
-        * Cached list of search stopwords.
-        *
-        * @since 3.7.0
-        * @var array
-        */
-       private $stopwords;
-
-       private $compat_fields = array( 'query_vars_hash', 'query_vars_changed' );
-
-       private $compat_methods = array( 'init_query_flags', 'parse_tax_query' );
-
-       /**
-        * Resets query flags to false.
-        *
-        * The query flags are what page info WordPress was able to figure out.
-        *
-        * @since 2.0.0
-        * @access private
-        */
-       private function init_query_flags() {
-               $this->is_single = false;
-               $this->is_preview = false;
-               $this->is_page = false;
-               $this->is_archive = false;
-               $this->is_date = false;
-               $this->is_year = false;
-               $this->is_month = false;
-               $this->is_day = false;
-               $this->is_time = false;
-               $this->is_author = false;
-               $this->is_category = false;
-               $this->is_tag = false;
-               $this->is_tax = false;
-               $this->is_search = false;
-               $this->is_feed = false;
-               $this->is_comment_feed = false;
-               $this->is_trackback = false;
-               $this->is_home = false;
-               $this->is_404 = false;
-               $this->is_paged = false;
-               $this->is_admin = false;
-               $this->is_attachment = false;
-               $this->is_singular = false;
-               $this->is_robots = false;
-               $this->is_posts_page = false;
-               $this->is_post_type_archive = false;
-       }
-
-       /**
-        * Initiates object properties and sets default values.
-        *
-        * @since 1.5.0
-        * @access public
-        */
-       public function init() {
-               unset($this->posts);
-               unset($this->query);
-               $this->query_vars = array();
-               unset($this->queried_object);
-               unset($this->queried_object_id);
-               $this->post_count = 0;
-               $this->current_post = -1;
-               $this->in_the_loop = false;
-               unset( $this->request );
-               unset( $this->post );
-               unset( $this->comments );
-               unset( $this->comment );
-               $this->comment_count = 0;
-               $this->current_comment = -1;
-               $this->found_posts = 0;
-               $this->max_num_pages = 0;
-               $this->max_num_comment_pages = 0;
-
-               $this->init_query_flags();
-       }
-
-       /**
-        * Reparse the query vars.
-        *
-        * @since 1.5.0
-        * @access public
-        */
-       public function parse_query_vars() {
-               $this->parse_query();
-       }
-
-       /**
-        * Fills in the query variables, which do not exist within the parameter.
-        *
-        * @since 2.1.0
-        * @since 4.4.0 Removed the `comments_popup` public query variable.
-        * @access public
-        *
-        * @param array $array Defined query variables.
-        * @return array Complete query variables with undefined ones filled in empty.
-        */
-       public function fill_query_vars($array) {
-               $keys = array(
-                       'error'
-                       , 'm'
-                       , 'p'
-                       , 'post_parent'
-                       , 'subpost'
-                       , 'subpost_id'
-                       , 'attachment'
-                       , 'attachment_id'
-                       , 'name'
-                       , 'static'
-                       , 'pagename'
-                       , 'page_id'
-                       , 'second'
-                       , 'minute'
-                       , 'hour'
-                       , 'day'
-                       , 'monthnum'
-                       , 'year'
-                       , 'w'
-                       , 'category_name'
-                       , 'tag'
-                       , 'cat'
-                       , 'tag_id'
-                       , 'author'
-                       , 'author_name'
-                       , 'feed'
-                       , 'tb'
-                       , 'paged'
-                       , 'meta_key'
-                       , 'meta_value'
-                       , 'preview'
-                       , 's'
-                       , 'sentence'
-                       , 'title'
-                       , 'fields'
-                       , 'menu_order'
-                       , 'embed'
-               );
-
-               foreach ( $keys as $key ) {
-                       if ( !isset($array[$key]) )
-                               $array[$key] = '';
-               }
-
-               $array_keys = array( 'category__in', 'category__not_in', 'category__and', 'post__in', 'post__not_in', 'post_name__in',
-                       'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'post_parent__in', 'post_parent__not_in',
-                       'author__in', 'author__not_in' );
-
-               foreach ( $array_keys as $key ) {
-                       if ( !isset($array[$key]) )
-                               $array[$key] = array();
-               }
-               return $array;
-       }
-
-       /**
-        * Parse a query string and set query type booleans.
-        *
-        * @since 1.5.0
-        * @since 4.2.0 Introduced the ability to order by specific clauses of a `$meta_query`, by passing the clause's
-        *              array key to `$orderby`.
-        * @since 4.4.0 Introduced `$post_name__in` and `$title` parameters. `$s` was updated to support excluded
-        *              search terms, by prepending a hyphen.
-        * @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 {
-        *     Optional. Array or string of Query parameters.
-        *
-        *     @type int          $attachment_id           Attachment post ID. Used for 'attachment' post_type.
-        *     @type int|string   $author                  Author ID, or comma-separated list of IDs.
-        *     @type string       $author_name             User 'user_nicename'.
-        *     @type array        $author__in              An array of author IDs to query from.
-        *     @type array        $author__not_in          An array of author IDs not to query from.
-        *     @type bool         $cache_results           Whether to cache post information. Default true.
-        *     @type int|string   $cat                     Category ID or comma-separated list of IDs (this or any children).
-        *     @type array        $category__and           An array of category IDs (AND in).
-        *     @type array        $category__in            An array of category IDs (OR in, no children).
-        *     @type array        $category__not_in        An array of category IDs (NOT in).
-        *     @type string       $category_name           Use category slug (not name, this or any children).
-        *     @type string       $comment_status          Comment status.
-        *     @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().
-        *     @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),
-        *                                                 or array of fields. 'id=>parent' uses 'id' and 'post_parent'.
-        *                                                 Default all fields. Accepts 'ids', 'id=>parent'.
-        *     @type int          $hour                    Hour of the day. Default empty. Accepts numbers 0-23.
-        *     @type int|bool     $ignore_sticky_posts     Whether to ignore sticky posts or not. Setting this to false
-        *                                                 excludes stickies from 'post__in'. Accepts 1|true, 0|false.
-        *                                                 Default 0|false.
-        *     @type int          $m                       Combination YearMonth. Accepts any four-digit year and month
-        *                                                 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 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.
-        *     @type int          $monthnum                The two-digit month. Default empty. Accepts numbers 1-12.
-        *     @type string       $name                    Post slug.
-        *     @type bool         $nopaging                Show all posts (true) or paginate (false). Default false.
-        *     @type bool         $no_found_rows           Whether to skip counting the total rows found. Enabling can improve
-        *                                                 performance. Default false.
-        *     @type int          $offset                  The number of posts to offset before retrieval.
-        *     @type string       $order                   Designates ascending or descending order of posts. Default 'DESC'.
-        *                                                 Accepts 'ASC', 'DESC'.
-        *     @type string|array $orderby                 Sort retrieved posts by parameter. One or more options may be
-        *                                                 passed. To use 'meta_value', or 'meta_value_num',
-        *                                                 'meta_key=keyname' must be also be defined. To sort by a
-        *                                                 specific `$meta_query` clause, use that clause's array key.
-        *                                                 Default 'date'. Accepts 'none', 'name', 'author', 'date',
-        *                                                 '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',
-        *                                                 '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.
-        *     @type int          $paged                   The number of the current page.
-        *     @type int          $page_id                 Page ID.
-        *     @type string       $pagename                Page slug.
-        *     @type string       $perm                    Show posts if user has the appropriate capability.
-        *     @type string       $ping_status             Ping status.
-        *     @type array        $post__in                An array of post IDs to retrieve, sticky posts will be included
-        *     @type string       $post_mime_type          The mime type of the post. Used for 'attachment' post_type.
-        *     @type array        $post__not_in            An array of post IDs not to retrieve. Note: a string of comma-
-        *                                                 separated IDs will NOT work.
-        *     @type int          $post_parent             Page ID to retrieve child pages for. Use 0 to only retrieve
-        *                                                 top-level pages.
-        *     @type array        $post_parent__in         An array containing parent page IDs to query child pages from.
-        *     @type array        $post_parent__not_in     An array containing parent page IDs not to query child pages from.
-        *     @type string|array $post_type               A post type slug (string) or array of post type slugs.
-        *                                                 Default 'any' if using 'tax_query'.
-        *     @type string|array $post_status             A post status (string) or array of post statuses.
-        *     @type int          $posts_per_page          The number of posts to query for. Use -1 to request all posts.
-        *     @type int          $posts_per_archive_page  The number of posts to query for by archive page. Overrides
-        *                                                 'posts_per_page' when is_archive(), or is_search() are true.
-        *     @type array        $post_name__in           An array of post slugs that results must match.
-        *     @type string       $s                       Search keyword(s). Prepending a term with a hyphen will
-        *                                                 exclude posts matching that term. Eg, 'pillow -sofa' will
-        *                                                 return posts containing 'pillow' but not 'sofa'.
-        *     @type int          $second                  Second of the minute. Default empty. Accepts numbers 0-60.
-        *     @type bool         $sentence                Whether to search by phrase. Default false.
-        *     @type bool         $suppress_filters        Whether to suppress filters. Default false.
-        *     @type string       $tag                     Tag slug. Comma-separated (either), Plus-separated (all).
-        *     @type array        $tag__and                An array of tag ids (AND in).
-        *     @type array        $tag__in                 An array of tag ids (OR in).
-        *     @type array        $tag__not_in             An array of tag ids (NOT in).
-        *     @type int          $tag_id                  Tag id or comma-separated list of IDs.
-        *     @type array        $tag_slug__and           An array of tag slugs (AND in).
-        *     @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.
-        *     @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.
-        * }
-        */
-       public function parse_query( $query =  '' ) {
-               if ( ! empty( $query ) ) {
-                       $this->init();
-                       $this->query = $this->query_vars = wp_parse_args( $query );
-               } elseif ( ! isset( $this->query ) ) {
-                       $this->query = $this->query_vars;
-               }
-
-               $this->query_vars = $this->fill_query_vars($this->query_vars);
-               $qv = &$this->query_vars;
-               $this->query_vars_changed = true;
-
-               if ( ! empty($qv['robots']) )
-                       $this->is_robots = true;
-
-               $qv['p'] =  absint($qv['p']);
-               $qv['page_id'] =  absint($qv['page_id']);
-               $qv['year'] = absint($qv['year']);
-               $qv['monthnum'] = absint($qv['monthnum']);
-               $qv['day'] = absint($qv['day']);
-               $qv['w'] = absint($qv['w']);
-               $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
-               $qv['pagename'] = trim( $qv['pagename'] );
-               $qv['name'] = trim( $qv['name'] );
-               $qv['title'] = trim( $qv['title'] );
-               if ( '' !== $qv['hour'] ) $qv['hour'] = absint($qv['hour']);
-               if ( '' !== $qv['minute'] ) $qv['minute'] = absint($qv['minute']);
-               if ( '' !== $qv['second'] ) $qv['second'] = absint($qv['second']);
-               if ( '' !== $qv['menu_order'] ) $qv['menu_order'] = absint($qv['menu_order']);
-
-               // Fairly insane upper bound for search string lengths.
-               if ( ! is_scalar( $qv['s'] ) || ( ! empty( $qv['s'] ) && strlen( $qv['s'] ) > 1600 ) ) {
-                       $qv['s'] = '';
-               }
-
-               // Compat. Map subpost to attachment.
-               if ( '' != $qv['subpost'] )
-                       $qv['attachment'] = $qv['subpost'];
-               if ( '' != $qv['subpost_id'] )
-                       $qv['attachment_id'] = $qv['subpost_id'];
-
-               $qv['attachment_id'] = absint($qv['attachment_id']);
-
-               if ( ('' != $qv['attachment']) || !empty($qv['attachment_id']) ) {
-                       $this->is_single = true;
-                       $this->is_attachment = true;
-               } elseif ( '' != $qv['name'] ) {
-                       $this->is_single = true;
-               } elseif ( $qv['p'] ) {
-                       $this->is_single = true;
-               } elseif ( ('' !== $qv['hour']) && ('' !== $qv['minute']) &&('' !== $qv['second']) && ('' != $qv['year']) && ('' != $qv['monthnum']) && ('' != $qv['day']) ) {
-                       // If year, month, day, hour, minute, and second are set, a single
-                       // post is being queried.
-                       $this->is_single = true;
-               } elseif ( '' != $qv['static'] || '' != $qv['pagename'] || !empty($qv['page_id']) ) {
-                       $this->is_page = true;
-                       $this->is_single = false;
-               } else {
-                       // Look for archive queries. Dates, categories, authors, search, post type archives.
-
-                       if ( isset( $this->query['s'] ) ) {
-                               $this->is_search = true;
-                       }
-
-                       if ( '' !== $qv['second'] ) {
-                               $this->is_time = true;
-                               $this->is_date = true;
-                       }
-
-                       if ( '' !== $qv['minute'] ) {
-                               $this->is_time = true;
-                               $this->is_date = true;
-                       }
-
-                       if ( '' !== $qv['hour'] ) {
-                               $this->is_time = true;
-                               $this->is_date = true;
-                       }
-
-                       if ( $qv['day'] ) {
-                               if ( ! $this->is_date ) {
-                                       $date = sprintf( '%04d-%02d-%02d', $qv['year'], $qv['monthnum'], $qv['day'] );
-                                       if ( $qv['monthnum'] && $qv['year'] && ! wp_checkdate( $qv['monthnum'], $qv['day'], $qv['year'], $date ) ) {
-                                               $qv['error'] = '404';
-                                       } else {
-                                               $this->is_day = true;
-                                               $this->is_date = true;
-                                       }
-                               }
-                       }
-
-                       if ( $qv['monthnum'] ) {
-                               if ( ! $this->is_date ) {
-                                       if ( 12 < $qv['monthnum'] ) {
-                                               $qv['error'] = '404';
-                                       } else {
-                                               $this->is_month = true;
-                                               $this->is_date = true;
-                                       }
-                               }
-                       }
-
-                       if ( $qv['year'] ) {
-                               if ( ! $this->is_date ) {
-                                       $this->is_year = true;
-                                       $this->is_date = true;
-                               }
-                       }
-
-                       if ( $qv['m'] ) {
-                               $this->is_date = true;
-                               if ( strlen($qv['m']) > 9 ) {
-                                       $this->is_time = true;
-                               } elseif ( strlen( $qv['m'] ) > 7 ) {
-                                       $this->is_day = true;
-                               } elseif ( strlen( $qv['m'] ) > 5 ) {
-                                       $this->is_month = true;
-                               } else {
-                                       $this->is_year = true;
-                               }
-                       }
-
-                       if ( '' != $qv['w'] ) {
-                               $this->is_date = true;
-                       }
-
-                       $this->query_vars_hash = false;
-                       $this->parse_tax_query( $qv );
-
-                       foreach ( $this->tax_query->queries as $tax_query ) {
-                               if ( ! is_array( $tax_query ) ) {
-                                       continue;
-                               }
-
-                               if ( isset( $tax_query['operator'] ) && 'NOT IN' != $tax_query['operator'] ) {
-                                       switch ( $tax_query['taxonomy'] ) {
-                                               case 'category':
-                                                       $this->is_category = true;
-                                                       break;
-                                               case 'post_tag':
-                                                       $this->is_tag = true;
-                                                       break;
-                                               default:
-                                                       $this->is_tax = true;
-                                       }
-                               }
-                       }
-                       unset( $tax_query );
-
-                       if ( empty($qv['author']) || ($qv['author'] == '0') ) {
-                               $this->is_author = false;
-                       } else {
-                               $this->is_author = true;
-                       }
-
-                       if ( '' != $qv['author_name'] )
-                               $this->is_author = true;
-
-                       if ( !empty( $qv['post_type'] ) && ! is_array( $qv['post_type'] ) ) {
-                               $post_type_obj = get_post_type_object( $qv['post_type'] );
-                               if ( ! empty( $post_type_obj->has_archive ) )
-                                       $this->is_post_type_archive = true;
-                       }
-
-                       if ( $this->is_post_type_archive || $this->is_date || $this->is_author || $this->is_category || $this->is_tag || $this->is_tax )
-                               $this->is_archive = true;
-               }
-
-               if ( '' != $qv['feed'] )
-                       $this->is_feed = true;
-
-               if ( '' != $qv['embed'] ) {
-                       $this->is_embed = true;
-               }
-
-               if ( '' != $qv['tb'] )
-                       $this->is_trackback = true;
-
-               if ( '' != $qv['paged'] && ( intval($qv['paged']) > 1 ) )
-                       $this->is_paged = true;
-
-               // if we're previewing inside the write screen
-               if ( '' != $qv['preview'] )
-                       $this->is_preview = true;
-
-               if ( is_admin() )
-                       $this->is_admin = true;
-
-               if ( false !== strpos($qv['feed'], 'comments-') ) {
-                       $qv['feed'] = str_replace('comments-', '', $qv['feed']);
-                       $qv['withcomments'] = 1;
-               }
-
-               $this->is_singular = $this->is_single || $this->is_page || $this->is_attachment;
-
-               if ( $this->is_feed && ( !empty($qv['withcomments']) || ( empty($qv['withoutcomments']) && $this->is_singular ) ) )
-                       $this->is_comment_feed = true;
-
-               if ( !( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_robots ) )
-                       $this->is_home = true;
-
-               // Correct is_* for page_on_front and page_for_posts
-               if ( $this->is_home && 'page' == get_option('show_on_front') && get_option('page_on_front') ) {
-                       $_query = wp_parse_args($this->query);
-                       // pagename can be set and empty depending on matched rewrite rules. Ignore an empty pagename.
-                       if ( isset($_query['pagename']) && '' == $_query['pagename'] )
-                               unset($_query['pagename']);
-
-                       unset( $_query['embed'] );
-
-                       if ( empty($_query) || !array_diff( array_keys($_query), array('preview', 'page', 'paged', 'cpage') ) ) {
-                               $this->is_page = true;
-                               $this->is_home = false;
-                               $qv['page_id'] = get_option('page_on_front');
-                               // Correct <!--nextpage--> for page_on_front
-                               if ( !empty($qv['paged']) ) {
-                                       $qv['page'] = $qv['paged'];
-                                       unset($qv['paged']);
-                               }
-                       }
-               }
-
-               if ( '' != $qv['pagename'] ) {
-                       $this->queried_object = get_page_by_path( $qv['pagename'] );
-
-                       if ( $this->queried_object && 'attachment' == $this->queried_object->post_type ) {
-                               if ( preg_match( "/^[^%]*%(?:postname)%/", get_option( 'permalink_structure' ) ) ) {
-                                       // See if we also have a post with the same slug
-                                       $post = get_page_by_path( $qv['pagename'], OBJECT, 'post' );
-                                       if ( $post ) {
-                                               $this->queried_object = $post;
-                                               $this->is_page = false;
-                                               $this->is_single = true;
-                                       }
-                               }
-                       }
-
-                       if ( ! empty( $this->queried_object ) ) {
-                               $this->queried_object_id = (int) $this->queried_object->ID;
-                       } else {
-                               unset( $this->queried_object );
-                       }
-
-                       if  ( 'page' == get_option('show_on_front') && isset($this->queried_object_id) && $this->queried_object_id == get_option('page_for_posts') ) {
-                               $this->is_page = false;
-                               $this->is_home = true;
-                               $this->is_posts_page = true;
-                       }
-               }
-
-               if ( $qv['page_id'] ) {
-                       if  ( 'page' == get_option('show_on_front') && $qv['page_id'] == get_option('page_for_posts') ) {
-                               $this->is_page = false;
-                               $this->is_home = true;
-                               $this->is_posts_page = true;
-                       }
-               }
-
-               if ( !empty($qv['post_type']) ) {
-                       if ( is_array($qv['post_type']) )
-                               $qv['post_type'] = array_map('sanitize_key', $qv['post_type']);
-                       else
-                               $qv['post_type'] = sanitize_key($qv['post_type']);
-               }
-
-               if ( ! empty( $qv['post_status'] ) ) {
-                       if ( is_array( $qv['post_status'] ) )
-                               $qv['post_status'] = array_map('sanitize_key', $qv['post_status']);
-                       else
-                               $qv['post_status'] = preg_replace('|[^a-z0-9_,-]|', '', $qv['post_status']);
-               }
-
-               if ( $this->is_posts_page && ( ! isset($qv['withcomments']) || ! $qv['withcomments'] ) )
-                       $this->is_comment_feed = false;
-
-               $this->is_singular = $this->is_single || $this->is_page || $this->is_attachment;
-               // Done correcting is_* for page_on_front and page_for_posts
-
-               if ( '404' == $qv['error'] )
-                       $this->set_404();
-
-               $this->is_embed = $this->is_embed && ( $this->is_singular || $this->is_404 );
-
-               $this->query_vars_hash = md5( serialize( $this->query_vars ) );
-               $this->query_vars_changed = false;
-
-               /**
-                * Fires after the main query vars have been parsed.
-                *
-                * @since 1.5.0
-                *
-                * @param WP_Query &$this The WP_Query instance (passed by reference).
-                */
-               do_action_ref_array( 'parse_query', array( &$this ) );
-       }
-
-       /**
-        * Parses various taxonomy related query vars.
-        *
-        * For BC, this method is not marked as protected. See [28987].
-        *
-        * @access protected
-        * @since 3.1.0
-        *
-        * @param array $q The query variables. Passed by reference.
-        */
-       public function parse_tax_query( &$q ) {
-               if ( ! empty( $q['tax_query'] ) && is_array( $q['tax_query'] ) ) {
-                       $tax_query = $q['tax_query'];
-               } else {
-                       $tax_query = array();
-               }
-
-               if ( !empty($q['taxonomy']) && !empty($q['term']) ) {
-                       $tax_query[] = array(
-                               'taxonomy' => $q['taxonomy'],
-                               'terms' => array( $q['term'] ),
-                               'field' => 'slug',
-                       );
-               }
-
-               foreach ( get_taxonomies( array() , 'objects' ) as $taxonomy => $t ) {
-                       if ( 'post_tag' == $taxonomy )
-                               continue;       // Handled further down in the $q['tag'] block
-
-                       if ( $t->query_var && !empty( $q[$t->query_var] ) ) {
-                               $tax_query_defaults = array(
-                                       'taxonomy' => $taxonomy,
-                                       'field' => 'slug',
-                               );
-
-                               if ( isset( $t->rewrite['hierarchical'] ) && $t->rewrite['hierarchical'] ) {
-                                       $q[$t->query_var] = wp_basename( $q[$t->query_var] );
-                               }
-
-                               $term = $q[$t->query_var];
-
-                               if ( is_array( $term ) ) {
-                                       $term = implode( ',', $term );
-                               }
-
-                               if ( strpos($term, '+') !== false ) {
-                                       $terms = preg_split( '/[+]+/', $term );
-                                       foreach ( $terms as $term ) {
-                                               $tax_query[] = array_merge( $tax_query_defaults, array(
-                                                       'terms' => array( $term )
-                                               ) );
-                                       }
-                               } else {
-                                       $tax_query[] = array_merge( $tax_query_defaults, array(
-                                               'terms' => preg_split( '/[,]+/', $term )
-                                       ) );
-                               }
-                       }
-               }
-
-               // If querystring 'cat' is an array, implode it.
-               if ( is_array( $q['cat'] ) ) {
-                       $q['cat'] = implode( ',', $q['cat'] );
-               }
-
-               // Category stuff
-               if ( ! empty( $q['cat'] ) && ! $this->is_singular ) {
-                       $cat_in = $cat_not_in = array();
-
-                       $cat_array = preg_split( '/[,\s]+/', urldecode( $q['cat'] ) );
-                       $cat_array = array_map( 'intval', $cat_array );
-                       $q['cat'] = implode( ',', $cat_array );
-
-                       foreach ( $cat_array as $cat ) {
-                               if ( $cat > 0 )
-                                       $cat_in[] = $cat;
-                               elseif ( $cat < 0 )
-                                       $cat_not_in[] = abs( $cat );
-                       }
-
-                       if ( ! empty( $cat_in ) ) {
-                               $tax_query[] = array(
-                                       'taxonomy' => 'category',
-                                       'terms' => $cat_in,
-                                       'field' => 'term_id',
-                                       'include_children' => true
-                               );
-                       }
-
-                       if ( ! empty( $cat_not_in ) ) {
-                               $tax_query[] = array(
-                                       'taxonomy' => 'category',
-                                       'terms' => $cat_not_in,
-                                       'field' => 'term_id',
-                                       'operator' => 'NOT IN',
-                                       'include_children' => true
-                               );
-                       }
-                       unset( $cat_array, $cat_in, $cat_not_in );
-               }
-
-               if ( ! empty( $q['category__and'] ) && 1 === count( (array) $q['category__and'] ) ) {
-                       $q['category__and'] = (array) $q['category__and'];
-                       if ( ! isset( $q['category__in'] ) )
-                               $q['category__in'] = array();
-                       $q['category__in'][] = absint( reset( $q['category__and'] ) );
-                       unset( $q['category__and'] );
-               }
-
-               if ( ! empty( $q['category__in'] ) ) {
-                       $q['category__in'] = array_map( 'absint', array_unique( (array) $q['category__in'] ) );
-                       $tax_query[] = array(
-                               'taxonomy' => 'category',
-                               'terms' => $q['category__in'],
-                               'field' => 'term_id',
-                               'include_children' => false
-                       );
-               }
-
-               if ( ! empty($q['category__not_in']) ) {
-                       $q['category__not_in'] = array_map( 'absint', array_unique( (array) $q['category__not_in'] ) );
-                       $tax_query[] = array(
-                               'taxonomy' => 'category',
-                               'terms' => $q['category__not_in'],
-                               'operator' => 'NOT IN',
-                               'include_children' => false
-                       );
-               }
-
-               if ( ! empty($q['category__and']) ) {
-                       $q['category__and'] = array_map( 'absint', array_unique( (array) $q['category__and'] ) );
-                       $tax_query[] = array(
-                               'taxonomy' => 'category',
-                               'terms' => $q['category__and'],
-                               'field' => 'term_id',
-                               'operator' => 'AND',
-                               'include_children' => false
-                       );
-               }
-
-               // If querystring 'tag' is array, implode it.
-               if ( is_array( $q['tag'] ) ) {
-                       $q['tag'] = implode( ',', $q['tag'] );
-               }
-
-               // Tag stuff
-               if ( '' != $q['tag'] && !$this->is_singular && $this->query_vars_changed ) {
-                       if ( strpos($q['tag'], ',') !== false ) {
-                               $tags = preg_split('/[,\r\n\t ]+/', $q['tag']);
-                               foreach ( (array) $tags as $tag ) {
-                                       $tag = sanitize_term_field('slug', $tag, 0, 'post_tag', 'db');
-                                       $q['tag_slug__in'][] = $tag;
-                               }
-                       } elseif ( preg_match('/[+\r\n\t ]+/', $q['tag'] ) || ! empty( $q['cat'] ) ) {
-                               $tags = preg_split('/[+\r\n\t ]+/', $q['tag']);
-                               foreach ( (array) $tags as $tag ) {
-                                       $tag = sanitize_term_field('slug', $tag, 0, 'post_tag', 'db');
-                                       $q['tag_slug__and'][] = $tag;
-                               }
-                       } else {
-                               $q['tag'] = sanitize_term_field('slug', $q['tag'], 0, 'post_tag', 'db');
-                               $q['tag_slug__in'][] = $q['tag'];
-                       }
-               }
-
-               if ( !empty($q['tag_id']) ) {
-                       $q['tag_id'] = absint( $q['tag_id'] );
-                       $tax_query[] = array(
-                               'taxonomy' => 'post_tag',
-                               'terms' => $q['tag_id']
-                       );
-               }
-
-               if ( !empty($q['tag__in']) ) {
-                       $q['tag__in'] = array_map('absint', array_unique( (array) $q['tag__in'] ) );
-                       $tax_query[] = array(
-                               'taxonomy' => 'post_tag',
-                               'terms' => $q['tag__in']
-                       );
-               }
-
-               if ( !empty($q['tag__not_in']) ) {
-                       $q['tag__not_in'] = array_map('absint', array_unique( (array) $q['tag__not_in'] ) );
-                       $tax_query[] = array(
-                               'taxonomy' => 'post_tag',
-                               'terms' => $q['tag__not_in'],
-                               'operator' => 'NOT IN'
-                       );
-               }
-
-               if ( !empty($q['tag__and']) ) {
-                       $q['tag__and'] = array_map('absint', array_unique( (array) $q['tag__and'] ) );
-                       $tax_query[] = array(
-                               'taxonomy' => 'post_tag',
-                               'terms' => $q['tag__and'],
-                               'operator' => 'AND'
-                       );
-               }
-
-               if ( !empty($q['tag_slug__in']) ) {
-                       $q['tag_slug__in'] = array_map('sanitize_title_for_query', array_unique( (array) $q['tag_slug__in'] ) );
-                       $tax_query[] = array(
-                               'taxonomy' => 'post_tag',
-                               'terms' => $q['tag_slug__in'],
-                               'field' => 'slug'
-                       );
-               }
-
-               if ( !empty($q['tag_slug__and']) ) {
-                       $q['tag_slug__and'] = array_map('sanitize_title_for_query', array_unique( (array) $q['tag_slug__and'] ) );
-                       $tax_query[] = array(
-                               'taxonomy' => 'post_tag',
-                               'terms' => $q['tag_slug__and'],
-                               'field' => 'slug',
-                               'operator' => 'AND'
-                       );
-               }
-
-               $this->tax_query = new WP_Tax_Query( $tax_query );
-
-               /**
-                * Fires after taxonomy-related query vars have been parsed.
-                *
-                * @since 3.7.0
-                *
-                * @param WP_Query $this The WP_Query instance.
-                */
-               do_action( 'parse_tax_query', $this );
-       }
-
-       /**
-        * Generate SQL for the WHERE clause based on passed search terms.
-        *
-        * @since 3.7.0
-        *
-        * @global wpdb $wpdb WordPress database abstraction object.
-        *
-        * @param array $q Query variables.
-        * @return string WHERE clause.
-        */
-       protected function parse_search( &$q ) {
-               global $wpdb;
-
-               $search = '';
-
-               // added slashes screw with quote grouping when done early, so done later
-               $q['s'] = stripslashes( $q['s'] );
-               if ( empty( $_GET['s'] ) && $this->is_main_query() )
-                       $q['s'] = urldecode( $q['s'] );
-               // there are no line breaks in <input /> fields
-               $q['s'] = str_replace( array( "\r", "\n" ), '', $q['s'] );
-               $q['search_terms_count'] = 1;
-               if ( ! empty( $q['sentence'] ) ) {
-                       $q['search_terms'] = array( $q['s'] );
-               } else {
-                       if ( preg_match_all( '/".*?("|$)|((?<=[\t ",+])|^)[^\t ",+]+/', $q['s'], $matches ) ) {
-                               $q['search_terms_count'] = count( $matches[0] );
-                               $q['search_terms'] = $this->parse_search_terms( $matches[0] );
-                               // if the search string has only short terms or stopwords, or is 10+ terms long, match it as sentence
-                               if ( empty( $q['search_terms'] ) || count( $q['search_terms'] ) > 9 )
-                                       $q['search_terms'] = array( $q['s'] );
-                       } else {
-                               $q['search_terms'] = array( $q['s'] );
-                       }
-               }
-
-               $n = ! empty( $q['exact'] ) ? '' : '%';
-               $searchand = '';
-               $q['search_orderby_title'] = array();
-               foreach ( $q['search_terms'] as $term ) {
-                       // Terms prefixed with '-' should be excluded.
-                       $include = '-' !== substr( $term, 0, 1 );
-                       if ( $include ) {
-                               $like_op  = 'LIKE';
-                               $andor_op = 'OR';
-                       } else {
-                               $like_op  = 'NOT LIKE';
-                               $andor_op = 'AND';
-                               $term     = substr( $term, 1 );
-                       }
-
-                       if ( $n && $include ) {
-                               $like = '%' . $wpdb->esc_like( $term ) . '%';
-                               $q['search_orderby_title'][] = $wpdb->prepare( "$wpdb->posts.post_title LIKE %s", $like );
-                       }
-
-                       $like = $n . $wpdb->esc_like( $term ) . $n;
-                       $search .= $wpdb->prepare( "{$searchand}(($wpdb->posts.post_title $like_op %s) $andor_op ($wpdb->posts.post_excerpt $like_op %s) $andor_op ($wpdb->posts.post_content $like_op %s))", $like, $like, $like );
-                       $searchand = ' AND ';
-               }
-
-               if ( ! empty( $search ) ) {
-                       $search = " AND ({$search}) ";
-                       if ( ! is_user_logged_in() )
-                               $search .= " AND ($wpdb->posts.post_password = '') ";
-               }
-
-               return $search;
-       }
-
-       /**
-        * Check if the terms are suitable for searching.
-        *
-        * Uses an array of stopwords (terms) that are excluded from the separate
-        * term matching when searching for posts. The list of English stopwords is
-        * the approximate search engines list, and is translatable.
-        *
-        * @since 3.7.0
-        *
-        * @param array $terms Terms to check.
-        * @return array Terms that are not stopwords.
-        */
-       protected function parse_search_terms( $terms ) {
-               $strtolower = function_exists( 'mb_strtolower' ) ? 'mb_strtolower' : 'strtolower';
-               $checked = array();
-
-               $stopwords = $this->get_search_stopwords();
-
-               foreach ( $terms as $term ) {
-                       // keep before/after spaces when term is for exact match
-                       if ( preg_match( '/^".+"$/', $term ) )
-                               $term = trim( $term, "\"'" );
-                       else
-                               $term = trim( $term, "\"' " );
-
-                       // Avoid single A-Z and single dashes.
-                       if ( ! $term || ( 1 === strlen( $term ) && preg_match( '/^[a-z\-]$/i', $term ) ) )
-                               continue;
-
-                       if ( in_array( call_user_func( $strtolower, $term ), $stopwords, true ) )
-                               continue;
-
-                       $checked[] = $term;
-               }
-
-               return $checked;
-       }
-
-       /**
-        * Retrieve stopwords used when parsing search terms.
-        *
-        * @since 3.7.0
-        *
-        * @return array Stopwords.
-        */
-       protected function get_search_stopwords() {
-               if ( isset( $this->stopwords ) )
-                       return $this->stopwords;
-
-               /* translators: This is a comma-separated list of very common words that should be excluded from a search,
-                * like a, an, and the. These are usually called "stopwords". You should not simply translate these individual
-                * words into your language. Instead, look for and provide commonly accepted stopwords in your language.
-                */
-               $words = explode( ',', _x( 'about,an,are,as,at,be,by,com,for,from,how,in,is,it,of,on,or,that,the,this,to,was,what,when,where,who,will,with,www',
-                       'Comma-separated list of search stopwords in your language' ) );
-
-               $stopwords = array();
-               foreach ( $words as $word ) {
-                       $word = trim( $word, "\r\n\t " );
-                       if ( $word )
-                               $stopwords[] = $word;
-               }
-
-               /**
-                * Filters stopwords used when parsing search terms.
-                *
-                * @since 3.7.0
-                *
-                * @param array $stopwords Stopwords.
-                */
-               $this->stopwords = apply_filters( 'wp_search_stopwords', $stopwords );
-               return $this->stopwords;
-       }
-
-       /**
-        * Generate SQL for the ORDER BY condition based on passed search terms.
-        *
-        * @global wpdb $wpdb WordPress database abstraction object.
-        *
-        * @param array $q Query variables.
-        * @return string ORDER BY clause.
-        */
-       protected function parse_search_order( &$q ) {
-               global $wpdb;
-
-               if ( $q['search_terms_count'] > 1 ) {
-                       $num_terms = count( $q['search_orderby_title'] );
-
-                       // If the search terms contain negative queries, don't bother ordering by sentence matches.
-                       $like = '';
-                       if ( ! preg_match( '/(?:\s|^)\-/', $q['s'] ) ) {
-                               $like = '%' . $wpdb->esc_like( $q['s'] ) . '%';
-                       }
-
-                       $search_orderby = '';
-
-                       // sentence match in 'post_title'
-                       if ( $like ) {
-                               $search_orderby .= $wpdb->prepare( "WHEN $wpdb->posts.post_title LIKE %s THEN 1 ", $like );
-                       }
-
-                       // sanity limit, sort as sentence when more than 6 terms
-                       // (few searches are longer than 6 terms and most titles are not)
-                       if ( $num_terms < 7 ) {
-                               // all words in title
-                               $search_orderby .= 'WHEN ' . implode( ' AND ', $q['search_orderby_title'] ) . ' THEN 2 ';
-                               // any word in title, not needed when $num_terms == 1
-                               if ( $num_terms > 1 )
-                                       $search_orderby .= 'WHEN ' . implode( ' OR ', $q['search_orderby_title'] ) . ' THEN 3 ';
-                       }
-
-                       // Sentence match in 'post_content' and 'post_excerpt'.
-                       if ( $like ) {
-                               $search_orderby .= $wpdb->prepare( "WHEN $wpdb->posts.post_excerpt LIKE %s THEN 4 ", $like );
-                               $search_orderby .= $wpdb->prepare( "WHEN $wpdb->posts.post_content LIKE %s THEN 5 ", $like );
-                       }
-
-                       if ( $search_orderby ) {
-                               $search_orderby = '(CASE ' . $search_orderby . 'ELSE 6 END)';
-                       }
-               } else {
-                       // single word or sentence search
-                       $search_orderby = reset( $q['search_orderby_title'] ) . ' DESC';
-               }
-
-               return $search_orderby;
-       }
-
-       /**
-        * If the passed orderby value is allowed, convert the alias to a
-        * properly-prefixed orderby value.
-        *
-        * @since 4.0.0
-        * @access protected
-        *
-        * @global wpdb $wpdb WordPress database abstraction object.
-        *
-        * @param string $orderby Alias for the field to order by.
-        * @return string|false Table-prefixed value to used in the ORDER clause. False otherwise.
-        */
-       protected function parse_orderby( $orderby ) {
-               global $wpdb;
-
-               // Used to filter values.
-               $allowed_keys = array(
-                       'post_name', 'post_author', 'post_date', 'post_title', 'post_modified',
-                       'post_parent', 'post_type', 'name', 'author', 'date', 'title', 'modified',
-                       'parent', 'type', 'ID', 'menu_order', 'comment_count', 'rand',
-               );
-
-               $primary_meta_key = '';
-               $primary_meta_query = false;
-               $meta_clauses = $this->meta_query->get_clauses();
-               if ( ! empty( $meta_clauses ) ) {
-                       $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 RAND() contains a seed value, sanitize and add to allowed keys.
-               $rand_with_seed = false;
-               if ( preg_match( '/RAND\(([0-9]+)\)/i', $orderby, $matches ) ) {
-                       $orderby = sprintf( 'RAND(%s)', intval( $matches[1] ) );
-                       $allowed_keys[] = $orderby;
-                       $rand_with_seed = true;
-               }
-
-               if ( ! in_array( $orderby, $allowed_keys, true ) ) {
-                       return false;
-               }
-
-               switch ( $orderby ) {
-                       case 'post_name':
-                       case 'post_author':
-                       case 'post_date':
-                       case 'post_title':
-                       case 'post_modified':
-                       case 'post_parent':
-                       case 'post_type':
-                       case 'ID':
-                       case 'menu_order':
-                       case 'comment_count':
-                               $orderby_clause = "$wpdb->posts.{$orderby}";
-                               break;
-                       case 'rand':
-                               $orderby_clause = 'RAND()';
-                               break;
-                       case $primary_meta_key:
-                       case 'meta_value':
-                               if ( ! empty( $primary_meta_query['type'] ) ) {
-                                       $orderby_clause = "CAST({$primary_meta_query['alias']}.meta_value AS {$primary_meta_query['cast']})";
-                               } else {
-                                       $orderby_clause = "{$primary_meta_query['alias']}.meta_value";
-                               }
-                               break;
-                       case 'meta_value_num':
-                               $orderby_clause = "{$primary_meta_query['alias']}.meta_value+0";
-                               break;
-                       default:
-                               if ( array_key_exists( $orderby, $meta_clauses ) ) {
-                                       // $orderby corresponds to a meta_query clause.
-                                       $meta_clause = $meta_clauses[ $orderby ];
-                                       $orderby_clause = "CAST({$meta_clause['alias']}.meta_value AS {$meta_clause['cast']})";
-                               } elseif ( $rand_with_seed ) {
-                                       $orderby_clause = $orderby;
-                               } else {
-                                       // Default: order by post field.
-                                       $orderby_clause = "$wpdb->posts.post_" . sanitize_key( $orderby );
-                               }
-
-                               break;
-               }
-
-               return $orderby_clause;
-       }
-
-       /**
-        * Parse an 'order' query variable and cast it to ASC or DESC as necessary.
-        *
-        * @since 4.0.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';
-               }
-       }
-
-       /**
-        * Sets the 404 property and saves whether query is feed.
-        *
-        * @since 2.0.0
-        * @access public
-        */
-       public function set_404() {
-               $is_feed = $this->is_feed;
-
-               $this->init_query_flags();
-               $this->is_404 = true;
-
-               $this->is_feed = $is_feed;
-       }
-
-       /**
-        * Retrieve query variable.
-        *
-        * @since 1.5.0
-        * @since 3.9.0 The `$default` argument was introduced.
-        *
-        * @access public
-        *
-        * @param string $query_var Query variable key.
-        * @param mixed  $default   Optional. Value to return if the query variable is not set. Default empty.
-        * @return mixed Contents of the query variable.
-        */
-       public function get( $query_var, $default = '' ) {
-               if ( isset( $this->query_vars[ $query_var ] ) ) {
-                       return $this->query_vars[ $query_var ];
-               }
-
-               return $default;
-       }
-
-       /**
-        * Set query variable.
-        *
-        * @since 1.5.0
-        * @access public
-        *
-        * @param string $query_var Query variable key.
-        * @param mixed  $value     Query variable value.
-        */
-       public function set($query_var, $value) {
-               $this->query_vars[$query_var] = $value;
-       }
-
-       /**
-        * Retrieve the posts based on query variables.
-        *
-        * There are a few filters and actions that can be used to modify the post
-        * database query.
-        *
-        * @since 1.5.0
-        * @access public
-        *
-        * @global wpdb $wpdb WordPress database abstraction object.
-        *
-        * @return array List of posts.
-        */
-       public function get_posts() {
-               global $wpdb;
-
-               $this->parse_query();
-
-               /**
-                * Fires after the query variable object is created, but before the actual query is run.
-                *
-                * Note: If using conditional tags, use the method versions within the passed instance
-                * (e.g. $this->is_main_query() instead of is_main_query()). This is because the functions
-                * like is_main_query() test against the global $wp_query instance, not the passed one.
-                *
-                * @since 2.0.0
-                *
-                * @param WP_Query &$this The WP_Query instance (passed by reference).
-                */
-               do_action_ref_array( 'pre_get_posts', array( &$this ) );
-
-               // Shorthand.
-               $q = &$this->query_vars;
-
-               // Fill again in case pre_get_posts unset some vars.
-               $q = $this->fill_query_vars($q);
-
-               // Parse meta query
-               $this->meta_query = new WP_Meta_Query();
-               $this->meta_query->parse_query_vars( $q );
-
-               // Set a flag if a pre_get_posts hook changed the query vars.
-               $hash = md5( serialize( $this->query_vars ) );
-               if ( $hash != $this->query_vars_hash ) {
-                       $this->query_vars_changed = true;
-                       $this->query_vars_hash = $hash;
-               }
-               unset($hash);
-
-               // First let's clear some variables
-               $distinct = '';
-               $whichauthor = '';
-               $whichmimetype = '';
-               $where = '';
-               $limits = '';
-               $join = '';
-               $search = '';
-               $groupby = '';
-               $post_status_join = false;
-               $page = 1;
-
-               if ( isset( $q['caller_get_posts'] ) ) {
-                       _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'];
-               }
-
-               if ( !isset( $q['ignore_sticky_posts'] ) )
-                       $q['ignore_sticky_posts'] = false;
-
-               if ( !isset($q['suppress_filters']) )
-                       $q['suppress_filters'] = false;
-
-               if ( !isset($q['cache_results']) ) {
-                       if ( wp_using_ext_object_cache() )
-                               $q['cache_results'] = false;
-                       else
-                               $q['cache_results'] = true;
-               }
-
-               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;
-
-               if ( !isset($q['post_type']) ) {
-                       if ( $this->is_search )
-                               $q['post_type'] = 'any';
-                       else
-                               $q['post_type'] = '';
-               }
-               $post_type = $q['post_type'];
-               if ( empty( $q['posts_per_page'] ) ) {
-                       $q['posts_per_page'] = get_option( 'posts_per_page' );
-               }
-               if ( isset($q['showposts']) && $q['showposts'] ) {
-                       $q['showposts'] = (int) $q['showposts'];
-                       $q['posts_per_page'] = $q['showposts'];
-               }
-               if ( (isset($q['posts_per_archive_page']) && $q['posts_per_archive_page'] != 0) && ($this->is_archive || $this->is_search) )
-                       $q['posts_per_page'] = $q['posts_per_archive_page'];
-               if ( !isset($q['nopaging']) ) {
-                       if ( $q['posts_per_page'] == -1 ) {
-                               $q['nopaging'] = true;
-                       } else {
-                               $q['nopaging'] = false;
-                       }
-               }
-
-               if ( $this->is_feed ) {
-                       // This overrides posts_per_page.
-                       if ( ! empty( $q['posts_per_rss'] ) ) {
-                               $q['posts_per_page'] = $q['posts_per_rss'];
-                       } else {
-                               $q['posts_per_page'] = get_option( 'posts_per_rss' );
-                       }
-                       $q['nopaging'] = false;
-               }
-               $q['posts_per_page'] = (int) $q['posts_per_page'];
-               if ( $q['posts_per_page'] < -1 )
-                       $q['posts_per_page'] = abs($q['posts_per_page']);
-               elseif ( $q['posts_per_page'] == 0 )
-                       $q['posts_per_page'] = 1;
-
-               if ( !isset($q['comments_per_page']) || $q['comments_per_page'] == 0 )
-                       $q['comments_per_page'] = get_option('comments_per_page');
-
-               if ( $this->is_home && (empty($this->query) || $q['preview'] == 'true') && ( 'page' == get_option('show_on_front') ) && get_option('page_on_front') ) {
-                       $this->is_page = true;
-                       $this->is_home = false;
-                       $q['page_id'] = get_option('page_on_front');
-               }
-
-               if ( isset($q['page']) ) {
-                       $q['page'] = trim($q['page'], '/');
-                       $q['page'] = absint($q['page']);
-               }
-
-               // If true, forcibly turns off SQL_CALC_FOUND_ROWS even when limits are present.
-               if ( isset($q['no_found_rows']) )
-                       $q['no_found_rows'] = (bool) $q['no_found_rows'];
-               else
-                       $q['no_found_rows'] = false;
-
-               switch ( $q['fields'] ) {
-                       case 'ids':
-                               $fields = "$wpdb->posts.ID";
-                               break;
-                       case 'id=>parent':
-                               $fields = "$wpdb->posts.ID, $wpdb->posts.post_parent";
-                               break;
-                       default:
-                               $fields = "$wpdb->posts.*";
-               }
-
-               if ( '' !== $q['menu_order'] )
-                       $where .= " AND $wpdb->posts.menu_order = " . $q['menu_order'];
-
-               // The "m" parameter is meant for months but accepts datetimes of varying specificity
-               if ( $q['m'] ) {
-                       $where .= " AND YEAR($wpdb->posts.post_date)=" . substr($q['m'], 0, 4);
-                       if ( strlen($q['m']) > 5 )
-                               $where .= " AND MONTH($wpdb->posts.post_date)=" . substr($q['m'], 4, 2);
-                       if ( strlen($q['m']) > 7 )
-                               $where .= " AND DAYOFMONTH($wpdb->posts.post_date)=" . substr($q['m'], 6, 2);
-                       if ( strlen($q['m']) > 9 )
-                               $where .= " AND HOUR($wpdb->posts.post_date)=" . substr($q['m'], 8, 2);
-                       if ( strlen($q['m']) > 11 )
-                               $where .= " AND MINUTE($wpdb->posts.post_date)=" . substr($q['m'], 10, 2);
-                       if ( strlen($q['m']) > 13 )
-                               $where .= " AND SECOND($wpdb->posts.post_date)=" . substr($q['m'], 12, 2);
-               }
-
-               // Handle the other individual date parameters
-               $date_parameters = array();
-
-               if ( '' !== $q['hour'] )
-                       $date_parameters['hour'] = $q['hour'];
-
-               if ( '' !== $q['minute'] )
-                       $date_parameters['minute'] = $q['minute'];
-
-               if ( '' !== $q['second'] )
-                       $date_parameters['second'] = $q['second'];
-
-               if ( $q['year'] )
-                       $date_parameters['year'] = $q['year'];
-
-               if ( $q['monthnum'] )
-                       $date_parameters['monthnum'] = $q['monthnum'];
-
-               if ( $q['w'] )
-                       $date_parameters['week'] = $q['w'];
-
-               if ( $q['day'] )
-                       $date_parameters['day'] = $q['day'];
-
-               if ( $date_parameters ) {
-                       $date_query = new WP_Date_Query( array( $date_parameters ) );
-                       $where .= $date_query->get_sql();
-               }
-               unset( $date_parameters, $date_query );
-
-               // Handle complex date queries
-               if ( ! empty( $q['date_query'] ) ) {
-                       $this->date_query = new WP_Date_Query( $q['date_query'] );
-                       $where .= $this->date_query->get_sql();
-               }
-
-
-               // If we've got a post_type AND it's not "any" post_type.
-               if ( !empty($q['post_type']) && 'any' != $q['post_type'] ) {
-                       foreach ( (array)$q['post_type'] as $_post_type ) {
-                               $ptype_obj = get_post_type_object($_post_type);
-                               if ( !$ptype_obj || !$ptype_obj->query_var || empty($q[ $ptype_obj->query_var ]) )
-                                       continue;
-
-                               if ( ! $ptype_obj->hierarchical ) {
-                                       // Non-hierarchical post types can directly use 'name'.
-                                       $q['name'] = $q[ $ptype_obj->query_var ];
-                               } else {
-                                       // Hierarchical post types will operate through 'pagename'.
-                                       $q['pagename'] = $q[ $ptype_obj->query_var ];
-                                       $q['name'] = '';
-                               }
-
-                               // Only one request for a slug is possible, this is why name & pagename are overwritten above.
-                               break;
-                       } //end foreach
-                       unset($ptype_obj);
-               }
-
-               if ( '' !== $q['title'] ) {
-                       $where .= $wpdb->prepare( " AND $wpdb->posts.post_title = %s", stripslashes( $q['title'] ) );
-               }
-
-               // Parameters related to 'post_name'.
-               if ( '' != $q['name'] ) {
-                       $q['name'] = sanitize_title_for_query( $q['name'] );
-                       $where .= " AND $wpdb->posts.post_name = '" . $q['name'] . "'";
-               } elseif ( '' != $q['pagename'] ) {
-                       if ( isset($this->queried_object_id) ) {
-                               $reqpage = $this->queried_object_id;
-                       } else {
-                               if ( 'page' != $q['post_type'] ) {
-                                       foreach ( (array)$q['post_type'] as $_post_type ) {
-                                               $ptype_obj = get_post_type_object($_post_type);
-                                               if ( !$ptype_obj || !$ptype_obj->hierarchical )
-                                                       continue;
-
-                                               $reqpage = get_page_by_path($q['pagename'], OBJECT, $_post_type);
-                                               if ( $reqpage )
-                                                       break;
-                                       }
-                                       unset($ptype_obj);
-                               } else {
-                                       $reqpage = get_page_by_path($q['pagename']);
-                               }
-                               if ( !empty($reqpage) )
-                                       $reqpage = $reqpage->ID;
-                               else
-                                       $reqpage = 0;
-                       }
-
-                       $page_for_posts = get_option('page_for_posts');
-                       if  ( ('page' != get_option('show_on_front') ) || empty($page_for_posts) || ( $reqpage != $page_for_posts ) ) {
-                               $q['pagename'] = sanitize_title_for_query( wp_basename( $q['pagename'] ) );
-                               $q['name'] = $q['pagename'];
-                               $where .= " AND ($wpdb->posts.ID = '$reqpage')";
-                               $reqpage_obj = get_post( $reqpage );
-                               if ( is_object($reqpage_obj) && 'attachment' == $reqpage_obj->post_type ) {
-                                       $this->is_attachment = true;
-                                       $post_type = $q['post_type'] = 'attachment';
-                                       $this->is_page = true;
-                                       $q['attachment_id'] = $reqpage;
-                               }
-                       }
-               } elseif ( '' != $q['attachment'] ) {
-                       $q['attachment'] = sanitize_title_for_query( wp_basename( $q['attachment'] ) );
-                       $q['name'] = $q['attachment'];
-                       $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'] );
-                       $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.
-               if ( $q['attachment_id'] )
-                       $q['p'] = absint($q['attachment_id']);
-
-               // If a post number is specified, load that post
-               if ( $q['p'] ) {
-                       $where .= " AND {$wpdb->posts}.ID = " . $q['p'];
-               } elseif ( $q['post__in'] ) {
-                       $post__in = implode(',', array_map( 'absint', $q['post__in'] ));
-                       $where .= " AND {$wpdb->posts}.ID IN ($post__in)";
-               } elseif ( $q['post__not_in'] ) {
-                       $post__not_in = implode(',',  array_map( 'absint', $q['post__not_in'] ));
-                       $where .= " AND {$wpdb->posts}.ID NOT IN ($post__not_in)";
-               }
-
-               if ( is_numeric( $q['post_parent'] ) ) {
-                       $where .= $wpdb->prepare( " AND $wpdb->posts.post_parent = %d ", $q['post_parent'] );
-               } elseif ( $q['post_parent__in'] ) {
-                       $post_parent__in = implode( ',', array_map( 'absint', $q['post_parent__in'] ) );
-                       $where .= " AND {$wpdb->posts}.post_parent IN ($post_parent__in)";
-               } elseif ( $q['post_parent__not_in'] ) {
-                       $post_parent__not_in = implode( ',',  array_map( 'absint', $q['post_parent__not_in'] ) );
-                       $where .= " AND {$wpdb->posts}.post_parent NOT IN ($post_parent__not_in)";
-               }
-
-               if ( $q['page_id'] ) {
-                       if  ( ('page' != get_option('show_on_front') ) || ( $q['page_id'] != get_option('page_for_posts') ) ) {
-                               $q['p'] = $q['page_id'];
-                               $where = " AND {$wpdb->posts}.ID = " . $q['page_id'];
-                       }
-               }
-
-               // If a search pattern is specified, load the posts that match.
-               if ( strlen( $q['s'] ) ) {
-                       $search = $this->parse_search( $q );
-               }
-
-               if ( ! $q['suppress_filters'] ) {
-                       /**
-                        * Filters the search SQL that is used in the WHERE clause of WP_Query.
-                        *
-                        * @since 3.0.0
-                        *
-                        * @param string   $search Search SQL for WHERE clause.
-                        * @param WP_Query $this   The current WP_Query object.
-                        */
-                       $search = apply_filters_ref_array( 'posts_search', array( $search, &$this ) );
-               }
-
-               // Taxonomies
-               if ( !$this->is_singular ) {
-                       $this->parse_tax_query( $q );
-
-                       $clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
-
-                       $join .= $clauses['join'];
-                       $where .= $clauses['where'];
-               }
-
-               if ( $this->is_tax ) {
-                       if ( empty($post_type) ) {
-                               // Do a fully inclusive search for currently registered post types of queried taxonomies
-                               $post_type = array();
-                               $taxonomies = array_keys( $this->tax_query->queried_terms );
-                               foreach ( get_post_types( array( 'exclude_from_search' => false ) ) as $pt ) {
-                                       $object_taxonomies = $pt === 'attachment' ? get_taxonomies_for_attachments() : get_object_taxonomies( $pt );
-                                       if ( array_intersect( $taxonomies, $object_taxonomies ) )
-                                               $post_type[] = $pt;
-                               }
-                               if ( ! $post_type )
-                                       $post_type = 'any';
-                               elseif ( count( $post_type ) == 1 )
-                                       $post_type = $post_type[0];
-
-                               $post_status_join = true;
-                       } elseif ( in_array('attachment', (array) $post_type) ) {
-                               $post_status_join = true;
-                       }
-               }
-
-               /*
-                * Ensure that 'taxonomy', 'term', 'term_id', 'cat', and
-                * 'category_name' vars are set for backward compatibility.
-                */
-               if ( ! empty( $this->tax_query->queried_terms ) ) {
-
-                       /*
-                        * Set 'taxonomy', 'term', and 'term_id' to the
-                        * first taxonomy other than 'post_tag' or 'category'.
-                        */
-                       if ( ! isset( $q['taxonomy'] ) ) {
-                               foreach ( $this->tax_query->queried_terms as $queried_taxonomy => $queried_items ) {
-                                       if ( empty( $queried_items['terms'][0] ) ) {
-                                               continue;
-                                       }
-
-                                       if ( ! in_array( $queried_taxonomy, array( 'category', 'post_tag' ) ) ) {
-                                               $q['taxonomy'] = $queried_taxonomy;
-
-                                               if ( 'slug' === $queried_items['field'] ) {
-                                                       $q['term'] = $queried_items['terms'][0];
-                                               } else {
-                                                       $q['term_id'] = $queried_items['terms'][0];
-                                               }
-
-                                               // Take the first one we find.
-                                               break;
-                                       }
-                               }
-                       }
-
-                       // 'cat', 'category_name', 'tag_id'
-                       foreach ( $this->tax_query->queried_terms as $queried_taxonomy => $queried_items ) {
-                               if ( empty( $queried_items['terms'][0] ) ) {
-                                       continue;
-                               }
-
-                               if ( 'category' === $queried_taxonomy ) {
-                                       $the_cat = get_term_by( $queried_items['field'], $queried_items['terms'][0], 'category' );
-                                       if ( $the_cat ) {
-                                               $this->set( 'cat', $the_cat->term_id );
-                                               $this->set( 'category_name', $the_cat->slug );
-                                       }
-                                       unset( $the_cat );
-                               }
-
-                               if ( 'post_tag' === $queried_taxonomy ) {
-                                       $the_tag = get_term_by( $queried_items['field'], $queried_items['terms'][0], 'post_tag' );
-                                       if ( $the_tag ) {
-                                               $this->set( 'tag_id', $the_tag->term_id );
-                                       }
-                                       unset( $the_tag );
-                               }
-                       }
-               }
-
-               if ( !empty( $this->tax_query->queries ) || !empty( $this->meta_query->queries ) ) {
-                       $groupby = "{$wpdb->posts}.ID";
-               }
-
-               // Author/user stuff
-
-               if ( ! empty( $q['author'] ) && $q['author'] != '0' ) {
-                       $q['author'] = addslashes_gpc( '' . urldecode( $q['author'] ) );
-                       $authors = array_unique( array_map( 'intval', preg_split( '/[,\s]+/', $q['author'] ) ) );
-                       foreach ( $authors as $author ) {
-                               $key = $author > 0 ? 'author__in' : 'author__not_in';
-                               $q[$key][] = abs( $author );
-                       }
-                       $q['author'] = implode( ',', $authors );
-               }
-
-               if ( ! empty( $q['author__not_in'] ) ) {
-                       $author__not_in = implode( ',', array_map( 'absint', array_unique( (array) $q['author__not_in'] ) ) );
-                       $where .= " AND {$wpdb->posts}.post_author NOT IN ($author__not_in) ";
-               } elseif ( ! empty( $q['author__in'] ) ) {
-                       $author__in = implode( ',', array_map( 'absint', array_unique( (array) $q['author__in'] ) ) );
-                       $where .= " AND {$wpdb->posts}.post_author IN ($author__in) ";
-               }
-
-               // Author stuff for nice URLs
-
-               if ( '' != $q['author_name'] ) {
-                       if ( strpos($q['author_name'], '/') !== false ) {
-                               $q['author_name'] = explode('/', $q['author_name']);
-                               if ( $q['author_name'][ count($q['author_name'])-1 ] ) {
-                                       $q['author_name'] = $q['author_name'][count($q['author_name'])-1]; // no trailing slash
-                               } else {
-                                       $q['author_name'] = $q['author_name'][count($q['author_name'])-2]; // there was a trailing slash
-                               }
-                       }
-                       $q['author_name'] = sanitize_title_for_query( $q['author_name'] );
-                       $q['author'] = get_user_by('slug', $q['author_name']);
-                       if ( $q['author'] )
-                               $q['author'] = $q['author']->ID;
-                       $whichauthor .= " AND ($wpdb->posts.post_author = " . absint($q['author']) . ')';
-               }
-
-               // MIME-Type stuff for attachment browsing
-
-               if ( isset( $q['post_mime_type'] ) && '' != $q['post_mime_type'] )
-                       $whichmimetype = wp_post_mime_type_where( $q['post_mime_type'], $wpdb->posts );
-
-               $where .= $search . $whichauthor . $whichmimetype;
-
-               if ( ! empty( $this->meta_query->queries ) ) {
-                       $clauses = $this->meta_query->get_sql( 'post', $wpdb->posts, 'ID', $this );
-                       $join   .= $clauses['join'];
-                       $where  .= $clauses['where'];
-               }
-
-               $rand = ( isset( $q['orderby'] ) && 'rand' === $q['orderby'] );
-               if ( ! isset( $q['order'] ) ) {
-                       $q['order'] = $rand ? '' : 'DESC';
-               } else {
-                       $q['order'] = $rand ? '' : $this->parse_order( $q['order'] );
-               }
-
-               // Order by.
-               if ( empty( $q['orderby'] ) ) {
-                       /*
-                        * Boolean false or empty array blanks out ORDER BY,
-                        * while leaving the value unset or otherwise empty sets the default.
-                        */
-                       if ( isset( $q['orderby'] ) && ( is_array( $q['orderby'] ) || false === $q['orderby'] ) ) {
-                               $orderby = '';
-                       } else {
-                               $orderby = "$wpdb->posts.post_date " . $q['order'];
-                       }
-               } elseif ( 'none' == $q['orderby'] ) {
-                       $orderby = '';
-               } elseif ( $q['orderby'] == 'post__in' && ! empty( $post__in ) ) {
-                       $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'] ) ) {
-                               foreach ( $q['orderby'] as $_orderby => $order ) {
-                                       $orderby = addslashes_gpc( urldecode( $_orderby ) );
-                                       $parsed  = $this->parse_orderby( $orderby );
-
-                                       if ( ! $parsed ) {
-                                               continue;
-                                       }
-
-                                       $orderby_array[] = $parsed . ' ' . $this->parse_order( $order );
-                               }
-                               $orderby = implode( ', ', $orderby_array );
-
-                       } else {
-                               $q['orderby'] = urldecode( $q['orderby'] );
-                               $q['orderby'] = addslashes_gpc( $q['orderby'] );
-
-                               foreach ( explode( ' ', $q['orderby'] ) as $i => $orderby ) {
-                                       $parsed = $this->parse_orderby( $orderby );
-                                       // Only allow certain values for safety.
-                                       if ( ! $parsed ) {
-                                               continue;
-                                       }
-
-                                       $orderby_array[] = $parsed;
-                               }
-                               $orderby = implode( ' ' . $q['order'] . ', ', $orderby_array );
-
-                               if ( empty( $orderby ) ) {
-                                       $orderby = "$wpdb->posts.post_date " . $q['order'];
-                               } elseif ( ! empty( $q['order'] ) ) {
-                                       $orderby .= " {$q['order']}";
-                               }
-                       }
-               }
-
-               // Order search results by relevance only when another "orderby" is not specified in the query.
-               if ( ! empty( $q['s'] ) ) {
-                       $search_orderby = '';
-                       if ( ! empty( $q['search_orderby_title'] ) && ( empty( $q['orderby'] ) && ! $this->is_feed ) || ( isset( $q['orderby'] ) && 'relevance' === $q['orderby'] ) )
-                               $search_orderby = $this->parse_search_order( $q );
-
-                       if ( ! $q['suppress_filters'] ) {
-                               /**
-                                * Filters the ORDER BY used when ordering search results.
-                                *
-                                * @since 3.7.0
-                                *
-                                * @param string   $search_orderby The ORDER BY clause.
-                                * @param WP_Query $this           The current WP_Query instance.
-                                */
-                               $search_orderby = apply_filters( 'posts_search_orderby', $search_orderby, $this );
-                       }
-
-                       if ( $search_orderby )
-                               $orderby = $orderby ? $search_orderby . ', ' . $orderby : $search_orderby;
-               }
-
-               if ( is_array( $post_type ) && count( $post_type ) > 1 ) {
-                       $post_type_cap = 'multiple_post_type';
-               } else {
-                       if ( is_array( $post_type ) )
-                               $post_type = reset( $post_type );
-                       $post_type_object = get_post_type_object( $post_type );
-                       if ( empty( $post_type_object ) )
-                               $post_type_cap = $post_type;
-               }
-
-               if ( isset( $q['post_password'] ) ) {
-                       $where .= $wpdb->prepare( " AND $wpdb->posts.post_password = %s", $q['post_password'] );
-                       if ( empty( $q['perm'] ) ) {
-                               $q['perm'] = 'readable';
-                       }
-               } elseif ( isset( $q['has_password'] ) ) {
-                       $where .= sprintf( " AND $wpdb->posts.post_password %s ''", $q['has_password'] ? '!=' : '=' );
-               }
-
-               if ( ! empty( $q['comment_status'] ) ) {
-                       $where .= $wpdb->prepare( " AND $wpdb->posts.comment_status = %s ", $q['comment_status'] );
-               }
-
-               if ( ! empty( $q['ping_status'] ) )  {
-                       $where .= $wpdb->prepare( " AND $wpdb->posts.ping_status = %s ", $q['ping_status'] );
-               }
-
-               if ( 'any' == $post_type ) {
-                       $in_search_post_types = get_post_types( array('exclude_from_search' => false) );
-                       if ( empty( $in_search_post_types ) ) {
-                               $where .= ' AND 1=0 ';
-                       } else {
-                               $where .= " AND {$wpdb->posts}.post_type IN ('" . join( "', '", array_map( 'esc_sql', $in_search_post_types ) ) . "')";
-                       }
-               } elseif ( !empty( $post_type ) && is_array( $post_type ) ) {
-                       $where .= " AND {$wpdb->posts}.post_type IN ('" . join("', '", esc_sql( $post_type ) ) . "')";
-               } elseif ( ! empty( $post_type ) ) {
-                       $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_type = %s", $post_type );
-                       $post_type_object = get_post_type_object ( $post_type );
-               } elseif ( $this->is_attachment ) {
-                       $where .= " AND $wpdb->posts.post_type = 'attachment'";
-                       $post_type_object = get_post_type_object ( 'attachment' );
-               } elseif ( $this->is_page ) {
-                       $where .= " AND $wpdb->posts.post_type = 'page'";
-                       $post_type_object = get_post_type_object ( 'page' );
-               } else {
-                       $where .= " AND $wpdb->posts.post_type = 'post'";
-                       $post_type_object = get_post_type_object ( 'post' );
-               }
-
-               $edit_cap = 'edit_post';
-               $read_cap = 'read_post';
-
-               if ( ! empty( $post_type_object ) ) {
-                       $edit_others_cap = $post_type_object->cap->edit_others_posts;
-                       $read_private_cap = $post_type_object->cap->read_private_posts;
-               } else {
-                       $edit_others_cap = 'edit_others_' . $post_type_cap . 's';
-                       $read_private_cap = 'read_private_' . $post_type_cap . 's';
-               }
-
-               $user_id = get_current_user_id();
-
-               $q_status = array();
-               if ( ! empty( $q['post_status'] ) ) {
-                       $statuswheres = array();
-                       $q_status = $q['post_status'];
-                       if ( ! is_array( $q_status ) )
-                               $q_status = explode(',', $q_status);
-                       $r_status = array();
-                       $p_status = array();
-                       $e_status = array();
-                       if ( in_array( 'any', $q_status ) ) {
-                               foreach ( get_post_stati( array( 'exclude_from_search' => true ) ) as $status ) {
-                                       if ( ! in_array( $status, $q_status ) ) {
-                                               $e_status[] = "$wpdb->posts.post_status <> '$status'";
-                                       }
-                               }
-                       } else {
-                               foreach ( get_post_stati() as $status ) {
-                                       if ( in_array( $status, $q_status ) ) {
-                                               if ( 'private' == $status )
-                                                       $p_status[] = "$wpdb->posts.post_status = '$status'";
-                                               else
-                                                       $r_status[] = "$wpdb->posts.post_status = '$status'";
-                                       }
-                               }
-                       }
-
-                       if ( empty($q['perm'] ) || 'readable' != $q['perm'] ) {
-                               $r_status = array_merge($r_status, $p_status);
-                               unset($p_status);
-                       }
-
-                       if ( !empty($e_status) ) {
-                               $statuswheres[] = "(" . join( ' AND ', $e_status ) . ")";
-                       }
-                       if ( !empty($r_status) ) {
-                               if ( !empty($q['perm'] ) && 'editable' == $q['perm'] && !current_user_can($edit_others_cap) )
-                                       $statuswheres[] = "($wpdb->posts.post_author = $user_id " . "AND (" . join( ' OR ', $r_status ) . "))";
-                               else
-                                       $statuswheres[] = "(" . join( ' OR ', $r_status ) . ")";
-                       }
-                       if ( !empty($p_status) ) {
-                               if ( !empty($q['perm'] ) && 'readable' == $q['perm'] && !current_user_can($read_private_cap) )
-                                       $statuswheres[] = "($wpdb->posts.post_author = $user_id " . "AND (" . join( ' OR ', $p_status ) . "))";
-                               else
-                                       $statuswheres[] = "(" . join( ' OR ', $p_status ) . ")";
-                       }
-                       if ( $post_status_join ) {
-                               $join .= " LEFT JOIN $wpdb->posts AS p2 ON ($wpdb->posts.post_parent = p2.ID) ";
-                               foreach ( $statuswheres as $index => $statuswhere )
-                                       $statuswheres[$index] = "($statuswhere OR ($wpdb->posts.post_status = 'inherit' AND " . str_replace($wpdb->posts, 'p2', $statuswhere) . "))";
-                       }
-                       $where_status = implode( ' OR ', $statuswheres );
-                       if ( ! empty( $where_status ) ) {
-                               $where .= " AND ($where_status)";
-                       }
-               } elseif ( !$this->is_singular ) {
-                       $where .= " AND ($wpdb->posts.post_status = 'publish'";
-
-                       // Add public states.
-                       $public_states = get_post_stati( array('public' => true) );
-                       foreach ( (array) $public_states as $state ) {
-                               if ( 'publish' == $state ) // Publish is hard-coded above.
-                                       continue;
-                               $where .= " OR $wpdb->posts.post_status = '$state'";
-                       }
-
-                       if ( $this->is_admin ) {
-                               // Add protected states that should show in the admin all list.
-                               $admin_all_states = get_post_stati( array('protected' => true, 'show_in_admin_all_list' => true) );
-                               foreach ( (array) $admin_all_states as $state )
-                                       $where .= " OR $wpdb->posts.post_status = '$state'";
-                       }
-
-                       if ( is_user_logged_in() ) {
-                               // Add private states that are limited to viewing by the author of a post or someone who has caps to read private states.
-                               $private_states = get_post_stati( array('private' => true) );
-                               foreach ( (array) $private_states as $state )
-                                       $where .= current_user_can( $read_private_cap ) ? " OR $wpdb->posts.post_status = '$state'" : " OR $wpdb->posts.post_author = $user_id AND $wpdb->posts.post_status = '$state'";
-                       }
-
-                       $where .= ')';
-               }
-
-               /*
-                * Apply filters on where and join prior to paging so that any
-                * manipulations to them are reflected in the paging by day queries.
-                */
-               if ( !$q['suppress_filters'] ) {
-                       /**
-                        * Filters the WHERE clause of the query.
-                        *
-                        * @since 1.5.0
-                        *
-                        * @param string   $where The WHERE clause of the query.
-                        * @param WP_Query &$this The WP_Query instance (passed by reference).
-                        */
-                       $where = apply_filters_ref_array( 'posts_where', array( $where, &$this ) );
-
-                       /**
-                        * Filters the JOIN clause of the query.
-                        *
-                        * @since 1.5.0
-                        *
-                        * @param string   $where The JOIN clause of the query.
-                        * @param WP_Query &$this The WP_Query instance (passed by reference).
-                        */
-                       $join = apply_filters_ref_array( 'posts_join', array( $join, &$this ) );
-               }
-
-               // Paging
-               if ( empty($q['nopaging']) && !$this->is_singular ) {
-                       $page = absint($q['paged']);
-                       if ( !$page )
-                               $page = 1;
-
-                       // If 'offset' is provided, it takes precedence over 'paged'.
-                       if ( isset( $q['offset'] ) && is_numeric( $q['offset'] ) ) {
-                               $q['offset'] = absint( $q['offset'] );
-                               $pgstrt = $q['offset'] . ', ';
-                       } else {
-                               $pgstrt = absint( ( $page - 1 ) * $q['posts_per_page'] ) . ', ';
-                       }
-                       $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page'];
-               }
-
-               // Comments feeds
-               if ( $this->is_comment_feed && ! $this->is_singular ) {
-                       if ( $this->is_archive || $this->is_search ) {
-                               $cjoin = "JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) $join ";
-                               $cwhere = "WHERE comment_approved = '1' $where";
-                               $cgroupby = "$wpdb->comments.comment_id";
-                       } else { // Other non singular e.g. front
-                               $cjoin = "JOIN $wpdb->posts ON ( $wpdb->comments.comment_post_ID = $wpdb->posts.ID )";
-                               $cwhere = "WHERE ( post_status = 'publish' OR ( post_status = 'inherit' && post_type = 'attachment' ) ) AND comment_approved = '1'";
-                               $cgroupby = '';
-                       }
-
-                       if ( !$q['suppress_filters'] ) {
-                               /**
-                                * Filters the JOIN clause of the comments feed query before sending.
-                                *
-                                * @since 2.2.0
-                                *
-                                * @param string   $cjoin The JOIN clause of the query.
-                                * @param WP_Query &$this The WP_Query instance (passed by reference).
-                                */
-                               $cjoin = apply_filters_ref_array( 'comment_feed_join', array( $cjoin, &$this ) );
-
-                               /**
-                                * Filters the WHERE clause of the comments feed query before sending.
-                                *
-                                * @since 2.2.0
-                                *
-                                * @param string   $cwhere The WHERE clause of the query.
-                                * @param WP_Query &$this  The WP_Query instance (passed by reference).
-                                */
-                               $cwhere = apply_filters_ref_array( 'comment_feed_where', array( $cwhere, &$this ) );
-
-                               /**
-                                * Filters the GROUP BY clause of the comments feed query before sending.
-                                *
-                                * @since 2.2.0
-                                *
-                                * @param string   $cgroupby The GROUP BY clause of the query.
-                                * @param WP_Query &$this    The WP_Query instance (passed by reference).
-                                */
-                               $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( $cgroupby, &$this ) );
-
-                               /**
-                                * Filters the ORDER BY clause of the comments feed query before sending.
-                                *
-                                * @since 2.8.0
-                                *
-                                * @param string   $corderby The ORDER BY clause of the query.
-                                * @param WP_Query &$this    The WP_Query instance (passed by reference).
-                                */
-                               $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
-
-                               /**
-                                * Filters the LIMIT clause of the comments feed query before sending.
-                                *
-                                * @since 2.8.0
-                                *
-                                * @param string   $climits The JOIN clause of the query.
-                                * @param WP_Query &$this   The WP_Query instance (passed by reference).
-                                */
-                               $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );
-                       }
-                       $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
-                       $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';
-
-                       $comments = (array) $wpdb->get_results("SELECT $distinct $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits");
-                       // Convert to WP_Comment
-                       $this->comments = array_map( 'get_comment', $comments );
-                       $this->comment_count = count($this->comments);
-
-                       $post_ids = array();
-
-                       foreach ( $this->comments as $comment )
-                               $post_ids[] = (int) $comment->comment_post_ID;
-
-                       $post_ids = join(',', $post_ids);
-                       $join = '';
-                       if ( $post_ids )
-                               $where = "AND $wpdb->posts.ID IN ($post_ids) ";
-                       else
-                               $where = "AND 0";
-               }
-
-               $pieces = array( 'where', 'groupby', 'join', 'orderby', 'distinct', 'fields', 'limits' );
-
-               /*
-                * Apply post-paging filters on where and join. Only plugins that
-                * manipulate paging queries should use these hooks.
-                */
-               if ( !$q['suppress_filters'] ) {
-                       /**
-                        * Filters the WHERE clause of the query.
-                        *
-                        * Specifically for manipulating paging queries.
-                        *
-                        * @since 1.5.0
-                        *
-                        * @param string   $where The WHERE clause of the query.
-                        * @param WP_Query &$this The WP_Query instance (passed by reference).
-                        */
-                       $where = apply_filters_ref_array( 'posts_where_paged', array( $where, &$this ) );
-
-                       /**
-                        * Filters the GROUP BY clause of the query.
-                        *
-                        * @since 2.0.0
-                        *
-                        * @param string   $groupby The GROUP BY clause of the query.
-                        * @param WP_Query &$this   The WP_Query instance (passed by reference).
-                        */
-                       $groupby = apply_filters_ref_array( 'posts_groupby', array( $groupby, &$this ) );
-
-                       /**
-                        * Filters the JOIN clause of the query.
-                        *
-                        * Specifically for manipulating paging queries.
-                        *
-                        * @since 1.5.0
-                        *
-                        * @param string   $join  The JOIN clause of the query.
-                        * @param WP_Query &$this The WP_Query instance (passed by reference).
-                        */
-                       $join = apply_filters_ref_array( 'posts_join_paged', array( $join, &$this ) );
-
-                       /**
-                        * Filters the ORDER BY clause of the query.
-                        *
-                        * @since 1.5.1
-                        *
-                        * @param string   $orderby The ORDER BY clause of the query.
-                        * @param WP_Query &$this   The WP_Query instance (passed by reference).
-                        */
-                       $orderby = apply_filters_ref_array( 'posts_orderby', array( $orderby, &$this ) );
-
-                       /**
-                        * Filters the DISTINCT clause of the query.
-                        *
-                        * @since 2.1.0
-                        *
-                        * @param string   $distinct The DISTINCT clause of the query.
-                        * @param WP_Query &$this    The WP_Query instance (passed by reference).
-                        */
-                       $distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, &$this ) );
-
-                       /**
-                        * Filters the LIMIT clause of the query.
-                        *
-                        * @since 2.1.0
-                        *
-                        * @param string   $limits The LIMIT clause of the query.
-                        * @param WP_Query &$this  The WP_Query instance (passed by reference).
-                        */
-                       $limits = apply_filters_ref_array( 'post_limits', array( $limits, &$this ) );
-
-                       /**
-                        * Filters the SELECT clause of the query.
-                        *
-                        * @since 2.1.0
-                        *
-                        * @param string   $fields The SELECT clause of the query.
-                        * @param WP_Query &$this  The WP_Query instance (passed by reference).
-                        */
-                       $fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) );
-
-                       /**
-                        * Filters all query clauses at once, for convenience.
-                        *
-                        * Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT,
-                        * fields (SELECT), and LIMITS clauses.
-                        *
-                        * @since 3.1.0
-                        *
-                        * @param array    $clauses The list of clauses for the query.
-                        * @param WP_Query &$this   The WP_Query instance (passed by reference).
-                        */
-                       $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
-
-                       $where = isset( $clauses[ 'where' ] ) ? $clauses[ 'where' ] : '';
-                       $groupby = isset( $clauses[ 'groupby' ] ) ? $clauses[ 'groupby' ] : '';
-                       $join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : '';
-                       $orderby = isset( $clauses[ 'orderby' ] ) ? $clauses[ 'orderby' ] : '';
-                       $distinct = isset( $clauses[ 'distinct' ] ) ? $clauses[ 'distinct' ] : '';
-                       $fields = isset( $clauses[ 'fields' ] ) ? $clauses[ 'fields' ] : '';
-                       $limits = isset( $clauses[ 'limits' ] ) ? $clauses[ 'limits' ] : '';
-               }
-
-               /**
-                * Fires to announce the query's current selection parameters.
-                *
-                * For use by caching plugins.
-                *
-                * @since 2.3.0
-                *
-                * @param string $selection The assembled selection query.
-                */
-               do_action( 'posts_selection', $where . $groupby . $orderby . $limits . $join );
-
-               /*
-                * Filters again for the benefit of caching plugins.
-                * Regular plugins should use the hooks above.
-                */
-               if ( !$q['suppress_filters'] ) {
-                       /**
-                        * Filters the WHERE clause of the query.
-                        *
-                        * For use by caching plugins.
-                        *
-                        * @since 2.5.0
-                        *
-                        * @param string   $where The WHERE clause of the query.
-                        * @param WP_Query &$this The WP_Query instance (passed by reference).
-                        */
-                       $where = apply_filters_ref_array( 'posts_where_request', array( $where, &$this ) );
-
-                       /**
-                        * Filters the GROUP BY clause of the query.
-                        *
-                        * For use by caching plugins.
-                        *
-                        * @since 2.5.0
-                        *
-                        * @param string   $groupby The GROUP BY clause of the query.
-                        * @param WP_Query &$this   The WP_Query instance (passed by reference).
-                        */
-                       $groupby = apply_filters_ref_array( 'posts_groupby_request', array( $groupby, &$this ) );
-
-                       /**
-                        * Filters the JOIN clause of the query.
-                        *
-                        * For use by caching plugins.
-                        *
-                        * @since 2.5.0
-                        *
-                        * @param string   $join  The JOIN clause of the query.
-                        * @param WP_Query &$this The WP_Query instance (passed by reference).
-                        */
-                       $join = apply_filters_ref_array( 'posts_join_request', array( $join, &$this ) );
-
-                       /**
-                        * Filters the ORDER BY clause of the query.
-                        *
-                        * For use by caching plugins.
-                        *
-                        * @since 2.5.0
-                        *
-                        * @param string   $orderby The ORDER BY clause of the query.
-                        * @param WP_Query &$this   The WP_Query instance (passed by reference).
-                        */
-                       $orderby = apply_filters_ref_array( 'posts_orderby_request', array( $orderby, &$this ) );
-
-                       /**
-                        * Filters the DISTINCT clause of the query.
-                        *
-                        * For use by caching plugins.
-                        *
-                        * @since 2.5.0
-                        *
-                        * @param string   $distinct The DISTINCT clause of the query.
-                        * @param WP_Query &$this    The WP_Query instance (passed by reference).
-                        */
-                       $distinct = apply_filters_ref_array( 'posts_distinct_request', array( $distinct, &$this ) );
-
-                       /**
-                        * Filters the SELECT clause of the query.
-                        *
-                        * For use by caching plugins.
-                        *
-                        * @since 2.5.0
-                        *
-                        * @param string   $fields The SELECT clause of the query.
-                        * @param WP_Query &$this  The WP_Query instance (passed by reference).
-                        */
-                       $fields = apply_filters_ref_array( 'posts_fields_request', array( $fields, &$this ) );
-
-                       /**
-                        * Filters the LIMIT clause of the query.
-                        *
-                        * For use by caching plugins.
-                        *
-                        * @since 2.5.0
-                        *
-                        * @param string   $limits The LIMIT clause of the query.
-                        * @param WP_Query &$this  The WP_Query instance (passed by reference).
-                        */
-                       $limits = apply_filters_ref_array( 'post_limits_request', array( $limits, &$this ) );
-
-                       /**
-                        * Filters all query clauses at once, for convenience.
-                        *
-                        * For use by caching plugins.
-                        *
-                        * Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT,
-                        * fields (SELECT), and LIMITS clauses.
-                        *
-                        * @since 3.1.0
-                        *
-                        * @param array    $pieces The pieces of the query.
-                        * @param WP_Query &$this  The WP_Query instance (passed by reference).
-                        */
-                       $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) );
-
-                       $where = isset( $clauses[ 'where' ] ) ? $clauses[ 'where' ] : '';
-                       $groupby = isset( $clauses[ 'groupby' ] ) ? $clauses[ 'groupby' ] : '';
-                       $join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : '';
-                       $orderby = isset( $clauses[ 'orderby' ] ) ? $clauses[ 'orderby' ] : '';
-                       $distinct = isset( $clauses[ 'distinct' ] ) ? $clauses[ 'distinct' ] : '';
-                       $fields = isset( $clauses[ 'fields' ] ) ? $clauses[ 'fields' ] : '';
-                       $limits = isset( $clauses[ 'limits' ] ) ? $clauses[ 'limits' ] : '';
-               }
-
-               if ( ! empty($groupby) )
-                       $groupby = 'GROUP BY ' . $groupby;
-               if ( !empty( $orderby ) )
-                       $orderby = 'ORDER BY ' . $orderby;
-
-               $found_rows = '';
-               if ( !$q['no_found_rows'] && !empty($limits) )
-                       $found_rows = 'SQL_CALC_FOUND_ROWS';
-
-               $this->request = $old_request = "SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";
-
-               if ( !$q['suppress_filters'] ) {
-                       /**
-                        * Filters the completed SQL query before sending.
-                        *
-                        * @since 2.0.0
-                        *
-                        * @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'] ) {
-                       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 );
-
-                       return $this->posts;
-               }
-
-               if ( 'id=>parent' == $q['fields'] ) {
-                       if ( null === $this->posts ) {
-                               $this->posts = $wpdb->get_results( $this->request );
-                       }
-
-                       $this->post_count = count( $this->posts );
-                       $this->set_found_posts( $q, $limits );
-
-                       $r = array();
-                       foreach ( $this->posts as $key => $post ) {
-                               $this->posts[ $key ]->ID = (int) $post->ID;
-                               $this->posts[ $key ]->post_parent = (int) $post->post_parent;
-
-                               $r[ (int) $post->ID ] = (int) $post->post_parent;
-                       }
-
-                       return $r;
-               }
-
-               if ( null === $this->posts ) {
-                       $split_the_query = ( $old_request == $this->request && "$wpdb->posts.*" == $fields && !empty( $limits ) && $q['posts_per_page'] < 500 );
-
-                       /**
-                        * 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 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";
-
-                               /**
-                                * 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 = $wpdb->get_results( $this->request );
-                               $this->set_found_posts( $q, $limits );
-                       }
-               }
-
-               // Convert to WP_Post objects.
-               if ( $this->posts ) {
-                       $this->posts = array_map( 'get_post', $this->posts );
-               }
-
-               if ( ! $q['suppress_filters'] ) {
-                       /**
-                        * Filters the raw post results array, prior to status checks.
-                        *
-                        * @since 2.3.0
-                        *
-                        * @param array    $posts The post results array.
-                        * @param WP_Query &$this The WP_Query instance (passed by reference).
-                        */
-                       $this->posts = apply_filters_ref_array( 'posts_results', array( $this->posts, &$this ) );
-               }
-
-               if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) {
-                       /** This filter is documented in wp-includes/query.php */
-                       $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) );
-
-                       /** This filter is documented in wp-includes/query.php */
-                       $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) );
-
-                       /** This filter is documented in wp-includes/query.php */
-                       $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) );
-                       $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
-
-                       /** This filter is documented in wp-includes/query.php */
-                       $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
-                       $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';
-
-                       /** This filter is documented in wp-includes/query.php */
-                       $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) );
-
-                       $comments_request = "SELECT $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits";
-                       $comments = $wpdb->get_results($comments_request);
-                       // Convert to WP_Comment
-                       $this->comments = array_map( 'get_comment', $comments );
-                       $this->comment_count = count($this->comments);
-               }
-
-               // Check post status to determine if post should be displayed.
-               if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) {
-                       $status = get_post_status($this->posts[0]);
-                       if ( 'attachment' === $this->posts[0]->post_type && 0 === (int) $this->posts[0]->post_parent ) {
-                               $this->is_page = false;
-                               $this->is_single = true;
-                               $this->is_attachment = true;
-                       }
-                       $post_status_obj = get_post_status_object($status);
-
-                       // If the post_status was specifically requested, let it pass through.
-                       if ( !$post_status_obj->public && ! in_array( $status, $q_status ) ) {
-
-                               if ( ! is_user_logged_in() ) {
-                                       // User must be logged in to view unpublished posts.
-                                       $this->posts = array();
-                               } else {
-                                       if  ( $post_status_obj->protected ) {
-                                               // User must have edit permissions on the draft to preview.
-                                               if ( ! current_user_can($edit_cap, $this->posts[0]->ID) ) {
-                                                       $this->posts = array();
-                                               } else {
-                                                       $this->is_preview = true;
-                                                       if ( 'future' != $status )
-                                                               $this->posts[0]->post_date = current_time('mysql');
-                                               }
-                                       } elseif ( $post_status_obj->private ) {
-                                               if ( ! current_user_can($read_cap, $this->posts[0]->ID) )
-                                                       $this->posts = array();
-                                       } else {
-                                               $this->posts = array();
-                                       }
-                               }
-                       }
-
-                       if ( $this->is_preview && $this->posts && current_user_can( $edit_cap, $this->posts[0]->ID ) ) {
-                               /**
-                                * Filters the single post for preview mode.
-                                *
-                                * @since 2.7.0
-                                *
-                                * @param WP_Post  $post_preview  The Post object.
-                                * @param WP_Query &$this         The WP_Query instance (passed by reference).
-                                */
-                               $this->posts[0] = get_post( apply_filters_ref_array( 'the_preview', array( $this->posts[0], &$this ) ) );
-                       }
-               }
-
-               // Put sticky posts at the top of the posts array
-               $sticky_posts = get_option('sticky_posts');
-               if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['ignore_sticky_posts'] ) {
-                       $num_posts = count($this->posts);
-                       $sticky_offset = 0;
-                       // Loop over posts and relocate stickies to the front.
-                       for ( $i = 0; $i < $num_posts; $i++ ) {
-                               if ( in_array($this->posts[$i]->ID, $sticky_posts) ) {
-                                       $sticky_post = $this->posts[$i];
-                                       // Remove sticky from current position
-                                       array_splice($this->posts, $i, 1);
-                                       // Move to front, after other stickies
-                                       array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
-                                       // Increment the sticky offset. The next sticky will be placed at this offset.
-                                       $sticky_offset++;
-                                       // Remove post from sticky posts array
-                                       $offset = array_search($sticky_post->ID, $sticky_posts);
-                                       unset( $sticky_posts[$offset] );
-                               }
-                       }
-
-                       // If any posts have been excluded specifically, Ignore those that are sticky.
-                       if ( !empty($sticky_posts) && !empty($q['post__not_in']) )
-                               $sticky_posts = array_diff($sticky_posts, $q['post__not_in']);
-
-                       // Fetch sticky posts that weren't in the query results
-                       if ( !empty($sticky_posts) ) {
-                               $stickies = get_posts( array(
-                                       'post__in' => $sticky_posts,
-                                       'post_type' => $post_type,
-                                       'post_status' => 'publish',
-                                       'nopaging' => true
-                               ) );
-
-                               foreach ( $stickies as $sticky_post ) {
-                                       array_splice( $this->posts, $sticky_offset, 0, array( $sticky_post ) );
-                                       $sticky_offset++;
-                               }
-                       }
-               }
-
-               // If comments have been fetched as part of the query, make sure comment meta lazy-loading is set up.
-               if ( ! empty( $this->comments ) ) {
-                       wp_queue_comments_for_comment_meta_lazyload( $this->comments );
-               }
-
-               if ( ! $q['suppress_filters'] ) {
-                       /**
-                        * Filters the array of retrieved posts after they've been fetched and
-                        * internally processed.
-                        *
-                        * @since 1.5.0
-                        *
-                        * @param array    $posts The array of retrieved posts.
-                        * @param WP_Query &$this The WP_Query instance (passed by reference).
-                        */
-                       $this->posts = apply_filters_ref_array( 'the_posts', array( $this->posts, &$this ) );
-               }
-
-               // Ensure that any posts added/modified via one of the filters above are
-               // of the type WP_Post and are filtered.
-               if ( $this->posts ) {
-                       $this->post_count = count( $this->posts );
-
-                       $this->posts = array_map( 'get_post', $this->posts );
-
-                       if ( $q['cache_results'] )
-                               update_post_caches($this->posts, $post_type, $q['update_post_term_cache'], $q['update_post_meta_cache']);
-
-                       $this->post = reset( $this->posts );
-               } else {
-                       $this->post_count = 0;
-                       $this->posts = array();
-               }
-
-               if ( $q['lazy_load_term_meta'] ) {
-                       wp_queue_posts_for_term_meta_lazyload( $this->posts );
-               }
-
-               return $this->posts;
-       }
-
-       /**
-        * Set up the amount of found posts and the number of pages (if limit clause was used)
-        * for the current query.
-        *
-        * @since 3.5.0
-        * @access private
-        *
-        * @global wpdb $wpdb WordPress database abstraction object.
-        *
-        * @param array  $q      Query variables.
-        * @param string $limits LIMIT clauses of the query.
-        */
-       private function set_found_posts( $q, $limits ) {
-               global $wpdb;
-
-               // Bail if posts is an empty array. Continue if posts is an empty string,
-               // null, or false to accommodate caching plugins that fill posts later.
-               if ( $q['no_found_rows'] || ( is_array( $this->posts ) && ! $this->posts ) )
-                       return;
-
-               if ( ! empty( $limits ) ) {
-                       /**
-                        * Filters the query to run for retrieving the found posts.
-                        *
-                        * @since 2.1.0
-                        *
-                        * @param string   $found_posts The query to run to find the found posts.
-                        * @param WP_Query &$this       The WP_Query instance (passed by reference).
-                        */
-                       $this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ) );
-               } else {
-                       $this->found_posts = count( $this->posts );
-               }
-
-               /**
-                * Filters the number of found posts for the query.
-                *
-                * @since 2.1.0
-                *
-                * @param int      $found_posts The number of posts found.
-                * @param WP_Query &$this       The WP_Query instance (passed by reference).
-                */
-               $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) );
-
-               if ( ! empty( $limits ) )
-                       $this->max_num_pages = ceil( $this->found_posts / $q['posts_per_page'] );
-       }
-
-       /**
-        * Set up the next post and iterate current post index.
-        *
-        * @since 1.5.0
-        * @access public
-        *
-        * @return WP_Post Next post.
-        */
-       public function next_post() {
-
-               $this->current_post++;
-
-               $this->post = $this->posts[$this->current_post];
-               return $this->post;
-       }
-
-       /**
-        * Sets up the current post.
-        *
-        * Retrieves the next post, sets up the post, sets the 'in the loop'
-        * property to true.
-        *
-        * @since 1.5.0
-        * @access public
-        *
-        * @global WP_Post $post
-        */
-       public function the_post() {
-               global $post;
-               $this->in_the_loop = true;
-
-               if ( $this->current_post == -1 ) // loop has just started
-                       /**
-                        * Fires once the loop is started.
-                        *
-                        * @since 2.0.0
-                        *
-                        * @param WP_Query &$this The WP_Query instance (passed by reference).
-                        */
-                       do_action_ref_array( 'loop_start', array( &$this ) );
-
-               $post = $this->next_post();
-               $this->setup_postdata( $post );
-       }
-
-       /**
-        * Determines whether there are more posts available in the loop.
-        *
-        * Calls the {@see 'loop_end'} action when the loop is complete.
-        *
-        * @since 1.5.0
-        * @access public
-        *
-        * @return bool True if posts are available, false if end of loop.
-        */
-       public function have_posts() {
-               if ( $this->current_post + 1 < $this->post_count ) {
-                       return true;
-               } elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) {
-                       /**
-                        * Fires once the loop has ended.
-                        *
-                        * @since 2.0.0
-                        *
-                        * @param WP_Query &$this The WP_Query instance (passed by reference).
-                        */
-                       do_action_ref_array( 'loop_end', array( &$this ) );
-                       // Do some cleaning up after the loop
-                       $this->rewind_posts();
-               }
-
-               $this->in_the_loop = false;
-               return false;
-       }
-
-       /**
-        * Rewind the posts and reset post index.
-        *
-        * @since 1.5.0
-        * @access public
-        */
-       public function rewind_posts() {
-               $this->current_post = -1;
-               if ( $this->post_count > 0 ) {
-                       $this->post = $this->posts[0];
-               }
-       }
-
-       /**
-        * Iterate current comment index and return WP_Comment object.
-        *
-        * @since 2.2.0
-        * @access public
-        *
-        * @return WP_Comment Comment object.
-        */
-       public function next_comment() {
-               $this->current_comment++;
-
-               $this->comment = $this->comments[$this->current_comment];
-               return $this->comment;
-       }
-
-       /**
-        * Sets up the current comment.
-        *
-        * @since 2.2.0
-        * @access public
-        * @global WP_Comment $comment Current comment.
-        */
-       public function the_comment() {
-               global $comment;
-
-               $comment = $this->next_comment();
-
-               if ( $this->current_comment == 0 ) {
-                       /**
-                        * Fires once the comment loop is started.
-                        *
-                        * @since 2.2.0
-                        */
-                       do_action( 'comment_loop_start' );
-               }
-       }
-
-       /**
-        * Whether there are more comments available.
-        *
-        * Automatically rewinds comments when finished.
-        *
-        * @since 2.2.0
-        * @access public
-        *
-        * @return bool True, if more comments. False, if no more posts.
-        */
-       public function have_comments() {
-               if ( $this->current_comment + 1 < $this->comment_count ) {
-                       return true;
-               } elseif ( $this->current_comment + 1 == $this->comment_count ) {
-                       $this->rewind_comments();
-               }
-
-               return false;
-       }
-
-       /**
-        * Rewind the comments, resets the comment index and comment to first.
-        *
-        * @since 2.2.0
-        * @access public
-        */
-       public function rewind_comments() {
-               $this->current_comment = -1;
-               if ( $this->comment_count > 0 ) {
-                       $this->comment = $this->comments[0];
-               }
-       }
-
-       /**
-        * Sets up the WordPress query by parsing query string.
-        *
-        * @since 1.5.0
-        * @access public
-        *
-        * @param string $query URL query string.
-        * @return array List of posts.
-        */
-       public function query( $query ) {
-               $this->init();
-               $this->query = $this->query_vars = wp_parse_args( $query );
-               return $this->get_posts();
-       }
-
-       /**
-        * Retrieve queried object.
-        *
-        * If queried object is not set, then the queried object will be set from
-        * the category, tag, taxonomy, posts page, single post, page, or author
-        * query variable. After it is set up, it will be returned.
-        *
-        * @since 1.5.0
-        * @access public
-        *
-        * @return object
-        */
-       public function get_queried_object() {
-               if ( isset($this->queried_object) )
-                       return $this->queried_object;
-
-               $this->queried_object = null;
-               $this->queried_object_id = null;
-
-               if ( $this->is_category || $this->is_tag || $this->is_tax ) {
-                       if ( $this->is_category ) {
-                               if ( $this->get( 'cat' ) ) {
-                                       $term = get_term( $this->get( 'cat' ), 'category' );
-                               } elseif ( $this->get( 'category_name' ) ) {
-                                       $term = get_term_by( 'slug', $this->get( 'category_name' ), 'category' );
-                               }
-                       } elseif ( $this->is_tag ) {
-                               if ( $this->get( 'tag_id' ) ) {
-                                       $term = get_term( $this->get( 'tag_id' ), 'post_tag' );
-                               } elseif ( $this->get( 'tag' ) ) {
-                                       $term = get_term_by( 'slug', $this->get( 'tag' ), 'post_tag' );
-                               }
-                       } else {
-                               // For other tax queries, grab the first term from the first clause.
-                               $tax_query_in_and = wp_list_filter( $this->tax_query->queried_terms, array( 'operator' => 'NOT IN' ), 'NOT' );
-
-                               if ( ! empty( $tax_query_in_and ) ) {
-                                       $queried_taxonomies = array_keys( $tax_query_in_and );
-                                       $matched_taxonomy = reset( $queried_taxonomies );
-                                       $query = $tax_query_in_and[ $matched_taxonomy ];
-
-                                       if ( $query['terms'] ) {
-                                               if ( 'term_id' == $query['field'] ) {
-                                                       $term = get_term( reset( $query['terms'] ), $matched_taxonomy );
-                                               } else {
-                                                       $term = get_term_by( $query['field'], reset( $query['terms'] ), $matched_taxonomy );
-                                               }
-                                       }
-                               }
-                       }
-
-                       if ( ! empty( $term ) && ! is_wp_error( $term ) )  {
-                               $this->queried_object = $term;
-                               $this->queried_object_id = (int) $term->term_id;
-
-                               if ( $this->is_category && 'category' === $this->queried_object->taxonomy )
-                                       _make_cat_compat( $this->queried_object );
-                       }
-               } elseif ( $this->is_post_type_archive ) {
-                       $post_type = $this->get( 'post_type' );
-                       if ( is_array( $post_type ) )
-                               $post_type = reset( $post_type );
-                       $this->queried_object = get_post_type_object( $post_type );
-               } elseif ( $this->is_posts_page ) {
-                       $page_for_posts = get_option('page_for_posts');
-                       $this->queried_object = get_post( $page_for_posts );
-                       $this->queried_object_id = (int) $this->queried_object->ID;
-               } elseif ( $this->is_singular && ! empty( $this->post ) ) {
-                       $this->queried_object = $this->post;
-                       $this->queried_object_id = (int) $this->post->ID;
-               } elseif ( $this->is_author ) {
-                       $this->queried_object_id = (int) $this->get('author');
-                       $this->queried_object = get_userdata( $this->queried_object_id );
-               }
-
-               return $this->queried_object;
-       }
-
-       /**
-        * Retrieve ID of the current queried object.
-        *
-        * @since 1.5.0
-        * @access public
-        *
-        * @return int
-        */
-       public function get_queried_object_id() {
-               $this->get_queried_object();
-
-               if ( isset($this->queried_object_id) ) {
-                       return $this->queried_object_id;
-               }
-
-               return 0;
-       }
-
-       /**
-        * Constructor.
-        *
-        * Sets up the WordPress query, if parameter is not empty.
-        *
-        * @since 1.5.0
-        * @access public
-        *
-        * @param string|array $query URL query string or array of vars.
-        */
-       public function __construct($query = '') {
-               if ( ! empty($query) ) {
-                       $this->query($query);
-               }
-       }
-
-       /**
-        * Make private properties readable for backward compatibility.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param string $name Property to get.
-        * @return mixed Property.
-        */
-       public function __get( $name ) {
-               if ( in_array( $name, $this->compat_fields ) ) {
-                       return $this->$name;
-               }
-       }
-
-       /**
-        * Make private properties checkable for backward compatibility.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param string $name Property to check if set.
-        * @return bool Whether the property is set.
-        */
-       public function __isset( $name ) {
-               if ( in_array( $name, $this->compat_fields ) ) {
-                       return isset( $this->$name );
-               }
-       }
-
-       /**
-        * Make private/protected methods readable for backward compatibility.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param callable $name      Method to call.
-        * @param array    $arguments Arguments to pass when calling.
-        * @return mixed|false Return value of the callback, false otherwise.
-        */
-       public function __call( $name, $arguments ) {
-               if ( in_array( $name, $this->compat_methods ) ) {
-                       return call_user_func_array( array( $this, $name ), $arguments );
-               }
-               return false;
-       }
-
-       /**
-        * Is the query for an existing archive page?
-        *
-        * Month, Year, Category, Author, Post Type archive...
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_archive() {
-               return (bool) $this->is_archive;
-       }
-
-       /**
-        * Is the query for an existing post type archive page?
-        *
-        * @since 3.1.0
-        *
-        * @param mixed $post_types Optional. Post type or array of posts types to check against.
-        * @return bool
-        */
-       public function is_post_type_archive( $post_types = '' ) {
-               if ( empty( $post_types ) || ! $this->is_post_type_archive )
-                       return (bool) $this->is_post_type_archive;
-
-               $post_type = $this->get( 'post_type' );
-               if ( is_array( $post_type ) )
-                       $post_type = reset( $post_type );
-               $post_type_object = get_post_type_object( $post_type );
-
-               return in_array( $post_type_object->name, (array) $post_types );
-       }
-
-       /**
-        * Is the query for an existing attachment page?
-        *
-        * @since 3.1.0
-        *
-        * @param mixed $attachment Attachment ID, title, slug, or array of such.
-        * @return bool
-        */
-       public function is_attachment( $attachment = '' ) {
-               if ( ! $this->is_attachment ) {
-                       return false;
-               }
-
-               if ( empty( $attachment ) ) {
-                       return true;
-               }
-
-               $attachment = array_map( 'strval', (array) $attachment );
-
-               $post_obj = $this->get_queried_object();
-
-               if ( in_array( (string) $post_obj->ID, $attachment ) ) {
-                       return true;
-               } elseif ( in_array( $post_obj->post_title, $attachment ) ) {
-                       return true;
-               } elseif ( in_array( $post_obj->post_name, $attachment ) ) {
-                       return true;
-               }
-               return false;
-       }
-
-       /**
-        * Is the query for an existing author archive page?
-        *
-        * If the $author parameter is specified, this function will additionally
-        * check if the query is for one of the authors specified.
-        *
-        * @since 3.1.0
-        *
-        * @param mixed $author Optional. User ID, nickname, nicename, or array of User IDs, nicknames, and nicenames
-        * @return bool
-        */
-       public function is_author( $author = '' ) {
-               if ( !$this->is_author )
-                       return false;
-
-               if ( empty($author) )
-                       return true;
-
-               $author_obj = $this->get_queried_object();
-
-               $author = array_map( 'strval', (array) $author );
-
-               if ( in_array( (string) $author_obj->ID, $author ) )
-                       return true;
-               elseif ( in_array( $author_obj->nickname, $author ) )
-                       return true;
-               elseif ( in_array( $author_obj->user_nicename, $author ) )
-                       return true;
-
-               return false;
-       }
-
-       /**
-        * Is the query for an existing category archive page?
-        *
-        * If the $category parameter is specified, this function will additionally
-        * check if the query is for one of the categories specified.
-        *
-        * @since 3.1.0
-        *
-        * @param mixed $category Optional. Category ID, name, slug, or array of Category IDs, names, and slugs.
-        * @return bool
-        */
-       public function is_category( $category = '' ) {
-               if ( !$this->is_category )
-                       return false;
-
-               if ( empty($category) )
-                       return true;
-
-               $cat_obj = $this->get_queried_object();
-
-               $category = array_map( 'strval', (array) $category );
-
-               if ( in_array( (string) $cat_obj->term_id, $category ) )
-                       return true;
-               elseif ( in_array( $cat_obj->name, $category ) )
-                       return true;
-               elseif ( in_array( $cat_obj->slug, $category ) )
-                       return true;
-
-               return false;
-       }
-
-       /**
-        * Is the query for an existing tag archive page?
-        *
-        * If the $tag parameter is specified, this function will additionally
-        * check if the query is for one of the tags specified.
-        *
-        * @since 3.1.0
-        *
-        * @param mixed $tag Optional. Tag ID, name, slug, or array of Tag IDs, names, and slugs.
-        * @return bool
-        */
-       public function is_tag( $tag = '' ) {
-               if ( ! $this->is_tag )
-                       return false;
-
-               if ( empty( $tag ) )
-                       return true;
-
-               $tag_obj = $this->get_queried_object();
-
-               $tag = array_map( 'strval', (array) $tag );
-
-               if ( in_array( (string) $tag_obj->term_id, $tag ) )
-                       return true;
-               elseif ( in_array( $tag_obj->name, $tag ) )
-                       return true;
-               elseif ( in_array( $tag_obj->slug, $tag ) )
-                       return true;
-
-               return false;
-       }
-
-       /**
-        * 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.
-        *
-        * If the $term parameter is specified in addition to the $taxonomy parameter,
-        * this function will additionally check if the query is for one of the terms
-        * specified.
-        *
-        * @since 3.1.0
-        *
-        * @global array $wp_taxonomies
-        *
-        * @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 True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives).
-        */
-       public function is_tax( $taxonomy = '', $term = '' ) {
-               global $wp_taxonomies;
-
-               if ( !$this->is_tax )
-                       return false;
-
-               if ( empty( $taxonomy ) )
-                       return true;
-
-               $queried_object = $this->get_queried_object();
-               $tax_array = array_intersect( array_keys( $wp_taxonomies ), (array) $taxonomy );
-               $term_array = (array) $term;
-
-               // Check that the taxonomy matches.
-               if ( ! ( isset( $queried_object->taxonomy ) && count( $tax_array ) && in_array( $queried_object->taxonomy, $tax_array ) ) )
-                       return false;
-
-               // Only a Taxonomy provided.
-               if ( empty( $term ) )
-                       return true;
-
-               return isset( $queried_object->term_id ) &&
-                       count( array_intersect(
-                               array( $queried_object->term_id, $queried_object->name, $queried_object->slug ),
-                               $term_array
-                       ) );
-       }
-
-       /**
-        * Whether the current URL is within the comments popup window.
-        *
-        * @since 3.1.0
-        * @deprecated 4.5.0
-        *
-        * @return bool
-        */
-       public function is_comments_popup() {
-               _deprecated_function( __FUNCTION__, '4.5.0' );
-
-               return false;
-       }
-
-       /**
-        * Is the query for an existing date archive?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_date() {
-               return (bool) $this->is_date;
-       }
-
-       /**
-        * Is the query for an existing day archive?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_day() {
-               return (bool) $this->is_day;
-       }
-
-       /**
-        * Is the query for a feed?
-        *
-        * @since 3.1.0
-        *
-        * @param string|array $feeds Optional feed types to check.
-        * @return bool
-        */
-       public function is_feed( $feeds = '' ) {
-               if ( empty( $feeds ) || ! $this->is_feed )
-                       return (bool) $this->is_feed;
-               $qv = $this->get( 'feed' );
-               if ( 'feed' == $qv )
-                       $qv = get_default_feed();
-               return in_array( $qv, (array) $feeds );
-       }
-
-       /**
-        * Is the query for a comments feed?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_comment_feed() {
-               return (bool) $this->is_comment_feed;
-       }
-
-       /**
-        * Is the query for the front page of the site?
-        *
-        * This is for what is displayed at your site's main URL.
-        *
-        * Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_on_front'.
-        *
-        * If you set a static page for the front page of your site, this function will return
-        * true when viewing that page.
-        *
-        * Otherwise the same as @see WP_Query::is_home()
-        *
-        * @since 3.1.0
-        *
-        * @return bool True, if front of site.
-        */
-       public function is_front_page() {
-               // most likely case
-               if ( 'posts' == get_option( 'show_on_front') && $this->is_home() )
-                       return true;
-               elseif ( 'page' == get_option( 'show_on_front') && get_option( 'page_on_front' ) && $this->is_page( get_option( 'page_on_front' ) ) )
-                       return true;
-               else
-                       return false;
-       }
-
-       /**
-        * Is the query for the blog homepage?
-        *
-        * This is the page which shows the time based blog content of your site.
-        *
-        * Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_for_posts'.
-        *
-        * 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".
-        *
-        * @see WP_Query::is_front_page()
-        *
-        * @since 3.1.0
-        *
-        * @return bool True if blog view homepage.
-        */
-       public function is_home() {
-               return (bool) $this->is_home;
-       }
-
-       /**
-        * Is the query for an existing month archive?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_month() {
-               return (bool) $this->is_month;
-       }
-
-       /**
-        * Is the query for an existing single page?
-        *
-        * If the $page parameter is specified, this function will additionally
-        * check if the query is for one of the pages specified.
-        *
-        * @see WP_Query::is_single()
-        * @see WP_Query::is_singular()
-        *
-        * @since 3.1.0
-        *
-        * @param int|string|array $page Optional. Page ID, title, slug, path, or array of such. Default empty.
-        * @return bool Whether the query is for an existing single page.
-        */
-       public function is_page( $page = '' ) {
-               if ( !$this->is_page )
-                       return false;
-
-               if ( empty( $page ) )
-                       return true;
-
-               $page_obj = $this->get_queried_object();
-
-               $page = array_map( 'strval', (array) $page );
-
-               if ( in_array( (string) $page_obj->ID, $page ) ) {
-                       return true;
-               } elseif ( in_array( $page_obj->post_title, $page ) ) {
-                       return true;
-               } elseif ( in_array( $page_obj->post_name, $page ) ) {
-                       return true;
-               } else {
-                       foreach ( $page as $pagepath ) {
-                               if ( ! strpos( $pagepath, '/' ) ) {
-                                       continue;
-                               }
-                               $pagepath_obj = get_page_by_path( $pagepath );
-
-                               if ( $pagepath_obj && ( $pagepath_obj->ID == $page_obj->ID ) ) {
-                                       return true;
-                               }
-                       }
-               }
-
-               return false;
-       }
-
-       /**
-        * Is the query for paged result and not for the first page?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_paged() {
-               return (bool) $this->is_paged;
-       }
-
-       /**
-        * Is the query for a post or page preview?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_preview() {
-               return (bool) $this->is_preview;
-       }
-
-       /**
-        * Is the query for the robots file?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_robots() {
-               return (bool) $this->is_robots;
-       }
-
-       /**
-        * Is the query for a search?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_search() {
-               return (bool) $this->is_search;
-       }
-
-       /**
-        * Is the query for an existing single post?
-        *
-        * Works for any post type, except attachments and pages
-        *
-        * If the $post parameter is specified, this function will additionally
-        * check if the query is for one of the Posts specified.
-        *
-        * @see WP_Query::is_page()
-        * @see WP_Query::is_singular()
-        *
-        * @since 3.1.0
-        *
-        * @param int|string|array $post Optional. Post ID, title, slug, path, or array of such. Default empty.
-        * @return bool Whether the query is for an existing single post.
-        */
-       public function is_single( $post = '' ) {
-               if ( !$this->is_single )
-                       return false;
-
-               if ( empty($post) )
-                       return true;
-
-               $post_obj = $this->get_queried_object();
-
-               $post = array_map( 'strval', (array) $post );
-
-               if ( in_array( (string) $post_obj->ID, $post ) ) {
-                       return true;
-               } elseif ( in_array( $post_obj->post_title, $post ) ) {
-                       return true;
-               } elseif ( in_array( $post_obj->post_name, $post ) ) {
-                       return true;
-               } else {
-                       foreach ( $post as $postpath ) {
-                               if ( ! strpos( $postpath, '/' ) ) {
-                                       continue;
-                               }
-                               $postpath_obj = get_page_by_path( $postpath, OBJECT, $post_obj->post_type );
-
-                               if ( $postpath_obj && ( $postpath_obj->ID == $post_obj->ID ) ) {
-                                       return true;
-                               }
-                       }
-               }
-               return false;
-       }
-
-       /**
-        * Is the query for an existing single post of any post type (post, attachment, page, ... )?
-        *
-        * If the $post_types parameter is specified, this function will additionally
-        * check if the query is for one of the Posts Types specified.
-        *
-        * @see WP_Query::is_page()
-        * @see WP_Query::is_single()
-        *
-        * @since 3.1.0
-        *
-        * @param string|array $post_types Optional. Post type or array of post types. Default empty.
-        * @return bool Whether the query is for an existing single post of any of the given post types.
-        */
-       public function is_singular( $post_types = '' ) {
-               if ( empty( $post_types ) || !$this->is_singular )
-                       return (bool) $this->is_singular;
-
-               $post_obj = $this->get_queried_object();
-
-               return in_array( $post_obj->post_type, (array) $post_types );
-       }
-
-       /**
-        * Is the query for a specific time?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_time() {
-               return (bool) $this->is_time;
-       }
-
-       /**
-        * Is the query for a trackback endpoint call?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_trackback() {
-               return (bool) $this->is_trackback;
-       }
-
-       /**
-        * Is the query for an existing year archive?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_year() {
-               return (bool) $this->is_year;
-       }
-
-       /**
-        * Is the query a 404 (returns no results)?
-        *
-        * @since 3.1.0
-        *
-        * @return bool
-        */
-       public function is_404() {
-               return (bool) $this->is_404;
-       }
-
-       /**
-        * Is the query for an embedded post?
-        *
-        * @since 4.4.0
-        *
-        * @return bool
-        */
-       public function is_embed() {
-               return (bool) $this->is_embed;
-       }
-
-       /**
-        * Is the query the main query?
-        *
-        * @since 3.3.0
-        *
-        * @global WP_Query $wp_query Global WP_Query instance.
-        *
-        * @return bool
-        */
-       public function is_main_query() {
-               global $wp_the_query;
-               return $wp_the_query === $this;
-       }
-
-       /**
-        * Set up global post data.
-        *
-        * @since 4.1.0
-        * @since 4.4.0 Added the ability to pass a post ID to `$post`.
-        *
-        * @global int             $id
-        * @global WP_User         $authordata
-        * @global string|int|bool $currentday
-        * @global string|int|bool $currentmonth
-        * @global int             $page
-        * @global array           $pages
-        * @global int             $multipage
-        * @global int             $more
-        * @global int             $numpages
-        *
-        * @param WP_Post|object|int $post WP_Post instance or Post ID/object.
-        * @return true True when finished.
-        */
-       public function setup_postdata( $post ) {
-               global $id, $authordata, $currentday, $currentmonth, $page, $pages, $multipage, $more, $numpages;
-
-               if ( ! ( $post instanceof WP_Post ) ) {
-                       $post = get_post( $post );
-               }
-
-               if ( ! $post ) {
-                       return;
-               }
-
-               $id = (int) $post->ID;
-
-               $authordata = get_userdata($post->post_author);
-
-               $currentday = mysql2date('d.m.y', $post->post_date, false);
-               $currentmonth = mysql2date('m', $post->post_date, false);
-               $numpages = 1;
-               $multipage = 0;
-               $page = $this->get( 'page' );
-               if ( ! $page )
-                       $page = 1;
-
-               /*
-                * Force full post content when viewing the permalink for the $post,
-                * or when on an RSS feed. Otherwise respect the 'more' tag.
-                */
-               if ( $post->ID === get_queried_object_id() && ( $this->is_page() || $this->is_single() ) ) {
-                       $more = 1;
-               } elseif ( $this->is_feed() ) {
-                       $more = 1;
-               } else {
-                       $more = 0;
-               }
-
-               $content = $post->post_content;
-               if ( false !== strpos( $content, '<!--nextpage-->' ) ) {
-                       $content = str_replace( "\n<!--nextpage-->\n", '<!--nextpage-->', $content );
-                       $content = str_replace( "\n<!--nextpage-->", '<!--nextpage-->', $content );
-                       $content = str_replace( "<!--nextpage-->\n", '<!--nextpage-->', $content );
-
-                       // Ignore nextpage at the beginning of the content.
-                       if ( 0 === strpos( $content, '<!--nextpage-->' ) )
-                               $content = substr( $content, 15 );
-
-                       $pages = explode('<!--nextpage-->', $content);
-               } else {
-                       $pages = array( $post->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.
-                *
-                * @since 4.4.0
-                *
-                * @param array   $pages Array of "pages" derived from the post content.
-                *                       of `<!-- nextpage -->` tags..
-                * @param WP_Post $post  Current post object.
-                */
-               $pages = apply_filters( 'content_pagination', $pages, $post );
-
-               $numpages = count( $pages );
-
-               if ( $numpages > 1 ) {
-                       if ( $page > 1 ) {
-                               $more = 1;
-                       }
-                       $multipage = 1;
-               } else {
-                       $multipage = 0;
-               }
-
-               /**
-                * Fires once the post data has been setup.
-                *
-                * @since 2.8.0
-                * @since 4.1.0 Introduced `$this` parameter.
-                *
-                * @param WP_Post  &$post The Post object (passed by reference).
-                * @param WP_Query &$this The current Query object (passed by reference).
-                */
-               do_action_ref_array( 'the_post', array( &$post, &$this ) );
-
-               return true;
-       }
-       /**
-        * After looping through a nested query, this function
-        * restores the $post global to the current post in this query.
-        *
-        * @since 3.7.0
-        *
-        * @global WP_Post $post
-        */
-       public function reset_postdata() {
-               if ( ! empty( $this->post ) ) {
-                       $GLOBALS['post'] = $this->post;
-                       $this->setup_postdata( $this->post );
-               }
-       }
-
-       /**
-        * Lazyload term meta for posts in the loop.
-        *
-        * @since 4.4.0
-        * @deprecated 4.5.0 See wp_queue_posts_for_term_meta_lazyload().
-        *
-        * @param mixed $check
-        * @param int   $term_id
-        * @return mixed
-        */
-       public function lazyload_term_meta( $check, $term_id ) {
-               _deprecated_function( __METHOD__, '4.5.0' );
-               return $check;
-       }
-
-       /**
-        * Lazyload comment meta for comments in the loop.
-        *
-        * @since 4.4.0
-        * @deprecated 4.5.0 See wp_queue_comments_for_comment_meta_lazyload().
-        *
-        * @param mixed $check
-        * @param int   $comment_id
-        * @return mixed
-        */
-       public function lazyload_comment_meta( $check, $comment_id ) {
-               _deprecated_function( __METHOD__, '4.5.0' );
-               return $check;
-       }
-}
-
 /**
  * Redirect old slugs to the correct permalink.
  *
@@ -4928,13 +844,10 @@ class WP_Query {
  *
  * @since 2.1.0
  *
- * @global WP_Query   $wp_query   Global WP_Query instance.
- * @global wpdb       $wpdb       WordPress database abstraction object.
+ * @global wpdb $wpdb WordPress database abstraction object.
  */
 function wp_old_slug_redirect() {
-       global $wp_query;
-
-       if ( is_404() && '' !== $wp_query->query_vars['name'] ) :
+       if ( is_404() && '' !== get_query_var( 'name' ) ) {
                global $wpdb;
 
                // Guess the current post_type based on the query vars.
@@ -4942,42 +855,48 @@ function wp_old_slug_redirect() {
                        $post_type = get_query_var( 'post_type' );
                } elseif ( get_query_var( 'attachment' ) ) {
                        $post_type = 'attachment';
-               } elseif ( ! empty( $wp_query->query_vars['pagename'] ) ) {
+               } elseif ( get_query_var( 'pagename' ) ) {
                        $post_type = 'page';
                } else {
                        $post_type = 'post';
                }
 
                if ( is_array( $post_type ) ) {
-                       if ( count( $post_type ) > 1 )
+                       if ( count( $post_type ) > 1 ) {
                                return;
+                       }
                        $post_type = reset( $post_type );
                }
 
                // Do not attempt redirect for hierarchical post types
-               if ( is_post_type_hierarchical( $post_type ) )
+               if ( is_post_type_hierarchical( $post_type ) ) {
                        return;
+               }
 
-               $query = $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta, $wpdb->posts WHERE ID = post_id AND post_type = %s AND meta_key = '_wp_old_slug' AND meta_value = %s", $post_type, $wp_query->query_vars['name']);
+               $query = $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta, $wpdb->posts WHERE ID = post_id AND post_type = %s AND meta_key = '_wp_old_slug' AND meta_value = %s", $post_type, get_query_var( 'name' ) );
 
                // if year, monthnum, or day have been specified, make our query more precise
                // just in case there are multiple identical _wp_old_slug values
-               if ( '' != $wp_query->query_vars['year'] )
-                       $query .= $wpdb->prepare(" AND YEAR(post_date) = %d", $wp_query->query_vars['year']);
-               if ( '' != $wp_query->query_vars['monthnum'] )
-                       $query .= $wpdb->prepare(" AND MONTH(post_date) = %d", $wp_query->query_vars['monthnum']);
-               if ( '' != $wp_query->query_vars['day'] )
-                       $query .= $wpdb->prepare(" AND DAYOFMONTH(post_date) = %d", $wp_query->query_vars['day']);
+               if ( get_query_var( 'year' ) ) {
+                       $query .= $wpdb->prepare(" AND YEAR(post_date) = %d", get_query_var( 'year' ) );
+               }
+               if ( get_query_var( 'monthnum' ) ) {
+                       $query .= $wpdb->prepare(" AND MONTH(post_date) = %d", get_query_var( 'monthnum' ) );
+               }
+               if ( get_query_var( 'day' ) ) {
+                       $query .= $wpdb->prepare(" AND DAYOFMONTH(post_date) = %d", get_query_var( 'day' ) );
+               }
 
-               $id = (int) $wpdb->get_var($query);
+               $id = (int) $wpdb->get_var( $query );
 
-               if ( ! $id )
+               if ( ! $id ) {
                        return;
+               }
 
                $link = get_permalink( $id );
 
-               if ( isset( $GLOBALS['wp_query']->query_vars['paged'] ) && $GLOBALS['wp_query']->query_vars['paged'] > 1 ) {
-                       $link = user_trailingslashit( trailingslashit( $link ) . 'page/' . $GLOBALS['wp_query']->query_vars['paged'] );
+               if ( get_query_var( 'paged' ) > 1 ) {
+                       $link = user_trailingslashit( trailingslashit( $link ) . 'page/' . get_query_var( 'paged' ) );
                } elseif( is_embed() ) {
                        $link = user_trailingslashit( trailingslashit( $link ) . 'embed' );
                }
@@ -4997,7 +916,7 @@ function wp_old_slug_redirect() {
 
                wp_redirect( $link, 301 ); // Permanent redirect
                exit;
-       endif;
+       }
 }
 
 /**
index 13bfa596ece1714567ff3a90a0882985fb1460e4..e5efb74fbe42dc830f3fdb1514aab21ee84ca59a 100644 (file)
@@ -70,6 +70,48 @@ function register_rest_route( $namespace, $route, $args = array(), $override = f
        return true;
 }
 
+/**
+ * Registers a new field on an existing WordPress object type.
+ *
+ * @since 4.7.0
+ *
+ * @global array $wp_rest_additional_fields Holds registered fields, organized
+ *                                          by object type.
+ *
+ * @param string|array $object_type Object(s) the field is being registered
+ *                                  to, "post"|"term"|"comment" etc.
+ * @param string $attribute         The attribute name.
+ * @param array  $args {
+ *     Optional. An array of arguments used to handle the registered field.
+ *
+ *     @type string|array|null $get_callback    Optional. The callback function used to retrieve the field
+ *                                              value. Default is 'null', the field will not be returned in
+ *                                              the response.
+ *     @type string|array|null $update_callback Optional. The callback function used to set and update the
+ *                                              field value. Default is 'null', the value cannot be set or
+ *                                              updated.
+ *     @type string|array|null $schema          Optional. The callback function used to create the schema for
+ *                                              this field. Default is 'null', no schema entry will be returned.
+ * }
+ */
+function register_rest_field( $object_type, $attribute, $args = array() ) {
+       $defaults = array(
+               'get_callback'    => null,
+               'update_callback' => null,
+               'schema'          => null,
+       );
+
+       $args = wp_parse_args( $args, $defaults );
+
+       global $wp_rest_additional_fields;
+
+       $object_types = (array) $object_type;
+
+       foreach ( $object_types as $object_type ) {
+               $wp_rest_additional_fields[ $object_type ][ $attribute ] = $args;
+       }
+}
+
 /**
  * Registers rewrite rules for the API.
  *
@@ -91,10 +133,15 @@ function rest_api_init() {
  * @since 4.4.0
  *
  * @see add_rewrite_rule()
+ * @global WP_Rewrite $wp_rewrite
  */
 function rest_api_register_rewrites() {
+       global $wp_rewrite;
+
        add_rewrite_rule( '^' . rest_get_url_prefix() . '/?$','index.php?rest_route=/','top' );
        add_rewrite_rule( '^' . rest_get_url_prefix() . '/(.*)?','index.php?rest_route=/$matches[1]','top' );
+       add_rewrite_rule( '^' . $wp_rewrite->index . '/' . rest_get_url_prefix() . '/?$','index.php?rest_route=/','top' );
+       add_rewrite_rule( '^' . $wp_rewrite->index . '/' . rest_get_url_prefix() . '/(.*)?','index.php?rest_route=/$matches[1]','top' );
 }
 
 /**
@@ -119,6 +166,71 @@ function rest_api_default_filters() {
        add_filter( 'rest_pre_dispatch', 'rest_handle_options_request', 10, 3 );
 }
 
+/**
+ * Registers default REST API routes.
+ *
+ * @since 4.7.0
+ */
+function create_initial_rest_routes() {
+       foreach ( get_post_types( array( 'show_in_rest' => true ), 'objects' ) as $post_type ) {
+               $class = ! empty( $post_type->rest_controller_class ) ? $post_type->rest_controller_class : 'WP_REST_Posts_Controller';
+
+               if ( ! class_exists( $class ) ) {
+                       continue;
+               }
+               $controller = new $class( $post_type->name );
+               if ( ! is_subclass_of( $controller, 'WP_REST_Controller' ) ) {
+                       continue;
+               }
+
+               $controller->register_routes();
+
+               if ( post_type_supports( $post_type->name, 'revisions' ) ) {
+                       $revisions_controller = new WP_REST_Revisions_Controller( $post_type->name );
+                       $revisions_controller->register_routes();
+               }
+       }
+
+       // Post types.
+       $controller = new WP_REST_Post_Types_Controller;
+       $controller->register_routes();
+
+       // Post statuses.
+       $controller = new WP_REST_Post_Statuses_Controller;
+       $controller->register_routes();
+
+       // Taxonomies.
+       $controller = new WP_REST_Taxonomies_Controller;
+       $controller->register_routes();
+
+       // Terms.
+       foreach ( get_taxonomies( array( 'show_in_rest' => true ), 'object' ) as $taxonomy ) {
+               $class = ! empty( $taxonomy->rest_controller_class ) ? $taxonomy->rest_controller_class : 'WP_REST_Terms_Controller';
+
+               if ( ! class_exists( $class ) ) {
+                       continue;
+               }
+               $controller = new $class( $taxonomy->name );
+               if ( ! is_subclass_of( $controller, 'WP_REST_Controller' ) ) {
+                       continue;
+               }
+
+               $controller->register_routes();
+       }
+
+       // Users.
+       $controller = new WP_REST_Users_Controller;
+       $controller->register_routes();
+
+       // Comments.
+       $controller = new WP_REST_Comments_Controller;
+       $controller->register_routes();
+
+       // Settings.
+       $controller = new WP_REST_Settings_Controller;
+       $controller->register_routes();
+}
+
 /**
  * Loads the REST API.
  *
@@ -144,7 +256,7 @@ function rest_api_loaded() {
        $server = rest_get_server();
 
        // Fire off the request.
-       $server->serve_request( $GLOBALS['wp']->query_vars['rest_route'] );
+       $server->serve_request( untrailingslashit( $GLOBALS['wp']->query_vars['rest_route'] ) );
 
        // We're done.
        die();
@@ -176,6 +288,7 @@ function rest_get_url_prefix() {
  * @since 4.4.0
  *
  * @todo Check if this is even necessary
+ * @global WP_Rewrite $wp_rewrite
  *
  * @param int    $blog_id Optional. Blog ID. Default of null returns URL for current blog.
  * @param string $path    Optional. REST route. Default '/'.
@@ -188,7 +301,14 @@ function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) {
        }
 
        if ( is_multisite() && get_blog_option( $blog_id, 'permalink_structure' ) || get_option( 'permalink_structure' ) ) {
-               $url = get_home_url( $blog_id, rest_get_url_prefix(), $scheme );
+               global $wp_rewrite;
+
+               if ( $wp_rewrite->using_index_permalinks() ) {
+                       $url = get_home_url( $blog_id, $wp_rewrite->index . '/' . rest_get_url_prefix(), $scheme );
+               } else {
+                       $url = get_home_url( $blog_id, rest_get_url_prefix(), $scheme );
+               }
+
                $url .= '/' . ltrim( $path, '/' );
        } else {
                $url = trailingslashit( get_home_url( $blog_id, '', $scheme ) );
@@ -323,8 +443,9 @@ function rest_ensure_request( $request ) {
  * @since 4.4.0
  *
  * @param WP_Error|WP_HTTP_Response|mixed $response Response to check.
- * @return mixed WP_Error if response generated an error, WP_HTTP_Response if response
- *               is a already an instance, otherwise returns a new WP_REST_Response instance.
+ * @return WP_REST_Response|mixed If response generated an error, WP_Error, if response
+ *                                is already an instance, WP_HTTP_Response, otherwise
+ *                                returns a new WP_REST_Response instance.
  */
 function rest_ensure_response( $response ) {
        if ( is_wp_error( $response ) ) {
@@ -393,8 +514,9 @@ function rest_send_cors_headers( $value ) {
 
        if ( $origin ) {
                header( 'Access-Control-Allow-Origin: ' . esc_url_raw( $origin ) );
-               header( 'Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE' );
+               header( 'Access-Control-Allow-Methods: OPTIONS, GET, POST, PUT, PATCH, DELETE' );
                header( 'Access-Control-Allow-Credentials: true' );
+               header( 'Vary: Origin' );
        }
 
        return $value;
@@ -421,10 +543,8 @@ function rest_handle_options_request( $response, $handler, $request ) {
        $response = new WP_REST_Response();
        $data = array();
 
-       $accept = array();
-
        foreach ( $handler->get_routes() as $route => $endpoints ) {
-               $match = preg_match( '@^' . $route . '$@i', $request->get_route(), $args );
+               $match = preg_match( '@^' . $route . '$@i', $request->get_route() );
 
                if ( ! $match ) {
                        continue;
@@ -671,3 +791,379 @@ function rest_get_date_with_gmt( $date, $force_utc = false ) {
 
        return array( $local, $utc );
 }
+
+/**
+ * Returns a contextual HTTP error code for authorization failure.
+ *
+ * @since 4.7.0
+ *
+ * @return integer 401 if the user is not logged in, 403 if the user is logged in.
+ */
+function rest_authorization_required_code() {
+       return is_user_logged_in() ? 403 : 401;
+}
+
+/**
+ * Validate a request argument based on details registered to the route.
+ *
+ * @since 4.7.0
+ *
+ * @param  mixed            $value
+ * @param  WP_REST_Request  $request
+ * @param  string           $param
+ * @return WP_Error|boolean
+ */
+function rest_validate_request_arg( $value, $request, $param ) {
+       $attributes = $request->get_attributes();
+       if ( ! isset( $attributes['args'][ $param ] ) || ! is_array( $attributes['args'][ $param ] ) ) {
+               return true;
+       }
+       $args = $attributes['args'][ $param ];
+
+       return rest_validate_value_from_schema( $value, $args, $param );
+}
+
+/**
+ * Sanitize a request argument based on details registered to the route.
+ *
+ * @since 4.7.0
+ *
+ * @param  mixed            $value
+ * @param  WP_REST_Request  $request
+ * @param  string           $param
+ * @return mixed
+ */
+function rest_sanitize_request_arg( $value, $request, $param ) {
+       $attributes = $request->get_attributes();
+       if ( ! isset( $attributes['args'][ $param ] ) || ! is_array( $attributes['args'][ $param ] ) ) {
+               return $value;
+       }
+       $args = $attributes['args'][ $param ];
+
+       return rest_sanitize_value_from_schema( $value, $args );
+}
+
+/**
+ * Parse a request argument based on details registered to the route.
+ *
+ * Runs a validation check and sanitizes the value, primarily to be used via
+ * the `sanitize_callback` arguments in the endpoint args registration.
+ *
+ * @since 4.7.0
+ *
+ * @param  mixed            $value
+ * @param  WP_REST_Request  $request
+ * @param  string           $param
+ * @return mixed
+ */
+function rest_parse_request_arg( $value, $request, $param ) {
+       $is_valid = rest_validate_request_arg( $value, $request, $param );
+
+       if ( is_wp_error( $is_valid ) ) {
+               return $is_valid;
+       }
+
+       $value = rest_sanitize_request_arg( $value, $request, $param );
+
+       return $value;
+}
+
+/**
+ * Determines if an IP address is valid.
+ *
+ * Handles both IPv4 and IPv6 addresses.
+ *
+ * @since 4.7.0
+ *
+ * @param  string $ip IP address.
+ * @return string|false The valid IP address, otherwise false.
+ */
+function rest_is_ip_address( $ip ) {
+       $ipv4_pattern = '/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/';
+
+       if ( ! preg_match( $ipv4_pattern, $ip ) && ! Requests_IPv6::check_ipv6( $ip ) ) {
+               return false;
+       }
+
+       return $ip;
+}
+
+/**
+ * Changes a boolean-like value into the proper boolean value.
+ *
+ * @since 4.7.0
+ *
+ * @param bool|string|int $value The value being evaluated.
+ * @return boolean Returns the proper associated boolean value.
+ */
+function rest_sanitize_boolean( $value ) {
+       // String values are translated to `true`; make sure 'false' is false.
+       if ( is_string( $value )  ) {
+               $value = strtolower( $value );
+               if ( in_array( $value, array( 'false', '0' ), true ) ) {
+                       $value = false;
+               }
+       }
+
+       // Everything else will map nicely to boolean.
+       return (boolean) $value;
+}
+
+/**
+ * Determines if a given value is boolean-like.
+ *
+ * @since 4.7.0
+ *
+ * @param bool|string $maybe_bool The value being evaluated.
+ * @return boolean True if a boolean, otherwise false.
+ */
+function rest_is_boolean( $maybe_bool ) {
+       if ( is_bool( $maybe_bool ) ) {
+               return true;
+       }
+
+       if ( is_string( $maybe_bool ) ) {
+               $maybe_bool = strtolower( $maybe_bool );
+
+               $valid_boolean_values = array(
+                       'false',
+                       'true',
+                       '0',
+                       '1',
+               );
+
+               return in_array( $maybe_bool, $valid_boolean_values, true );
+       }
+
+       if ( is_int( $maybe_bool ) ) {
+               return in_array( $maybe_bool, array( 0, 1 ), true );
+       }
+
+       return false;
+}
+
+/**
+ * Retrieves the avatar urls in various sizes based on a given email address.
+ *
+ * @since 4.7.0
+ *
+ * @see get_avatar_url()
+ *
+ * @param string $email Email address.
+ * @return array $urls Gravatar url for each size.
+ */
+function rest_get_avatar_urls( $email ) {
+       $avatar_sizes = rest_get_avatar_sizes();
+
+       $urls = array();
+       foreach ( $avatar_sizes as $size ) {
+               $urls[ $size ] = get_avatar_url( $email, array( 'size' => $size ) );
+       }
+
+       return $urls;
+}
+
+/**
+ * Retrieves the pixel sizes for avatars.
+ *
+ * @since 4.7.0
+ *
+ * @return array List of pixel sizes for avatars. Default `[ 24, 48, 96 ]`.
+ */
+function rest_get_avatar_sizes() {
+       /**
+        * Filter the REST avatar sizes.
+        *
+        * Use this filter to adjust the array of sizes returned by the
+        * `rest_get_avatar_sizes` function.
+        *
+        * @since 4.4.0
+        *
+        * @param array $sizes An array of int values that are the pixel sizes for avatars.
+        *                     Default `[ 24, 48, 96 ]`.
+        */
+       return apply_filters( 'rest_avatar_sizes', array( 24, 48, 96 ) );
+}
+
+/**
+ * Validate a value based on a schema.
+ *
+ * @param mixed  $value The value to validate.
+ * @param array  $args  Schema array to use for validation.
+ * @param string $param The parameter name, used in error messages.
+ * @return true|WP_Error
+ */
+function rest_validate_value_from_schema( $value, $args, $param = '' ) {
+       if ( 'array' === $args['type'] ) {
+               if ( ! is_array( $value ) ) {
+                       $value = preg_split( '/[\s,]+/', $value );
+               }
+               if ( ! wp_is_numeric_array( $value ) ) {
+                       /* translators: 1: parameter, 2: type name */
+                       return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $param, 'array' ) );
+               }
+               foreach ( $value as $index => $v ) {
+                       $is_valid = rest_validate_value_from_schema( $v, $args['items'], $param . '[' . $index . ']' );
+                       if ( is_wp_error( $is_valid ) ) {
+                               return $is_valid;
+                       }
+               }
+       }
+       if ( ! empty( $args['enum'] ) ) {
+               if ( ! in_array( $value, $args['enum'], true ) ) {
+                       /* translators: 1: parameter, 2: list of valid values */
+                       return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not one of %2$s.' ), $param, implode( ', ', $args['enum'] ) ) );
+               }
+       }
+
+       if ( in_array( $args['type'], array( 'integer', 'number' ) ) && ! is_numeric( $value ) ) {
+               /* translators: 1: parameter, 2: type name */
+               return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $param, $args['type'] ) );
+       }
+
+       if ( 'integer' === $args['type'] && round( floatval( $value ) ) !== floatval( $value ) ) {
+               /* translators: 1: parameter, 2: type name */
+               return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $param, 'integer' ) );
+       }
+
+       if ( 'boolean' === $args['type'] && ! rest_is_boolean( $value ) ) {
+               /* translators: 1: parameter, 2: type name */
+               return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $value, 'boolean' ) );
+       }
+
+       if ( 'string' === $args['type'] && ! is_string( $value ) ) {
+               /* translators: 1: parameter, 2: type name */
+               return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $param, 'string' ) );
+       }
+
+       if ( isset( $args['format'] ) ) {
+               switch ( $args['format'] ) {
+                       case 'date-time' :
+                               if ( ! rest_parse_date( $value ) ) {
+                                       return new WP_Error( 'rest_invalid_date', __( 'Invalid date.' ) );
+                               }
+                               break;
+
+                       case 'email' :
+                               // is_email() checks for 3 characters (a@b), but
+                               // wp_handle_comment_submission() requires 6 characters (a@b.co)
+                               //
+                               // https://core.trac.wordpress.org/ticket/38506
+                               if ( ! is_email( $value ) || strlen( $value ) < 6 ) {
+                                       return new WP_Error( 'rest_invalid_email', __( 'Invalid email address.' ) );
+                               }
+                               break;
+                       case 'ip' :
+                               if ( ! rest_is_ip_address( $value ) ) {
+                                       /* translators: %s: IP address */
+                                       return new WP_Error( 'rest_invalid_param', sprintf( __( '%s is not a valid IP address.' ), $value ) );
+                               }
+                               break;
+               }
+       }
+
+       if ( in_array( $args['type'], array( 'number', 'integer' ), true ) && ( isset( $args['minimum'] ) || isset( $args['maximum'] ) ) ) {
+               if ( isset( $args['minimum'] ) && ! isset( $args['maximum'] ) ) {
+                       if ( ! empty( $args['exclusiveMinimum'] ) && $value <= $args['minimum'] ) {
+                               /* translators: 1: parameter, 2: minimum number */
+                               return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be greater than %2$d (exclusive)' ), $param, $args['minimum'] ) );
+                       } elseif ( empty( $args['exclusiveMinimum'] ) && $value < $args['minimum'] ) {
+                               /* translators: 1: parameter, 2: minimum number */
+                               return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be greater than %2$d (inclusive)' ), $param, $args['minimum'] ) );
+                       }
+               } elseif ( isset( $args['maximum'] ) && ! isset( $args['minimum'] ) ) {
+                       if ( ! empty( $args['exclusiveMaximum'] ) && $value >= $args['maximum'] ) {
+                               /* translators: 1: parameter, 2: maximum number */
+                               return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be less than %2$d (exclusive)' ), $param, $args['maximum'] ) );
+                       } elseif ( empty( $args['exclusiveMaximum'] ) && $value > $args['maximum'] ) {
+                               /* translators: 1: parameter, 2: maximum number */
+                               return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be less than %2$d (inclusive)' ), $param, $args['maximum'] ) );
+                       }
+               } elseif ( isset( $args['maximum'] ) && isset( $args['minimum'] ) ) {
+                       if ( ! empty( $args['exclusiveMinimum'] ) && ! empty( $args['exclusiveMaximum'] ) ) {
+                               if ( $value >= $args['maximum'] || $value <= $args['minimum'] ) {
+                                       /* translators: 1: parameter, 2: minimum number, 3: maximum number */
+                                       return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be between %2$d (exclusive) and %3$d (exclusive)' ), $param, $args['minimum'], $args['maximum'] ) );
+                               }
+                       } elseif ( empty( $args['exclusiveMinimum'] ) && ! empty( $args['exclusiveMaximum'] ) ) {
+                               if ( $value >= $args['maximum'] || $value < $args['minimum'] ) {
+                                       /* translators: 1: parameter, 2: minimum number, 3: maximum number */
+                                       return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be between %2$d (inclusive) and %3$d (exclusive)' ), $param, $args['minimum'], $args['maximum'] ) );
+                               }
+                       } elseif ( ! empty( $args['exclusiveMinimum'] ) && empty( $args['exclusiveMaximum'] ) ) {
+                               if ( $value > $args['maximum'] || $value <= $args['minimum'] ) {
+                                       /* translators: 1: parameter, 2: minimum number, 3: maximum number */
+                                       return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be between %2$d (exclusive) and %3$d (inclusive)' ), $param, $args['minimum'], $args['maximum'] ) );
+                               }
+                       } elseif ( empty( $args['exclusiveMinimum'] ) && empty( $args['exclusiveMaximum'] ) ) {
+                               if ( $value > $args['maximum'] || $value < $args['minimum'] ) {
+                                       /* translators: 1: parameter, 2: minimum number, 3: maximum number */
+                                       return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be between %2$d (inclusive) and %3$d (inclusive)' ), $param, $args['minimum'], $args['maximum'] ) );
+                               }
+                       }
+               }
+       }
+
+       return true;
+}
+
+/**
+ * Sanitize a value based on a schema.
+ *
+ * @param mixed $value The value to sanitize.
+ * @param array $args  Schema array to use for sanitization.
+ * @return true|WP_Error
+ */
+function rest_sanitize_value_from_schema( $value, $args ) {
+       if ( 'array' === $args['type'] ) {
+               if ( empty( $args['items'] ) ) {
+                       return (array) $value;
+               }
+               if ( ! is_array( $value ) ) {
+                       $value = preg_split( '/[\s,]+/', $value );
+               }
+               foreach ( $value as $index => $v ) {
+                       $value[ $index ] = rest_sanitize_value_from_schema( $v, $args['items'] );
+               }
+               // Normalize to numeric array so nothing unexpected
+               // is in the keys.
+               $value = array_values( $value );
+               return $value;
+       }
+       if ( 'integer' === $args['type'] ) {
+               return (int) $value;
+       }
+
+       if ( 'number' === $args['type'] ) {
+               return (float) $value;
+       }
+
+       if ( 'boolean' === $args['type'] ) {
+               return rest_sanitize_boolean( $value );
+       }
+
+       if ( isset( $args['format'] ) ) {
+               switch ( $args['format'] ) {
+                       case 'date-time' :
+                               return sanitize_text_field( $value );
+
+                       case 'email' :
+                               /*
+                                * sanitize_email() validates, which would be unexpected.
+                                */
+                               return sanitize_text_field( $value );
+
+                       case 'uri' :
+                               return esc_url_raw( $value );
+
+                       case 'ip' :
+                               return sanitize_text_field( $value );
+               }
+       }
+
+       if ( 'string' === $args['type'] ) {
+               return strval( $value );
+       }
+
+       return $value;
+}
index 80c58bf5b184a3f232e81d614016b783e68839ea..3c465babd05847aa13435addacd031858e605c9c 100644 (file)
@@ -359,7 +359,8 @@ class WP_REST_Request implements ArrayAccess {
 
                // Ensure we parse the body data.
                $body = $this->get_body();
-               if ( $this->method !== 'POST' && ! empty( $body ) ) {
+
+               if ( 'POST' !== $this->method && ! empty( $body ) ) {
                        $this->parse_body_params();
                }
 
@@ -450,7 +451,11 @@ class WP_REST_Request implements ArrayAccess {
 
                $params = array();
                foreach ( $order as $type ) {
-                       $params = array_merge( $params, (array) $this->params[ $type ] );
+                       // array_merge / the "+" operator will mess up
+                       // numeric keys, so instead do a manual foreach.
+                       foreach ( (array) $this->params[ $type ] as $key => $value ) {
+                               $params[ $key ] = $value;
+                       }
                }
 
                return $params;
@@ -646,11 +651,13 @@ class WP_REST_Request implements ArrayAccess {
         * Avoids parsing the JSON data until we need to access it.
         *
         * @since 4.4.0
+        * @since 4.7.0 Returns error instance if value cannot be decoded.
         * @access protected
+        * @return true|WP_Error True if the JSON data was passed or no JSON data was provided, WP_Error if invalid JSON was passed.
         */
        protected function parse_json_params() {
                if ( $this->parsed_json ) {
-                       return;
+                       return true;
                }
 
                $this->parsed_json = true;
@@ -659,7 +666,7 @@ class WP_REST_Request implements ArrayAccess {
                $content_type = $this->get_content_type();
 
                if ( empty( $content_type ) || 'application/json' !== $content_type['value'] ) {
-                       return;
+                       return true;
                }
 
                $params = json_decode( $this->get_body(), true );
@@ -671,10 +678,22 @@ class WP_REST_Request implements ArrayAccess {
                 * might not be defined: https://core.trac.wordpress.org/ticket/27799
                 */
                if ( null === $params && ( ! function_exists( 'json_last_error' ) || JSON_ERROR_NONE !== json_last_error() ) ) {
-                       return;
+                       // Ensure subsequent calls receive error instance.
+                       $this->parsed_json = false;
+
+                       $error_data = array(
+                               'status' => WP_Http::BAD_REQUEST,
+                       );
+                       if ( function_exists( 'json_last_error' ) ) {
+                               $error_data['json_error_code'] = json_last_error();
+                               $error_data['json_error_message'] = json_last_error_msg();
+                       }
+
+                       return new WP_Error( 'rest_invalid_json', __( 'Invalid JSON body passed.' ), $error_data );
                }
 
                $this->params['JSON'] = $params;
+               return true;
        }
 
        /**
@@ -780,10 +799,9 @@ class WP_REST_Request implements ArrayAccess {
         * @since 4.4.0
         * @access public
         *
-        * @return true|null True if there are no parameters to sanitize, null otherwise.
+        * @return true|WP_Error True if parameters were sanitized, WP_Error if an error occurred during sanitization.
         */
        public function sanitize_params() {
-
                $attributes = $this->get_attributes();
 
                // No arguments set, skip sanitizing.
@@ -793,18 +811,38 @@ class WP_REST_Request implements ArrayAccess {
 
                $order = $this->get_parameter_order();
 
+               $invalid_params = array();
+
                foreach ( $order as $type ) {
                        if ( empty( $this->params[ $type ] ) ) {
                                continue;
                        }
                        foreach ( $this->params[ $type ] as $key => $value ) {
+                               // if no sanitize_callback was specified, default to rest_parse_request_arg
+                               // if a type was specified in the args.
+                               if ( ! isset( $attributes['args'][ $key ]['sanitize_callback'] ) && ! empty( $attributes['args'][ $key ]['type'] ) ) {
+                                       $attributes['args'][ $key ]['sanitize_callback'] = 'rest_parse_request_arg';
+                               }
                                // Check if this param has a sanitize_callback added.
-                               if ( isset( $attributes['args'][ $key ] ) && ! empty( $attributes['args'][ $key ]['sanitize_callback'] ) ) {
-                                       $this->params[ $type ][ $key ] = call_user_func( $attributes['args'][ $key ]['sanitize_callback'], $value, $this, $key );
+                               if ( ! isset( $attributes['args'][ $key ] ) || empty( $attributes['args'][ $key ]['sanitize_callback'] ) ) {
+                                       continue;
+                               }
+
+                               $sanitized_value = call_user_func( $attributes['args'][ $key ]['sanitize_callback'], $value, $this, $key );
+
+                               if ( is_wp_error( $sanitized_value ) ) {
+                                       $invalid_params[ $key ] = $sanitized_value->get_error_message();
+                               } else {
+                                       $this->params[ $type ][ $key ] = $sanitized_value;
                                }
                        }
                }
-               return null;
+
+               if ( $invalid_params ) {
+                       return new WP_Error( 'rest_invalid_param', sprintf( __( 'Invalid parameter(s): %s' ), implode( ', ', array_keys( $invalid_params ) ) ), array( 'status' => 400, 'params' => $invalid_params ) );
+               }
+
+               return true;
        }
 
        /**
@@ -817,6 +855,11 @@ class WP_REST_Request implements ArrayAccess {
         *                       WP_Error if required parameters are missing.
         */
        public function has_valid_params() {
+               // If JSON data was passed, check for errors.
+               $json_error = $this->parse_json_params();
+               if ( is_wp_error( $json_error ) ) {
+                       return $json_error;
+               }
 
                $attributes = $this->get_attributes();
                $required = array();
@@ -954,7 +997,7 @@ class WP_REST_Request implements ArrayAccess {
 
                $api_root = rest_url();
                if ( get_option( 'permalink_structure' ) && 0 === strpos( $url, $api_root ) ) {
-                       // Pretty permalinks on, and URL is under the API root
+                       // Pretty permalinks on, and URL is under the API root.
                        $api_url_part = substr( $url, strlen( untrailingslashit( $api_root ) ) );
                        $route = parse_url( $api_url_part, PHP_URL_PATH );
                } elseif ( ! empty( $query_params['rest_route'] ) ) {
index 7a459066905dc271fd59c4850b7e6c43adc946ee..ec8d2a0baf7c8b4b88f0dcb264a916fff800013a 100644 (file)
@@ -114,7 +114,7 @@ class WP_REST_Server {
         */
        public function check_authentication() {
                /**
-                * Pass an authentication error to the API
+                * Filters REST authentication errors.
                 *
                 * This is used to pass a WP_Error from an authentication method back to
                 * the API.
@@ -240,7 +240,7 @@ class WP_REST_Server {
                 */
                $this->send_header( 'X-Content-Type-Options', 'nosniff' );
                $this->send_header( 'Access-Control-Expose-Headers', 'X-WP-Total, X-WP-TotalPages' );
-               $this->send_header( 'Access-Control-Allow-Headers', 'Authorization' );
+               $this->send_header( 'Access-Control-Allow-Headers', 'Authorization, Content-Type' );
 
                /**
                 * Send nocache headers on authenticated requests.
@@ -260,10 +260,11 @@ class WP_REST_Server {
                 * Filters whether the REST API is enabled.
                 *
                 * @since 4.4.0
+                * @deprecated 4.7.0 Use the rest_authentication_errors filter to restrict access to the API
                 *
                 * @param bool $rest_enabled Whether the REST API is enabled. Default true.
                 */
-               $enabled = apply_filters( 'rest_enabled', true );
+               apply_filters_deprecated( 'rest_enabled', array( true ), '4.7.0', 'rest_authentication_errors', __( 'The REST API can no longer be completely disabled, the rest_authentication_errors can be used to restrict access to the API, instead.' ) );
 
                /**
                 * Filters whether jsonp is enabled.
@@ -276,10 +277,6 @@ class WP_REST_Server {
 
                $jsonp_callback = null;
 
-               if ( ! $enabled ) {
-                       echo $this->json_error( 'rest_disabled', __( 'The REST API is disabled on this site.' ), 404 );
-                       return false;
-               }
                if ( isset( $_GET['_jsonp'] ) ) {
                        if ( ! $jsonp_enabled ) {
                                echo $this->json_error( 'rest_callback_disabled', __( 'JSONP support is disabled on this site.' ), 400 );
@@ -288,7 +285,7 @@ class WP_REST_Server {
 
                        $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 );
+                               echo $this->json_error( 'rest_callback_invalid', __( 'Invalid JSONP callback function.' ), 400 );
                                return false;
                        }
                }
@@ -394,7 +391,7 @@ class WP_REST_Server {
                        }
 
                        if ( $jsonp_callback ) {
-                               // Prepend '/**/' to mitigate possible JSONP Flash attacks
+                               // Prepend '/**/' to mitigate possible JSONP Flash attacks.
                                // https://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
                                echo '/**/' . $jsonp_callback . '(' . $result . ')';
                        } else {
@@ -505,7 +502,7 @@ class WP_REST_Server {
                                        continue;
                                }
 
-                               // Relation now changes from '$uri' to '$curie:$relation'
+                               // Relation now changes from '$uri' to '$curie:$relation'.
                                $rel_regex = str_replace( '\{rel\}', '(.+)', preg_quote( $curie['href'], '!' ) );
                                preg_match( '!' . $rel_regex . '!', $rel, $matches );
                                if ( $matches ) {
@@ -585,6 +582,7 @@ class WP_REST_Server {
 
                        // Determine if any real links were found.
                        $has_links = count( array_filter( $embeds ) );
+
                        if ( $has_links ) {
                                $embedded[ $rel ] = $embeds;
                        }
@@ -641,7 +639,7 @@ class WP_REST_Server {
         * @param string $namespace  Namespace.
         * @param string $route      The REST route.
         * @param array  $route_args Route arguments.
-        * @param bool   $override   Optional. Whether the route should be overriden if it already exists.
+        * @param bool   $override   Optional. Whether the route should be overridden if it already exists.
         *                           Default false.
         */
        public function register_route( $namespace, $route, $route_args, $override = false ) {
@@ -744,7 +742,7 @@ class WP_REST_Server {
                                // Allow comma-separated HTTP methods.
                                if ( is_string( $handler['methods'] ) ) {
                                        $methods = explode( ',', $handler['methods'] );
-                               } else if ( is_array( $handler['methods'] ) ) {
+                               } elseif ( is_array( $handler['methods'] ) ) {
                                        $methods = $handler['methods'];
                                } else {
                                        $methods = array();
@@ -758,6 +756,7 @@ class WP_REST_Server {
                                }
                        }
                }
+
                return $endpoints;
        }
 
@@ -866,11 +865,32 @@ class WP_REST_Server {
                                        $check_required = $request->has_valid_params();
                                        if ( is_wp_error( $check_required ) ) {
                                                $response = $check_required;
+                                       } else {
+                                               $check_sanitized = $request->sanitize_params();
+                                               if ( is_wp_error( $check_sanitized ) ) {
+                                                       $response = $check_sanitized;
+                                               }
                                        }
-
-                                       $request->sanitize_params();
                                }
 
+                               /**
+                                * Filters the response before executing any REST API callbacks.
+                                *
+                                * Allows plugins to perform additional validation after a
+                                * request is initialized and matched to a registered route,
+                                * but before it is executed.
+                                *
+                                * Note that this filter will not be called for requests that
+                                * fail to authenticate or match to a registered route.
+                                *
+                                * @since 4.7.0
+                                *
+                                * @param WP_HTTP_Response $response Result to send to the client. Usually a WP_REST_Response.
+                                * @param WP_REST_Server   $handler  ResponseHandler instance (usually WP_REST_Server).
+                                * @param WP_REST_Request  $request  Request used to generate the response.
+                                */
+                               $response = apply_filters( 'rest_request_before_callbacks', $response, $handler, $request );
+
                                if ( ! is_wp_error( $response ) ) {
                                        // Check permission specified on the route.
                                        if ( ! empty( $handler['permission_callback'] ) ) {
@@ -878,7 +898,7 @@ class WP_REST_Server {
 
                                                if ( is_wp_error( $permission ) ) {
                                                        $response = $permission;
-                                               } else if ( false === $permission || null === $permission ) {
+                                               } elseif ( false === $permission || null === $permission ) {
                                                        $response = new WP_Error( 'rest_forbidden', __( 'Sorry, you are not allowed to do that.' ), array( 'status' => 403 ) );
                                                }
                                        }
@@ -908,6 +928,28 @@ class WP_REST_Server {
                                        }
                                }
 
+                               /**
+                                * Filters the response immediately after executing any REST API
+                                * callbacks.
+                                *
+                                * Allows plugins to perform any needed cleanup, for example,
+                                * to undo changes made during the {@see 'rest_request_before_callbacks'}
+                                * filter.
+                                *
+                                * Note that this filter will not be called for requests that
+                                * fail to authenticate or match to a registered route.
+                                *
+                                * Note that an endpoint's `permission_callback` can still be
+                                * called after this filter - see `rest_send_allow_header()`.
+                                *
+                                * @since 4.7.0
+                                *
+                                * @param WP_HTTP_Response $response Result to send to the client. Usually a WP_REST_Response.
+                                * @param WP_REST_Server   $handler  ResponseHandler instance (usually WP_REST_Server).
+                                * @param WP_REST_Request  $request  Request used to generate the response.
+                                */
+                               $response = apply_filters( 'rest_request_after_callbacks', $response, $handler, $request );
+
                                if ( is_wp_error( $response ) ) {
                                        $response = $this->error_to_response( $response );
                                } else {
@@ -1141,6 +1183,12 @@ class WP_REST_Server {
                                        if ( isset( $opts['description'] ) ) {
                                                $arg_data['description'] = $opts['description'];
                                        }
+                                       if ( isset( $opts['type'] ) ) {
+                                               $arg_data['type'] = $opts['type'];
+                                       }
+                                       if ( isset( $opts['items'] ) ) {
+                                               $arg_data['items'] = $opts['items'];
+                                       }
                                        $endpoint_data['args'][ $key ] = $arg_data;
                                }
                        }
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
new file mode 100644 (file)
index 0000000..f0055ee
--- /dev/null
@@ -0,0 +1,749 @@
+<?php
+/**
+ * REST API: WP_REST_Attachments_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core controller used to access attachments via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Posts_Controller
+ */
+class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
+
+       /**
+        * Determines the allowed query_vars for a get_items() response and
+        * prepares for WP_Query.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param array           $prepared_args Optional. Array of prepared arguments. Default empty array.
+        * @param WP_REST_Request $request       Optional. Request to prepare items for.
+        * @return array Array of query arguments.
+        */
+       protected function prepare_items_query( $prepared_args = array(), $request = null ) {
+               $query_args = parent::prepare_items_query( $prepared_args, $request );
+
+               if ( empty( $query_args['post_status'] ) ) {
+                       $query_args['post_status'] = 'inherit';
+               }
+
+               $media_types = $this->get_media_types();
+
+               if ( ! empty( $request['media_type'] ) && isset( $media_types[ $request['media_type'] ] ) ) {
+                       $query_args['post_mime_type'] = $media_types[ $request['media_type'] ];
+               }
+
+               if ( ! empty( $request['mime_type'] ) ) {
+                       $parts = explode( '/', $request['mime_type'] );
+                       if ( isset( $media_types[ $parts[0] ] ) && in_array( $request['mime_type'], $media_types[ $parts[0] ], true ) ) {
+                               $query_args['post_mime_type'] = $request['mime_type'];
+                       }
+               }
+
+               return $query_args;
+       }
+
+       /**
+        * Checks if a given request has access to create an attachment.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|true Boolean true if the attachment may be created, or a WP_Error if not.
+        */
+       public function create_item_permissions_check( $request ) {
+               $ret = parent::create_item_permissions_check( $request );
+
+               if ( ! $ret || is_wp_error( $ret ) ) {
+                       return $ret;
+               }
+
+               if ( ! current_user_can( 'upload_files' ) ) {
+                       return new WP_Error( 'rest_cannot_create', __( 'Sorry, you are not allowed to upload media on this site.' ), array( 'status' => 400 ) );
+               }
+
+               // Attaching media to a post requires ability to edit said post.
+               if ( ! empty( $request['post'] ) ) {
+                       $parent = get_post( (int) $request['post'] );
+                       $post_parent_type = get_post_type_object( $parent->post_type );
+
+                       if ( ! current_user_can( $post_parent_type->cap->edit_post, $request['post'] ) ) {
+                               return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to upload media to this post.' ), array( 'status' => rest_authorization_required_code() ) );
+                       }
+               }
+
+               return true;
+       }
+
+       /**
+        * Creates a single attachment.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, WP_Error object on failure.
+        */
+       public function create_item( $request ) {
+
+               if ( ! empty( $request['post'] ) && in_array( get_post_type( $request['post'] ), array( 'revision', 'attachment' ), true ) ) {
+                       return new WP_Error( 'rest_invalid_param', __( 'Invalid parent type.' ), array( 'status' => 400 ) );
+               }
+
+               // Get the file via $_FILES or raw data.
+               $files = $request->get_file_params();
+               $headers = $request->get_headers();
+
+               if ( ! empty( $files ) ) {
+                       $file = $this->upload_from_file( $files, $headers );
+               } else {
+                       $file = $this->upload_from_data( $request->get_body(), $headers );
+               }
+
+               if ( is_wp_error( $file ) ) {
+                       return $file;
+               }
+
+               $name       = basename( $file['file'] );
+               $name_parts = pathinfo( $name );
+               $name       = trim( substr( $name, 0, -(1 + strlen( $name_parts['extension'] ) ) ) );
+
+               $url     = $file['url'];
+               $type    = $file['type'];
+               $file    = $file['file'];
+
+               // use image exif/iptc data for title and caption defaults if possible
+               $image_meta = @wp_read_image_metadata( $file );
+
+               if ( ! empty( $image_meta ) ) {
+                       if ( empty( $request['title'] ) && trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) {
+                               $request['title'] = $image_meta['title'];
+                       }
+
+                       if ( empty( $request['caption'] ) && trim( $image_meta['caption'] ) ) {
+                               $request['caption'] = $image_meta['caption'];
+                       }
+               }
+
+               $attachment = $this->prepare_item_for_database( $request );
+               $attachment->file = $file;
+               $attachment->post_mime_type = $type;
+               $attachment->guid = $url;
+
+               if ( empty( $attachment->post_title ) ) {
+                       $attachment->post_title = preg_replace( '/\.[^.]+$/', '', basename( $file ) );
+               }
+
+               $id = wp_insert_post( wp_slash( (array) $attachment ), true );
+
+               if ( is_wp_error( $id ) ) {
+                       if ( 'db_update_error' === $id->get_error_code() ) {
+                               $id->add_data( array( 'status' => 500 ) );
+                       } else {
+                               $id->add_data( array( 'status' => 400 ) );
+                       }
+                       return $id;
+               }
+
+               $attachment = get_post( $id );
+
+               /**
+                * Fires after a single attachment is created or updated via the REST API.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_Post         $attachment Inserted or updated attachment
+                *                                    object.
+                * @param WP_REST_Request $request    The request sent to the API.
+                * @param bool            $creating   True when creating an attachment, false when updating.
+                */
+               do_action( 'rest_insert_attachment', $attachment, $request, true );
+
+               // Include admin functions to get access to wp_generate_attachment_metadata().
+               require_once ABSPATH . 'wp-admin/includes/admin.php';
+
+               wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
+
+               if ( isset( $request['alt_text'] ) ) {
+                       update_post_meta( $id, '_wp_attachment_image_alt', sanitize_text_field( $request['alt_text'] ) );
+               }
+
+               $fields_update = $this->update_additional_fields_for_object( $attachment, $request );
+
+               if ( is_wp_error( $fields_update ) ) {
+                       return $fields_update;
+               }
+
+               $request->set_param( 'context', 'edit' );
+               $response = $this->prepare_item_for_response( $attachment, $request );
+               $response = rest_ensure_response( $response );
+               $response->set_status( 201 );
+               $response->header( 'Location', rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->rest_base, $id ) ) );
+
+               return $response;
+       }
+
+       /**
+        * Updates a single attachment.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, WP_Error object on failure.
+        */
+       public function update_item( $request ) {
+               if ( ! empty( $request['post'] ) && in_array( get_post_type( $request['post'] ), array( 'revision', 'attachment' ), true ) ) {
+                       return new WP_Error( 'rest_invalid_param', __( 'Invalid parent type.' ), array( 'status' => 400 ) );
+               }
+
+               $response = parent::update_item( $request );
+
+               if ( is_wp_error( $response ) ) {
+                       return $response;
+               }
+
+               $response = rest_ensure_response( $response );
+               $data = $response->get_data();
+
+               if ( isset( $request['alt_text'] ) ) {
+                       update_post_meta( $data['id'], '_wp_attachment_image_alt', $request['alt_text'] );
+               }
+
+               $attachment = get_post( $request['id'] );
+
+               /* This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php */
+               do_action( 'rest_insert_attachment', $data, $request, false );
+
+               $fields_update = $this->update_additional_fields_for_object( $attachment, $request );
+
+               if ( is_wp_error( $fields_update ) ) {
+                       return $fields_update;
+               }
+
+               $request->set_param( 'context', 'edit' );
+               $response = $this->prepare_item_for_response( $attachment, $request );
+               $response = rest_ensure_response( $response );
+
+               return $response;
+       }
+
+       /**
+        * Prepares a single attachment for create or update.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Request object.
+        * @return WP_Error|stdClass $prepared_attachment Post object.
+        */
+       protected function prepare_item_for_database( $request ) {
+               $prepared_attachment = parent::prepare_item_for_database( $request );
+
+               // Attachment caption (post_excerpt internally)
+               if ( isset( $request['caption'] ) ) {
+                       if ( is_string( $request['caption'] ) ) {
+                               $prepared_attachment->post_excerpt = $request['caption'];
+                       } elseif ( isset( $request['caption']['raw'] ) ) {
+                               $prepared_attachment->post_excerpt = $request['caption']['raw'];
+                       }
+               }
+
+               // Attachment description (post_content internally)
+               if ( isset( $request['description'] ) ) {
+                       if ( is_string( $request['description'] ) ) {
+                               $prepared_attachment->post_content = $request['description'];
+                       } elseif ( isset( $request['description']['raw'] ) ) {
+                               $prepared_attachment->post_content = $request['description']['raw'];
+                       }
+               }
+
+               if ( isset( $request['post'] ) ) {
+                       $prepared_attachment->post_parent = (int) $request['post'];
+               }
+
+               return $prepared_attachment;
+       }
+
+       /**
+        * Prepares a single attachment output for response.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_Post         $post    Attachment object.
+        * @param WP_REST_Request $request Request object.
+        * @return WP_REST_Response Response object.
+        */
+       public function prepare_item_for_response( $post, $request ) {
+               $response = parent::prepare_item_for_response( $post, $request );
+               $data = $response->get_data();
+
+               $data['description'] = array(
+                       'raw'       => $post->post_content,
+                       /** This filter is documented in wp-includes/post-template.php */
+                       'rendered'  => apply_filters( 'the_content', $post->post_content ),
+               );
+
+               /** This filter is documented in wp-includes/post-template.php */
+               $caption = apply_filters( 'the_excerpt', apply_filters( 'get_the_excerpt', $post->post_excerpt, $post ) );
+               $data['caption'] = array(
+                       'raw'       => $post->post_excerpt,
+                       'rendered'  => $caption,
+               );
+
+               $data['alt_text']      = get_post_meta( $post->ID, '_wp_attachment_image_alt', true );
+               $data['media_type']    = wp_attachment_is_image( $post->ID ) ? 'image' : 'file';
+               $data['mime_type']     = $post->post_mime_type;
+               $data['media_details'] = wp_get_attachment_metadata( $post->ID );
+               $data['post']          = ! empty( $post->post_parent ) ? (int) $post->post_parent : null;
+               $data['source_url']    = wp_get_attachment_url( $post->ID );
+
+               // Ensure empty details is an empty object.
+               if ( empty( $data['media_details'] ) ) {
+                       $data['media_details'] = new stdClass;
+               } elseif ( ! empty( $data['media_details']['sizes'] ) ) {
+
+                       foreach ( $data['media_details']['sizes'] as $size => &$size_data ) {
+
+                               if ( isset( $size_data['mime-type'] ) ) {
+                                       $size_data['mime_type'] = $size_data['mime-type'];
+                                       unset( $size_data['mime-type'] );
+                               }
+
+                               // Use the same method image_downsize() does.
+                               $image_src = wp_get_attachment_image_src( $post->ID, $size );
+                               if ( ! $image_src ) {
+                                       continue;
+                               }
+
+                               $size_data['source_url'] = $image_src[0];
+                       }
+
+                       $full_src = wp_get_attachment_image_src( $post->ID, 'full' );
+
+                       if ( ! empty( $full_src ) ) {
+                               $data['media_details']['sizes']['full'] = array(
+                                       'file'       => wp_basename( $full_src[0] ),
+                                       'width'      => $full_src[1],
+                                       'height'     => $full_src[2],
+                                       'mime_type'  => $post->post_mime_type,
+                                       'source_url' => $full_src[0],
+                               );
+                       }
+               } else {
+                       $data['media_details']['sizes'] = new stdClass;
+               }
+
+               $context = ! empty( $request['context'] ) ? $request['context'] : 'view';
+
+               $data = $this->filter_response_by_context( $data, $context );
+
+               // Wrap the data in a response object.
+               $response = rest_ensure_response( $data );
+
+               $response->add_links( $this->prepare_links( $post ) );
+
+               /**
+                * Filters an attachment returned from the REST API.
+                *
+                * Allows modification of the attachment right before it is returned.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_REST_Response $response The response object.
+                * @param WP_Post          $post     The original attachment post.
+                * @param WP_REST_Request  $request  Request used to generate the response.
+                */
+               return apply_filters( 'rest_prepare_attachment', $response, $post, $request );
+       }
+
+       /**
+        * Retrieves the attachment's schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Item schema as an array.
+        */
+       public function get_item_schema() {
+
+               $schema = parent::get_item_schema();
+
+               $schema['properties']['alt_text'] = array(
+                       'description'     => __( 'Alternative text to display when attachment is not displayed.' ),
+                       'type'            => 'string',
+                       'context'         => array( 'view', 'edit', 'embed' ),
+                       'arg_options'     => array(
+                               'sanitize_callback' => 'sanitize_text_field',
+                       ),
+               );
+
+               $schema['properties']['caption'] = array(
+                       'description' => __( 'The attachment caption.' ),
+                       'type'        => 'object',
+                       'context'     => array( 'view', 'edit', 'embed' ),
+                       'arg_options' => array(
+                               'sanitize_callback' => null, // Note: sanitization implemented in self::prepare_item_for_database()
+                       ),
+                       'properties'  => array(
+                               'raw' => array(
+                                       'description' => __( 'Caption for the attachment, as it exists in the database.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'edit' ),
+                               ),
+                               'rendered' => array(
+                                       'description' => __( 'HTML caption for the attachment, transformed for display.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'view', 'edit', 'embed' ),
+                                       'readonly'    => true,
+                               ),
+                       ),
+               );
+
+               $schema['properties']['description'] = array(
+                       'description' => __( 'The attachment description.' ),
+                       'type'        => 'object',
+                       'context'     => array( 'view', 'edit' ),
+                       'arg_options' => array(
+                               'sanitize_callback' => null, // Note: sanitization implemented in self::prepare_item_for_database()
+                       ),
+                       'properties'  => array(
+                               'raw' => array(
+                                       'description' => __( 'Description for the object, as it exists in the database.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'edit' ),
+                               ),
+                               'rendered' => array(
+                                       'description' => __( 'HTML description for the object, transformed for display.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'view', 'edit' ),
+                                       'readonly'    => true,
+                               ),
+                       ),
+               );
+
+               $schema['properties']['media_type'] = array(
+                       'description'     => __( 'Attachment type.' ),
+                       'type'            => 'string',
+                       'enum'            => array( 'image', 'file' ),
+                       'context'         => array( 'view', 'edit', 'embed' ),
+                       'readonly'        => true,
+               );
+
+               $schema['properties']['mime_type'] = array(
+                       'description'     => __( 'The attachment MIME type.' ),
+                       'type'            => 'string',
+                       'context'         => array( 'view', 'edit', 'embed' ),
+                       'readonly'        => true,
+               );
+
+               $schema['properties']['media_details'] = array(
+                       'description'     => __( 'Details about the media file, specific to its type.' ),
+                       'type'            => 'object',
+                       'context'         => array( 'view', 'edit', 'embed' ),
+                       'readonly'        => true,
+               );
+
+               $schema['properties']['post'] = array(
+                       'description'     => __( 'The ID for the associated post of the attachment.' ),
+                       'type'            => 'integer',
+                       'context'         => array( 'view', 'edit' ),
+               );
+
+               $schema['properties']['source_url'] = array(
+                       'description'     => __( 'URL to the original attachment file.' ),
+                       'type'            => 'string',
+                       'format'          => 'uri',
+                       'context'         => array( 'view', 'edit', 'embed' ),
+                       'readonly'        => true,
+               );
+
+               unset( $schema['properties']['password'] );
+
+               return $schema;
+       }
+
+       /**
+        * Handles an upload via raw POST data.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param array $data    Supplied file data.
+        * @param array $headers HTTP headers from the request.
+        * @return array|WP_Error Data from wp_handle_sideload().
+        */
+       protected function upload_from_data( $data, $headers ) {
+               if ( empty( $data ) ) {
+                       return new WP_Error( 'rest_upload_no_data', __( 'No data supplied.' ), array( 'status' => 400 ) );
+               }
+
+               if ( empty( $headers['content_type'] ) ) {
+                       return new WP_Error( 'rest_upload_no_content_type', __( 'No Content-Type supplied.' ), array( 'status' => 400 ) );
+               }
+
+               if ( empty( $headers['content_disposition'] ) ) {
+                       return new WP_Error( 'rest_upload_no_content_disposition', __( 'No Content-Disposition supplied.' ), array( 'status' => 400 ) );
+               }
+
+               $filename = self::get_filename_from_disposition( $headers['content_disposition'] );
+
+               if ( empty( $filename ) ) {
+                       return new WP_Error( 'rest_upload_invalid_disposition', __( 'Invalid Content-Disposition supplied. Content-Disposition needs to be formatted as `attachment; filename="image.png"` or similar.' ), array( 'status' => 400 ) );
+               }
+
+               if ( ! empty( $headers['content_md5'] ) ) {
+                       $content_md5 = array_shift( $headers['content_md5'] );
+                       $expected    = trim( $content_md5 );
+                       $actual      = md5( $data );
+
+                       if ( $expected !== $actual ) {
+                               return new WP_Error( 'rest_upload_hash_mismatch', __( 'Content hash did not match expected.' ), array( 'status' => 412 ) );
+                       }
+               }
+
+               // Get the content-type.
+               $type = array_shift( $headers['content_type'] );
+
+               /** Include admin functions to get access to wp_tempnam() and wp_handle_sideload() */
+               require_once ABSPATH . 'wp-admin/includes/admin.php';
+
+               // Save the file.
+               $tmpfname = wp_tempnam( $filename );
+
+               $fp = fopen( $tmpfname, 'w+' );
+
+               if ( ! $fp ) {
+                       return new WP_Error( 'rest_upload_file_error', __( 'Could not open file handle.' ), array( 'status' => 500 ) );
+               }
+
+               fwrite( $fp, $data );
+               fclose( $fp );
+
+               // Now, sideload it in.
+               $file_data = array(
+                       'error'    => null,
+                       'tmp_name' => $tmpfname,
+                       'name'     => $filename,
+                       'type'     => $type,
+               );
+
+               $overrides = array(
+                       'test_form' => false,
+               );
+
+               $sideloaded = wp_handle_sideload( $file_data, $overrides );
+
+               if ( isset( $sideloaded['error'] ) ) {
+                       @unlink( $tmpfname );
+
+                       return new WP_Error( 'rest_upload_sideload_error', $sideloaded['error'], array( 'status' => 500 ) );
+               }
+
+               return $sideloaded;
+       }
+
+       /**
+        * Parses filename from a Content-Disposition header value.
+        *
+        * As per RFC6266:
+        *
+        *     content-disposition = "Content-Disposition" ":"
+        *                            disposition-type *( ";" disposition-parm )
+        *
+        *     disposition-type    = "inline" | "attachment" | disp-ext-type
+        *                         ; case-insensitive
+        *     disp-ext-type       = token
+        *
+        *     disposition-parm    = filename-parm | disp-ext-parm
+        *
+        *     filename-parm       = "filename" "=" value
+        *                         | "filename*" "=" ext-value
+        *
+        *     disp-ext-parm       = token "=" value
+        *                         | ext-token "=" ext-value
+        *     ext-token           = <the characters in token, followed by "*">
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @link http://tools.ietf.org/html/rfc2388
+        * @link http://tools.ietf.org/html/rfc6266
+        *
+        * @param string[] $disposition_header List of Content-Disposition header values.
+        * @return string|null Filename if available, or null if not found.
+        */
+       public static function get_filename_from_disposition( $disposition_header ) {
+               // Get the filename.
+               $filename = null;
+
+               foreach ( $disposition_header as $value ) {
+                       $value = trim( $value );
+
+                       if ( strpos( $value, ';' ) === false ) {
+                               continue;
+                       }
+
+                       list( $type, $attr_parts ) = explode( ';', $value, 2 );
+
+                       $attr_parts = explode( ';', $attr_parts );
+                       $attributes = array();
+
+                       foreach ( $attr_parts as $part ) {
+                               if ( strpos( $part, '=' ) === false ) {
+                                       continue;
+                               }
+
+                               list( $key, $value ) = explode( '=', $part, 2 );
+
+                               $attributes[ trim( $key ) ] = trim( $value );
+                       }
+
+                       if ( empty( $attributes['filename'] ) ) {
+                               continue;
+                       }
+
+                       $filename = trim( $attributes['filename'] );
+
+                       // Unquote quoted filename, but after trimming.
+                       if ( substr( $filename, 0, 1 ) === '"' && substr( $filename, -1, 1 ) === '"' ) {
+                               $filename = substr( $filename, 1, -1 );
+                       }
+               }
+
+               return $filename;
+       }
+
+       /**
+        * Retrieves the query params for collections of attachments.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Query parameters for the attachment collection as an array.
+        */
+       public function get_collection_params() {
+               $params = parent::get_collection_params();
+               $params['status']['default'] = 'inherit';
+               $params['status']['items']['enum'] = array( 'inherit', 'private', 'trash' );
+               $media_types = $this->get_media_types();
+
+               $params['media_type'] = array(
+                       'default'           => null,
+                       'description'       => __( 'Limit result set to attachments of a particular media type.' ),
+                       'type'              => 'string',
+                       'enum'              => array_keys( $media_types ),
+               );
+
+               $params['mime_type'] = array(
+                       'default'     => null,
+                       'description' => __( 'Limit result set to attachments of a particular MIME type.' ),
+                       'type'        => 'string',
+               );
+
+               return $params;
+       }
+
+       /**
+        * Validates whether the user can query private statuses.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param mixed           $value     Status value.
+        * @param WP_REST_Request $request   Request object.
+        * @param string          $parameter Additional parameter to pass for validation.
+        * @return WP_Error|bool True if the user may query, WP_Error if not.
+        */
+       public function validate_user_can_query_private_statuses( $value, $request, $parameter ) {
+               if ( 'inherit' === $value ) {
+                       return true;
+               }
+
+               return parent::validate_user_can_query_private_statuses( $value, $request, $parameter );
+       }
+
+       /**
+        * Handles an upload via multipart/form-data ($_FILES).
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param array $files   Data from the `$_FILES` superglobal.
+        * @param array $headers HTTP headers from the request.
+        * @return array|WP_Error Data from wp_handle_upload().
+        */
+       protected function upload_from_file( $files, $headers ) {
+               if ( empty( $files ) ) {
+                       return new WP_Error( 'rest_upload_no_data', __( 'No data supplied.' ), array( 'status' => 400 ) );
+               }
+
+               // Verify hash, if given.
+               if ( ! empty( $headers['content_md5'] ) ) {
+                       $content_md5 = array_shift( $headers['content_md5'] );
+                       $expected    = trim( $content_md5 );
+                       $actual      = md5_file( $files['file']['tmp_name'] );
+
+                       if ( $expected !== $actual ) {
+                               return new WP_Error( 'rest_upload_hash_mismatch', __( 'Content hash did not match expected.' ), array( 'status' => 412 ) );
+                       }
+               }
+
+               // Pass off to WP to handle the actual upload.
+               $overrides = array(
+                       'test_form'   => false,
+               );
+
+               // Bypasses is_uploaded_file() when running unit tests.
+               if ( defined( 'DIR_TESTDATA' ) && DIR_TESTDATA ) {
+                       $overrides['action'] = 'wp_handle_mock_upload';
+               }
+
+               /** Include admin functions to get access to wp_handle_upload() */
+               require_once ABSPATH . 'wp-admin/includes/admin.php';
+
+               $file = wp_handle_upload( $files['file'], $overrides );
+
+               if ( isset( $file['error'] ) ) {
+                       return new WP_Error( 'rest_upload_unknown_error', $file['error'], array( 'status' => 500 ) );
+               }
+
+               return $file;
+       }
+
+       /**
+        * Retrieves the supported media types.
+        *
+        * Media types are considered the MIME type category.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return array Array of supported media types.
+        */
+       protected function get_media_types() {
+               $media_types = array();
+
+               foreach ( get_allowed_mime_types() as $mime_type ) {
+                       $parts = explode( '/', $mime_type );
+
+                       if ( ! isset( $media_types[ $parts[0] ] ) ) {
+                               $media_types[ $parts[0] ] = array();
+                       }
+
+                       $media_types[ $parts[0] ][] = $mime_type;
+               }
+
+               return $media_types;
+       }
+
+}
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
new file mode 100644 (file)
index 0000000..9d61294
--- /dev/null
@@ -0,0 +1,1609 @@
+<?php
+/**
+ * REST API: WP_REST_Comments_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core controller used to access comments via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Controller
+ */
+class WP_REST_Comments_Controller extends WP_REST_Controller {
+
+       /**
+        * Instance of a comment meta fields object.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var WP_REST_Comment_Meta_Fields
+        */
+       protected $meta;
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function __construct() {
+               $this->namespace = 'wp/v2';
+               $this->rest_base = 'comments';
+
+               $this->meta = new WP_REST_Comment_Meta_Fields();
+       }
+
+       /**
+        * Registers the routes for the objects of the controller.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function register_routes() {
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base, array(
+                       array(
+                               'methods'   => WP_REST_Server::READABLE,
+                               'callback'  => array( $this, 'get_items' ),
+                               'permission_callback' => array( $this, 'get_items_permissions_check' ),
+                               'args'      => $this->get_collection_params(),
+                       ),
+                       array(
+                               'methods'  => WP_REST_Server::CREATABLE,
+                               'callback' => array( $this, 'create_item' ),
+                               'permission_callback' => array( $this, 'create_item_permissions_check' ),
+                               'args'     => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\d]+)', array(
+                       array(
+                               'methods'  => WP_REST_Server::READABLE,
+                               'callback' => array( $this, 'get_item' ),
+                               'permission_callback' => array( $this, 'get_item_permissions_check' ),
+                               'args'     => array(
+                                       'context'          => $this->get_context_param( array( 'default' => 'view' ) ),
+                                       'password' => array(
+                                               'description' => __( 'The password for the post if it is password protected.' ),
+                                               'type'        => 'string',
+                                       ),
+                               ),
+                       ),
+                       array(
+                               'methods'  => WP_REST_Server::EDITABLE,
+                               'callback' => array( $this, 'update_item' ),
+                               'permission_callback' => array( $this, 'update_item_permissions_check' ),
+                               'args'     => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
+                       ),
+                       array(
+                               'methods'  => WP_REST_Server::DELETABLE,
+                               'callback' => array( $this, 'delete_item' ),
+                               'permission_callback' => array( $this, 'delete_item_permissions_check' ),
+                               'args'     => array(
+                                       'force'    => array(
+                                               'type'        => 'boolean',
+                                               'default'     => false,
+                                               'description' => __( 'Whether to bypass trash and force deletion.' ),
+                                       ),
+                                       'password' => array(
+                                               'description' => __( 'The password for the post if it is password protected.' ),
+                                               'type'        => 'string',
+                                       ),
+                               ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+       }
+
+       /**
+        * Checks if a given request has access to read comments.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|bool True if the request has read access, error object otherwise.
+        */
+       public function get_items_permissions_check( $request ) {
+
+               if ( ! empty( $request['post'] ) ) {
+                       foreach ( (array) $request['post'] as $post_id ) {
+                               $post = get_post( $post_id );
+
+                               if ( ! empty( $post_id ) && $post && ! $this->check_read_post_permission( $post, $request ) ) {
+                                       return new WP_Error( 'rest_cannot_read_post', __( 'Sorry, you are not allowed to read the post for this comment.' ), array( 'status' => rest_authorization_required_code() ) );
+                               } elseif ( 0 === $post_id && ! current_user_can( 'moderate_comments' ) ) {
+                                       return new WP_Error( 'rest_cannot_read', __( 'Sorry, you are not allowed to read comments without a post.' ), array( 'status' => rest_authorization_required_code() ) );
+                               }
+                       }
+               }
+
+               if ( ! empty( $request['context'] ) && 'edit' === $request['context'] && ! current_user_can( 'moderate_comments' ) ) {
+                       return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit comments.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( ! current_user_can( 'edit_posts' ) ) {
+                       $protected_params = array( 'author', 'author_exclude', 'author_email', 'type', 'status' );
+                       $forbidden_params = array();
+
+                       foreach ( $protected_params as $param ) {
+                               if ( 'status' === $param ) {
+                                       if ( 'approve' !== $request[ $param ] ) {
+                                               $forbidden_params[] = $param;
+                                       }
+                               } elseif ( 'type' === $param ) {
+                                       if ( 'comment' !== $request[ $param ] ) {
+                                               $forbidden_params[] = $param;
+                                       }
+                               } elseif ( ! empty( $request[ $param ] ) ) {
+                                       $forbidden_params[] = $param;
+                               }
+                       }
+
+                       if ( ! empty( $forbidden_params ) ) {
+                               return new WP_Error( 'rest_forbidden_param', sprintf( __( 'Query parameter not permitted: %s' ), implode( ', ', $forbidden_params ) ), array( 'status' => rest_authorization_required_code() ) );
+                       }
+               }
+
+               return true;
+       }
+
+       /**
+        * Retrieves a list of comment items.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
+        */
+       public function get_items( $request ) {
+
+               // Retrieve the list of registered collection query parameters.
+               $registered = $this->get_collection_params();
+
+               /*
+                * This array defines mappings between public API query parameters whose
+                * values are accepted as-passed, and their internal WP_Query parameter
+                * name equivalents (some are the same). Only values which are also
+                * present in $registered will be set.
+                */
+               $parameter_mappings = array(
+                       'author'         => 'author__in',
+                       'author_email'   => 'author_email',
+                       'author_exclude' => 'author__not_in',
+                       'exclude'        => 'comment__not_in',
+                       'include'        => 'comment__in',
+                       'offset'         => 'offset',
+                       'order'          => 'order',
+                       'parent'         => 'parent__in',
+                       'parent_exclude' => 'parent__not_in',
+                       'per_page'       => 'number',
+                       'post'           => 'post__in',
+                       'search'         => 'search',
+                       'status'         => 'status',
+                       'type'           => 'type',
+               );
+
+               $prepared_args = array();
+
+               /*
+                * For each known parameter which is both registered and present in the request,
+                * set the parameter's value on the query $prepared_args.
+                */
+               foreach ( $parameter_mappings as $api_param => $wp_param ) {
+                       if ( isset( $registered[ $api_param ], $request[ $api_param ] ) ) {
+                               $prepared_args[ $wp_param ] = $request[ $api_param ];
+                       }
+               }
+
+               // Ensure certain parameter values default to empty strings.
+               foreach ( array( 'author_email', 'search' ) as $param ) {
+                       if ( ! isset( $prepared_args[ $param ] ) ) {
+                               $prepared_args[ $param ] = '';
+                       }
+               }
+
+               if ( isset( $registered['orderby'] ) ) {
+                       $prepared_args['orderby'] = $this->normalize_query_param( $request['orderby'] );
+               }
+
+               $prepared_args['no_found_rows'] = false;
+
+               $prepared_args['date_query'] = array();
+
+               // Set before into date query. Date query must be specified as an array of an array.
+               if ( isset( $registered['before'], $request['before'] ) ) {
+                       $prepared_args['date_query'][0]['before'] = $request['before'];
+               }
+
+               // Set after into date query. Date query must be specified as an array of an array.
+               if ( isset( $registered['after'], $request['after'] ) ) {
+                       $prepared_args['date_query'][0]['after'] = $request['after'];
+               }
+
+               if ( isset( $registered['page'] ) && empty( $request['offset'] ) ) {
+                       $prepared_args['offset'] = $prepared_args['number'] * ( absint( $request['page'] ) - 1 );
+               }
+
+               /**
+                * Filters arguments, before passing to WP_Comment_Query, when querying comments via the REST API.
+                *
+                * @since 4.7.0
+                *
+                * @link https://developer.wordpress.org/reference/classes/wp_comment_query/
+                *
+                * @param array           $prepared_args Array of arguments for WP_Comment_Query.
+                * @param WP_REST_Request $request       The current request.
+                */
+               $prepared_args = apply_filters( 'rest_comment_query', $prepared_args, $request );
+
+               $query = new WP_Comment_Query;
+               $query_result = $query->query( $prepared_args );
+
+               $comments = array();
+
+               foreach ( $query_result as $comment ) {
+                       if ( ! $this->check_read_permission( $comment, $request ) ) {
+                               continue;
+                       }
+
+                       $data = $this->prepare_item_for_response( $comment, $request );
+                       $comments[] = $this->prepare_response_for_collection( $data );
+               }
+
+               $total_comments = (int) $query->found_comments;
+               $max_pages      = (int) $query->max_num_pages;
+
+               if ( $total_comments < 1 ) {
+                       // Out-of-bounds, run the query again without LIMIT for total count.
+                       unset( $prepared_args['number'], $prepared_args['offset'] );
+
+                       $query = new WP_Comment_Query;
+                       $prepared_args['count'] = true;
+
+                       $total_comments = $query->query( $prepared_args );
+                       $max_pages = ceil( $total_comments / $request['per_page'] );
+               }
+
+               $response = rest_ensure_response( $comments );
+               $response->header( 'X-WP-Total', $total_comments );
+               $response->header( 'X-WP-TotalPages', $max_pages );
+
+               $base = add_query_arg( $request->get_query_params(), rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ) );
+
+               if ( $request['page'] > 1 ) {
+                       $prev_page = $request['page'] - 1;
+
+                       if ( $prev_page > $max_pages ) {
+                               $prev_page = $max_pages;
+                       }
+
+                       $prev_link = add_query_arg( 'page', $prev_page, $base );
+                       $response->link_header( 'prev', $prev_link );
+               }
+
+               if ( $max_pages > $request['page'] ) {
+                       $next_page = $request['page'] + 1;
+                       $next_link = add_query_arg( 'page', $next_page, $base );
+
+                       $response->link_header( 'next', $next_link );
+               }
+
+               return $response;
+       }
+
+       /**
+        * Checks if a given request has access to read the comment.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|bool True if the request has read access for the item, error object otherwise.
+        */
+       public function get_item_permissions_check( $request ) {
+               $id = (int) $request['id'];
+
+               $comment = get_comment( $id );
+
+               if ( ! $comment ) {
+                       return true;
+               }
+
+               if ( ! empty( $request['context'] ) && 'edit' === $request['context'] && ! current_user_can( 'moderate_comments' ) ) {
+                       return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit comments.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               $post = get_post( $comment->comment_post_ID );
+
+               if ( ! $this->check_read_permission( $comment, $request ) ) {
+                       return new WP_Error( 'rest_cannot_read', __( 'Sorry, you are not allowed to read this comment.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( $post && ! $this->check_read_post_permission( $post, $request ) ) {
+                       return new WP_Error( 'rest_cannot_read_post', __( 'Sorry, you are not allowed to read the post for this comment.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Retrieves a comment.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
+        */
+       public function get_item( $request ) {
+               $id = (int) $request['id'];
+
+               $comment = get_comment( $id );
+               if ( empty( $comment ) ) {
+                       return new WP_Error( 'rest_comment_invalid_id', __( 'Invalid comment ID.' ), array( 'status' => 404 ) );
+               }
+
+               if ( ! empty( $comment->comment_post_ID ) ) {
+                       $post = get_post( $comment->comment_post_ID );
+                       if ( empty( $post ) ) {
+                               return new WP_Error( 'rest_post_invalid_id', __( 'Invalid post ID.' ), array( 'status' => 404 ) );
+                       }
+               }
+
+               $data = $this->prepare_item_for_response( $comment, $request );
+               $response = rest_ensure_response( $data );
+
+               return $response;
+       }
+
+       /**
+        * Checks if a given request has access to create a comment.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|bool True if the request has access to create items, error object otherwise.
+        */
+       public function create_item_permissions_check( $request ) {
+               if ( ! is_user_logged_in() ) {
+                       if ( get_option( 'comment_registration' ) ) {
+                               return new WP_Error( 'rest_comment_login_required', __( 'Sorry, you must be logged in to comment.' ), array( 'status' => 401 ) );
+                       }
+
+                       /**
+                        * Filter whether comments can be created without authentication.
+                        *
+                        * Enables creating comments for anonymous users.
+                        *
+                        * @since 4.7.0
+                        *
+                        * @param bool $allow_anonymous Whether to allow anonymous comments to
+                        *                              be created. Default `false`.
+                        * @param WP_REST_Request $request Request used to generate the
+                        *                                 response.
+                        */
+                       $allow_anonymous = apply_filters( 'rest_allow_anonymous_comments', false, $request );
+                       if ( false === $allow_anonymous ) {
+                               return new WP_Error( 'rest_comment_login_required', __( 'Sorry, you must be logged in to comment.' ), array( 'status' => 401 ) );
+                       }
+               }
+
+               // Limit who can set comment `author`, `author_ip` or `status` to anything other than the default.
+               if ( isset( $request['author'] ) && get_current_user_id() !== $request['author'] && ! current_user_can( 'moderate_comments' ) ) {
+                       return new WP_Error( 'rest_comment_invalid_author',
+                               /* translators: %s: request parameter */
+                               sprintf( __( "Sorry, you are not allowed to edit '%s' for comments." ), 'author' ),
+                               array( 'status' => rest_authorization_required_code() )
+                       );
+               }
+
+               if ( isset( $request['author_ip'] ) && ! current_user_can( 'moderate_comments' ) ) {
+                       if ( empty( $_SERVER['REMOTE_ADDR'] ) || $request['author_ip'] !== $_SERVER['REMOTE_ADDR'] ) {
+                               return new WP_Error( 'rest_comment_invalid_author_ip',
+                                       /* translators: %s: request parameter */
+                                       sprintf( __( "Sorry, you are not allowed to edit '%s' for comments." ), 'author_ip' ),
+                                       array( 'status' => rest_authorization_required_code() )
+                               );
+                       }
+               }
+
+               if ( isset( $request['status'] ) && ! current_user_can( 'moderate_comments' ) ) {
+                       return new WP_Error( 'rest_comment_invalid_status',
+                               /* translators: %s: request parameter */
+                               sprintf( __( "Sorry, you are not allowed to edit '%s' for comments." ), 'status' ),
+                               array( 'status' => rest_authorization_required_code() )
+                       );
+               }
+
+               if ( empty( $request['post'] ) ) {
+                       return new WP_Error( 'rest_comment_invalid_post_id', __( 'Sorry, you are not allowed to create this comment without a post.' ), array( 'status' => 403 ) );
+               }
+
+               $post = get_post( (int) $request['post'] );
+               if ( ! $post ) {
+                       return new WP_Error( 'rest_comment_invalid_post_id', __( 'Sorry, you are not allowed to create this comment without a post.' ), array( 'status' => 403 ) );
+               }
+
+               if ( 'draft' === $post->post_status ) {
+                       return new WP_Error( 'rest_comment_draft_post', __( 'Sorry, you are not allowed to create a comment on this post.' ), array( 'status' => 403 ) );
+               }
+
+               if ( 'trash' === $post->post_status ) {
+                       return new WP_Error( 'rest_comment_trash_post', __( 'Sorry, you are not allowed to create a comment on this post.' ), array( 'status' => 403 ) );
+               }
+
+               if ( ! $this->check_read_post_permission( $post, $request ) ) {
+                       return new WP_Error( 'rest_cannot_read_post', __( 'Sorry, you are not allowed to read the post for this comment.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( ! comments_open( $post->ID ) ) {
+                       return new WP_Error( 'rest_comment_closed', __( 'Sorry, comments are closed for this item.' ), array( 'status' => 403 ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Creates a comment.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
+        */
+       public function create_item( $request ) {
+               if ( ! empty( $request['id'] ) ) {
+                       return new WP_Error( 'rest_comment_exists', __( 'Cannot create existing comment.' ), array( 'status' => 400 ) );
+               }
+
+               // Do not allow comments to be created with a non-default type.
+               if ( ! empty( $request['type'] ) && 'comment' !== $request['type'] ) {
+                       return new WP_Error( 'rest_invalid_comment_type', __( 'Cannot create a comment with that type.' ), array( 'status' => 400 ) );
+               }
+
+               $prepared_comment = $this->prepare_item_for_database( $request );
+               if ( is_wp_error( $prepared_comment ) ) {
+                       return $prepared_comment;
+               }
+
+               $prepared_comment['comment_type'] = '';
+
+               /*
+                * Do not allow a comment to be created with missing or empty
+                * comment_content. See wp_handle_comment_submission().
+                */
+               if ( empty( $prepared_comment['comment_content'] ) ) {
+                       return new WP_Error( 'rest_comment_content_invalid', __( 'Invalid comment content.' ), array( 'status' => 400 ) );
+               }
+
+               // Setting remaining values before wp_insert_comment so we can use wp_allow_comment().
+               if ( ! isset( $prepared_comment['comment_date_gmt'] ) ) {
+                       $prepared_comment['comment_date_gmt'] = current_time( 'mysql', true );
+               }
+
+               // Set author data if the user's logged in.
+               $missing_author = empty( $prepared_comment['user_id'] )
+                       && empty( $prepared_comment['comment_author'] )
+                       && empty( $prepared_comment['comment_author_email'] )
+                       && empty( $prepared_comment['comment_author_url'] );
+
+               if ( is_user_logged_in() && $missing_author ) {
+                       $user = wp_get_current_user();
+
+                       $prepared_comment['user_id'] = $user->ID;
+                       $prepared_comment['comment_author'] = $user->display_name;
+                       $prepared_comment['comment_author_email'] = $user->user_email;
+                       $prepared_comment['comment_author_url'] = $user->user_url;
+               }
+
+               // Honor the discussion setting that requires a name and email address of the comment author.
+               if ( get_option( 'require_name_email' ) ) {
+                       if ( empty( $prepared_comment['comment_author'] ) || empty( $prepared_comment['comment_author_email'] ) ) {
+                               return new WP_Error( 'rest_comment_author_data_required', __( 'Creating a comment requires valid author name and email values.' ), array( 'status' => 400 ) );
+                       }
+               }
+
+               if ( ! isset( $prepared_comment['comment_author_email'] ) ) {
+                       $prepared_comment['comment_author_email'] = '';
+               }
+
+               if ( ! isset( $prepared_comment['comment_author_url'] ) ) {
+                       $prepared_comment['comment_author_url'] = '';
+               }
+
+               if ( ! isset( $prepared_comment['comment_agent'] ) ) {
+                       $prepared_comment['comment_agent'] = '';
+               }
+
+               $check_comment_lengths = wp_check_comment_data_max_lengths( $prepared_comment );
+               if ( is_wp_error( $check_comment_lengths ) ) {
+                       $error_code = $check_comment_lengths->get_error_code();
+                       return new WP_Error( $error_code, __( 'Comment field exceeds maximum length allowed.' ), array( 'status' => 400 ) );
+               }
+
+               $prepared_comment['comment_approved'] = wp_allow_comment( $prepared_comment, true );
+
+               if ( is_wp_error( $prepared_comment['comment_approved'] ) ) {
+                       $error_code    = $prepared_comment['comment_approved']->get_error_code();
+                       $error_message = $prepared_comment['comment_approved']->get_error_message();
+
+                       if ( 'comment_duplicate' === $error_code ) {
+                               return new WP_Error( $error_code, $error_message, array( 'status' => 409 ) );
+                       }
+
+                       if ( 'comment_flood' === $error_code ) {
+                               return new WP_Error( $error_code, $error_message, array( 'status' => 400 ) );
+                       }
+
+                       return $prepared_comment['comment_approved'];
+               }
+
+               /**
+                * Filters a comment before it is inserted via the REST API.
+                *
+                * Allows modification of the comment right before it is inserted via wp_insert_comment().
+                *
+                * @since 4.7.0
+                *
+                * @param array           $prepared_comment The prepared comment data for wp_insert_comment().
+                * @param WP_REST_Request $request          Request used to insert the comment.
+                */
+               $prepared_comment = apply_filters( 'rest_pre_insert_comment', $prepared_comment, $request );
+
+               $comment_id = wp_insert_comment( wp_filter_comment( wp_slash( (array) $prepared_comment ) ) );
+
+               if ( ! $comment_id ) {
+                       return new WP_Error( 'rest_comment_failed_create', __( 'Creating comment failed.' ), array( 'status' => 500 ) );
+               }
+
+               if ( isset( $request['status'] ) ) {
+                       $this->handle_status_param( $request['status'], $comment_id );
+               }
+
+               $comment = get_comment( $comment_id );
+
+               /**
+                * Fires after a comment is created or updated via the REST API.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_Comment      $comment  Inserted or updated comment object.
+                * @param WP_REST_Request $request  Request object.
+                * @param bool            $creating True when creating a comment, false
+                *                                  when updating.
+                */
+               do_action( 'rest_insert_comment', $comment, $request, true );
+
+               $schema = $this->get_item_schema();
+
+               if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
+                       $meta_update = $this->meta->update_value( $request['meta'], $comment_id );
+
+                       if ( is_wp_error( $meta_update ) ) {
+                               return $meta_update;
+                       }
+               }
+
+               $fields_update = $this->update_additional_fields_for_object( $comment, $request );
+
+               if ( is_wp_error( $fields_update ) ) {
+                       return $fields_update;
+               }
+
+               $context = current_user_can( 'moderate_comments' ) ? 'edit' : 'view';
+
+               $request->set_param( 'context', $context );
+
+               $response = $this->prepare_item_for_response( $comment, $request );
+               $response = rest_ensure_response( $response );
+
+               $response->set_status( 201 );
+               $response->header( 'Location', rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->rest_base, $comment_id ) ) );
+
+
+               return $response;
+       }
+
+       /**
+        * Checks if a given REST request has access to update a comment.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|bool True if the request has access to update the item, error object otherwise.
+        */
+       public function update_item_permissions_check( $request ) {
+
+               $id = (int) $request['id'];
+
+               $comment = get_comment( $id );
+
+               if ( $comment && ! $this->check_edit_permission( $comment ) ) {
+                       return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to edit this comment.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Updates a comment.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
+        */
+       public function update_item( $request ) {
+               $id = (int) $request['id'];
+
+               $comment = get_comment( $id );
+
+               if ( empty( $comment ) ) {
+                       return new WP_Error( 'rest_comment_invalid_id', __( 'Invalid comment ID.' ), array( 'status' => 404 ) );
+               }
+
+               if ( isset( $request['type'] ) && get_comment_type( $id ) !== $request['type'] ) {
+                       return new WP_Error( 'rest_comment_invalid_type', __( 'Sorry, you are not allowed to change the comment type.' ), array( 'status' => 404 ) );
+               }
+
+               $prepared_args = $this->prepare_item_for_database( $request );
+
+               if ( is_wp_error( $prepared_args ) ) {
+                       return $prepared_args;
+               }
+
+               if ( empty( $prepared_args ) && isset( $request['status'] ) ) {
+                       // Only the comment status is being changed.
+                       $change = $this->handle_status_param( $request['status'], $id );
+
+                       if ( ! $change ) {
+                               return new WP_Error( 'rest_comment_failed_edit', __( 'Updating comment status failed.' ), array( 'status' => 500 ) );
+                       }
+               } elseif ( ! empty( $prepared_args ) ) {
+                       if ( is_wp_error( $prepared_args ) ) {
+                               return $prepared_args;
+                       }
+
+                       if ( isset( $prepared_args['comment_content'] ) && empty( $prepared_args['comment_content'] ) ) {
+                               return new WP_Error( 'rest_comment_content_invalid', __( 'Invalid comment content.' ), array( 'status' => 400 ) );
+                       }
+
+                       $prepared_args['comment_ID'] = $id;
+
+                       $check_comment_lengths = wp_check_comment_data_max_lengths( $prepared_args );
+                       if ( is_wp_error( $check_comment_lengths ) ) {
+                               $error_code = $check_comment_lengths->get_error_code();
+                               return new WP_Error( $error_code, __( 'Comment field exceeds maximum length allowed.' ), array( 'status' => 400 ) );
+                       }
+
+                       $updated = wp_update_comment( wp_slash( (array) $prepared_args ) );
+
+                       if ( 0 === $updated ) {
+                               return new WP_Error( 'rest_comment_failed_edit', __( 'Updating comment failed.' ), array( 'status' => 500 ) );
+                       }
+
+                       if ( isset( $request['status'] ) ) {
+                               $this->handle_status_param( $request['status'], $id );
+                       }
+               }
+
+               $comment = get_comment( $id );
+
+               /* This action is documented in lib/endpoints/class-wp-rest-comments-controller.php */
+               do_action( 'rest_insert_comment', $comment, $request, false );
+
+               $schema = $this->get_item_schema();
+
+               if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
+                       $meta_update = $this->meta->update_value( $request['meta'], $id );
+
+                       if ( is_wp_error( $meta_update ) ) {
+                               return $meta_update;
+                       }
+               }
+
+               $fields_update = $this->update_additional_fields_for_object( $comment, $request );
+
+               if ( is_wp_error( $fields_update ) ) {
+                       return $fields_update;
+               }
+
+               $request->set_param( 'context', 'edit' );
+
+               $response = $this->prepare_item_for_response( $comment, $request );
+
+               return rest_ensure_response( $response );
+       }
+
+       /**
+        * Checks if a given request has access to delete a comment.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|bool True if the request has access to delete the item, error object otherwise.
+        */
+       public function delete_item_permissions_check( $request ) {
+               $id      = (int) $request['id'];
+               $comment = get_comment( $id );
+
+               if ( ! $comment ) {
+                       return new WP_Error( 'rest_comment_invalid_id', __( 'Invalid comment ID.' ), array( 'status' => 404 ) );
+               }
+
+               if ( ! $this->check_edit_permission( $comment ) ) {
+                       return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this comment.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+               return true;
+       }
+
+       /**
+        * Deletes a comment.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
+        */
+       public function delete_item( $request ) {
+               $id    = (int) $request['id'];
+               $force = isset( $request['force'] ) ? (bool) $request['force'] : false;
+
+               $comment = get_comment( $id );
+
+               if ( empty( $comment ) ) {
+                       return new WP_Error( 'rest_comment_invalid_id', __( 'Invalid comment ID.' ), array( 'status' => 404 ) );
+               }
+
+               /**
+                * Filters whether a comment can be trashed.
+                *
+                * Return false to disable trash support for the post.
+                *
+                * @since 4.7.0
+                *
+                * @param bool    $supports_trash Whether the post type support trashing.
+                * @param WP_Post $comment        The comment object being considered for trashing support.
+                */
+               $supports_trash = apply_filters( 'rest_comment_trashable', ( EMPTY_TRASH_DAYS > 0 ), $comment );
+
+               $request->set_param( 'context', 'edit' );
+
+               if ( $force ) {
+                       $previous = $this->prepare_item_for_response( $comment, $request );
+                       $result = wp_delete_comment( $comment->comment_ID, true );
+                       $response = new WP_REST_Response();
+                       $response->set_data( array( 'deleted' => true, 'previous' => $previous->get_data() ) );
+               } else {
+                       // If this type doesn't support trashing, error out.
+                       if ( ! $supports_trash ) {
+                               return new WP_Error( 'rest_trash_not_supported', __( 'The comment does not support trashing. Set force=true to delete.' ), array( 'status' => 501 ) );
+                       }
+
+                       if ( 'trash' === $comment->comment_approved ) {
+                               return new WP_Error( 'rest_already_trashed', __( 'The comment has already been trashed.' ), array( 'status' => 410 ) );
+                       }
+
+                       $result = wp_trash_comment( $comment->comment_ID );
+                       $comment = get_comment( $comment->comment_ID );
+                       $response = $this->prepare_item_for_response( $comment, $request );
+               }
+
+               if ( ! $result ) {
+                       return new WP_Error( 'rest_cannot_delete', __( 'The comment cannot be deleted.' ), array( 'status' => 500 ) );
+               }
+
+               /**
+                * Fires after a comment is deleted via the REST API.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_Comment       $comment  The deleted comment data.
+                * @param WP_REST_Response $response The response returned from the API.
+                * @param WP_REST_Request  $request  The request sent to the API.
+                */
+               do_action( 'rest_delete_comment', $comment, $response, $request );
+
+               return $response;
+       }
+
+       /**
+        * Prepares a single comment output for response.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_Comment      $comment Comment object.
+        * @param WP_REST_Request $request Request object.
+        * @return WP_REST_Response Response object.
+        */
+       public function prepare_item_for_response( $comment, $request ) {
+               $data = array(
+                       'id'                 => (int) $comment->comment_ID,
+                       'post'               => (int) $comment->comment_post_ID,
+                       'parent'             => (int) $comment->comment_parent,
+                       'author'             => (int) $comment->user_id,
+                       'author_name'        => $comment->comment_author,
+                       'author_email'       => $comment->comment_author_email,
+                       'author_url'         => $comment->comment_author_url,
+                       'author_ip'          => $comment->comment_author_IP,
+                       'author_user_agent'  => $comment->comment_agent,
+                       'date'               => mysql_to_rfc3339( $comment->comment_date ),
+                       'date_gmt'           => mysql_to_rfc3339( $comment->comment_date_gmt ),
+                       'content'            => array(
+                               /** This filter is documented in wp-includes/comment-template.php */
+                               'rendered' => apply_filters( 'comment_text', $comment->comment_content, $comment ),
+                               'raw'      => $comment->comment_content,
+                       ),
+                       'link'               => get_comment_link( $comment ),
+                       'status'             => $this->prepare_status_response( $comment->comment_approved ),
+                       'type'               => get_comment_type( $comment->comment_ID ),
+               );
+
+               $schema = $this->get_item_schema();
+
+               if ( ! empty( $schema['properties']['author_avatar_urls'] ) ) {
+                       $data['author_avatar_urls'] = rest_get_avatar_urls( $comment->comment_author_email );
+               }
+
+               if ( ! empty( $schema['properties']['meta'] ) ) {
+                       $data['meta'] = $this->meta->get_value( $comment->comment_ID, $request );
+               }
+
+               $context = ! empty( $request['context'] ) ? $request['context'] : 'view';
+               $data    = $this->add_additional_fields_to_object( $data, $request );
+               $data    = $this->filter_response_by_context( $data, $context );
+
+               // Wrap the data in a response object.
+               $response = rest_ensure_response( $data );
+
+               $response->add_links( $this->prepare_links( $comment ) );
+
+               /**
+                * Filters a comment returned from the API.
+                *
+                * Allows modification of the comment right before it is returned.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_REST_Response  $response The response object.
+                * @param WP_Comment        $comment  The original comment object.
+                * @param WP_REST_Request   $request  Request used to generate the response.
+                */
+               return apply_filters( 'rest_prepare_comment', $response, $comment, $request );
+       }
+
+       /**
+        * Prepares links for the request.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param WP_Comment $comment Comment object.
+        * @return array Links for the given comment.
+        */
+       protected function prepare_links( $comment ) {
+               $links = array(
+                       'self' => array(
+                               'href' => rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->rest_base, $comment->comment_ID ) ),
+                       ),
+                       'collection' => array(
+                               'href' => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ),
+                       ),
+               );
+
+               if ( 0 !== (int) $comment->user_id ) {
+                       $links['author'] = array(
+                               'href'       => rest_url( 'wp/v2/users/' . $comment->user_id ),
+                               'embeddable' => true,
+                       );
+               }
+
+               if ( 0 !== (int) $comment->comment_post_ID ) {
+                       $post = get_post( $comment->comment_post_ID );
+
+                       if ( ! empty( $post->ID ) ) {
+                               $obj = get_post_type_object( $post->post_type );
+                               $base = ! empty( $obj->rest_base ) ? $obj->rest_base : $obj->name;
+
+                               $links['up'] = array(
+                                       'href'       => rest_url( 'wp/v2/' . $base . '/' . $comment->comment_post_ID ),
+                                       'embeddable' => true,
+                                       'post_type'  => $post->post_type,
+                               );
+                       }
+               }
+
+               if ( 0 !== (int) $comment->comment_parent ) {
+                       $links['in-reply-to'] = array(
+                               'href'       => rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->rest_base, $comment->comment_parent ) ),
+                               'embeddable' => true,
+                       );
+               }
+
+               // Only grab one comment to verify the comment has children.
+               $comment_children = $comment->get_children( array(
+                       'number' => 1,
+                       'count'  => true
+               ) );
+
+               if ( ! empty( $comment_children ) ) {
+                       $args = array(
+                               'parent' => $comment->comment_ID
+                       );
+
+                       $rest_url = add_query_arg( $args, rest_url( $this->namespace . '/' . $this->rest_base ) );
+
+                       $links['children'] = array(
+                               'href' => $rest_url,
+                       );
+               }
+
+               return $links;
+       }
+
+       /**
+        * Prepends internal property prefix to query parameters to match our response fields.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param string $query_param Query parameter.
+        * @return string The normalized query parameter.
+        */
+       protected function normalize_query_param( $query_param ) {
+               $prefix = 'comment_';
+
+               switch ( $query_param ) {
+                       case 'id':
+                               $normalized = $prefix . 'ID';
+                               break;
+                       case 'post':
+                               $normalized = $prefix . 'post_ID';
+                               break;
+                       case 'parent':
+                               $normalized = $prefix . 'parent';
+                               break;
+                       case 'include':
+                               $normalized = 'comment__in';
+                               break;
+                       default:
+                               $normalized = $prefix . $query_param;
+                               break;
+               }
+
+               return $normalized;
+       }
+
+       /**
+        * Checks comment_approved to set comment status for single comment output.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param string|int $comment_approved comment status.
+        * @return string Comment status.
+        */
+       protected function prepare_status_response( $comment_approved ) {
+
+               switch ( $comment_approved ) {
+                       case 'hold':
+                       case '0':
+                               $status = 'hold';
+                               break;
+
+                       case 'approve':
+                       case '1':
+                               $status = 'approved';
+                               break;
+
+                       case 'spam':
+                       case 'trash':
+                       default:
+                               $status = $comment_approved;
+                               break;
+               }
+
+               return $status;
+       }
+
+       /**
+        * Prepares a single comment to be inserted into the database.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param WP_REST_Request $request Request object.
+        * @return array|WP_Error Prepared comment, otherwise WP_Error object.
+        */
+       protected function prepare_item_for_database( $request ) {
+               $prepared_comment = array();
+
+               /*
+                * Allow the comment_content to be set via the 'content' or
+                * the 'content.raw' properties of the Request object.
+                */
+               if ( isset( $request['content'] ) && is_string( $request['content'] ) ) {
+                       $prepared_comment['comment_content'] = $request['content'];
+               } elseif ( isset( $request['content']['raw'] ) && is_string( $request['content']['raw'] ) ) {
+                       $prepared_comment['comment_content'] = $request['content']['raw'];
+               }
+
+               if ( isset( $request['post'] ) ) {
+                       $prepared_comment['comment_post_ID'] = (int) $request['post'];
+               }
+
+               if ( isset( $request['parent'] ) ) {
+                       $prepared_comment['comment_parent'] = $request['parent'];
+               }
+
+               if ( isset( $request['author'] ) ) {
+                       $user = new WP_User( $request['author'] );
+
+                       if ( $user->exists() ) {
+                               $prepared_comment['user_id'] = $user->ID;
+                               $prepared_comment['comment_author'] = $user->display_name;
+                               $prepared_comment['comment_author_email'] = $user->user_email;
+                               $prepared_comment['comment_author_url'] = $user->user_url;
+                       } else {
+                               return new WP_Error( 'rest_comment_author_invalid', __( 'Invalid comment author ID.' ), array( 'status' => 400 ) );
+                       }
+               }
+
+               if ( isset( $request['author_name'] ) ) {
+                       $prepared_comment['comment_author'] = $request['author_name'];
+               }
+
+               if ( isset( $request['author_email'] ) ) {
+                       $prepared_comment['comment_author_email'] = $request['author_email'];
+               }
+
+               if ( isset( $request['author_url'] ) ) {
+                       $prepared_comment['comment_author_url'] = $request['author_url'];
+               }
+
+               if ( isset( $request['author_ip'] ) && current_user_can( 'moderate_comments' ) ) {
+                       $prepared_comment['comment_author_IP'] = $request['author_ip'];
+               } elseif ( ! empty( $_SERVER['REMOTE_ADDR'] ) && rest_is_ip_address( $_SERVER['REMOTE_ADDR'] ) ) {
+                       $prepared_comment['comment_author_IP'] = $_SERVER['REMOTE_ADDR'];
+               } else {
+                       $prepared_comment['comment_author_IP'] = '127.0.0.1';
+               }
+
+               if ( ! empty( $request['author_user_agent'] ) ) {
+                       $prepared_comment['comment_agent'] = $request['author_user_agent'];
+               } elseif ( $request->get_header( 'user_agent' ) ) {
+                       $prepared_comment['comment_agent'] = $request->get_header( 'user_agent' );
+               }
+
+               if ( ! empty( $request['date'] ) ) {
+                       $date_data = rest_get_date_with_gmt( $request['date'] );
+
+                       if ( ! empty( $date_data ) ) {
+                               list( $prepared_comment['comment_date'], $prepared_comment['comment_date_gmt'] ) = $date_data;
+                       }
+               } elseif ( ! empty( $request['date_gmt'] ) ) {
+                       $date_data = rest_get_date_with_gmt( $request['date_gmt'], true );
+
+                       if ( ! empty( $date_data ) ) {
+                               list( $prepared_comment['comment_date'], $prepared_comment['comment_date_gmt'] ) = $date_data;
+                       }
+               }
+
+               /**
+                * Filters a comment after it is prepared for the database.
+                *
+                * Allows modification of the comment right after it is prepared for the database.
+                *
+                * @since 4.7.0
+                *
+                * @param array           $prepared_comment The prepared comment data for `wp_insert_comment`.
+                * @param WP_REST_Request $request          The current request.
+                */
+               return apply_filters( 'rest_preprocess_comment', $prepared_comment, $request );
+       }
+
+       /**
+        * Retrieves the comment's schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array
+        */
+       public function get_item_schema() {
+               $schema = array(
+                       '$schema'              => 'http://json-schema.org/schema#',
+                       'title'                => 'comment',
+                       'type'                 => 'object',
+                       'properties'           => array(
+                               'id'               => array(
+                                       'description'  => __( 'Unique identifier for the object.' ),
+                                       'type'         => 'integer',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                                       'readonly'     => true,
+                               ),
+                               'author'           => array(
+                                       'description'  => __( 'The ID of the user object, if author was a user.' ),
+                                       'type'         => 'integer',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                               ),
+                               'author_email'     => array(
+                                       'description'  => __( 'Email address for the object author.' ),
+                                       'type'         => 'string',
+                                       'format'       => 'email',
+                                       'context'      => array( 'edit' ),
+                                       'arg_options'  => array(
+                                               'sanitize_callback' => array( $this, 'check_comment_author_email' ),
+                                               'validate_callback' => null, // skip built-in validation of 'email'.
+                                       ),
+                               ),
+                               'author_ip'     => array(
+                                       'description'  => __( 'IP address for the object author.' ),
+                                       'type'         => 'string',
+                                       'format'       => 'ip',
+                                       'context'      => array( 'edit' ),
+                               ),
+                               'author_name'     => array(
+                                       'description'  => __( 'Display name for the object author.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                                       'arg_options'  => array(
+                                               'sanitize_callback' => 'sanitize_text_field',
+                                       ),
+                               ),
+                               'author_url'       => array(
+                                       'description'  => __( 'URL for the object author.' ),
+                                       'type'         => 'string',
+                                       'format'       => 'uri',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                               ),
+                               'author_user_agent'     => array(
+                                       'description'  => __( 'User agent for the object author.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'edit' ),
+                                       'arg_options'  => array(
+                                               'sanitize_callback' => 'sanitize_text_field',
+                                       ),
+                               ),
+                               'content'          => array(
+                                       'description'     => __( 'The content for the object.' ),
+                                       'type'            => 'object',
+                                       'context'         => array( 'view', 'edit', 'embed' ),
+                                       'arg_options'     => array(
+                                               'sanitize_callback' => null, // Note: sanitization implemented in self::prepare_item_for_database()
+                                       ),
+                                       'properties'      => array(
+                                               'raw'         => array(
+                                                       'description'     => __( 'Content for the object, as it exists in the database.' ),
+                                                       'type'            => 'string',
+                                                       'context'         => array( 'edit' ),
+                                               ),
+                                               'rendered'    => array(
+                                                       'description'     => __( 'HTML content for the object, transformed for display.' ),
+                                                       'type'            => 'string',
+                                                       'context'         => array( 'view', 'edit', 'embed' ),
+                                                       'readonly'        => true,
+                                               ),
+                                       ),
+                               ),
+                               'date'             => array(
+                                       'description'  => __( "The date the object was published, in the site's timezone." ),
+                                       'type'         => 'string',
+                                       'format'       => 'date-time',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                               ),
+                               'date_gmt'         => array(
+                                       'description'  => __( 'The date the object was published, as GMT.' ),
+                                       'type'         => 'string',
+                                       'format'       => 'date-time',
+                                       'context'      => array( 'view', 'edit' ),
+                               ),
+                               'link'             => array(
+                                       'description'  => __( 'URL to the object.' ),
+                                       'type'         => 'string',
+                                       'format'       => 'uri',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                                       'readonly'     => true,
+                               ),
+                               'parent'           => array(
+                                       'description'  => __( 'The ID for the parent of the object.' ),
+                                       'type'         => 'integer',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                                       'default'      => 0,
+                               ),
+                               'post'             => array(
+                                       'description'  => __( 'The ID of the associated post object.' ),
+                                       'type'         => 'integer',
+                                       'context'      => array( 'view', 'edit' ),
+                                       'default'      => 0,
+                               ),
+                               'status'           => array(
+                                       'description'  => __( 'State of the object.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit' ),
+                                       'arg_options'  => array(
+                                               'sanitize_callback' => 'sanitize_key',
+                                       ),
+                               ),
+                               'type'             => array(
+                                       'description'  => __( 'Type of Comment for the object.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                                       'readonly'     => true,
+                               ),
+                       ),
+               );
+
+               if ( get_option( 'show_avatars' ) ) {
+                       $avatar_properties = array();
+
+                       $avatar_sizes = rest_get_avatar_sizes();
+                       foreach ( $avatar_sizes as $size ) {
+                               $avatar_properties[ $size ] = array(
+                                       /* translators: %d: avatar image size in pixels */
+                                       'description' => sprintf( __( 'Avatar URL with image size of %d pixels.' ), $size ),
+                                       'type'        => 'string',
+                                       'format'      => 'uri',
+                                       'context'     => array( 'embed', 'view', 'edit' ),
+                               );
+                       }
+
+                       $schema['properties']['author_avatar_urls'] = array(
+                               'description'   => __( 'Avatar URLs for the object author.' ),
+                               'type'          => 'object',
+                               'context'       => array( 'view', 'edit', 'embed' ),
+                               'readonly'      => true,
+                               'properties'    => $avatar_properties,
+                       );
+               }
+
+               $schema['properties']['meta'] = $this->meta->get_field_schema();
+
+               return $this->add_additional_fields_schema( $schema );
+       }
+
+       /**
+        * Retrieves the query params for collections.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Comments collection parameters.
+        */
+       public function get_collection_params() {
+               $query_params = parent::get_collection_params();
+
+               $query_params['context']['default'] = 'view';
+
+               $query_params['after'] = array(
+                       'description'       => __( 'Limit response to comments published after a given ISO8601 compliant date.' ),
+                       'type'              => 'string',
+                       'format'            => 'date-time',
+               );
+
+               $query_params['author'] = array(
+                       'description'       => __( 'Limit result set to comments assigned to specific user IDs. Requires authorization.' ),
+                       'type'              => 'array',
+                       'items'             => array(
+                               'type'          => 'integer',
+                       ),
+               );
+
+               $query_params['author_exclude'] = array(
+                       'description'       => __( 'Ensure result set excludes comments assigned to specific user IDs. Requires authorization.' ),
+                       'type'              => 'array',
+                       'items'             => array(
+                               'type'          => 'integer',
+                       ),
+               );
+
+               $query_params['author_email'] = array(
+                       'default'           => null,
+                       'description'       => __( 'Limit result set to that from a specific author email. Requires authorization.' ),
+                       'format'            => 'email',
+                       'type'              => 'string',
+               );
+
+               $query_params['before'] = array(
+                       'description'       => __( 'Limit response to comments published before a given ISO8601 compliant date.' ),
+                       'type'              => 'string',
+                       'format'            => 'date-time',
+               );
+
+               $query_params['exclude'] = array(
+                       'description'        => __( 'Ensure result set excludes specific IDs.' ),
+                       'type'               => 'array',
+                       'items'              => array(
+                               'type'           => 'integer',
+                       ),
+                       'default'            => array(),
+               );
+
+               $query_params['include'] = array(
+                       'description'        => __( 'Limit result set to specific IDs.' ),
+                       'type'               => 'array',
+                       'items'              => array(
+                               'type'           => 'integer',
+                       ),
+                       'default'            => array(),
+               );
+
+               $query_params['offset'] = array(
+                       'description'        => __( 'Offset the result set by a specific number of items.' ),
+                       'type'               => 'integer',
+               );
+
+               $query_params['order']      = array(
+                       'description'           => __( 'Order sort attribute ascending or descending.' ),
+                       'type'                  => 'string',
+                       'default'               => 'desc',
+                       'enum'                  => array(
+                               'asc',
+                               'desc',
+                       ),
+               );
+
+               $query_params['orderby']    = array(
+                       'description'           => __( 'Sort collection by object attribute.' ),
+                       'type'                  => 'string',
+                       'default'               => 'date_gmt',
+                       'enum'                  => array(
+                               'date',
+                               'date_gmt',
+                               'id',
+                               'include',
+                               'post',
+                               'parent',
+                               'type',
+                       ),
+               );
+
+               $query_params['parent'] = array(
+                       'default'           => array(),
+                       'description'       => __( 'Limit result set to comments of specific parent IDs.' ),
+                       'type'              => 'array',
+                       'items'             => array(
+                               'type'          => 'integer',
+                       ),
+               );
+
+               $query_params['parent_exclude'] = array(
+                       'default'           => array(),
+                       'description'       => __( 'Ensure result set excludes specific parent IDs.' ),
+                       'type'              => 'array',
+                       'items'             => array(
+                               'type'          => 'integer',
+                       ),
+               );
+
+               $query_params['post']   = array(
+                       'default'           => array(),
+                       'description'       => __( 'Limit result set to comments assigned to specific post IDs.' ),
+                       'type'              => 'array',
+                       'items'             => array(
+                               'type'          => 'integer',
+                       ),
+               );
+
+               $query_params['status'] = array(
+                       'default'           => 'approve',
+                       'description'       => __( 'Limit result set to comments assigned a specific status. Requires authorization.' ),
+                       'sanitize_callback' => 'sanitize_key',
+                       'type'              => 'string',
+                       'validate_callback' => 'rest_validate_request_arg',
+               );
+
+               $query_params['type'] = array(
+                       'default'           => 'comment',
+                       'description'       => __( 'Limit result set to comments assigned a specific type. Requires authorization.' ),
+                       'sanitize_callback' => 'sanitize_key',
+                       'type'              => 'string',
+                       'validate_callback' => 'rest_validate_request_arg',
+               );
+
+               $query_params['password'] = array(
+                       'description' => __( 'The password for the post if it is password protected.' ),
+                       'type'        => 'string',
+               );
+
+               /**
+                * Filter collection parameters for the comments controller.
+                *
+                * This filter registers the collection parameter, but does not map the
+                * collection parameter to an internal WP_Comment_Query parameter. Use the
+                * `rest_comment_query` filter to set WP_Comment_Query parameters.
+                *
+                * @since 4.7.0
+                *
+                * @param $params JSON Schema-formatted collection parameters.
+                */
+               return apply_filters( 'rest_comment_collection_params', $query_params );
+       }
+
+       /**
+        * Sets the comment_status of a given comment object when creating or updating a comment.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param string|int $new_status New comment status.
+        * @param int        $comment_id Comment ID.
+        * @return bool Whether the status was changed.
+        */
+       protected function handle_status_param( $new_status, $comment_id ) {
+               $old_status = wp_get_comment_status( $comment_id );
+
+               if ( $new_status === $old_status ) {
+                       return false;
+               }
+
+               switch ( $new_status ) {
+                       case 'approved' :
+                       case 'approve':
+                       case '1':
+                               $changed = wp_set_comment_status( $comment_id, 'approve' );
+                               break;
+                       case 'hold':
+                       case '0':
+                               $changed = wp_set_comment_status( $comment_id, 'hold' );
+                               break;
+                       case 'spam' :
+                               $changed = wp_spam_comment( $comment_id );
+                               break;
+                       case 'unspam' :
+                               $changed = wp_unspam_comment( $comment_id );
+                               break;
+                       case 'trash' :
+                               $changed = wp_trash_comment( $comment_id );
+                               break;
+                       case 'untrash' :
+                               $changed = wp_untrash_comment( $comment_id );
+                               break;
+                       default :
+                               $changed = false;
+                               break;
+               }
+
+               return $changed;
+       }
+
+       /**
+        * Checks if the post can be read.
+        *
+        * Correctly handles posts with the inherit status.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param WP_Post         $post    Post object.
+        * @param WP_REST_Request $request Request data to check.
+        * @return bool Whether post can be read.
+        */
+       protected function check_read_post_permission( $post, $request ) {
+               $posts_controller = new WP_REST_Posts_Controller( $post->post_type );
+               $post_type = get_post_type_object( $post->post_type );
+
+               $has_password_filter = false;
+
+               // Only check password if a specific post was queried for or a single comment
+               $requested_post = ! empty( $request['post'] ) && 1 === count( $request['post'] );
+               $requested_comment = ! empty( $request['id'] );
+               if ( ( $requested_post || $requested_comment ) && $posts_controller->can_access_password_content( $post, $request ) ) {
+                       add_filter( 'post_password_required', '__return_false' );
+
+                       $has_password_filter = true;
+               }
+
+               if ( post_password_required( $post ) ) {
+                       $result = current_user_can( $post_type->cap->edit_post, $post->ID );
+               } else {
+                       $result = $posts_controller->check_read_permission( $post );
+               }
+
+               if ( $has_password_filter ) {
+                       remove_filter( 'post_password_required', '__return_false' );
+               }
+
+               return $result;
+       }
+
+       /**
+        * Checks if the comment can be read.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param WP_Comment      $comment Comment object.
+        * @param WP_REST_Request $request Request data to check.
+        * @return bool Whether the comment can be read.
+        */
+       protected function check_read_permission( $comment, $request ) {
+               if ( ! empty( $comment->comment_post_ID ) ) {
+                       $post = get_post( $comment->comment_post_ID );
+                       if ( $post ) {
+                               if ( $this->check_read_post_permission( $post, $request ) && 1 === (int) $comment->comment_approved ) {
+                                       return true;
+                               }
+                       }
+               }
+
+               if ( 0 === get_current_user_id() ) {
+                       return false;
+               }
+
+               if ( empty( $comment->comment_post_ID ) && ! current_user_can( 'moderate_comments' ) ) {
+                       return false;
+               }
+
+               if ( ! empty( $comment->user_id ) && get_current_user_id() === (int) $comment->user_id ) {
+                       return true;
+               }
+
+               return current_user_can( 'edit_comment', $comment->comment_ID );
+       }
+
+       /**
+        * Checks if a comment can be edited or deleted.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param object $comment Comment object.
+        * @return bool Whether the comment can be edited or deleted.
+        */
+       protected function check_edit_permission( $comment ) {
+               if ( 0 === (int) get_current_user_id() ) {
+                       return false;
+               }
+
+               if ( ! current_user_can( 'moderate_comments' ) ) {
+                       return false;
+               }
+
+               return current_user_can( 'edit_comment', $comment->comment_ID );
+       }
+
+       /**
+        * Checks a comment author email for validity.
+        *
+        * Accepts either a valid email address or empty string as a valid comment
+        * author email address. Setting the comment author email to an empty
+        * string is allowed when a comment is being updated.
+        *
+        * @since 4.7.0
+        *
+        * @param string          $value   Author email value submitted.
+        * @param WP_REST_Request $request Full details about the request.
+        * @param string          $param   The parameter name.
+        * @return WP_Error|string The sanitized email address, if valid,
+        *                         otherwise an error.
+        */
+       public function check_comment_author_email( $value, $request, $param ) {
+               $email = (string) $value;
+               if ( empty( $email ) ) {
+                       return $email;
+               }
+
+               $check_email = rest_validate_request_arg( $email, $request, $param );
+               if ( is_wp_error( $check_email ) ) {
+                       return $check_email;
+               }
+
+               return $email;
+       }
+}
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
new file mode 100644 (file)
index 0000000..b6c8ac4
--- /dev/null
@@ -0,0 +1,603 @@
+<?php
+/**
+ * REST API: WP_REST_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core base controller for managing and interacting with REST API items.
+ *
+ * @since 4.7.0
+ */
+abstract class WP_REST_Controller {
+
+       /**
+        * The namespace of this controller's route.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var string
+        */
+       protected $namespace;
+
+       /**
+        * The base of this controller's route.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var string
+        */
+       protected $rest_base;
+
+       /**
+        * Registers the routes for the objects of the controller.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function register_routes() {
+               _doing_it_wrong( 'WP_REST_Controller::register_routes', __( 'The register_routes() method must be overridden' ), '4.7' );
+       }
+
+       /**
+        * Checks if a given request has access to get items.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_Error|bool True if the request has read access, WP_Error object otherwise.
+        */
+       public function get_items_permissions_check( $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Retrieves a collection of items.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
+        */
+       public function get_items( $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Checks if a given request has access to get a specific item.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_Error|bool True if the request has read access for the item, WP_Error object otherwise.
+        */
+       public function get_item_permissions_check( $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Retrieves one item from the collection.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
+        */
+       public function get_item( $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Checks if a given request has access to create items.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_Error|bool True if the request has access to create items, WP_Error object otherwise.
+        */
+       public function create_item_permissions_check( $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Creates one item from the collection.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
+        */
+       public function create_item( $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Checks if a given request has access to update a specific item.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_Error|bool True if the request has access to update the item, WP_Error object otherwise.
+        */
+       public function update_item_permissions_check( $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Updates one item from the collection.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
+        */
+       public function update_item( $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Checks if a given request has access to delete a specific item.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_Error|bool True if the request has access to delete the item, WP_Error object otherwise.
+        */
+       public function delete_item_permissions_check( $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Deletes one item from the collection.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
+        */
+       public function delete_item( $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Prepares one item for create or update operation.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Request object.
+        * @return WP_Error|object The prepared item, or WP_Error object on failure.
+        */
+       protected function prepare_item_for_database( $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Prepares the item for the REST response.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param mixed           $item    WordPress representation of the item.
+        * @param WP_REST_Request $request Request object.
+        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
+        */
+       public function prepare_item_for_response( $item, $request ) {
+               return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) );
+       }
+
+       /**
+        * Prepares a response for insertion into a collection.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Response $response Response object.
+        * @return array|mixed Response data, ready for insertion into collection data.
+        */
+       public function prepare_response_for_collection( $response ) {
+               if ( ! ( $response instanceof WP_REST_Response ) ) {
+                       return $response;
+               }
+
+               $data   = (array) $response->get_data();
+               $server = rest_get_server();
+
+               if ( method_exists( $server, 'get_compact_response_links' ) ) {
+                       $links = call_user_func( array( $server, 'get_compact_response_links' ), $response );
+               } else {
+                       $links = call_user_func( array( $server, 'get_response_links' ), $response );
+               }
+
+               if ( ! empty( $links ) ) {
+                       $data['_links'] = $links;
+               }
+
+               return $data;
+       }
+
+       /**
+        * Filters a response based on the context defined in the schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param array  $data    Response data to fiter.
+        * @param string $context Context defined in the schema.
+        * @return array Filtered response.
+        */
+       public function filter_response_by_context( $data, $context ) {
+
+               $schema = $this->get_item_schema();
+
+               foreach ( $data as $key => $value ) {
+                       if ( empty( $schema['properties'][ $key ] ) || empty( $schema['properties'][ $key ]['context'] ) ) {
+                               continue;
+                       }
+
+                       if ( ! in_array( $context, $schema['properties'][ $key ]['context'], true ) ) {
+                               unset( $data[ $key ] );
+                               continue;
+                       }
+
+                       if ( 'object' === $schema['properties'][ $key ]['type'] && ! empty( $schema['properties'][ $key ]['properties'] ) ) {
+                               foreach ( $schema['properties'][ $key ]['properties'] as $attribute => $details ) {
+                                       if ( empty( $details['context'] ) ) {
+                                               continue;
+                                       }
+
+                                       if ( ! in_array( $context, $details['context'], true ) ) {
+                                               if ( isset( $data[ $key ][ $attribute ] ) ) {
+                                                       unset( $data[ $key ][ $attribute ] );
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               return $data;
+       }
+
+       /**
+        * Retrieves the item's schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Item schema data.
+        */
+       public function get_item_schema() {
+               return $this->add_additional_fields_schema( array() );
+       }
+
+       /**
+        * Retrieves the item's schema for display / public consumption purposes.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Public item schema data.
+        */
+       public function get_public_item_schema() {
+
+               $schema = $this->get_item_schema();
+
+               foreach ( $schema['properties'] as &$property ) {
+                       unset( $property['arg_options'] );
+               }
+
+               return $schema;
+       }
+
+       /**
+        * Retrieves the query params for the collections.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Query parameters for the collection.
+        */
+       public function get_collection_params() {
+               return array(
+                       'context'                => $this->get_context_param(),
+                       'page'                   => array(
+                               'description'        => __( 'Current page of the collection.' ),
+                               'type'               => 'integer',
+                               'default'            => 1,
+                               'sanitize_callback'  => 'absint',
+                               'validate_callback'  => 'rest_validate_request_arg',
+                               'minimum'            => 1,
+                       ),
+                       'per_page'               => array(
+                               'description'        => __( 'Maximum number of items to be returned in result set.' ),
+                               'type'               => 'integer',
+                               'default'            => 10,
+                               'minimum'            => 1,
+                               'maximum'            => 100,
+                               'sanitize_callback'  => 'absint',
+                               'validate_callback'  => 'rest_validate_request_arg',
+                       ),
+                       'search'                 => array(
+                               'description'        => __( 'Limit results to those matching a string.' ),
+                               'type'               => 'string',
+                               'sanitize_callback'  => 'sanitize_text_field',
+                               'validate_callback'  => 'rest_validate_request_arg',
+                       ),
+               );
+       }
+
+       /**
+        * Retrieves the magical context param.
+        *
+        * Ensures consistent descriptions between endpoints, and populates enum from schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param array $args Optional. Additional arguments for context parameter. Default empty array.
+        * @return array Context parameter details.
+        */
+       public function get_context_param( $args = array() ) {
+               $param_details = array(
+                       'description'        => __( 'Scope under which the request is made; determines fields present in response.' ),
+                       'type'               => 'string',
+                       'sanitize_callback'  => 'sanitize_key',
+                       'validate_callback'  => 'rest_validate_request_arg',
+               );
+
+               $schema = $this->get_item_schema();
+
+               if ( empty( $schema['properties'] ) ) {
+                       return array_merge( $param_details, $args );
+               }
+
+               $contexts = array();
+
+               foreach ( $schema['properties'] as $attributes ) {
+                       if ( ! empty( $attributes['context'] ) ) {
+                               $contexts = array_merge( $contexts, $attributes['context'] );
+                       }
+               }
+
+               if ( ! empty( $contexts ) ) {
+                       $param_details['enum'] = array_unique( $contexts );
+                       rsort( $param_details['enum'] );
+               }
+
+               return array_merge( $param_details, $args );
+       }
+
+       /**
+        * Adds the values from additional fields to a data object.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param array           $object  Data object.
+        * @param WP_REST_Request $request Full details about the request.
+        * @return array Modified data object with additional fields.
+        */
+       protected function add_additional_fields_to_object( $object, $request ) {
+
+               $additional_fields = $this->get_additional_fields();
+
+               foreach ( $additional_fields as $field_name => $field_options ) {
+
+                       if ( ! $field_options['get_callback'] ) {
+                               continue;
+                       }
+
+                       $object[ $field_name ] = call_user_func( $field_options['get_callback'], $object, $field_name, $request, $this->get_object_type() );
+               }
+
+               return $object;
+       }
+
+       /**
+        * Updates the values of additional fields added to a data object.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param array           $object  Data Object.
+        * @param WP_REST_Request $request Full details about the request.
+        * @return bool|WP_Error True on success, WP_Error object if a field cannot be updated.
+        */
+       protected function update_additional_fields_for_object( $object, $request ) {
+               $additional_fields = $this->get_additional_fields();
+
+               foreach ( $additional_fields as $field_name => $field_options ) {
+                       if ( ! $field_options['update_callback'] ) {
+                               continue;
+                       }
+
+                       // Don't run the update callbacks if the data wasn't passed in the request.
+                       if ( ! isset( $request[ $field_name ] ) ) {
+                               continue;
+                       }
+
+                       $result = call_user_func( $field_options['update_callback'], $request[ $field_name ], $object, $field_name, $request, $this->get_object_type() );
+
+                       if ( is_wp_error( $result ) ) {
+                               return $result;
+                       }
+               }
+
+               return true;
+       }
+
+       /**
+        * Adds the schema from additional fields to a schema array.
+        *
+        * The type of object is inferred from the passed schema.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param array $schema Schema array.
+        * @return array Modified Schema array.
+        */
+       protected function add_additional_fields_schema( $schema ) {
+               if ( empty( $schema['title'] ) ) {
+                       return $schema;
+               }
+
+               // Can't use $this->get_object_type otherwise we cause an inf loop.
+               $object_type = $schema['title'];
+
+               $additional_fields = $this->get_additional_fields( $object_type );
+
+               foreach ( $additional_fields as $field_name => $field_options ) {
+                       if ( ! $field_options['schema'] ) {
+                               continue;
+                       }
+
+                       $schema['properties'][ $field_name ] = $field_options['schema'];
+               }
+
+               return $schema;
+       }
+
+       /**
+        * Retrieves all of the registered additional fields for a given object-type.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param  string $object_type Optional. The object type.
+        * @return array Registered additional fields (if any), empty array if none or if the object type could
+        *               not be inferred.
+        */
+       protected function get_additional_fields( $object_type = null ) {
+
+               if ( ! $object_type ) {
+                       $object_type = $this->get_object_type();
+               }
+
+               if ( ! $object_type ) {
+                       return array();
+               }
+
+               global $wp_rest_additional_fields;
+
+               if ( ! $wp_rest_additional_fields || ! isset( $wp_rest_additional_fields[ $object_type ] ) ) {
+                       return array();
+               }
+
+               return $wp_rest_additional_fields[ $object_type ];
+       }
+
+       /**
+        * Retrieves the object type this controller is responsible for managing.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return string Object type for the controller.
+        */
+       protected function get_object_type() {
+               $schema = $this->get_item_schema();
+
+               if ( ! $schema || ! isset( $schema['title'] ) ) {
+                       return null;
+               }
+
+               return $schema['title'];
+       }
+
+       /**
+        * Retrieves an array of endpoint arguments from the item schema for the controller.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param string $method Optional. HTTP method of the request. The arguments for `CREATABLE` requests are
+        *                       checked for required values and may fall-back to a given default, this is not done
+        *                       on `EDITABLE` requests. Default WP_REST_Server::CREATABLE.
+        * @return array Endpoint arguments.
+        */
+       public function get_endpoint_args_for_item_schema( $method = WP_REST_Server::CREATABLE ) {
+
+               $schema            = $this->get_item_schema();
+               $schema_properties = ! empty( $schema['properties'] ) ? $schema['properties'] : array();
+               $endpoint_args     = array();
+
+               foreach ( $schema_properties as $field_id => $params ) {
+
+                       // Arguments specified as `readonly` are not allowed to be set.
+                       if ( ! empty( $params['readonly'] ) ) {
+                               continue;
+                       }
+
+                       $endpoint_args[ $field_id ] = array(
+                               'validate_callback' => 'rest_validate_request_arg',
+                               'sanitize_callback' => 'rest_sanitize_request_arg',
+                       );
+
+                       if ( isset( $params['description'] ) ) {
+                               $endpoint_args[ $field_id ]['description'] = $params['description'];
+                       }
+
+                       if ( WP_REST_Server::CREATABLE === $method && isset( $params['default'] ) ) {
+                               $endpoint_args[ $field_id ]['default'] = $params['default'];
+                       }
+
+                       if ( WP_REST_Server::CREATABLE === $method && ! empty( $params['required'] ) ) {
+                               $endpoint_args[ $field_id ]['required'] = true;
+                       }
+
+                       foreach ( array( 'type', 'format', 'enum', 'items' ) as $schema_prop ) {
+                               if ( isset( $params[ $schema_prop ] ) ) {
+                                       $endpoint_args[ $field_id ][ $schema_prop ] = $params[ $schema_prop ];
+                               }
+                       }
+
+                       // Merge in any options provided by the schema property.
+                       if ( isset( $params['arg_options'] ) ) {
+
+                               // Only use required / default from arg_options on CREATABLE endpoints.
+                               if ( WP_REST_Server::CREATABLE !== $method ) {
+                                       $params['arg_options'] = array_diff_key( $params['arg_options'], array( 'required' => '', 'default' => '' ) );
+                               }
+
+                               $endpoint_args[ $field_id ] = array_merge( $endpoint_args[ $field_id ], $params['arg_options'] );
+                       }
+               }
+
+               return $endpoint_args;
+       }
+
+       /**
+        * Sanitizes the slug value.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @internal We can't use sanitize_title() directly, as the second
+        * parameter is the fallback title, which would end up being set to the
+        * request object.
+        *
+        * @see https://github.com/WP-API/WP-API/issues/1585
+        *
+        * @todo Remove this in favour of https://core.trac.wordpress.org/ticket/34659
+        *
+        * @param string $slug Slug value passed in request.
+        * @return string Sanitized value for the slug.
+        */
+       public function sanitize_slug( $slug ) {
+               return sanitize_title( $slug );
+       }
+}
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php
new file mode 100644 (file)
index 0000000..0ec4bcd
--- /dev/null
@@ -0,0 +1,312 @@
+<?php
+/**
+ * REST API: WP_REST_Post_Statuses_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to access post statuses via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Controller
+ */
+class WP_REST_Post_Statuses_Controller extends WP_REST_Controller {
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function __construct() {
+               $this->namespace = 'wp/v2';
+               $this->rest_base = 'statuses';
+       }
+
+       /**
+        * Registers the routes for the objects of the controller.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @see register_rest_route()
+        */
+       public function register_routes() {
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base, array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_items' ),
+                               'permission_callback' => array( $this, 'get_items_permissions_check' ),
+                               'args'                => $this->get_collection_params(),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<status>[\w-]+)', array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_item' ),
+                               'permission_callback' => array( $this, 'get_item_permissions_check' ),
+                               'args'                => array(
+                                       'context' => $this->get_context_param( array( 'default' => 'view' ) ),
+                               ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+       }
+
+       /**
+        * Checks whether a given request has permission to read post statuses.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|bool True if the request has read access, WP_Error object otherwise.
+        */
+       public function get_items_permissions_check( $request ) {
+               if ( 'edit' === $request['context'] ) {
+                       $types = get_post_types( array( 'show_in_rest' => true ), 'objects' );
+
+                       foreach ( $types as $type ) {
+                               if ( current_user_can( $type->cap->edit_posts ) ) {
+                                       return true;
+                               }
+                       }
+                       return new WP_Error( 'rest_cannot_view', __( 'Sorry, you are not allowed to edit posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Retrieves all post statuses, depending on user context.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
+        */
+       public function get_items( $request ) {
+               $data = array();
+               $statuses = get_post_stati( array( 'internal' => false ), 'object' );
+               $statuses['trash'] = get_post_status_object( 'trash' );
+
+               foreach ( $statuses as $slug => $obj ) {
+                       $ret = $this->check_read_permission( $obj );
+
+                       if ( ! $ret ) {
+                               continue;
+                       }
+
+                       $status = $this->prepare_item_for_response( $obj, $request );
+                       $data[ $obj->name ] = $this->prepare_response_for_collection( $status );
+               }
+
+               return rest_ensure_response( $data );
+       }
+
+       /**
+        * Checks if a given request has access to read a post status.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|bool True if the request has read access for the item, WP_Error object otherwise.
+        */
+       public function get_item_permissions_check( $request ) {
+               $status = get_post_status_object( $request['status'] );
+
+               if ( empty( $status ) ) {
+                       return new WP_Error( 'rest_status_invalid', __( 'Invalid status.' ), array( 'status' => 404 ) );
+               }
+
+               $check = $this->check_read_permission( $status );
+
+               if ( ! $check ) {
+                       return new WP_Error( 'rest_cannot_read_status', __( 'Cannot view status.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Checks whether a given post status should be visible.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param object $status Post status.
+        * @return bool True if the post status is visible, otherwise false.
+        */
+       protected function check_read_permission( $status ) {
+               if ( true === $status->public ) {
+                       return true;
+               }
+
+               if ( false === $status->internal || 'trash' === $status->name ) {
+                       $types = get_post_types( array( 'show_in_rest' => true ), 'objects' );
+
+                       foreach ( $types as $type ) {
+                               if ( current_user_can( $type->cap->edit_posts ) ) {
+                                       return true;
+                               }
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Retrieves a specific post status.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
+        */
+       public function get_item( $request ) {
+               $obj = get_post_status_object( $request['status'] );
+
+               if ( empty( $obj ) ) {
+                       return new WP_Error( 'rest_status_invalid', __( 'Invalid status.' ), array( 'status' => 404 ) );
+               }
+
+               $data = $this->prepare_item_for_response( $obj, $request );
+
+               return rest_ensure_response( $data );
+       }
+
+       /**
+        * Prepares a post status object for serialization.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param stdClass        $status  Post status data.
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response Post status data.
+        */
+       public function prepare_item_for_response( $status, $request ) {
+
+               $data = array(
+                       'name'         => $status->label,
+                       'private'      => (bool) $status->private,
+                       'protected'    => (bool) $status->protected,
+                       'public'       => (bool) $status->public,
+                       'queryable'    => (bool) $status->publicly_queryable,
+                       'show_in_list' => (bool) $status->show_in_admin_all_list,
+                       'slug'         => $status->name,
+               );
+
+               $context = ! empty( $request['context'] ) ? $request['context'] : 'view';
+               $data = $this->add_additional_fields_to_object( $data, $request );
+               $data = $this->filter_response_by_context( $data, $context );
+
+               $response = rest_ensure_response( $data );
+
+               if ( 'publish' === $status->name ) {
+                       $response->add_link( 'archives', rest_url( 'wp/v2/posts' ) );
+               } else {
+                       $response->add_link( 'archives', add_query_arg( 'status', $status->name, rest_url( 'wp/v2/posts' ) ) );
+               }
+
+               /**
+                * Filters a status returned from the REST API.
+                *
+                * Allows modification of the status data right before it is returned.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_REST_Response $response The response object.
+                * @param object           $status   The original status object.
+                * @param WP_REST_Request  $request  Request used to generate the response.
+                */
+               return apply_filters( 'rest_prepare_status', $response, $status, $request );
+       }
+
+       /**
+        * Retrieves the post status' schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Item schema data.
+        */
+       public function get_item_schema() {
+               $schema = array(
+                       '$schema'              => 'http://json-schema.org/schema#',
+                       'title'                => 'status',
+                       'type'                 => 'object',
+                       'properties'           => array(
+                               'name'             => array(
+                                       'description'  => __( 'The title for the status.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'embed', 'view', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'private'          => array(
+                                       'description'  => __( 'Whether posts with this status should be private.' ),
+                                       'type'         => 'boolean',
+                                       'context'      => array( 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'protected'        => array(
+                                       'description'  => __( 'Whether posts with this status should be protected.' ),
+                                       'type'         => 'boolean',
+                                       'context'      => array( 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'public'           => array(
+                                       'description'  => __( 'Whether posts of this status should be shown in the front end of the site.' ),
+                                       'type'         => 'boolean',
+                                       'context'      => array( 'view', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'queryable'        => array(
+                                       'description'  => __( 'Whether posts with this status should be publicly-queryable.' ),
+                                       'type'         => 'boolean',
+                                       'context'      => array( 'view', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'show_in_list'     => array(
+                                       'description'  => __( 'Whether to include posts in the edit listing for their post type.' ),
+                                       'type'         => 'boolean',
+                                       'context'      => array( 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'slug'             => array(
+                                       'description'  => __( 'An alphanumeric identifier for the status.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'embed', 'view', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                       ),
+               );
+
+               return $this->add_additional_fields_schema( $schema );
+       }
+
+       /**
+        * Retrieves the query params for collections.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Collection parameters.
+        */
+       public function get_collection_params() {
+               return array(
+                       'context' => $this->get_context_param( array( 'default' => 'view' ) ),
+               );
+       }
+
+}
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php
new file mode 100644 (file)
index 0000000..a1437dd
--- /dev/null
@@ -0,0 +1,276 @@
+<?php
+/**
+ * REST API: WP_REST_Post_Types_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class to access post types via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Controller
+ */
+class WP_REST_Post_Types_Controller extends WP_REST_Controller {
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function __construct() {
+               $this->namespace = 'wp/v2';
+               $this->rest_base = 'types';
+       }
+
+       /**
+        * Registers the routes for the objects of the controller.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @see register_rest_route()
+        */
+       public function register_routes() {
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base, array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_items' ),
+                               'permission_callback' => array( $this, 'get_items_permissions_check' ),
+                               'args'                => $this->get_collection_params(),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<type>[\w-]+)', array(
+                       array(
+                               'methods'  => WP_REST_Server::READABLE,
+                               'callback' => array( $this, 'get_item' ),
+                               'args'     => array(
+                                       'context' => $this->get_context_param( array( 'default' => 'view' ) ),
+                               ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+       }
+
+       /**
+        * Checks whether a given request has permission to read types.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|true True if the request has read access, WP_Error object otherwise.
+        */
+       public function get_items_permissions_check( $request ) {
+               if ( 'edit' === $request['context'] ) {
+                       foreach ( get_post_types( array(), 'object' ) as $post_type ) {
+                               if ( ! empty( $post_type->show_in_rest ) && current_user_can( $post_type->cap->edit_posts ) ) {
+                                       return true;
+                               }
+                       }
+
+                       return new WP_Error( 'rest_cannot_view', __( 'Sorry, you are not allowed to edit posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Retrieves all public post types.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
+        */
+       public function get_items( $request ) {
+               $data = array();
+
+               foreach ( get_post_types( array(), 'object' ) as $obj ) {
+                       if ( empty( $obj->show_in_rest ) || ( 'edit' === $request['context'] && ! current_user_can( $obj->cap->edit_posts ) ) ) {
+                               continue;
+                       }
+
+                       $post_type = $this->prepare_item_for_response( $obj, $request );
+                       $data[ $obj->name ] = $this->prepare_response_for_collection( $post_type );
+               }
+
+               return rest_ensure_response( $data );
+       }
+
+       /**
+        * Retrieves a specific post type.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
+        */
+       public function get_item( $request ) {
+               $obj = get_post_type_object( $request['type'] );
+
+               if ( empty( $obj ) ) {
+                       return new WP_Error( 'rest_type_invalid', __( 'Invalid post type.' ), array( 'status' => 404 ) );
+               }
+
+               if ( empty( $obj->show_in_rest ) ) {
+                       return new WP_Error( 'rest_cannot_read_type', __( 'Cannot view post type.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( 'edit' === $request['context'] && ! current_user_can( $obj->cap->edit_posts ) ) {
+                       return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               $data = $this->prepare_item_for_response( $obj, $request );
+
+               return rest_ensure_response( $data );
+       }
+
+       /**
+        * Prepares a post type object for serialization.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param stdClass        $post_type Post type data.
+        * @param WP_REST_Request $request   Full details about the request.
+        * @return WP_REST_Response Response object.
+        */
+       public function prepare_item_for_response( $post_type, $request ) {
+               $taxonomies = wp_list_filter( get_object_taxonomies( $post_type->name, 'objects' ), array( 'show_in_rest' => true ) );
+               $taxonomies = wp_list_pluck( $taxonomies, 'name' );
+               $base = ! empty( $post_type->rest_base ) ? $post_type->rest_base : $post_type->name;
+               $data = array(
+                       'capabilities' => $post_type->cap,
+                       'description'  => $post_type->description,
+                       'hierarchical' => $post_type->hierarchical,
+                       'labels'       => $post_type->labels,
+                       'name'         => $post_type->label,
+                       'slug'         => $post_type->name,
+                       'taxonomies'   => array_values( $taxonomies ),
+                       'rest_base'    => $base,
+               );
+               $context = ! empty( $request['context'] ) ? $request['context'] : 'view';
+               $data    = $this->add_additional_fields_to_object( $data, $request );
+               $data    = $this->filter_response_by_context( $data, $context );
+
+               // Wrap the data in a response object.
+               $response = rest_ensure_response( $data );
+
+               $response->add_links( array(
+                       'collection' => array(
+                               'href'   => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ),
+                       ),
+                       'https://api.w.org/items' => array(
+                               'href' => rest_url( sprintf( 'wp/v2/%s', $base ) ),
+                       ),
+               ) );
+
+               /**
+                * Filters a post type returned from the API.
+                *
+                * Allows modification of the post type data right before it is returned.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_REST_Response $response The response object.
+                * @param object           $item     The original post type object.
+                * @param WP_REST_Request  $request  Request used to generate the response.
+                */
+               return apply_filters( 'rest_prepare_post_type', $response, $post_type, $request );
+       }
+
+       /**
+        * Retrieves the post type's schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Item schema data.
+        */
+       public function get_item_schema() {
+               $schema = array(
+                       '$schema'              => 'http://json-schema.org/schema#',
+                       'title'                => 'type',
+                       'type'                 => 'object',
+                       'properties'           => array(
+                               'capabilities'     => array(
+                                       'description'  => __( 'All capabilities used by the post type.' ),
+                                       'type'         => 'object',
+                                       'context'      => array( 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'description'      => array(
+                                       'description'  => __( 'A human-readable description of the post type.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'hierarchical'     => array(
+                                       'description'  => __( 'Whether or not the post type should have children.' ),
+                                       'type'         => 'boolean',
+                                       'context'      => array( 'view', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'labels'           => array(
+                                       'description'  => __( 'Human-readable labels for the post type for various contexts.' ),
+                                       'type'         => 'object',
+                                       'context'      => array( 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'name'             => array(
+                                       'description'  => __( 'The title for the post type.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                                       'readonly'     => true,
+                               ),
+                               'slug'             => array(
+                                       'description'  => __( 'An alphanumeric identifier for the post type.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                                       'readonly'     => true,
+                               ),
+                               'taxonomies'       => array(
+                                       'description'  => __( 'Taxonomies associated with post type.' ),
+                                       'type'         => 'array',
+                                       'items'        => array(
+                                               'type' => 'string',
+                                       ),
+                                       'context'      => array( 'view', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'rest_base'            => array(
+                                       'description'  => __( 'REST base route for the post type.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                                       'readonly'     => true,
+                               ),
+                       ),
+               );
+               return $this->add_additional_fields_schema( $schema );
+       }
+
+       /**
+        * Retrieves the query params for collections.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Collection parameters.
+        */
+       public function get_collection_params() {
+               return array(
+                       'context' => $this->get_context_param( array( 'default' => 'view' ) ),
+               );
+       }
+
+}
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
new file mode 100644 (file)
index 0000000..872a660
--- /dev/null
@@ -0,0 +1,2198 @@
+<?php
+/**
+ * REST API: WP_REST_Posts_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class to access posts via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Controller
+ */
+class WP_REST_Posts_Controller extends WP_REST_Controller {
+
+       /**
+        * Post type.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var string
+        */
+       protected $post_type;
+
+       /**
+        * Instance of a post meta fields object.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var WP_REST_Post_Meta_Fields
+        */
+       protected $meta;
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param string $post_type Post type.
+        */
+       public function __construct( $post_type ) {
+               $this->post_type = $post_type;
+               $this->namespace = 'wp/v2';
+               $obj = get_post_type_object( $post_type );
+               $this->rest_base = ! empty( $obj->rest_base ) ? $obj->rest_base : $obj->name;
+
+               $this->meta = new WP_REST_Post_Meta_Fields( $this->post_type );
+       }
+
+       /**
+        * Registers the routes for the objects of the controller.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @see register_rest_route()
+        */
+       public function register_routes() {
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base, array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_items' ),
+                               'permission_callback' => array( $this, 'get_items_permissions_check' ),
+                               'args'                => $this->get_collection_params(),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::CREATABLE,
+                               'callback'            => array( $this, 'create_item' ),
+                               'permission_callback' => array( $this, 'create_item_permissions_check' ),
+                               'args'                => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\d]+)', array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_item' ),
+                               'permission_callback' => array( $this, 'get_item_permissions_check' ),
+                               'args'                => array(
+                                       'context'  => $this->get_context_param( array( 'default' => 'view' ) ),
+                                       'password' => array(
+                                               'description' => __( 'The password for the post if it is password protected.' ),
+                                               'type'        => 'string',
+                                       ),
+                               ),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::EDITABLE,
+                               'callback'            => array( $this, 'update_item' ),
+                               'permission_callback' => array( $this, 'update_item_permissions_check' ),
+                               'args'                => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::DELETABLE,
+                               'callback'            => array( $this, 'delete_item' ),
+                               'permission_callback' => array( $this, 'delete_item_permissions_check' ),
+                               'args'                => array(
+                                       'force' => array(
+                                               'type'        => 'boolean',
+                                               'default'     => false,
+                                               'description' => __( 'Whether to bypass trash and force deletion.' ),
+                                       ),
+                               ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+       }
+
+       /**
+        * Checks if a given request has access to read posts.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param  WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has read access, WP_Error object otherwise.
+        */
+       public function get_items_permissions_check( $request ) {
+
+               $post_type = get_post_type_object( $this->post_type );
+
+               if ( 'edit' === $request['context'] && ! current_user_can( $post_type->cap->edit_posts ) ) {
+                       return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Retrieves a collection of posts.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function get_items( $request ) {
+
+               // Ensure a search string is set in case the orderby is set to 'relevance'.
+               if ( ! empty( $request['orderby'] ) && 'relevance' === $request['orderby'] && empty( $request['search'] ) ) {
+                       return new WP_Error( 'rest_no_search_term_defined', __( 'You need to define a search term to order by relevance.' ), array( 'status' => 400 ) );
+               }
+
+               // Ensure an include parameter is set in case the orderby is set to 'include'.
+               if ( ! empty( $request['orderby'] ) && 'include' === $request['orderby'] && empty( $request['include'] ) ) {
+                       return new WP_Error( 'rest_orderby_include_missing_include', sprintf( __( 'Missing parameter(s): %s' ), 'include' ), array( 'status' => 400 ) );
+               }
+
+               // Retrieve the list of registered collection query parameters.
+               $registered = $this->get_collection_params();
+               $args = array();
+
+               /*
+                * This array defines mappings between public API query parameters whose
+                * values are accepted as-passed, and their internal WP_Query parameter
+                * name equivalents (some are the same). Only values which are also
+                * present in $registered will be set.
+                */
+               $parameter_mappings = array(
+                       'author'         => 'author__in',
+                       'author_exclude' => 'author__not_in',
+                       'exclude'        => 'post__not_in',
+                       'include'        => 'post__in',
+                       'menu_order'     => 'menu_order',
+                       'offset'         => 'offset',
+                       'order'          => 'order',
+                       'orderby'        => 'orderby',
+                       'page'           => 'paged',
+                       'parent'         => 'post_parent__in',
+                       'parent_exclude' => 'post_parent__not_in',
+                       'search'         => 's',
+                       'slug'           => 'post_name__in',
+                       'status'         => 'post_status',
+               );
+
+               /*
+                * For each known parameter which is both registered and present in the request,
+                * set the parameter's value on the query $args.
+                */
+               foreach ( $parameter_mappings as $api_param => $wp_param ) {
+                       if ( isset( $registered[ $api_param ], $request[ $api_param ] ) ) {
+                               $args[ $wp_param ] = $request[ $api_param ];
+                       }
+               }
+
+               // Check for & assign any parameters which require special handling or setting.
+               $args['date_query'] = array();
+
+               // Set before into date query. Date query must be specified as an array of an array.
+               if ( isset( $registered['before'], $request['before'] ) ) {
+                       $args['date_query'][0]['before'] = $request['before'];
+               }
+
+               // Set after into date query. Date query must be specified as an array of an array.
+               if ( isset( $registered['after'], $request['after'] ) ) {
+                       $args['date_query'][0]['after'] = $request['after'];
+               }
+
+               // Ensure our per_page parameter overrides any provided posts_per_page filter.
+               if ( isset( $registered['per_page'] ) ) {
+                       $args['posts_per_page'] = $request['per_page'];
+               }
+
+               if ( isset( $registered['sticky'], $request['sticky'] ) ) {
+                       $sticky_posts = get_option( 'sticky_posts', array() );
+                       if ( $sticky_posts && $request['sticky'] ) {
+                               /*
+                                * As post__in will be used to only get sticky posts,
+                                * we have to support the case where post__in was already
+                                * specified.
+                                */
+                               $args['post__in'] = $args['post__in'] ? array_intersect( $sticky_posts, $args['post__in'] ) : $sticky_posts;
+
+                               /*
+                                * If we intersected, but there are no post ids in common,
+                                * WP_Query won't return "no posts" for post__in = array()
+                                * so we have to fake it a bit.
+                                */
+                               if ( ! $args['post__in'] ) {
+                                       $args['post__in'] = array( -1 );
+                               }
+                       } elseif ( $sticky_posts ) {
+                               /*
+                                * As post___not_in will be used to only get posts that
+                                * are not sticky, we have to support the case where post__not_in
+                                * was already specified.
+                                */
+                               $args['post__not_in'] = array_merge( $args['post__not_in'], $sticky_posts );
+                       }
+               }
+
+               // Force the post_type argument, since it's not a user input variable.
+               $args['post_type'] = $this->post_type;
+
+               /**
+                * Filters the query arguments for a request.
+                *
+                * Enables adding extra arguments or setting defaults for a post collection request.
+                *
+                * @since 4.7.0
+                *
+                * @link https://developer.wordpress.org/reference/classes/wp_query/
+                *
+                * @param array           $args    Key value array of query var to query value.
+                * @param WP_REST_Request $request The request used.
+                */
+               $args = apply_filters( "rest_{$this->post_type}_query", $args, $request );
+               $query_args = $this->prepare_items_query( $args, $request );
+
+               $taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) );
+
+               foreach ( $taxonomies as $taxonomy ) {
+                       $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;
+                       $tax_exclude = $base . '_exclude';
+
+                       if ( ! empty( $request[ $base ] ) ) {
+                               $query_args['tax_query'][] = array(
+                                       'taxonomy'         => $taxonomy->name,
+                                       'field'            => 'term_id',
+                                       'terms'            => $request[ $base ],
+                                       'include_children' => false,
+                               );
+                       }
+
+                       if ( ! empty( $request[ $tax_exclude ] ) ) {
+                               $query_args['tax_query'][] = array(
+                                       'taxonomy'         => $taxonomy->name,
+                                       'field'            => 'term_id',
+                                       'terms'            => $request[ $tax_exclude ],
+                                       'include_children' => false,
+                                       'operator'         => 'NOT IN',
+                               );
+                       }
+               }
+
+               $posts_query  = new WP_Query();
+               $query_result = $posts_query->query( $query_args );
+
+               // Allow access to all password protected posts if the context is edit.
+               if ( 'edit' === $request['context'] ) {
+                       add_filter( 'post_password_required', '__return_false' );
+               }
+
+               $posts = array();
+
+               foreach ( $query_result as $post ) {
+                       if ( ! $this->check_read_permission( $post ) ) {
+                               continue;
+                       }
+
+                       $data    = $this->prepare_item_for_response( $post, $request );
+                       $posts[] = $this->prepare_response_for_collection( $data );
+               }
+
+               // Reset filter.
+               if ( 'edit' === $request['context'] ) {
+                       remove_filter( 'post_password_required', '__return_false' );
+               }
+
+               $page = (int) $query_args['paged'];
+               $total_posts = $posts_query->found_posts;
+
+               if ( $total_posts < 1 ) {
+                       // Out-of-bounds, run the query again without LIMIT for total count.
+                       unset( $query_args['paged'] );
+
+                       $count_query = new WP_Query();
+                       $count_query->query( $query_args );
+                       $total_posts = $count_query->found_posts;
+               }
+
+               $max_pages = ceil( $total_posts / (int) $posts_query->query_vars['posts_per_page'] );
+               $response  = rest_ensure_response( $posts );
+
+               $response->header( 'X-WP-Total', (int) $total_posts );
+               $response->header( 'X-WP-TotalPages', (int) $max_pages );
+
+               $request_params = $request->get_query_params();
+               $base = add_query_arg( $request_params, rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ) );
+
+               if ( $page > 1 ) {
+                       $prev_page = $page - 1;
+
+                       if ( $prev_page > $max_pages ) {
+                               $prev_page = $max_pages;
+                       }
+
+                       $prev_link = add_query_arg( 'page', $prev_page, $base );
+                       $response->link_header( 'prev', $prev_link );
+               }
+               if ( $max_pages > $page ) {
+                       $next_page = $page + 1;
+                       $next_link = add_query_arg( 'page', $next_page, $base );
+
+                       $response->link_header( 'next', $next_link );
+               }
+
+               return $response;
+       }
+
+       /**
+        * Checks if a given request has access to read a post.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return bool|WP_Error True if the request has read access for the item, WP_Error object otherwise.
+        */
+       public function get_item_permissions_check( $request ) {
+
+               $post = get_post( (int) $request['id'] );
+
+               if ( 'edit' === $request['context'] && $post && ! $this->check_update_permission( $post ) ) {
+                       return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit this post.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( $post && ! empty( $request['password'] ) ) {
+                       // Check post password, and return error if invalid.
+                       if ( ! hash_equals( $post->post_password, $request['password'] ) ) {
+                               return new WP_Error( 'rest_post_incorrect_password', __( 'Incorrect post password.' ), array( 'status' => 403 ) );
+                       }
+               }
+
+               // Allow access to all password protected posts if the context is edit.
+               if ( 'edit' === $request['context'] ) {
+                       add_filter( 'post_password_required', '__return_false' );
+               }
+
+               if ( $post ) {
+                       return $this->check_read_permission( $post );
+               }
+
+               return true;
+       }
+
+       /**
+        * Checks if the user can access password-protected content.
+        *
+        * This method determines whether we need to override the regular password
+        * check in core with a filter.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_Post         $post    Post to check against.
+        * @param WP_REST_Request $request Request data to check.
+        * @return bool True if the user can access password-protected content, otherwise false.
+        */
+       public function can_access_password_content( $post, $request ) {
+               if ( empty( $post->post_password ) ) {
+                       // No filter required.
+                       return false;
+               }
+
+               // Edit context always gets access to password-protected posts.
+               if ( 'edit' === $request['context'] ) {
+                       return true;
+               }
+
+               // No password, no auth.
+               if ( empty( $request['password'] ) ) {
+                       return false;
+               }
+
+               // Double-check the request password.
+               return hash_equals( $post->post_password, $request['password'] );
+       }
+
+       /**
+        * Retrieves a single post.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function get_item( $request ) {
+               $id   = (int) $request['id'];
+               $post = get_post( $id );
+
+               if ( empty( $id ) || empty( $post->ID ) || $this->post_type !== $post->post_type ) {
+                       return new WP_Error( 'rest_post_invalid_id', __( 'Invalid post ID.' ), array( 'status' => 404 ) );
+               }
+
+               $data     = $this->prepare_item_for_response( $post, $request );
+               $response = rest_ensure_response( $data );
+
+               if ( is_post_type_viewable( get_post_type_object( $post->post_type ) ) ) {
+                       $response->link_header( 'alternate',  get_permalink( $id ), array( 'type' => 'text/html' ) );
+               }
+
+               return $response;
+       }
+
+       /**
+        * Checks if a given request has access to create a post.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has access to create items, WP_Error object otherwise.
+        */
+       public function create_item_permissions_check( $request ) {
+
+               $post_type = get_post_type_object( $this->post_type );
+
+               if ( ! empty( $request['author'] ) && get_current_user_id() !== $request['author'] && ! current_user_can( $post_type->cap->edit_others_posts ) ) {
+                       return new WP_Error( 'rest_cannot_edit_others', __( 'Sorry, you are not allowed to create posts as this user.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) ) {
+                       return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( ! current_user_can( $post_type->cap->create_posts ) ) {
+                       return new WP_Error( 'rest_cannot_create', __( 'Sorry, you are not allowed to create posts as this user.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( ! $this->check_assign_terms_permission( $request ) ) {
+                       return new WP_Error( 'rest_cannot_assign_term', __( 'Sorry, you are not allowed to assign the provided terms.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Creates a single post.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function create_item( $request ) {
+               if ( ! empty( $request['id'] ) ) {
+                       return new WP_Error( 'rest_post_exists', __( 'Cannot create existing post.' ), array( 'status' => 400 ) );
+               }
+
+               $prepared_post = $this->prepare_item_for_database( $request );
+
+               if ( is_wp_error( $prepared_post ) ) {
+                       return $prepared_post;
+               }
+
+               $prepared_post->post_type = $this->post_type;
+
+               $post_id = wp_insert_post( wp_slash( (array) $prepared_post ), true );
+
+               if ( is_wp_error( $post_id ) ) {
+
+                       if ( 'db_insert_error' === $post_id->get_error_code() ) {
+                               $post_id->add_data( array( 'status' => 500 ) );
+                       } else {
+                               $post_id->add_data( array( 'status' => 400 ) );
+                       }
+
+                       return $post_id;
+               }
+
+               $post = get_post( $post_id );
+
+               /**
+                * Fires after a single post is created or updated via the REST API.
+                *
+                * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_Post         $post     Inserted or updated post object.
+                * @param WP_REST_Request $request  Request object.
+                * @param bool            $creating True when creating a post, false when updating.
+                */
+               do_action( "rest_insert_{$this->post_type}", $post, $request, true );
+
+               $schema = $this->get_item_schema();
+
+               if ( ! empty( $schema['properties']['sticky'] ) ) {
+                       if ( ! empty( $request['sticky'] ) ) {
+                               stick_post( $post_id );
+                       } else {
+                               unstick_post( $post_id );
+                       }
+               }
+
+               if ( ! empty( $schema['properties']['featured_media'] ) && isset( $request['featured_media'] ) ) {
+                       $this->handle_featured_media( $request['featured_media'], $post_id );
+               }
+
+               if ( ! empty( $schema['properties']['format'] ) && ! empty( $request['format'] ) ) {
+                       set_post_format( $post, $request['format'] );
+               }
+
+               if ( ! empty( $schema['properties']['template'] ) && isset( $request['template'] ) ) {
+                       $this->handle_template( $request['template'], $post_id );
+               }
+
+               $terms_update = $this->handle_terms( $post_id, $request );
+
+               if ( is_wp_error( $terms_update ) ) {
+                       return $terms_update;
+               }
+
+               if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
+                       $meta_update = $this->meta->update_value( $request['meta'], $post_id );
+
+                       if ( is_wp_error( $meta_update ) ) {
+                               return $meta_update;
+                       }
+               }
+
+               $post = get_post( $post_id );
+               $fields_update = $this->update_additional_fields_for_object( $post, $request );
+
+               if ( is_wp_error( $fields_update ) ) {
+                       return $fields_update;
+               }
+
+               $request->set_param( 'context', 'edit' );
+
+               $response = $this->prepare_item_for_response( $post, $request );
+               $response = rest_ensure_response( $response );
+
+               $response->set_status( 201 );
+               $response->header( 'Location', rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->rest_base, $post_id ) ) );
+
+               return $response;
+       }
+
+       /**
+        * Checks if a given request has access to update a post.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has access to update the item, WP_Error object otherwise.
+        */
+       public function update_item_permissions_check( $request ) {
+
+               $post = get_post( $request['id'] );
+               $post_type = get_post_type_object( $this->post_type );
+
+               if ( $post && ! $this->check_update_permission( $post ) ) {
+                       return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to edit this post.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( ! empty( $request['author'] ) && get_current_user_id() !== $request['author'] && ! current_user_can( $post_type->cap->edit_others_posts ) ) {
+                       return new WP_Error( 'rest_cannot_edit_others', __( 'Sorry, you are not allowed to update posts as this user.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) ) {
+                       return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( ! $this->check_assign_terms_permission( $request ) ) {
+                       return new WP_Error( 'rest_cannot_assign_term', __( 'Sorry, you are not allowed to assign the provided terms.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Updates a single post.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function update_item( $request ) {
+               $id   = (int) $request['id'];
+               $post = get_post( $id );
+
+               if ( empty( $id ) || empty( $post->ID ) || $this->post_type !== $post->post_type ) {
+                       return new WP_Error( 'rest_post_invalid_id', __( 'Invalid post ID.' ), array( 'status' => 404 ) );
+               }
+
+               $post = $this->prepare_item_for_database( $request );
+
+               if ( is_wp_error( $post ) ) {
+                       return $post;
+               }
+
+               // convert the post object to an array, otherwise wp_update_post will expect non-escaped input.
+               $post_id = wp_update_post( wp_slash( (array) $post ), true );
+
+               if ( is_wp_error( $post_id ) ) {
+                       if ( 'db_update_error' === $post_id->get_error_code() ) {
+                               $post_id->add_data( array( 'status' => 500 ) );
+                       } else {
+                               $post_id->add_data( array( 'status' => 400 ) );
+                       }
+                       return $post_id;
+               }
+
+               $post = get_post( $post_id );
+
+               /* This action is documented in lib/endpoints/class-wp-rest-controller.php */
+               do_action( "rest_insert_{$this->post_type}", $post, $request, false );
+
+               $schema = $this->get_item_schema();
+
+               if ( ! empty( $schema['properties']['format'] ) && ! empty( $request['format'] ) ) {
+                       set_post_format( $post, $request['format'] );
+               }
+
+               if ( ! empty( $schema['properties']['featured_media'] ) && isset( $request['featured_media'] ) ) {
+                       $this->handle_featured_media( $request['featured_media'], $post_id );
+               }
+
+               if ( ! empty( $schema['properties']['sticky'] ) && isset( $request['sticky'] ) ) {
+                       if ( ! empty( $request['sticky'] ) ) {
+                               stick_post( $post_id );
+                       } else {
+                               unstick_post( $post_id );
+                       }
+               }
+
+               if ( ! empty( $schema['properties']['template'] ) && isset( $request['template'] ) ) {
+                       $this->handle_template( $request['template'], $post->ID );
+               }
+
+               $terms_update = $this->handle_terms( $post->ID, $request );
+
+               if ( is_wp_error( $terms_update ) ) {
+                       return $terms_update;
+               }
+
+               if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
+                       $meta_update = $this->meta->update_value( $request['meta'], $post->ID );
+
+                       if ( is_wp_error( $meta_update ) ) {
+                               return $meta_update;
+                       }
+               }
+
+               $post = get_post( $post_id );
+               $fields_update = $this->update_additional_fields_for_object( $post, $request );
+
+               if ( is_wp_error( $fields_update ) ) {
+                       return $fields_update;
+               }
+
+               $request->set_param( 'context', 'edit' );
+
+               $response = $this->prepare_item_for_response( $post, $request );
+
+               return rest_ensure_response( $response );
+       }
+
+       /**
+        * Checks if a given request has access to delete a post.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has access to delete the item, WP_Error object otherwise.
+        */
+       public function delete_item_permissions_check( $request ) {
+
+               $post = get_post( $request['id'] );
+
+               if ( $post && ! $this->check_delete_permission( $post ) ) {
+                       return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this post.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Deletes a single post.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function delete_item( $request ) {
+               $id    = (int) $request['id'];
+               $force = (bool) $request['force'];
+
+               $post = get_post( $id );
+
+               if ( empty( $id ) || empty( $post->ID ) || $this->post_type !== $post->post_type ) {
+                       return new WP_Error( 'rest_post_invalid_id', __( 'Invalid post ID.' ), array( 'status' => 404 ) );
+               }
+
+               $supports_trash = ( EMPTY_TRASH_DAYS > 0 );
+
+               if ( 'attachment' === $post->post_type ) {
+                       $supports_trash = $supports_trash && MEDIA_TRASH;
+               }
+
+               /**
+                * Filters whether a post is trashable.
+                *
+                * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
+                *
+                * Pass false to disable trash support for the post.
+                *
+                * @since 4.7.0
+                *
+                * @param bool    $supports_trash Whether the post type support trashing.
+                * @param WP_Post $post           The Post object being considered for trashing support.
+                */
+               $supports_trash = apply_filters( "rest_{$this->post_type}_trashable", $supports_trash, $post );
+
+               if ( ! $this->check_delete_permission( $post ) ) {
+                       return new WP_Error( 'rest_user_cannot_delete_post', __( 'Sorry, you are not allowed to delete this post.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               $request->set_param( 'context', 'edit' );
+
+
+               // If we're forcing, then delete permanently.
+               if ( $force ) {
+                       $previous = $this->prepare_item_for_response( $post, $request );
+                       $result = wp_delete_post( $id, true );
+                       $response = new WP_REST_Response();
+                       $response->set_data( array( 'deleted' => true, 'previous' => $previous->get_data() ) );
+               } else {
+                       // If we don't support trashing for this type, error out.
+                       if ( ! $supports_trash ) {
+                               return new WP_Error( 'rest_trash_not_supported', __( 'The post does not support trashing. Set force=true to delete.' ), array( 'status' => 501 ) );
+                       }
+
+                       // Otherwise, only trash if we haven't already.
+                       if ( 'trash' === $post->post_status ) {
+                               return new WP_Error( 'rest_already_trashed', __( 'The post has already been deleted.' ), array( 'status' => 410 ) );
+                       }
+
+                       // (Note that internally this falls through to `wp_delete_post` if
+                       // the trash is disabled.)
+                       $result = wp_trash_post( $id );
+                       $post = get_post( $id );
+                       $response = $this->prepare_item_for_response( $post, $request );
+               }
+
+               if ( ! $result ) {
+                       return new WP_Error( 'rest_cannot_delete', __( 'The post cannot be deleted.' ), array( 'status' => 500 ) );
+               }
+
+               /**
+                * Fires immediately after a single post is deleted or trashed via the REST API.
+                *
+                * They dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
+                *
+                * @since 4.7.0
+                *
+                * @param object           $post     The deleted or trashed post.
+                * @param WP_REST_Response $response The response data.
+                * @param WP_REST_Request  $request  The request sent to the API.
+                */
+               do_action( "rest_delete_{$this->post_type}", $post, $response, $request );
+
+               return $response;
+       }
+
+       /**
+        * Determines the allowed query_vars for a get_items() response and prepares
+        * them for WP_Query.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param array           $prepared_args Optional. Prepared WP_Query arguments. Default empty array.
+        * @param WP_REST_Request $request       Optional. Full details about the request.
+        * @return array Items query arguments.
+        */
+       protected function prepare_items_query( $prepared_args = array(), $request = null ) {
+               $query_args = array();
+
+               foreach ( $prepared_args as $key => $value ) {
+                       /**
+                        * Filters the query_vars used in get_items() for the constructed query.
+                        *
+                        * The dynamic portion of the hook name, `$key`, refers to the query_var key.
+                        *
+                        * @since 4.7.0
+                        *
+                        * @param string $value The query_var value.
+                        */
+                       $query_args[ $key ] = apply_filters( "rest_query_var-{$key}", $value );
+               }
+
+               if ( 'post' !== $this->post_type || ! isset( $query_args['ignore_sticky_posts'] ) ) {
+                       $query_args['ignore_sticky_posts'] = true;
+               }
+
+               // Map to proper WP_Query orderby param.
+               if ( isset( $query_args['orderby'] ) && isset( $request['orderby'] ) ) {
+                       $orderby_mappings = array(
+                               'id'      => 'ID',
+                               'include' => 'post__in',
+                               'slug'    => 'post_name',
+                       );
+
+                       if ( isset( $orderby_mappings[ $request['orderby'] ] ) ) {
+                               $query_args['orderby'] = $orderby_mappings[ $request['orderby'] ];
+                       }
+               }
+
+               return $query_args;
+       }
+
+       /**
+        * Checks the post_date_gmt or modified_gmt and prepare any post or
+        * modified date for single post output.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param string      $date_gmt GMT publication time.
+        * @param string|null $date     Optional. Local publication time. Default null.
+        * @return string|null ISO8601/RFC3339 formatted datetime.
+        */
+       protected function prepare_date_response( $date_gmt, $date = null ) {
+               // Use the date if passed.
+               if ( isset( $date ) ) {
+                       return mysql_to_rfc3339( $date );
+               }
+
+               // Return null if $date_gmt is empty/zeros.
+               if ( '0000-00-00 00:00:00' === $date_gmt ) {
+                       return null;
+               }
+
+               // Return the formatted datetime.
+               return mysql_to_rfc3339( $date_gmt );
+       }
+
+       /**
+        * Prepares a single post for create or update.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param WP_REST_Request $request Request object.
+        * @return stdClass|WP_Error Post object or WP_Error.
+        */
+       protected function prepare_item_for_database( $request ) {
+               $prepared_post = new stdClass;
+
+               // Post ID.
+               if ( isset( $request['id'] ) ) {
+                       $prepared_post->ID = absint( $request['id'] );
+               }
+
+               $schema = $this->get_item_schema();
+
+               // Post title.
+               if ( ! empty( $schema['properties']['title'] ) && isset( $request['title'] ) ) {
+                       if ( is_string( $request['title'] ) ) {
+                               $prepared_post->post_title = $request['title'];
+                       } elseif ( ! empty( $request['title']['raw'] ) ) {
+                               $prepared_post->post_title = $request['title']['raw'];
+                       }
+               }
+
+               // Post content.
+               if ( ! empty( $schema['properties']['content'] ) && isset( $request['content'] ) ) {
+                       if ( is_string( $request['content'] ) ) {
+                               $prepared_post->post_content = $request['content'];
+                       } elseif ( isset( $request['content']['raw'] ) ) {
+                               $prepared_post->post_content = $request['content']['raw'];
+                       }
+               }
+
+               // Post excerpt.
+               if ( ! empty( $schema['properties']['excerpt'] ) && isset( $request['excerpt'] ) ) {
+                       if ( is_string( $request['excerpt'] ) ) {
+                               $prepared_post->post_excerpt = $request['excerpt'];
+                       } elseif ( isset( $request['excerpt']['raw'] ) ) {
+                               $prepared_post->post_excerpt = $request['excerpt']['raw'];
+                       }
+               }
+
+               // Post type.
+               if ( empty( $request['id'] ) ) {
+                       // Creating new post, use default type for the controller.
+                       $prepared_post->post_type = $this->post_type;
+               } else {
+                       // Updating a post, use previous type.
+                       $prepared_post->post_type = get_post_type( $request['id'] );
+               }
+
+               $post_type = get_post_type_object( $prepared_post->post_type );
+
+               // Post status.
+               if ( ! empty( $schema['properties']['status'] ) && isset( $request['status'] ) ) {
+                       $status = $this->handle_status_param( $request['status'], $post_type );
+
+                       if ( is_wp_error( $status ) ) {
+                               return $status;
+                       }
+
+                       $prepared_post->post_status = $status;
+               }
+
+               // Post date.
+               if ( ! empty( $schema['properties']['date'] ) && ! empty( $request['date'] ) ) {
+                       $date_data = rest_get_date_with_gmt( $request['date'] );
+
+                       if ( ! empty( $date_data ) ) {
+                               list( $prepared_post->post_date, $prepared_post->post_date_gmt ) = $date_data;
+                       }
+               } elseif ( ! empty( $schema['properties']['date_gmt'] ) && ! empty( $request['date_gmt'] ) ) {
+                       $date_data = rest_get_date_with_gmt( $request['date_gmt'], true );
+
+                       if ( ! empty( $date_data ) ) {
+                               list( $prepared_post->post_date, $prepared_post->post_date_gmt ) = $date_data;
+                       }
+               }
+
+               // Post slug.
+               if ( ! empty( $schema['properties']['slug'] ) && isset( $request['slug'] ) ) {
+                       $prepared_post->post_name = $request['slug'];
+               }
+
+               // Author.
+               if ( ! empty( $schema['properties']['author'] ) && ! empty( $request['author'] ) ) {
+                       $post_author = (int) $request['author'];
+
+                       if ( get_current_user_id() !== $post_author ) {
+                               $user_obj = get_userdata( $post_author );
+
+                               if ( ! $user_obj ) {
+                                       return new WP_Error( 'rest_invalid_author', __( 'Invalid author ID.' ), array( 'status' => 400 ) );
+                               }
+                       }
+
+                       $prepared_post->post_author = $post_author;
+               }
+
+               // Post password.
+               if ( ! empty( $schema['properties']['password'] ) && isset( $request['password'] ) ) {
+                       $prepared_post->post_password = $request['password'];
+
+                       if ( '' !== $request['password'] ) {
+                               if ( ! empty( $schema['properties']['sticky'] ) && ! empty( $request['sticky'] ) ) {
+                                       return new WP_Error( 'rest_invalid_field', __( 'A post can not be sticky and have a password.' ), array( 'status' => 400 ) );
+                               }
+
+                               if ( ! empty( $prepared_post->ID ) && is_sticky( $prepared_post->ID ) ) {
+                                       return new WP_Error( 'rest_invalid_field', __( 'A sticky post can not be password protected.' ), array( 'status' => 400 ) );
+                               }
+                       }
+               }
+
+               if ( ! empty( $schema['properties']['sticky'] ) && ! empty( $request['sticky'] ) ) {
+                       if ( ! empty( $prepared_post->ID ) && post_password_required( $prepared_post->ID ) ) {
+                               return new WP_Error( 'rest_invalid_field', __( 'A password protected post can not be set to sticky.' ), array( 'status' => 400 ) );
+                       }
+               }
+
+               // Parent.
+               if ( ! empty( $schema['properties']['parent'] ) && isset( $request['parent'] ) ) {
+                       if ( 0 === (int) $request['parent'] ) {
+                               $prepared_post->post_parent = 0;
+                       } else {
+                               $parent = get_post( (int) $request['parent'] );
+                               if ( empty( $parent ) ) {
+                                       return new WP_Error( 'rest_post_invalid_id', __( 'Invalid post parent ID.' ), array( 'status' => 400 ) );
+                               }
+                               $prepared_post->post_parent = (int) $parent->ID;
+                       }
+               }
+
+               // Menu order.
+               if ( ! empty( $schema['properties']['menu_order'] ) && isset( $request['menu_order'] ) ) {
+                       $prepared_post->menu_order = (int) $request['menu_order'];
+               }
+
+               // Comment status.
+               if ( ! empty( $schema['properties']['comment_status'] ) && ! empty( $request['comment_status'] ) ) {
+                       $prepared_post->comment_status = $request['comment_status'];
+               }
+
+               // Ping status.
+               if ( ! empty( $schema['properties']['ping_status'] ) && ! empty( $request['ping_status'] ) ) {
+                       $prepared_post->ping_status = $request['ping_status'];
+               }
+
+               /**
+                * Filters a post before it is inserted via the REST API.
+                *
+                * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
+                *
+                * @since 4.7.0
+                *
+                * @param stdClass        $prepared_post An object representing a single post prepared
+                *                                       for inserting or updating the database.
+                * @param WP_REST_Request $request       Request object.
+                */
+               return apply_filters( "rest_pre_insert_{$this->post_type}", $prepared_post, $request );
+
+       }
+
+       /**
+        * Determines validity and normalizes the given status parameter.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param string $post_status Post status.
+        * @param object $post_type   Post type.
+        * @return string|WP_Error Post status or WP_Error if lacking the proper permission.
+        */
+       protected function handle_status_param( $post_status, $post_type ) {
+
+               switch ( $post_status ) {
+                       case 'draft':
+                       case 'pending':
+                               break;
+                       case 'private':
+                               if ( ! current_user_can( $post_type->cap->publish_posts ) ) {
+                                       return new WP_Error( 'rest_cannot_publish', __( 'Sorry, you are not allowed to create private posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) );
+                               }
+                               break;
+                       case 'publish':
+                       case 'future':
+                               if ( ! current_user_can( $post_type->cap->publish_posts ) ) {
+                                       return new WP_Error( 'rest_cannot_publish', __( 'Sorry, you are not allowed to publish posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) );
+                               }
+                               break;
+                       default:
+                               if ( ! get_post_status_object( $post_status ) ) {
+                                       $post_status = 'draft';
+                               }
+                               break;
+               }
+
+               return $post_status;
+       }
+
+       /**
+        * Determines the featured media based on a request param.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param int $featured_media Featured Media ID.
+        * @param int $post_id        Post ID.
+        * @return bool|WP_Error Whether the post thumbnail was successfully deleted, otherwise WP_Error.
+        */
+       protected function handle_featured_media( $featured_media, $post_id ) {
+
+               $featured_media = (int) $featured_media;
+               if ( $featured_media ) {
+                       $result = set_post_thumbnail( $post_id, $featured_media );
+                       if ( $result ) {
+                               return true;
+                       } else {
+                               return new WP_Error( 'rest_invalid_featured_media', __( 'Invalid featured media ID.' ), array( 'status' => 400 ) );
+                       }
+               } else {
+                       return delete_post_thumbnail( $post_id );
+               }
+
+       }
+
+       /**
+        * Sets the template for a post.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param string  $template Page template filename.
+        * @param integer $post_id  Post ID.
+        */
+       public function handle_template( $template, $post_id ) {
+               if ( in_array( $template, array_keys( wp_get_theme()->get_page_templates( get_post( $post_id ) ) ), true ) ) {
+                       update_post_meta( $post_id, '_wp_page_template', $template );
+               } else {
+                       update_post_meta( $post_id, '_wp_page_template', '' );
+               }
+       }
+
+       /**
+        * Updates the post's terms from a REST request.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param int             $post_id The post ID to update the terms form.
+        * @param WP_REST_Request $request The request object with post and terms data.
+        * @return null|WP_Error WP_Error on an error assigning any of the terms, otherwise null.
+        */
+       protected function handle_terms( $post_id, $request ) {
+               $taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) );
+
+               foreach ( $taxonomies as $taxonomy ) {
+                       $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;
+
+                       if ( ! isset( $request[ $base ] ) ) {
+                               continue;
+                       }
+
+                       $result = wp_set_object_terms( $post_id, $request[ $base ], $taxonomy->name );
+
+                       if ( is_wp_error( $result ) ) {
+                               return $result;
+                       }
+               }
+       }
+
+       /**
+        * Checks whether current user can assign all terms sent with the current request.
+        *
+        * @since 4.7.0
+        *
+        * @param WP_REST_Request $request The request object with post and terms data.
+        * @return bool Whether the current user can assign the provided terms.
+        */
+       protected function check_assign_terms_permission( $request ) {
+               $taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) );
+               foreach ( $taxonomies as $taxonomy ) {
+                       $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;
+
+                       if ( ! isset( $request[ $base ] ) ) {
+                               continue;
+                       }
+
+                       foreach ( $request[ $base ] as $term_id ) {
+                               // Invalid terms will be rejected later.
+                               if ( ! get_term( $term_id, $taxonomy->name ) ) {
+                                       continue;
+                               }
+
+                               if ( ! current_user_can( 'assign_term', (int) $term_id ) ) {
+                                       return false;
+                               }
+                       }
+               }
+
+               return true;
+       }
+
+       /**
+        * Checks if a given post type can be viewed or managed.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param object|string $post_type Post type name or object.
+        * @return bool Whether the post type is allowed in REST.
+        */
+       protected function check_is_post_type_allowed( $post_type ) {
+               if ( ! is_object( $post_type ) ) {
+                       $post_type = get_post_type_object( $post_type );
+               }
+
+               if ( ! empty( $post_type ) && ! empty( $post_type->show_in_rest ) ) {
+                       return true;
+               }
+
+               return false;
+       }
+
+       /**
+        * Checks if a post can be read.
+        *
+        * Correctly handles posts with the inherit status.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param object $post Post object.
+        * @return bool Whether the post can be read.
+        */
+       public function check_read_permission( $post ) {
+               $post_type = get_post_type_object( $post->post_type );
+               if ( ! $this->check_is_post_type_allowed( $post_type ) ) {
+                       return false;
+               }
+
+               // Is the post readable?
+               if ( 'publish' === $post->post_status || current_user_can( $post_type->cap->read_post, $post->ID ) ) {
+                       return true;
+               }
+
+               $post_status_obj = get_post_status_object( $post->post_status );
+               if ( $post_status_obj && $post_status_obj->public ) {
+                       return true;
+               }
+
+               // Can we read the parent if we're inheriting?
+               if ( 'inherit' === $post->post_status && $post->post_parent > 0 ) {
+                       $parent = get_post( $post->post_parent );
+                       return $this->check_read_permission( $parent );
+               }
+
+               /*
+                * If there isn't a parent, but the status is set to inherit, assume
+                * it's published (as per get_post_status()).
+                */
+               if ( 'inherit' === $post->post_status ) {
+                       return true;
+               }
+
+               return false;
+       }
+
+       /**
+        * Checks if a post can be edited.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param object $post Post object.
+        * @return bool Whether the post can be edited.
+        */
+       protected function check_update_permission( $post ) {
+               $post_type = get_post_type_object( $post->post_type );
+
+               if ( ! $this->check_is_post_type_allowed( $post_type ) ) {
+                       return false;
+               }
+
+               return current_user_can( $post_type->cap->edit_post, $post->ID );
+       }
+
+       /**
+        * Checks if a post can be created.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param object $post Post object.
+        * @return bool Whether the post can be created.
+        */
+       protected function check_create_permission( $post ) {
+               $post_type = get_post_type_object( $post->post_type );
+
+               if ( ! $this->check_is_post_type_allowed( $post_type ) ) {
+                       return false;
+               }
+
+               return current_user_can( $post_type->cap->create_posts );
+       }
+
+       /**
+        * Checks if a post can be deleted.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param object $post Post object.
+        * @return bool Whether the post can be deleted.
+        */
+       protected function check_delete_permission( $post ) {
+               $post_type = get_post_type_object( $post->post_type );
+
+               if ( ! $this->check_is_post_type_allowed( $post_type ) ) {
+                       return false;
+               }
+
+               return current_user_can( $post_type->cap->delete_post, $post->ID );
+       }
+
+       /**
+        * Prepares a single post output for response.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_Post         $post    Post object.
+        * @param WP_REST_Request $request Request object.
+        * @return WP_REST_Response Response object.
+        */
+       public function prepare_item_for_response( $post, $request ) {
+               $GLOBALS['post'] = $post;
+
+               setup_postdata( $post );
+
+               $schema = $this->get_item_schema();
+
+               // Base fields for every post.
+               $data = array();
+
+               if ( ! empty( $schema['properties']['id'] ) ) {
+                       $data['id'] = $post->ID;
+               }
+
+               if ( ! empty( $schema['properties']['date'] ) ) {
+                       $data['date'] = $this->prepare_date_response( $post->post_date_gmt, $post->post_date );
+               }
+
+               if ( ! empty( $schema['properties']['date_gmt'] ) ) {
+                       $data['date_gmt'] = $this->prepare_date_response( $post->post_date_gmt );
+               }
+
+               if ( ! empty( $schema['properties']['guid'] ) ) {
+                       $data['guid'] = array(
+                               /** This filter is documented in wp-includes/post-template.php */
+                               'rendered' => apply_filters( 'get_the_guid', $post->guid ),
+                               'raw'      => $post->guid,
+                       );
+               }
+
+               if ( ! empty( $schema['properties']['modified'] ) ) {
+                       $data['modified'] = $this->prepare_date_response( $post->post_modified_gmt, $post->post_modified );
+               }
+
+               if ( ! empty( $schema['properties']['modified_gmt'] ) ) {
+                       $data['modified_gmt'] = $this->prepare_date_response( $post->post_modified_gmt );
+               }
+
+               if ( ! empty( $schema['properties']['password'] ) ) {
+                       $data['password'] = $post->post_password;
+               }
+
+               if ( ! empty( $schema['properties']['slug'] ) ) {
+                       $data['slug'] = $post->post_name;
+               }
+
+               if ( ! empty( $schema['properties']['status'] ) ) {
+                       $data['status'] = $post->post_status;
+               }
+
+               if ( ! empty( $schema['properties']['type'] ) ) {
+                       $data['type'] = $post->post_type;
+               }
+
+               if ( ! empty( $schema['properties']['link'] ) ) {
+                       $data['link'] = get_permalink( $post->ID );
+               }
+
+               if ( ! empty( $schema['properties']['title'] ) ) {
+                       add_filter( 'protected_title_format', array( $this, 'protected_title_format' ) );
+
+                       $data['title'] = array(
+                               'raw'      => $post->post_title,
+                               'rendered' => get_the_title( $post->ID ),
+                       );
+
+                       remove_filter( 'protected_title_format', array( $this, 'protected_title_format' ) );
+               }
+
+               $has_password_filter = false;
+
+               if ( $this->can_access_password_content( $post, $request ) ) {
+                       // Allow access to the post, permissions already checked before.
+                       add_filter( 'post_password_required', '__return_false' );
+
+                       $has_password_filter = true;
+               }
+
+               if ( ! empty( $schema['properties']['content'] ) ) {
+                       $data['content'] = array(
+                               'raw'       => $post->post_content,
+                               /** This filter is documented in wp-includes/post-template.php */
+                               'rendered'  => post_password_required( $post ) ? '' : apply_filters( 'the_content', $post->post_content ),
+                               'protected' => (bool) $post->post_password,
+                       );
+               }
+
+               if ( ! empty( $schema['properties']['excerpt'] ) ) {
+                       /** This filter is documented in wp-includes/post-template.php */
+                       $excerpt = apply_filters( 'the_excerpt', apply_filters( 'get_the_excerpt', $post->post_excerpt, $post ) );
+                       $data['excerpt'] = array(
+                               'raw'       => $post->post_excerpt,
+                               'rendered'  => post_password_required( $post ) ? '' : $excerpt,
+                               'protected' => (bool) $post->post_password,
+                       );
+               }
+
+               if ( $has_password_filter ) {
+                       // Reset filter.
+                       remove_filter( 'post_password_required', '__return_false' );
+               }
+
+               if ( ! empty( $schema['properties']['author'] ) ) {
+                       $data['author'] = (int) $post->post_author;
+               }
+
+               if ( ! empty( $schema['properties']['featured_media'] ) ) {
+                       $data['featured_media'] = (int) get_post_thumbnail_id( $post->ID );
+               }
+
+               if ( ! empty( $schema['properties']['parent'] ) ) {
+                       $data['parent'] = (int) $post->post_parent;
+               }
+
+               if ( ! empty( $schema['properties']['menu_order'] ) ) {
+                       $data['menu_order'] = (int) $post->menu_order;
+               }
+
+               if ( ! empty( $schema['properties']['comment_status'] ) ) {
+                       $data['comment_status'] = $post->comment_status;
+               }
+
+               if ( ! empty( $schema['properties']['ping_status'] ) ) {
+                       $data['ping_status'] = $post->ping_status;
+               }
+
+               if ( ! empty( $schema['properties']['sticky'] ) ) {
+                       $data['sticky'] = is_sticky( $post->ID );
+               }
+
+               if ( ! empty( $schema['properties']['template'] ) ) {
+                       if ( $template = get_page_template_slug( $post->ID ) ) {
+                               $data['template'] = $template;
+                       } else {
+                               $data['template'] = '';
+                       }
+               }
+
+               if ( ! empty( $schema['properties']['format'] ) ) {
+                       $data['format'] = get_post_format( $post->ID );
+
+                       // Fill in blank post format.
+                       if ( empty( $data['format'] ) ) {
+                               $data['format'] = 'standard';
+                       }
+               }
+
+               if ( ! empty( $schema['properties']['meta'] ) ) {
+                       $data['meta'] = $this->meta->get_value( $post->ID, $request );
+               }
+
+               $taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) );
+
+               foreach ( $taxonomies as $taxonomy ) {
+                       $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;
+
+                       if ( ! empty( $schema['properties'][ $base ] ) ) {
+                               $terms = get_the_terms( $post, $taxonomy->name );
+                               $data[ $base ] = $terms ? array_values( wp_list_pluck( $terms, 'term_id' ) ) : array();
+                       }
+               }
+
+               $context = ! empty( $request['context'] ) ? $request['context'] : 'view';
+               $data    = $this->add_additional_fields_to_object( $data, $request );
+               $data    = $this->filter_response_by_context( $data, $context );
+
+               // Wrap the data in a response object.
+               $response = rest_ensure_response( $data );
+
+               $response->add_links( $this->prepare_links( $post ) );
+
+               /**
+                * Filters the post data for a response.
+                *
+                * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_REST_Response $response The response object.
+                * @param WP_Post          $post     Post object.
+                * @param WP_REST_Request  $request  Request object.
+                */
+               return apply_filters( "rest_prepare_{$this->post_type}", $response, $post, $request );
+       }
+
+       /**
+        * Overwrites the default protected title format.
+        *
+        * By default, WordPress will show password protected posts with a title of
+        * "Protected: %s", as the REST API communicates the protected status of a post
+        * in a machine readable format, we remove the "Protected: " prefix.
+        *
+        * @return string Protected title format.
+        */
+       public function protected_title_format() {
+               return '%s';
+       }
+
+       /**
+        * Prepares links for the request.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param WP_Post $post Post object.
+        * @return array Links for the given post.
+        */
+       protected function prepare_links( $post ) {
+               $base = sprintf( '%s/%s', $this->namespace, $this->rest_base );
+
+               // Entity meta.
+               $links = array(
+                       'self' => array(
+                               'href'   => rest_url( trailingslashit( $base ) . $post->ID ),
+                       ),
+                       'collection' => array(
+                               'href'   => rest_url( $base ),
+                       ),
+                       'about'      => array(
+                               'href'   => rest_url( 'wp/v2/types/' . $this->post_type ),
+                       ),
+               );
+
+               if ( ( in_array( $post->post_type, array( 'post', 'page' ), true ) || post_type_supports( $post->post_type, 'author' ) )
+                       && ! empty( $post->post_author ) ) {
+                       $links['author'] = array(
+                               'href'       => rest_url( 'wp/v2/users/' . $post->post_author ),
+                               'embeddable' => true,
+                       );
+               }
+
+               if ( in_array( $post->post_type, array( 'post', 'page' ), true ) || post_type_supports( $post->post_type, 'comments' ) ) {
+                       $replies_url = rest_url( 'wp/v2/comments' );
+                       $replies_url = add_query_arg( 'post', $post->ID, $replies_url );
+
+                       $links['replies'] = array(
+                               'href'       => $replies_url,
+                               'embeddable' => true,
+                       );
+               }
+
+               if ( in_array( $post->post_type, array( 'post', 'page' ), true ) || post_type_supports( $post->post_type, 'revisions' ) ) {
+                       $links['version-history'] = array(
+                               'href' => rest_url( trailingslashit( $base ) . $post->ID . '/revisions' ),
+                       );
+               }
+
+               $post_type_obj = get_post_type_object( $post->post_type );
+
+               if ( $post_type_obj->hierarchical && ! empty( $post->post_parent ) ) {
+                       $links['up'] = array(
+                               'href'       => rest_url( trailingslashit( $base ) . (int) $post->post_parent ),
+                               'embeddable' => true,
+                       );
+               }
+
+               // If we have a featured media, add that.
+               if ( $featured_media = get_post_thumbnail_id( $post->ID ) ) {
+                       $image_url = rest_url( 'wp/v2/media/' . $featured_media );
+
+                       $links['https://api.w.org/featuredmedia'] = array(
+                               'href'       => $image_url,
+                               'embeddable' => true,
+                       );
+               }
+
+               if ( ! in_array( $post->post_type, array( 'attachment', 'nav_menu_item', 'revision' ), true ) ) {
+                       $attachments_url = rest_url( 'wp/v2/media' );
+                       $attachments_url = add_query_arg( 'parent', $post->ID, $attachments_url );
+
+                       $links['https://api.w.org/attachment'] = array(
+                               'href' => $attachments_url,
+                       );
+               }
+
+               $taxonomies = get_object_taxonomies( $post->post_type );
+
+               if ( ! empty( $taxonomies ) ) {
+                       $links['https://api.w.org/term'] = array();
+
+                       foreach ( $taxonomies as $tax ) {
+                               $taxonomy_obj = get_taxonomy( $tax );
+
+                               // Skip taxonomies that are not public.
+                               if ( empty( $taxonomy_obj->show_in_rest ) ) {
+                                       continue;
+                               }
+
+                               $tax_base = ! empty( $taxonomy_obj->rest_base ) ? $taxonomy_obj->rest_base : $tax;
+
+                               $terms_url = add_query_arg(
+                                       'post',
+                                       $post->ID,
+                                       rest_url( 'wp/v2/' . $tax_base )
+                               );
+
+                               $links['https://api.w.org/term'][] = array(
+                                       'href'       => $terms_url,
+                                       'taxonomy'   => $tax,
+                                       'embeddable' => true,
+                               );
+                       }
+               }
+
+               return $links;
+       }
+
+       /**
+        * Retrieves the post's schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Item schema data.
+        */
+       public function get_item_schema() {
+
+               $schema = array(
+                       '$schema'    => 'http://json-schema.org/schema#',
+                       'title'      => $this->post_type,
+                       'type'       => 'object',
+                       // Base properties for every Post.
+                       'properties' => array(
+                               'date'            => array(
+                                       'description' => __( "The date the object was published, in the site's timezone." ),
+                                       'type'        => 'string',
+                                       'format'      => 'date-time',
+                                       'context'     => array( 'view', 'edit', 'embed' ),
+                               ),
+                               'date_gmt'        => array(
+                                       'description' => __( 'The date the object was published, as GMT.' ),
+                                       'type'        => 'string',
+                                       'format'      => 'date-time',
+                                       'context'     => array( 'view', 'edit' ),
+                               ),
+                               'guid'            => array(
+                                       'description' => __( 'The globally unique identifier for the object.' ),
+                                       'type'        => 'object',
+                                       'context'     => array( 'view', 'edit' ),
+                                       'readonly'    => true,
+                                       'properties'  => array(
+                                               'raw'      => array(
+                                                       'description' => __( 'GUID for the object, as it exists in the database.' ),
+                                                       'type'        => 'string',
+                                                       'context'     => array( 'edit' ),
+                                                       'readonly'    => true,
+                                               ),
+                                               'rendered' => array(
+                                                       'description' => __( 'GUID for the object, transformed for display.' ),
+                                                       'type'        => 'string',
+                                                       'context'     => array( 'view', 'edit' ),
+                                                       'readonly'    => true,
+                                               ),
+                                       ),
+                               ),
+                               'id'              => array(
+                                       'description' => __( 'Unique identifier for the object.' ),
+                                       'type'        => 'integer',
+                                       'context'     => array( 'view', 'edit', 'embed' ),
+                                       'readonly'    => true,
+                               ),
+                               'link'            => array(
+                                       'description' => __( 'URL to the object.' ),
+                                       'type'        => 'string',
+                                       'format'      => 'uri',
+                                       'context'     => array( 'view', 'edit', 'embed' ),
+                                       'readonly'    => true,
+                               ),
+                               'modified'        => array(
+                                       'description' => __( "The date the object was last modified, in the site's timezone." ),
+                                       'type'        => 'string',
+                                       'format'      => 'date-time',
+                                       'context'     => array( 'view', 'edit' ),
+                                       'readonly'    => true,
+                               ),
+                               'modified_gmt'    => array(
+                                       'description' => __( 'The date the object was last modified, as GMT.' ),
+                                       'type'        => 'string',
+                                       'format'      => 'date-time',
+                                       'context'     => array( 'view', 'edit' ),
+                                       'readonly'    => true,
+                               ),
+                               'slug'            => array(
+                                       'description' => __( 'An alphanumeric identifier for the object unique to its type.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'view', 'edit', 'embed' ),
+                                       'arg_options' => array(
+                                               'sanitize_callback' => array( $this, 'sanitize_slug' ),
+                                       ),
+                               ),
+                               'status'          => array(
+                                       'description' => __( 'A named status for the object.' ),
+                                       'type'        => 'string',
+                                       'enum'        => array_keys( get_post_stati( array( 'internal' => false ) ) ),
+                                       'context'     => array( 'edit' ),
+                               ),
+                               'type'            => array(
+                                       'description' => __( 'Type of Post for the object.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'view', 'edit', 'embed' ),
+                                       'readonly'    => true,
+                               ),
+                               'password'        => array(
+                                       'description' => __( 'A password to protect access to the content and excerpt.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'edit' ),
+                               ),
+                       ),
+               );
+
+               $post_type_obj = get_post_type_object( $this->post_type );
+
+               if ( $post_type_obj->hierarchical ) {
+                       $schema['properties']['parent'] = array(
+                               'description' => __( 'The ID for the parent of the object.' ),
+                               'type'        => 'integer',
+                               'context'     => array( 'view', 'edit' ),
+                       );
+               }
+
+               $post_type_attributes = array(
+                       'title',
+                       'editor',
+                       'author',
+                       'excerpt',
+                       'thumbnail',
+                       'comments',
+                       'revisions',
+                       'page-attributes',
+                       'post-formats',
+                       'custom-fields',
+               );
+               $fixed_schemas = array(
+                       'post' => array(
+                               'title',
+                               'editor',
+                               'author',
+                               'excerpt',
+                               'thumbnail',
+                               'comments',
+                               'revisions',
+                               'post-formats',
+                               'custom-fields',
+                       ),
+                       'page' => array(
+                               'title',
+                               'editor',
+                               'author',
+                               'excerpt',
+                               'thumbnail',
+                               'comments',
+                               'revisions',
+                               'page-attributes',
+                               'custom-fields',
+                       ),
+                       'attachment' => array(
+                               'title',
+                               'author',
+                               'comments',
+                               'revisions',
+                               'custom-fields',
+                       ),
+               );
+               foreach ( $post_type_attributes as $attribute ) {
+                       if ( isset( $fixed_schemas[ $this->post_type ] ) && ! in_array( $attribute, $fixed_schemas[ $this->post_type ], true ) ) {
+                               continue;
+                       } elseif ( ! isset( $fixed_schemas[ $this->post_type ] ) && ! post_type_supports( $this->post_type, $attribute ) ) {
+                               continue;
+                       }
+
+                       switch ( $attribute ) {
+
+                               case 'title':
+                                       $schema['properties']['title'] = array(
+                                               'description' => __( 'The title for the object.' ),
+                                               'type'        => 'object',
+                                               'context'     => array( 'view', 'edit', 'embed' ),
+                                               'arg_options' => array(
+                                                       'sanitize_callback' => null, // Note: sanitization implemented in self::prepare_item_for_database()
+                                               ),
+                                               'properties'  => array(
+                                                       'raw' => array(
+                                                               'description' => __( 'Title for the object, as it exists in the database.' ),
+                                                               'type'        => 'string',
+                                                               'context'     => array( 'edit' ),
+                                                       ),
+                                                       'rendered' => array(
+                                                               'description' => __( 'HTML title for the object, transformed for display.' ),
+                                                               'type'        => 'string',
+                                                               'context'     => array( 'view', 'edit', 'embed' ),
+                                                               'readonly'    => true,
+                                                       ),
+                                               ),
+                                       );
+                                       break;
+
+                               case 'editor':
+                                       $schema['properties']['content'] = array(
+                                               'description' => __( 'The content for the object.' ),
+                                               'type'        => 'object',
+                                               'context'     => array( 'view', 'edit' ),
+                                               'arg_options' => array(
+                                                       'sanitize_callback' => null, // Note: sanitization implemented in self::prepare_item_for_database()
+                                               ),
+                                               'properties'  => array(
+                                                       'raw' => array(
+                                                               'description' => __( 'Content for the object, as it exists in the database.' ),
+                                                               'type'        => 'string',
+                                                               'context'     => array( 'edit' ),
+                                                       ),
+                                                       'rendered' => array(
+                                                               'description' => __( 'HTML content for the object, transformed for display.' ),
+                                                               'type'        => 'string',
+                                                               'context'     => array( 'view', 'edit' ),
+                                                               'readonly'    => true,
+                                                       ),
+                                                       'protected'       => array(
+                                                               'description' => __( 'Whether the content is protected with a password.' ),
+                                                               'type'        => 'boolean',
+                                                               'context'     => array( 'view', 'edit', 'embed' ),
+                                                               'readonly'    => true,
+                                                       ),
+                                               ),
+                                       );
+                                       break;
+
+                               case 'author':
+                                       $schema['properties']['author'] = array(
+                                               'description' => __( 'The ID for the author of the object.' ),
+                                               'type'        => 'integer',
+                                               'context'     => array( 'view', 'edit', 'embed' ),
+                                       );
+                                       break;
+
+                               case 'excerpt':
+                                       $schema['properties']['excerpt'] = array(
+                                               'description' => __( 'The excerpt for the object.' ),
+                                               'type'        => 'object',
+                                               'context'     => array( 'view', 'edit', 'embed' ),
+                                               'arg_options' => array(
+                                                       'sanitize_callback' => null, // Note: sanitization implemented in self::prepare_item_for_database()
+                                               ),
+                                               'properties'  => array(
+                                                       'raw' => array(
+                                                               'description' => __( 'Excerpt for the object, as it exists in the database.' ),
+                                                               'type'        => 'string',
+                                                               'context'     => array( 'edit' ),
+                                                       ),
+                                                       'rendered' => array(
+                                                               'description' => __( 'HTML excerpt for the object, transformed for display.' ),
+                                                               'type'        => 'string',
+                                                               'context'     => array( 'view', 'edit', 'embed' ),
+                                                               'readonly'    => true,
+                                                       ),
+                                                       'protected'       => array(
+                                                               'description' => __( 'Whether the excerpt is protected with a password.' ),
+                                                               'type'        => 'boolean',
+                                                               'context'     => array( 'view', 'edit', 'embed' ),
+                                                               'readonly'    => true,
+                                                       ),
+                                               ),
+                                       );
+                                       break;
+
+                               case 'thumbnail':
+                                       $schema['properties']['featured_media'] = array(
+                                               'description' => __( 'The ID of the featured media for the object.' ),
+                                               'type'        => 'integer',
+                                               'context'     => array( 'view', 'edit' ),
+                                       );
+                                       break;
+
+                               case 'comments':
+                                       $schema['properties']['comment_status'] = array(
+                                               'description' => __( 'Whether or not comments are open on the object.' ),
+                                               'type'        => 'string',
+                                               'enum'        => array( 'open', 'closed' ),
+                                               'context'     => array( 'view', 'edit' ),
+                                       );
+                                       $schema['properties']['ping_status'] = array(
+                                               'description' => __( 'Whether or not the object can be pinged.' ),
+                                               'type'        => 'string',
+                                               'enum'        => array( 'open', 'closed' ),
+                                               'context'     => array( 'view', 'edit' ),
+                                       );
+                                       break;
+
+                               case 'page-attributes':
+                                       $schema['properties']['menu_order'] = array(
+                                               'description' => __( 'The order of the object in relation to other object of its type.' ),
+                                               'type'        => 'integer',
+                                               'context'     => array( 'view', 'edit' ),
+                                       );
+                                       break;
+
+                               case 'post-formats':
+                                       $supports_formats = get_theme_support( 'post-formats' );
+                                       $schema['properties']['format'] = array(
+                                               'description' => __( 'The format for the object.' ),
+                                               'type'        => 'string',
+                                               'enum'        => array_merge( array( 'standard' ), $supports_formats ? array_values( $supports_formats[0] ) : array() ),
+                                               'context'     => array( 'view', 'edit' ),
+                                       );
+                                       break;
+
+                               case 'custom-fields':
+                                       $schema['properties']['meta'] = $this->meta->get_field_schema();
+                                       break;
+
+                       }
+               }
+
+               if ( 'post' === $this->post_type ) {
+                       $schema['properties']['sticky'] = array(
+                               'description' => __( 'Whether or not the object should be treated as sticky.' ),
+                               'type'        => 'boolean',
+                               'context'     => array( 'view', 'edit' ),
+                       );
+               }
+
+               $schema['properties']['template'] = array(
+                       'description' => __( 'The theme file to use to display the object.' ),
+                       'type'        => 'string',
+                       'enum'        => array_merge( array_keys( wp_get_theme()->get_page_templates( null, $this->post_type ) ), array( '' ) ),
+                       'context'     => array( 'view', 'edit' ),
+               );
+
+               $taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) );
+               foreach ( $taxonomies as $taxonomy ) {
+                       $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;
+                       $schema['properties'][ $base ] = array(
+                               /* translators: %s: taxonomy name */
+                               'description' => sprintf( __( 'The terms assigned to the object in the %s taxonomy.' ), $taxonomy->name ),
+                               'type'        => 'array',
+                               'items'       => array(
+                                       'type'    => 'integer',
+                               ),
+                               'context'     => array( 'view', 'edit' ),
+                       );
+               }
+
+               return $this->add_additional_fields_schema( $schema );
+       }
+
+       /**
+        * Retrieves the query params for the posts collection.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Collection parameters.
+        */
+       public function get_collection_params() {
+               $params = parent::get_collection_params();
+
+               $params['context']['default'] = 'view';
+
+               $params['after'] = array(
+                       'description'        => __( 'Limit response to posts published after a given ISO8601 compliant date.' ),
+                       'type'               => 'string',
+                       'format'             => 'date-time',
+               );
+
+               if ( post_type_supports( $this->post_type, 'author' ) ) {
+                       $params['author'] = array(
+                               'description'         => __( 'Limit result set to posts assigned to specific authors.' ),
+                               'type'                => 'array',
+                               'items'               => array(
+                                       'type'            => 'integer',
+                               ),
+                               'default'             => array(),
+                       );
+                       $params['author_exclude'] = array(
+                               'description'         => __( 'Ensure result set excludes posts assigned to specific authors.' ),
+                               'type'                => 'array',
+                               'items'               => array(
+                                       'type'            => 'integer',
+                               ),
+                               'default'             => array(),
+                       );
+               }
+
+               $params['before'] = array(
+                       'description'        => __( 'Limit response to posts published before a given ISO8601 compliant date.' ),
+                       'type'               => 'string',
+                       'format'             => 'date-time',
+               );
+
+               $params['exclude'] = array(
+                       'description'        => __( 'Ensure result set excludes specific IDs.' ),
+                       'type'               => 'array',
+                       'items'              => array(
+                               'type'           => 'integer',
+                       ),
+                       'default'            => array(),
+               );
+
+               $params['include'] = array(
+                       'description'        => __( 'Limit result set to specific IDs.' ),
+                       'type'               => 'array',
+                       'items'              => array(
+                               'type'           => 'integer',
+                       ),
+                       'default'            => array(),
+               );
+
+               if ( 'page' === $this->post_type || post_type_supports( $this->post_type, 'page-attributes' ) ) {
+                       $params['menu_order'] = array(
+                               'description'        => __( 'Limit result set to posts with a specific menu_order value.' ),
+                               'type'               => 'integer',
+                       );
+               }
+
+               $params['offset'] = array(
+                       'description'        => __( 'Offset the result set by a specific number of items.' ),
+                       'type'               => 'integer',
+               );
+
+               $params['order'] = array(
+                       'description'        => __( 'Order sort attribute ascending or descending.' ),
+                       'type'               => 'string',
+                       'default'            => 'desc',
+                       'enum'               => array( 'asc', 'desc' ),
+               );
+
+               $params['orderby'] = array(
+                       'description'        => __( 'Sort collection by object attribute.' ),
+                       'type'               => 'string',
+                       'default'            => 'date',
+                       'enum'               => array(
+                               'date',
+                               'relevance',
+                               'id',
+                               'include',
+                               'title',
+                               'slug',
+                       ),
+               );
+
+               if ( 'page' === $this->post_type || post_type_supports( $this->post_type, 'page-attributes' ) ) {
+                       $params['orderby']['enum'][] = 'menu_order';
+               }
+
+               $post_type_obj = get_post_type_object( $this->post_type );
+
+               if ( $post_type_obj->hierarchical || 'attachment' === $this->post_type ) {
+                       $params['parent'] = array(
+                               'description'       => __( 'Limit result set to those of particular parent IDs.' ),
+                               'type'              => 'array',
+                               'items'             => array(
+                                       'type'          => 'integer',
+                               ),
+                               'default'           => array(),
+                       );
+                       $params['parent_exclude'] = array(
+                               'description'       => __( 'Limit result set to all items except those of a particular parent ID.' ),
+                               'type'              => 'array',
+                               'items'             => array(
+                                       'type'          => 'integer',
+                               ),
+                               'default'           => array(),
+                       );
+               }
+
+               $params['slug'] = array(
+                       'description'       => __( 'Limit result set to posts with one or more specific slugs.' ),
+                       'type'              => 'array',
+                       'items'             => array(
+                               'type'          => 'string',
+                       ),
+                       'sanitize_callback' => 'wp_parse_slug_list',
+               );
+
+               $params['status'] = array(
+                       'default'           => 'publish',
+                       'description'       => __( 'Limit result set to posts assigned one or more statuses.' ),
+                       'type'              => 'array',
+                       'items'             => array(
+                               'enum'          => array_merge( array_keys( get_post_stati() ), array( 'any' ) ),
+                               'type'          => 'string',
+                       ),
+                       'sanitize_callback' => array( $this, 'sanitize_post_statuses' ),
+               );
+
+               $taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) );
+
+               foreach ( $taxonomies as $taxonomy ) {
+                       $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;
+
+                       $params[ $base ] = array(
+                               /* translators: %s: taxonomy name */
+                               'description'       => sprintf( __( 'Limit result set to all items that have the specified term assigned in the %s taxonomy.' ), $base ),
+                               'type'              => 'array',
+                               'items'             => array(
+                                       'type'          => 'integer',
+                               ),
+                               'default'           => array(),
+                       );
+
+                       $params[ $base . '_exclude' ] = array(
+                               /* translators: %s: taxonomy name */
+                               'description' => sprintf( __( 'Limit result set to all items except those that have the specified term assigned in the %s taxonomy.' ), $base ),
+                               'type'        => 'array',
+                               'items'       => array(
+                                       'type'    => 'integer',
+                               ),
+                               'default'           => array(),
+                       );
+               }
+
+               if ( 'post' === $this->post_type ) {
+                       $params['sticky'] = array(
+                               'description'       => __( 'Limit result set to items that are sticky.' ),
+                               'type'              => 'boolean',
+                       );
+               }
+
+               /**
+                * Filter collection parameters for the posts controller.
+                *
+                * The dynamic part of the filter `$this->post_type` refers to the post
+                * type slug for the controller.
+                *
+                * This filter registers the collection parameter, but does not map the
+                * collection parameter to an internal WP_Query parameter. Use the
+                * `rest_{$this->post_type}_query` filter to set WP_Query parameters.
+                *
+                * @since 4.7.0
+                *
+                * @param $params JSON Schema-formatted collection parameters.
+                * @param WP_Post_Type $post_type_obj Post type object.
+                */
+               return apply_filters( "rest_{$this->post_type}_collection_params", $params, $post_type_obj );
+       }
+
+       /**
+        * Sanitizes and validates the list of post statuses, including whether the
+        * user can query private statuses.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param  string|array    $statuses  One or more post statuses.
+        * @param  WP_REST_Request $request   Full details about the request.
+        * @param  string          $parameter Additional parameter to pass to validation.
+        * @return array|WP_Error A list of valid statuses, otherwise WP_Error object.
+        */
+       public function sanitize_post_statuses( $statuses, $request, $parameter ) {
+               $statuses = wp_parse_slug_list( $statuses );
+
+               // The default status is different in WP_REST_Attachments_Controller
+               $attributes = $request->get_attributes();
+               $default_status = $attributes['args']['status']['default'];
+
+               foreach ( $statuses as $status ) {
+                       if ( $status === $default_status ) {
+                               continue;
+                       }
+
+                       $post_type_obj = get_post_type_object( $this->post_type );
+
+                       if ( current_user_can( $post_type_obj->cap->edit_posts ) ) {
+                               $result = rest_validate_request_arg( $status, $request, $parameter );
+                               if ( is_wp_error( $result ) ) {
+                                       return $result;
+                               }
+                       } else {
+                               return new WP_Error( 'rest_forbidden_status', __( 'Status is forbidden.' ), array( 'status' => rest_authorization_required_code() ) );
+                       }
+               }
+
+               return $statuses;
+       }
+}
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php
new file mode 100644 (file)
index 0000000..39ef8fe
--- /dev/null
@@ -0,0 +1,509 @@
+<?php
+/**
+ * REST API: WP_REST_Revisions_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to access revisions via the REST API.
+ *
+ * @since 4.7.0
+ *0
+ * @see WP_REST_Controller
+ */
+class WP_REST_Revisions_Controller extends WP_REST_Controller {
+
+       /**
+        * Parent post type.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var string
+        */
+       private $parent_post_type;
+
+       /**
+        * Parent controller.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var WP_REST_Controller
+        */
+       private $parent_controller;
+
+       /**
+        * The base of the parent controller's route.
+        *
+        * @since 4.7.0
+        * @access private
+        * @var string
+        */
+       private $parent_base;
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param string $parent_post_type Post type of the parent.
+        */
+       public function __construct( $parent_post_type ) {
+               $this->parent_post_type = $parent_post_type;
+               $this->parent_controller = new WP_REST_Posts_Controller( $parent_post_type );
+               $this->namespace = 'wp/v2';
+               $this->rest_base = 'revisions';
+               $post_type_object = get_post_type_object( $parent_post_type );
+               $this->parent_base = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name;
+       }
+
+       /**
+        * Registers routes for revisions based on post types supporting revisions.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @see register_rest_route()
+        */
+       public function register_routes() {
+
+               register_rest_route( $this->namespace, '/' . $this->parent_base . '/(?P<parent>[\d]+)/' . $this->rest_base, array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_items' ),
+                               'permission_callback' => array( $this, 'get_items_permissions_check' ),
+                               'args'                => $this->get_collection_params(),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+
+               register_rest_route( $this->namespace, '/' . $this->parent_base . '/(?P<parent>[\d]+)/' . $this->rest_base . '/(?P<id>[\d]+)', array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_item' ),
+                               'permission_callback' => array( $this, 'get_item_permissions_check' ),
+                               'args'                => array(
+                                       'context' => $this->get_context_param( array( 'default' => 'view' ) ),
+                               ),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::DELETABLE,
+                               'callback'            => array( $this, 'delete_item' ),
+                               'permission_callback' => array( $this, 'delete_item_permissions_check' ),
+                               'args'                => array(
+                                       'force' => array(
+                                               'type'        => 'boolean',
+                                               'default'     => false,
+                                               'description' => __( 'Required to be true, as revisions do not support trashing.' ),
+                                       ),
+                               ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ));
+
+       }
+
+       /**
+        * Checks if a given request has access to get revisions.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return true|WP_Error True if the request has read access, WP_Error object otherwise.
+        */
+       public function get_items_permissions_check( $request ) {
+
+               $parent = get_post( $request['parent'] );
+               if ( ! $parent ) {
+                       return true;
+               }
+               $parent_post_type_obj = get_post_type_object( $parent->post_type );
+               if ( ! current_user_can( $parent_post_type_obj->cap->edit_post, $parent->ID ) ) {
+                       return new WP_Error( 'rest_cannot_read', __( 'Sorry, you are not allowed to view revisions of this post.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Gets a collection of revisions.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function get_items( $request ) {
+               $parent = get_post( $request['parent'] );
+               if ( ! $request['parent'] || ! $parent || $this->parent_post_type !== $parent->post_type ) {
+                       return new WP_Error( 'rest_post_invalid_parent', __( 'Invalid post parent ID.' ), array( 'status' => 404 ) );
+               }
+
+               $revisions = wp_get_post_revisions( $request['parent'] );
+
+               $response = array();
+               foreach ( $revisions as $revision ) {
+                       $data = $this->prepare_item_for_response( $revision, $request );
+                       $response[] = $this->prepare_response_for_collection( $data );
+               }
+               return rest_ensure_response( $response );
+       }
+
+       /**
+        * Checks if a given request has access to get a specific revision.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return bool|WP_Error True if the request has read access for the item, WP_Error object otherwise.
+        */
+       public function get_item_permissions_check( $request ) {
+               return $this->get_items_permissions_check( $request );
+       }
+
+       /**
+        * Retrieves one revision from the collection.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full data about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function get_item( $request ) {
+               $parent = get_post( $request['parent'] );
+               if ( ! $request['parent'] || ! $parent || $this->parent_post_type !== $parent->post_type ) {
+                       return new WP_Error( 'rest_post_invalid_parent', __( 'Invalid post parent ID.' ), array( 'status' => 404 ) );
+               }
+
+               $revision = get_post( $request['id'] );
+               if ( ! $revision || 'revision' !== $revision->post_type ) {
+                       return new WP_Error( 'rest_post_invalid_id', __( 'Invalid revision ID.' ), array( 'status' => 404 ) );
+               }
+
+               $response = $this->prepare_item_for_response( $revision, $request );
+               return rest_ensure_response( $response );
+       }
+
+       /**
+        * Checks if a given request has access to delete a revision.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param  WP_REST_Request $request Full details about the request.
+        * @return bool|WP_Error True if the request has access to delete the item, WP_Error object otherwise.
+        */
+       public function delete_item_permissions_check( $request ) {
+
+               $response = $this->get_items_permissions_check( $request );
+               if ( ! $response || is_wp_error( $response ) ) {
+                       return $response;
+               }
+
+               $post = get_post( $request['id'] );
+               if ( ! $post ) {
+                       return new WP_Error( 'rest_post_invalid_id', __( 'Invalid revision ID.' ), array( 'status' => 404 ) );
+               }
+               $post_type = get_post_type_object( 'revision' );
+               return current_user_can( $post_type->cap->delete_post, $post->ID );
+       }
+
+       /**
+        * Deletes a single revision.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True on success, or WP_Error object on failure.
+        */
+       public function delete_item( $request ) {
+               $force = isset( $request['force'] ) ? (bool) $request['force'] : false;
+
+               // We don't support trashing for revisions.
+               if ( ! $force ) {
+                       return new WP_Error( 'rest_trash_not_supported', __( 'Revisions do not support trashing. Set force=true to delete.' ), array( 'status' => 501 ) );
+               }
+
+               $revision = get_post( $request['id'] );
+               $previous = $this->prepare_item_for_response( $revision, $request );
+
+               $result = wp_delete_post( $request['id'], true );
+
+               /**
+                * Fires after a revision is deleted via the REST API.
+                *
+                * @since 4.7.0
+                *
+                * @param (mixed) $result The revision object (if it was deleted or moved to the trash successfully)
+                *                        or false (failure). If the revision was moved to to the trash, $result represents
+                *                        its new state; if it was deleted, $result represents its state before deletion.
+                * @param WP_REST_Request $request The request sent to the API.
+                */
+               do_action( 'rest_delete_revision', $result, $request );
+
+               if ( ! $result ) {
+                       return new WP_Error( 'rest_cannot_delete', __( 'The post cannot be deleted.' ), array( 'status' => 500 ) );
+               }
+
+               $response = new WP_REST_Response();
+               $response->set_data( array( 'deleted' => true, 'previous' => $previous->get_data() ) );
+               return $response;
+       }
+
+       /**
+        * Prepares the revision for the REST response.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_Post         $post    Post revision object.
+        * @param WP_REST_Request $request Request object.
+        * @return WP_REST_Response Response object.
+        */
+       public function prepare_item_for_response( $post, $request ) {
+
+               $schema = $this->get_item_schema();
+
+               $data = array();
+
+               if ( ! empty( $schema['properties']['author'] ) ) {
+                       $data['author'] = $post->post_author;
+               }
+
+               if ( ! empty( $schema['properties']['date'] ) ) {
+                       $data['date'] = $this->prepare_date_response( $post->post_date_gmt, $post->post_date );
+               }
+
+               if ( ! empty( $schema['properties']['date_gmt'] ) ) {
+                       $data['date_gmt'] = $this->prepare_date_response( $post->post_date_gmt );
+               }
+
+               if ( ! empty( $schema['properties']['id'] ) ) {
+                       $data['id'] = $post->ID;
+               }
+
+               if ( ! empty( $schema['properties']['modified'] ) ) {
+                       $data['modified'] = $this->prepare_date_response( $post->post_modified_gmt, $post->post_modified );
+               }
+
+               if ( ! empty( $schema['properties']['modified_gmt'] ) ) {
+                       $data['modified_gmt'] = $this->prepare_date_response( $post->post_modified_gmt );
+               }
+
+               if ( ! empty( $schema['properties']['parent'] ) ) {
+                       $data['parent'] = (int) $post->post_parent;
+               }
+
+               if ( ! empty( $schema['properties']['slug'] ) ) {
+                       $data['slug'] = $post->post_name;
+               }
+
+               if ( ! empty( $schema['properties']['guid'] ) ) {
+                       $data['guid'] = array(
+                               /** This filter is documented in wp-includes/post-template.php */
+                               'rendered' => apply_filters( 'get_the_guid', $post->guid ),
+                               'raw'      => $post->guid,
+                       );
+               }
+
+               if ( ! empty( $schema['properties']['title'] ) ) {
+                       $data['title'] = array(
+                               'raw'      => $post->post_title,
+                               'rendered' => get_the_title( $post->ID ),
+                       );
+               }
+
+               if ( ! empty( $schema['properties']['content'] ) ) {
+
+                       $data['content'] = array(
+                               'raw'      => $post->post_content,
+                               /** This filter is documented in wp-includes/post-template.php */
+                               'rendered' => apply_filters( 'the_content', $post->post_content ),
+                       );
+               }
+
+               if ( ! empty( $schema['properties']['excerpt'] ) ) {
+                       $data['excerpt'] = array(
+                               'raw'      => $post->post_excerpt,
+                               'rendered' => $this->prepare_excerpt_response( $post->post_excerpt, $post ),
+                       );
+               }
+
+               $context = ! empty( $request['context'] ) ? $request['context'] : 'view';
+               $data = $this->add_additional_fields_to_object( $data, $request );
+               $data = $this->filter_response_by_context( $data, $context );
+               $response = rest_ensure_response( $data );
+
+               if ( ! empty( $data['parent'] ) ) {
+                       $response->add_link( 'parent', rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->parent_base, $data['parent'] ) ) );
+               }
+
+               /**
+                * Filters a revision returned from the API.
+                *
+                * Allows modification of the revision right before it is returned.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_REST_Response $response The response object.
+                * @param WP_Post          $post     The original revision object.
+                * @param WP_REST_Request  $request  Request used to generate the response.
+                */
+               return apply_filters( 'rest_prepare_revision', $response, $post, $request );
+       }
+
+       /**
+        * Checks the post_date_gmt or modified_gmt and prepare any post or
+        * modified date for single post output.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param string      $date_gmt GMT publication time.
+        * @param string|null $date     Optional. Local publication time. Default null.
+        * @return string|null ISO8601/RFC3339 formatted datetime, otherwise null.
+        */
+       protected function prepare_date_response( $date_gmt, $date = null ) {
+               if ( '0000-00-00 00:00:00' === $date_gmt ) {
+                       return null;
+               }
+
+               if ( isset( $date ) ) {
+                       return mysql_to_rfc3339( $date );
+               }
+
+               return mysql_to_rfc3339( $date_gmt );
+       }
+
+       /**
+        * Retrieves the revision's schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Item schema data.
+        */
+       public function get_item_schema() {
+               $schema = array(
+                       '$schema'    => 'http://json-schema.org/schema#',
+                       'title'      => "{$this->parent_post_type}-revision",
+                       'type'       => 'object',
+                       // Base properties for every Revision.
+                       'properties' => array(
+                               'author'          => array(
+                                       'description' => __( 'The ID for the author of the object.' ),
+                                       'type'        => 'integer',
+                                       'context'     => array( 'view', 'edit', 'embed' ),
+                               ),
+                               'date'            => array(
+                                       'description' => __( "The date the object was published, in the site's timezone." ),
+                                       'type'        => 'string',
+                                       'format'      => 'date-time',
+                                       'context'     => array( 'view', 'edit', 'embed' ),
+                               ),
+                               'date_gmt'        => array(
+                                       'description' => __( 'The date the object was published, as GMT.' ),
+                                       'type'        => 'string',
+                                       'format'      => 'date-time',
+                                       'context'     => array( 'view', 'edit' ),
+                               ),
+                               'guid'            => array(
+                                       'description' => __( 'GUID for the object, as it exists in the database.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'view', 'edit' ),
+                               ),
+                               'id'              => array(
+                                       'description' => __( 'Unique identifier for the object.' ),
+                                       'type'        => 'integer',
+                                       'context'     => array( 'view', 'edit', 'embed' ),
+                               ),
+                               'modified'        => array(
+                                       'description' => __( "The date the object was last modified, in the site's timezone." ),
+                                       'type'        => 'string',
+                                       'format'      => 'date-time',
+                                       'context'     => array( 'view', 'edit' ),
+                               ),
+                               'modified_gmt'    => array(
+                                       'description' => __( 'The date the object was last modified, as GMT.' ),
+                                       'type'        => 'string',
+                                       'format'      => 'date-time',
+                                       'context'     => array( 'view', 'edit' ),
+                               ),
+                               'parent'          => array(
+                                       'description' => __( 'The ID for the parent of the object.' ),
+                                       'type'        => 'integer',
+                                       'context'     => array( 'view', 'edit', 'embed' ),
+                                       ),
+                               'slug'            => array(
+                                       'description' => __( 'An alphanumeric identifier for the object unique to its type.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'view', 'edit', 'embed' ),
+                               ),
+                       ),
+               );
+
+               $parent_schema = $this->parent_controller->get_item_schema();
+
+               if ( ! empty( $parent_schema['properties']['title'] ) ) {
+                       $schema['properties']['title'] = $parent_schema['properties']['title'];
+               }
+
+               if ( ! empty( $parent_schema['properties']['content'] ) ) {
+                       $schema['properties']['content'] = $parent_schema['properties']['content'];
+               }
+
+               if ( ! empty( $parent_schema['properties']['excerpt'] ) ) {
+                       $schema['properties']['excerpt'] = $parent_schema['properties']['excerpt'];
+               }
+
+               if ( ! empty( $parent_schema['properties']['guid'] ) ) {
+                       $schema['properties']['guid'] = $parent_schema['properties']['guid'];
+               }
+
+               return $this->add_additional_fields_schema( $schema );
+       }
+
+       /**
+        * Retrieves the query params for collections.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Collection parameters.
+        */
+       public function get_collection_params() {
+               return array(
+                       'context' => $this->get_context_param( array( 'default' => 'view' ) ),
+               );
+       }
+
+       /**
+        * Checks the post excerpt and prepare it for single post output.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param string  $excerpt The post excerpt.
+        * @param WP_Post $post    Post revision object.
+        * @return string Prepared excerpt or empty string.
+        */
+       protected function prepare_excerpt_response( $excerpt, $post ) {
+
+               /** This filter is documented in wp-includes/post-template.php */
+               $excerpt = apply_filters( 'the_excerpt', $excerpt, $post );
+
+               if ( empty( $excerpt ) ) {
+                       return '';
+               }
+
+               return $excerpt;
+       }
+}
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php
new file mode 100644 (file)
index 0000000..3bf7431
--- /dev/null
@@ -0,0 +1,319 @@
+<?php
+/**
+ * REST API: WP_REST_Settings_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to manage a site's settings via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Controller
+ */
+class WP_REST_Settings_Controller extends WP_REST_Controller {
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function __construct() {
+               $this->namespace = 'wp/v2';
+               $this->rest_base = 'settings';
+       }
+
+       /**
+        * Registers the routes for the objects of the controller.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @see register_rest_route()
+        */
+       public function register_routes() {
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base, array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_item' ),
+                               'args'                => array(),
+                               'permission_callback' => array( $this, 'get_item_permissions_check' ),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::EDITABLE,
+                               'callback'            => array( $this, 'update_item' ),
+                               'args'                => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
+                               'permission_callback' => array( $this, 'get_item_permissions_check' ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+
+       }
+
+       /**
+        * Checks if a given request has access to read and manage settings.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return bool True if the request has read access for the item, otherwise false.
+        */
+       public function get_item_permissions_check( $request ) {
+               return current_user_can( 'manage_options' );
+       }
+
+       /**
+        * Retrieves the settings.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return array|WP_Error Array on success, or WP_Error object on failure.
+        */
+       public function get_item( $request ) {
+               $options  = $this->get_registered_options();
+               $response = array();
+
+               foreach ( $options as $name => $args ) {
+                       /**
+                        * Filters the value of a setting recognized by the REST API.
+                        *
+                        * Allow hijacking the setting value and overriding the built-in behavior by returning a
+                        * non-null value.  The returned value will be presented as the setting value instead.
+                        *
+                        * @since 4.7.0
+                        *
+                        * @param mixed  $result Value to use for the requested setting. Can be a scalar
+                        *                       matching the registered schema for the setting, or null to
+                        *                       follow the default get_option() behavior.
+                        * @param string $name   Setting name (as shown in REST API responses).
+                        * @param array  $args   Arguments passed to register_setting() for this setting.
+                        */
+                       $response[ $name ] = apply_filters( 'rest_pre_get_setting', null, $name, $args );
+
+                       if ( is_null( $response[ $name ] ) ) {
+                               // Default to a null value as "null" in the response means "not set".
+                               $response[ $name ] = get_option( $args['option_name'], $args['schema']['default'] );
+                       }
+
+                       /*
+                        * Because get_option() is lossy, we have to
+                        * cast values to the type they are registered with.
+                        */
+                       $response[ $name ] = $this->prepare_value( $response[ $name ], $args['schema'] );
+               }
+
+               return $response;
+       }
+
+       /**
+        * Prepares a value for output based off a schema array.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param mixed $value  Value to prepare.
+        * @param array $schema Schema to match.
+        * @return mixed The prepared value.
+        */
+       protected function prepare_value( $value, $schema ) {
+               // If the value is not a scalar, it's not possible to cast it to anything.
+               if ( ! is_scalar( $value ) ) {
+                       return null;
+               }
+
+               switch ( $schema['type'] ) {
+                       case 'string':
+                               return (string) $value;
+                       case 'integer':
+                               return (int) $value;
+                       case 'number':
+                               return (float) $value;
+                       case 'boolean':
+                               return (bool) $value;
+                       default:
+                               return null;
+               }
+       }
+
+       /**
+        * Updates settings for the settings object.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return array|WP_Error Array on success, or error object on failure.
+        */
+       public function update_item( $request ) {
+               $options = $this->get_registered_options();
+               $params  = $request->get_params();
+
+               foreach ( $options as $name => $args ) {
+                       if ( ! array_key_exists( $name, $params ) ) {
+                               continue;
+                       }
+
+                       /**
+                        * Filters whether to preempt a setting value update.
+                        *
+                        * Allows hijacking the setting update logic and overriding the built-in behavior by
+                        * returning true.
+                        *
+                        * @since 4.7.0
+                        *
+                        * @param bool   $result Whether to override the default behavior for updating the
+                        *                       value of a setting.
+                        * @param string $name   Setting name (as shown in REST API responses).
+                        * @param mixed  $value  Updated setting value.
+                        * @param array  $args   Arguments passed to register_setting() for this setting.
+                        */
+                       $updated = apply_filters( 'rest_pre_update_setting', false, $name, $request[ $name ], $args );
+
+                       if ( $updated ) {
+                               continue;
+                       }
+
+                       /*
+                        * A null value for an option would have the same effect as
+                        * deleting the option from the database, and relying on the
+                        * default value.
+                        */
+                       if ( is_null( $request[ $name ] ) ) {
+                               /*
+                                * A null value is returned in the response for any option
+                                * that has a non-scalar value.
+                                *
+                                * To protect clients from accidentally including the null
+                                * values from a response object in a request, we do not allow
+                                * options with non-scalar values to be updated to null.
+                                * Without this added protection a client could mistakenly
+                                * delete all options that have non-scalar values from the
+                                * database.
+                                */
+                               if ( ! is_scalar( get_option( $args['option_name'], false ) ) ) {
+                                       return new WP_Error(
+                                               'rest_invalid_stored_value', sprintf( __( 'The %s property has an invalid stored value, and cannot be updated to null.' ), $name ), array( 'status' => 500 )
+                                       );
+                               }
+
+                               delete_option( $args['option_name'] );
+                       } else {
+                               update_option( $args['option_name'], $request[ $name ] );
+                       }
+               }
+
+               return $this->get_item( $request );
+       }
+
+       /**
+        * Retrieves all of the registered options for the Settings API.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return array Array of registered options.
+        */
+       protected function get_registered_options() {
+               $rest_options = array();
+
+               foreach ( get_registered_settings() as $name => $args ) {
+                       if ( empty( $args['show_in_rest'] ) ) {
+                               continue;
+                       }
+
+                       $rest_args = array();
+
+                       if ( is_array( $args['show_in_rest'] ) ) {
+                               $rest_args = $args['show_in_rest'];
+                       }
+
+                       $defaults = array(
+                               'name'   => ! empty( $rest_args['name'] ) ? $rest_args['name'] : $name,
+                               'schema' => array(),
+                       );
+
+                       $rest_args = array_merge( $defaults, $rest_args );
+
+                       $default_schema = array(
+                               'type'        => empty( $args['type'] ) ? null : $args['type'],
+                               'description' => empty( $args['description'] ) ? '' : $args['description'],
+                               'default'     => isset( $args['default'] ) ? $args['default'] : null,
+                       );
+
+                       $rest_args['schema'] = array_merge( $default_schema, $rest_args['schema'] );
+                       $rest_args['option_name'] = $name;
+
+                       // Skip over settings that don't have a defined type in the schema.
+                       if ( empty( $rest_args['schema']['type'] ) ) {
+                               continue;
+                       }
+
+                       /*
+                        * Whitelist the supported types for settings, as we don't want invalid types
+                        * to be updated with arbitrary values that we can't do decent sanitizing for.
+                        */
+                       if ( ! in_array( $rest_args['schema']['type'], array( 'number', 'integer', 'string', 'boolean' ), true ) ) {
+                               continue;
+                       }
+
+                       $rest_options[ $rest_args['name'] ] = $rest_args;
+               }
+
+               return $rest_options;
+       }
+
+       /**
+        * Retrieves the site setting schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Item schema data.
+        */
+       public function get_item_schema() {
+               $options = $this->get_registered_options();
+
+               $schema = array(
+                       '$schema'    => 'http://json-schema.org/schema#',
+                       'title'      => 'settings',
+                       'type'       => 'object',
+                       'properties' => array(),
+               );
+
+               foreach ( $options as $option_name => $option ) {
+                       $schema['properties'][ $option_name ] = $option['schema'];
+                       $schema['properties'][ $option_name ]['arg_options'] = array(
+                               'sanitize_callback' => array( $this, 'sanitize_callback' ),
+                       );
+               }
+
+               return $this->add_additional_fields_schema( $schema );
+       }
+
+       /**
+        * Custom sanitize callback used for all options to allow the use of 'null'.
+        *
+        * By default, the schema of settings will throw an error if a value is set to
+        * `null` as it's not a valid value for something like "type => string". We
+        * provide a wrapper sanitizer to whitelist the use of `null`.
+        *
+        * @param  mixed           $value   The value for the setting.
+        * @param  WP_REST_Request $request The request object.
+        * @param  string          $param   The parameter name.
+        * @return mixed|WP_Error
+        */
+       public function sanitize_callback( $value, $request, $param ) {
+               if ( is_null( $value ) ) {
+                       return $value;
+               }
+               return rest_parse_request_arg( $value, $request, $param );
+       }
+}
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
new file mode 100644 (file)
index 0000000..0fe91ee
--- /dev/null
@@ -0,0 +1,317 @@
+<?php
+/**
+ * REST API: WP_REST_Taxonomies_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to manage taxonomies via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Controller
+ */
+class WP_REST_Taxonomies_Controller extends WP_REST_Controller {
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function __construct() {
+               $this->namespace = 'wp/v2';
+               $this->rest_base = 'taxonomies';
+       }
+
+       /**
+        * Registers the routes for the objects of the controller.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @see register_rest_route()
+        */
+       public function register_routes() {
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base, array(
+                       array(
+                               'methods'         => WP_REST_Server::READABLE,
+                               'callback'        => array( $this, 'get_items' ),
+                               'permission_callback' => array( $this, 'get_items_permissions_check' ),
+                               'args'            => $this->get_collection_params(),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<taxonomy>[\w-]+)', array(
+                       array(
+                               'methods'         => WP_REST_Server::READABLE,
+                               'callback'        => array( $this, 'get_item' ),
+                               'permission_callback' => array( $this, 'get_item_permissions_check' ),
+                               'args'            => array(
+                                       'context'     => $this->get_context_param( array( 'default' => 'view' ) ),
+                               ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+       }
+
+       /**
+        * Checks whether a given request has permission to read taxonomies.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has read access, WP_Error object otherwise.
+        */
+       public function get_items_permissions_check( $request ) {
+               if ( 'edit' === $request['context'] ) {
+                       if ( ! empty( $request['type'] ) ) {
+                               $taxonomies = get_object_taxonomies( $request['type'], 'objects' );
+                       } else {
+                               $taxonomies = get_taxonomies( '', 'objects' );
+                       }
+                       foreach ( $taxonomies as $taxonomy ) {
+                               if ( ! empty( $taxonomy->show_in_rest ) && current_user_can( $taxonomy->cap->manage_terms ) ) {
+                                       return true;
+                               }
+                       }
+                       return new WP_Error( 'rest_cannot_view', __( 'Sorry, you are not allowed to manage terms in this taxonomy.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+               return true;
+       }
+
+       /**
+        * Retrieves all public taxonomies.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response Response object on success, or WP_Error object on failure.
+        */
+       public function get_items( $request ) {
+
+               // Retrieve the list of registered collection query parameters.
+               $registered = $this->get_collection_params();
+
+               if ( isset( $registered['type'] ) && ! empty( $request['type'] ) ) {
+                       $taxonomies = get_object_taxonomies( $request['type'], 'objects' );
+               } else {
+                       $taxonomies = get_taxonomies( '', 'objects' );
+               }
+               $data = array();
+               foreach ( $taxonomies as $tax_type => $value ) {
+                       if ( empty( $value->show_in_rest ) || ( 'edit' === $request['context'] && ! current_user_can( $value->cap->manage_terms ) ) ) {
+                               continue;
+                       }
+                       $tax = $this->prepare_item_for_response( $value, $request );
+                       $tax = $this->prepare_response_for_collection( $tax );
+                       $data[ $tax_type ] = $tax;
+               }
+
+               if ( empty( $data ) ) {
+                       // Response should still be returned as a JSON object when it is empty.
+                       $data = (object) $data;
+               }
+
+               return rest_ensure_response( $data );
+       }
+
+       /**
+        * Checks if a given request has access to a taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param  WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has read access for the item, otherwise false or WP_Error object.
+        */
+       public function get_item_permissions_check( $request ) {
+
+               $tax_obj = get_taxonomy( $request['taxonomy'] );
+
+               if ( $tax_obj ) {
+                       if ( empty( $tax_obj->show_in_rest ) ) {
+                               return false;
+                       }
+                       if ( 'edit' === $request['context'] && ! current_user_can( $tax_obj->cap->manage_terms ) ) {
+                               return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to manage terms in this taxonomy.' ), array( 'status' => rest_authorization_required_code() ) );
+                       }
+               }
+
+               return true;
+       }
+
+       /**
+        * Retrieves a specific taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function get_item( $request ) {
+               $tax_obj = get_taxonomy( $request['taxonomy'] );
+               if ( empty( $tax_obj ) ) {
+                       return new WP_Error( 'rest_taxonomy_invalid', __( 'Invalid taxonomy.' ), array( 'status' => 404 ) );
+               }
+               $data = $this->prepare_item_for_response( $tax_obj, $request );
+               return rest_ensure_response( $data );
+       }
+
+       /**
+        * Prepares a taxonomy object for serialization.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param stdClass        $taxonomy Taxonomy data.
+        * @param WP_REST_Request $request  Full details about the request.
+        * @return WP_REST_Response Response object.
+        */
+       public function prepare_item_for_response( $taxonomy, $request ) {
+               $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;
+               $data = array(
+                       'name'         => $taxonomy->label,
+                       'slug'         => $taxonomy->name,
+                       'capabilities' => $taxonomy->cap,
+                       'description'  => $taxonomy->description,
+                       'labels'       => $taxonomy->labels,
+                       'types'        => $taxonomy->object_type,
+                       'show_cloud'   => $taxonomy->show_tagcloud,
+                       'hierarchical' => $taxonomy->hierarchical,
+                       'rest_base'    => $base,
+               );
+
+               $context = ! empty( $request['context'] ) ? $request['context'] : 'view';
+               $data = $this->add_additional_fields_to_object( $data, $request );
+               $data = $this->filter_response_by_context( $data, $context );
+
+               // Wrap the data in a response object.
+               $response = rest_ensure_response( $data );
+
+               $response->add_links( array(
+                       'collection'                => array(
+                               'href'                  => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ),
+                       ),
+                       'https://api.w.org/items'   => array(
+                               'href'                  => rest_url( sprintf( 'wp/v2/%s', $base ) ),
+                       ),
+               ) );
+
+               /**
+                * Filters a taxonomy returned from the REST API.
+                *
+                * Allows modification of the taxonomy data right before it is returned.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_REST_Response $response The response object.
+                * @param object           $item     The original taxonomy object.
+                * @param WP_REST_Request  $request  Request used to generate the response.
+                */
+               return apply_filters( 'rest_prepare_taxonomy', $response, $taxonomy, $request );
+       }
+
+       /**
+        * Retrieves the taxonomy's schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Item schema data.
+        */
+       public function get_item_schema() {
+               $schema = array(
+                       '$schema'              => 'http://json-schema.org/schema#',
+                       'title'                => 'taxonomy',
+                       'type'                 => 'object',
+                       'properties'           => array(
+                               'capabilities'     => array(
+                                       'description'  => __( 'All capabilities used by the taxonomy.' ),
+                                       'type'         => 'object',
+                                       'context'      => array( 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'description'      => array(
+                                       'description'  => __( 'A human-readable description of the taxonomy.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'hierarchical'     => array(
+                                       'description'  => __( 'Whether or not the taxonomy should have children.' ),
+                                       'type'         => 'boolean',
+                                       'context'      => array( 'view', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'labels'           => array(
+                                       'description'  => __( 'Human-readable labels for the taxonomy for various contexts.' ),
+                                       'type'         => 'object',
+                                       'context'      => array( 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'name'             => array(
+                                       'description'  => __( 'The title for the taxonomy.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                                       'readonly'     => true,
+                               ),
+                               'slug'             => array(
+                                       'description'  => __( 'An alphanumeric identifier for the taxonomy.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                                       'readonly'     => true,
+                               ),
+                               'show_cloud'       => array(
+                                       'description'  => __( 'Whether or not the term cloud should be displayed.' ),
+                                       'type'         => 'boolean',
+                                       'context'      => array( 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'types'            => array(
+                                       'description'  => __( 'Types associated with the taxonomy.' ),
+                                       'type'         => 'array',
+                                       'items'        => array(
+                                               'type' => 'string',
+                                       ),
+                                       'context'      => array( 'view', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'rest_base'            => array(
+                                       'description'  => __( 'REST base route for the taxonomy.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit', 'embed' ),
+                                       'readonly'     => true,
+                               ),
+                       ),
+               );
+               return $this->add_additional_fields_schema( $schema );
+       }
+
+       /**
+        * Retrieves the query params for collections.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Collection parameters.
+        */
+       public function get_collection_params() {
+               $new_params = array();
+               $new_params['context'] = $this->get_context_param( array( 'default' => 'view' ) );
+               $new_params['type'] = array(
+                       'description'  => __( 'Limit results to taxonomies associated with a specific post type.' ),
+                       'type'         => 'string',
+               );
+               return $new_params;
+       }
+
+}
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
new file mode 100644 (file)
index 0000000..6ca86ca
--- /dev/null
@@ -0,0 +1,996 @@
+<?php
+/**
+ * REST API: WP_REST_Terms_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to managed terms associated with a taxonomy via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Controller
+ */
+class WP_REST_Terms_Controller extends WP_REST_Controller {
+
+       /**
+        * Taxonomy key.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var string
+        */
+       protected $taxonomy;
+
+       /**
+        * Instance of a term meta fields object.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var WP_REST_Term_Meta_Fields
+        */
+       protected $meta;
+
+       /**
+        * Column to have the terms be sorted by.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var string
+        */
+       protected $sort_column;
+
+       /**
+        * Number of terms that were found.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var int
+        */
+       protected $total_terms;
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param string $taxonomy Taxonomy key.
+        */
+       public function __construct( $taxonomy ) {
+               $this->taxonomy = $taxonomy;
+               $this->namespace = 'wp/v2';
+               $tax_obj = get_taxonomy( $taxonomy );
+               $this->rest_base = ! empty( $tax_obj->rest_base ) ? $tax_obj->rest_base : $tax_obj->name;
+
+               $this->meta = new WP_REST_Term_Meta_Fields( $taxonomy );
+       }
+
+       /**
+        * Registers the routes for the objects of the controller.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @see register_rest_route()
+        */
+       public function register_routes() {
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base, array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_items' ),
+                               'permission_callback' => array( $this, 'get_items_permissions_check' ),
+                               'args'                => $this->get_collection_params(),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::CREATABLE,
+                               'callback'            => array( $this, 'create_item' ),
+                               'permission_callback' => array( $this, 'create_item_permissions_check' ),
+                               'args'                => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\d]+)', array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_item' ),
+                               'permission_callback' => array( $this, 'get_item_permissions_check' ),
+                               'args'                => array(
+                                       'context' => $this->get_context_param( array( 'default' => 'view' ) ),
+                               ),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::EDITABLE,
+                               'callback'            => array( $this, 'update_item' ),
+                               'permission_callback' => array( $this, 'update_item_permissions_check' ),
+                               'args'                 => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::DELETABLE,
+                               'callback'            => array( $this, 'delete_item' ),
+                               'permission_callback' => array( $this, 'delete_item_permissions_check' ),
+                               'args'                => array(
+                                       'force' => array(
+                                               'type'        => 'boolean',
+                                               'default'     => false,
+                                               'description' => __( 'Required to be true, as terms do not support trashing.' ),
+                                       ),
+                               ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+       }
+
+       /**
+        * Checks if a request has access to read terms in the specified taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return bool|WP_Error True if the request has read access, otherwise false or WP_Error object.
+        */
+       public function get_items_permissions_check( $request ) {
+               $tax_obj = get_taxonomy( $this->taxonomy );
+               if ( ! $tax_obj || ! $this->check_is_taxonomy_allowed( $this->taxonomy ) ) {
+                       return false;
+               }
+               if ( 'edit' === $request['context'] && ! current_user_can( $tax_obj->cap->edit_terms ) ) {
+                       return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+               return true;
+       }
+
+       /**
+        * Retrieves terms associated with a taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function get_items( $request ) {
+
+               // Retrieve the list of registered collection query parameters.
+               $registered = $this->get_collection_params();
+
+               /*
+                * This array defines mappings between public API query parameters whose
+                * values are accepted as-passed, and their internal WP_Query parameter
+                * name equivalents (some are the same). Only values which are also
+                * present in $registered will be set.
+                */
+               $parameter_mappings = array(
+                       'exclude'    => 'exclude',
+                       'include'    => 'include',
+                       'order'      => 'order',
+                       'orderby'    => 'orderby',
+                       'post'       => 'post',
+                       'hide_empty' => 'hide_empty',
+                       'per_page'   => 'number',
+                       'search'     => 'search',
+                       'slug'       => 'slug',
+               );
+
+               $prepared_args = array();
+
+               /*
+                * For each known parameter which is both registered and present in the request,
+                * set the parameter's value on the query $prepared_args.
+                */
+               foreach ( $parameter_mappings as $api_param => $wp_param ) {
+                       if ( isset( $registered[ $api_param ], $request[ $api_param ] ) ) {
+                               $prepared_args[ $wp_param ] = $request[ $api_param ];
+                       }
+               }
+
+               if ( isset( $registered['offset'] ) && ! empty( $request['offset'] ) ) {
+                       $prepared_args['offset'] = $request['offset'];
+               } else {
+                       $prepared_args['offset'] = ( $request['page'] - 1 ) * $prepared_args['number'];
+               }
+
+               $taxonomy_obj = get_taxonomy( $this->taxonomy );
+
+               if ( $taxonomy_obj->hierarchical && isset( $registered['parent'], $request['parent'] ) ) {
+                       if ( 0 === $request['parent'] ) {
+                               // Only query top-level terms.
+                               $prepared_args['parent'] = 0;
+                       } else {
+                               if ( $request['parent'] ) {
+                                       $prepared_args['parent'] = $request['parent'];
+                               }
+                       }
+               }
+
+               /**
+                * Filters the query arguments before passing them to get_terms().
+                *
+                * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
+                *
+                * Enables adding extra arguments or setting defaults for a terms
+                * collection request.
+                *
+                * @since 4.7.0
+                *
+                * @link https://developer.wordpress.org/reference/functions/get_terms/
+                *
+                * @param array           $prepared_args Array of arguments to be
+                *                                       passed to get_terms().
+                * @param WP_REST_Request $request       The current request.
+                */
+               $prepared_args = apply_filters( "rest_{$this->taxonomy}_query", $prepared_args, $request );
+
+               if ( ! empty( $prepared_args['post'] )  ) {
+                       $query_result = wp_get_object_terms( $prepared_args['post'], $this->taxonomy, $prepared_args );
+
+                       // Used when calling wp_count_terms() below.
+                       $prepared_args['object_ids'] = $prepared_args['post'];
+               } else {
+                       $query_result = get_terms( $this->taxonomy, $prepared_args );
+               }
+
+               $count_args = $prepared_args;
+
+               unset( $count_args['number'], $count_args['offset'] );
+
+               $total_terms = wp_count_terms( $this->taxonomy, $count_args );
+
+               // wp_count_terms can return a falsy value when the term has no children.
+               if ( ! $total_terms ) {
+                       $total_terms = 0;
+               }
+
+               $response = array();
+
+               foreach ( $query_result as $term ) {
+                       $data = $this->prepare_item_for_response( $term, $request );
+                       $response[] = $this->prepare_response_for_collection( $data );
+               }
+
+               $response = rest_ensure_response( $response );
+
+               // Store pagination values for headers.
+               $per_page = (int) $prepared_args['number'];
+               $page     = ceil( ( ( (int) $prepared_args['offset'] ) / $per_page ) + 1 );
+
+               $response->header( 'X-WP-Total', (int) $total_terms );
+
+               $max_pages = ceil( $total_terms / $per_page );
+
+               $response->header( 'X-WP-TotalPages', (int) $max_pages );
+
+               $base = add_query_arg( $request->get_query_params(), rest_url( $this->namespace . '/' . $this->rest_base ) );
+               if ( $page > 1 ) {
+                       $prev_page = $page - 1;
+
+                       if ( $prev_page > $max_pages ) {
+                               $prev_page = $max_pages;
+                       }
+
+                       $prev_link = add_query_arg( 'page', $prev_page, $base );
+                       $response->link_header( 'prev', $prev_link );
+               }
+               if ( $max_pages > $page ) {
+                       $next_page = $page + 1;
+                       $next_link = add_query_arg( 'page', $next_page, $base );
+
+                       $response->link_header( 'next', $next_link );
+               }
+
+               return $response;
+       }
+
+       /**
+        * Checks if a request has access to read or edit the specified term.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return bool|WP_Error True if the request has read access for the item, otherwise false or WP_Error object.
+        */
+       public function get_item_permissions_check( $request ) {
+               $tax_obj = get_taxonomy( $this->taxonomy );
+               if ( ! $tax_obj || ! $this->check_is_taxonomy_allowed( $this->taxonomy ) ) {
+                       return false;
+               }
+               if ( 'edit' === $request['context'] && ! current_user_can( 'edit_term', (int) $request['id'] ) ) {
+                       return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit this term.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+               return true;
+       }
+
+       /**
+        * Gets a single term from a taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function get_item( $request ) {
+
+               $term = get_term( (int) $request['id'], $this->taxonomy );
+
+               if ( ! $term || $term->taxonomy !== $this->taxonomy ) {
+                       return new WP_Error( 'rest_term_invalid', __( "Term doesn't exist." ), array( 'status' => 404 ) );
+               }
+
+               if ( is_wp_error( $term ) ) {
+                       return $term;
+               }
+
+               $response = $this->prepare_item_for_response( $term, $request );
+
+               return rest_ensure_response( $response );
+       }
+
+       /**
+        * Checks if a request has access to create a term.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return bool|WP_Error True if the request has access to create items, false or WP_Error object otherwise.
+        */
+       public function create_item_permissions_check( $request ) {
+
+               if ( ! $this->check_is_taxonomy_allowed( $this->taxonomy ) ) {
+                       return false;
+               }
+
+               $taxonomy_obj = get_taxonomy( $this->taxonomy );
+               if ( ! current_user_can( $taxonomy_obj->cap->edit_terms ) ) {
+                       return new WP_Error( 'rest_cannot_create', __( 'Sorry, you are not allowed to create new terms.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Creates a single term in a taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function create_item( $request ) {
+               if ( isset( $request['parent'] ) ) {
+                       if ( ! is_taxonomy_hierarchical( $this->taxonomy ) ) {
+                               return new WP_Error( 'rest_taxonomy_not_hierarchical', __( 'Can not set parent term, taxonomy is not hierarchical.' ), array( 'status' => 400 ) );
+                       }
+
+                       $parent = get_term( (int) $request['parent'], $this->taxonomy );
+
+                       if ( ! $parent ) {
+                               return new WP_Error( 'rest_term_invalid', __( "Parent term doesn't exist." ), array( 'status' => 400 ) );
+                       }
+               }
+
+               $prepared_term = $this->prepare_item_for_database( $request );
+
+               $term = wp_insert_term( wp_slash( $prepared_term->name ), $this->taxonomy, wp_slash( (array) $prepared_term ) );
+               if ( is_wp_error( $term ) ) {
+                       /*
+                        * If we're going to inform the client that the term already exists,
+                        * give them the identifier for future use.
+                        */
+                       if ( $term_id = $term->get_error_data( 'term_exists' ) ) {
+                               $existing_term = get_term( $term_id, $this->taxonomy );
+                               $term->add_data( $existing_term->term_id, 'term_exists' );
+                       }
+
+                       return $term;
+               }
+
+               $term = get_term( $term['term_id'], $this->taxonomy );
+
+               /**
+                * Fires after a single term is created or updated via the REST API.
+                *
+                * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_Term         $term     Inserted or updated term object.
+                * @param WP_REST_Request $request  Request object.
+                * @param bool            $creating True when creating a term, false when updating.
+                */
+               do_action( "rest_insert_{$this->taxonomy}", $term, $request, true );
+
+               $schema = $this->get_item_schema();
+               if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
+                       $meta_update = $this->meta->update_value( $request['meta'], (int) $request['id'] );
+
+                       if ( is_wp_error( $meta_update ) ) {
+                               return $meta_update;
+                       }
+               }
+
+               $fields_update = $this->update_additional_fields_for_object( $term, $request );
+
+               if ( is_wp_error( $fields_update ) ) {
+                       return $fields_update;
+               }
+
+               $request->set_param( 'context', 'view' );
+
+               $response = $this->prepare_item_for_response( $term, $request );
+               $response = rest_ensure_response( $response );
+
+               $response->set_status( 201 );
+               $response->header( 'Location', rest_url( $this->namespace . '/' . $this->rest_base . '/' . $term->term_id ) );
+
+               return $response;
+       }
+
+       /**
+        * Checks if a request has access to update the specified term.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return bool|WP_Error True if the request has access to update the item, false or WP_Error object otherwise.
+        */
+       public function update_item_permissions_check( $request ) {
+
+               if ( ! $this->check_is_taxonomy_allowed( $this->taxonomy ) ) {
+                       return false;
+               }
+
+               $term = get_term( (int) $request['id'], $this->taxonomy );
+
+               if ( ! $term ) {
+                       return new WP_Error( 'rest_term_invalid', __( "Term doesn't exist." ), array( 'status' => 404 ) );
+               }
+
+               if ( ! current_user_can( 'edit_term', $term->term_id ) ) {
+                       return new WP_Error( 'rest_cannot_update', __( 'Sorry, you are not allowed to edit this term.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Updates a single term from a taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function update_item( $request ) {
+               if ( isset( $request['parent'] ) ) {
+                       if ( ! is_taxonomy_hierarchical( $this->taxonomy ) ) {
+                               return new WP_Error( 'rest_taxonomy_not_hierarchical', __( 'Can not set parent term, taxonomy is not hierarchical.' ), array( 'status' => 400 ) );
+                       }
+
+                       $parent = get_term( (int) $request['parent'], $this->taxonomy );
+
+                       if ( ! $parent ) {
+                               return new WP_Error( 'rest_term_invalid', __( "Parent term doesn't exist." ), array( 'status' => 400 ) );
+                       }
+               }
+
+               $prepared_term = $this->prepare_item_for_database( $request );
+
+               $term = get_term( (int) $request['id'], $this->taxonomy );
+
+               // Only update the term if we haz something to update.
+               if ( ! empty( $prepared_term ) ) {
+                       $update = wp_update_term( $term->term_id, $term->taxonomy, wp_slash( (array) $prepared_term ) );
+
+                       if ( is_wp_error( $update ) ) {
+                               return $update;
+                       }
+               }
+
+               $term = get_term( (int) $request['id'], $this->taxonomy );
+
+               /* This action is documented in lib/endpoints/class-wp-rest-terms-controller.php */
+               do_action( "rest_insert_{$this->taxonomy}", $term, $request, false );
+
+               $schema = $this->get_item_schema();
+               if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
+                       $meta_update = $this->meta->update_value( $request['meta'], (int) $request['id'] );
+
+                       if ( is_wp_error( $meta_update ) ) {
+                               return $meta_update;
+                       }
+               }
+
+               $fields_update = $this->update_additional_fields_for_object( $term, $request );
+
+               if ( is_wp_error( $fields_update ) ) {
+                       return $fields_update;
+               }
+
+               $request->set_param( 'context', 'view' );
+
+               $response = $this->prepare_item_for_response( $term, $request );
+
+               return rest_ensure_response( $response );
+       }
+
+       /**
+        * Checks if a request has access to delete the specified term.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return bool|WP_Error True if the request has access to delete the item, otherwise false or WP_Error object.
+        */
+       public function delete_item_permissions_check( $request ) {
+               if ( ! $this->check_is_taxonomy_allowed( $this->taxonomy ) ) {
+                       return false;
+               }
+
+               $term = get_term( (int) $request['id'], $this->taxonomy );
+
+               if ( ! $term ) {
+                       return new WP_Error( 'rest_term_invalid', __( "Term doesn't exist." ), array( 'status' => 404 ) );
+               }
+
+               if ( ! current_user_can( 'delete_term', $term->term_id ) ) {
+                       return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this term.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Deletes a single term from a taxonomy.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function delete_item( $request ) {
+
+               $force = isset( $request['force'] ) ? (bool) $request['force'] : false;
+
+               // We don't support trashing for terms.
+               if ( ! $force ) {
+                       return new WP_Error( 'rest_trash_not_supported', __( 'Terms do not support trashing. Set force=true to delete.' ), array( 'status' => 501 ) );
+               }
+
+               $term = get_term( (int) $request['id'], $this->taxonomy );
+
+               $request->set_param( 'context', 'view' );
+
+               $previous = $this->prepare_item_for_response( $term, $request );
+
+               $retval = wp_delete_term( $term->term_id, $term->taxonomy );
+
+               if ( ! $retval ) {
+                       return new WP_Error( 'rest_cannot_delete', __( 'The term cannot be deleted.' ), array( 'status' => 500 ) );
+               }
+
+               $response = new WP_REST_Response();
+               $response->set_data( array( 'deleted' => true, 'previous' => $previous->get_data() ) );
+
+               /**
+                * Fires after a single term is deleted via the REST API.
+                *
+                * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_Term          $term     The deleted term.
+                * @param WP_REST_Response $response The response data.
+                * @param WP_REST_Request  $request  The request sent to the API.
+                */
+               do_action( "rest_delete_{$this->taxonomy}", $term, $response, $request );
+
+               return $response;
+       }
+
+       /**
+        * Prepares a single term for create or update.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Request object.
+        * @return object $prepared_term Term object.
+        */
+       public function prepare_item_for_database( $request ) {
+               $prepared_term = new stdClass;
+
+               $schema = $this->get_item_schema();
+               if ( isset( $request['name'] ) && ! empty( $schema['properties']['name'] ) ) {
+                       $prepared_term->name = $request['name'];
+               }
+
+               if ( isset( $request['slug'] ) && ! empty( $schema['properties']['slug'] ) ) {
+                       $prepared_term->slug = $request['slug'];
+               }
+
+               if ( isset( $request['taxonomy'] ) && ! empty( $schema['properties']['taxonomy'] ) ) {
+                       $prepared_term->taxonomy = $request['taxonomy'];
+               }
+
+               if ( isset( $request['description'] ) && ! empty( $schema['properties']['description'] ) ) {
+                       $prepared_term->description = $request['description'];
+               }
+
+               if ( isset( $request['parent'] ) && ! empty( $schema['properties']['parent'] ) ) {
+                       $parent_term_id = 0;
+                       $parent_term    = get_term( (int) $request['parent'], $this->taxonomy );
+
+                       if ( $parent_term ) {
+                               $parent_term_id = $parent_term->term_id;
+                       }
+
+                       $prepared_term->parent = $parent_term_id;
+               }
+
+               /**
+                * Filters term data before inserting term via the REST API.
+                *
+                * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
+                *
+                * @since 4.7.0
+                *
+                * @param object          $prepared_term Term object.
+                * @param WP_REST_Request $request       Request object.
+                */
+               return apply_filters( "rest_pre_insert_{$this->taxonomy}", $prepared_term, $request );
+       }
+
+       /**
+        * Prepares a single term output for response.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param obj             $item    Term object.
+        * @param WP_REST_Request $request Request object.
+        * @return WP_REST_Response $response Response object.
+        */
+       public function prepare_item_for_response( $item, $request ) {
+
+               $schema = $this->get_item_schema();
+               $data   = array();
+
+               if ( ! empty( $schema['properties']['id'] ) ) {
+                       $data['id'] = (int) $item->term_id;
+               }
+
+               if ( ! empty( $schema['properties']['count'] ) ) {
+                       $data['count'] = (int) $item->count;
+               }
+
+               if ( ! empty( $schema['properties']['description'] ) ) {
+                       $data['description'] = $item->description;
+               }
+
+               if ( ! empty( $schema['properties']['link'] ) ) {
+                       $data['link'] = get_term_link( $item );
+               }
+
+               if ( ! empty( $schema['properties']['name'] ) ) {
+                       $data['name'] = $item->name;
+               }
+
+               if ( ! empty( $schema['properties']['slug'] ) ) {
+                       $data['slug'] = $item->slug;
+               }
+
+               if ( ! empty( $schema['properties']['taxonomy'] ) ) {
+                       $data['taxonomy'] = $item->taxonomy;
+               }
+
+               if ( ! empty( $schema['properties']['parent'] ) ) {
+                       $data['parent'] = (int) $item->parent;
+               }
+
+               if ( ! empty( $schema['properties']['meta'] ) ) {
+                       $data['meta'] = $this->meta->get_value( $item->term_id, $request );
+               }
+
+               $context = ! empty( $request['context'] ) ? $request['context'] : 'view';
+               $data    = $this->add_additional_fields_to_object( $data, $request );
+               $data    = $this->filter_response_by_context( $data, $context );
+
+               $response = rest_ensure_response( $data );
+
+               $response->add_links( $this->prepare_links( $item ) );
+
+               /**
+                * Filters a term item returned from the API.
+                *
+                * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
+                *
+                * Allows modification of the term data right before it is returned.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_REST_Response  $response  The response object.
+                * @param object            $item      The original term object.
+                * @param WP_REST_Request   $request   Request used to generate the response.
+                */
+               return apply_filters( "rest_prepare_{$this->taxonomy}", $response, $item, $request );
+       }
+
+       /**
+        * Prepares links for the request.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param object $term Term object.
+        * @return array Links for the given term.
+        */
+       protected function prepare_links( $term ) {
+               $base = $this->namespace . '/' . $this->rest_base;
+               $links = array(
+                       'self'       => array(
+                               'href' => rest_url( trailingslashit( $base ) . $term->term_id ),
+                       ),
+                       'collection' => array(
+                               'href' => rest_url( $base ),
+                       ),
+                       'about'      => array(
+                               'href' => rest_url( sprintf( 'wp/v2/taxonomies/%s', $this->taxonomy ) ),
+                       ),
+               );
+
+               if ( $term->parent ) {
+                       $parent_term = get_term( (int) $term->parent, $term->taxonomy );
+
+                       if ( $parent_term ) {
+                               $links['up'] = array(
+                                       'href'       => rest_url( trailingslashit( $base ) . $parent_term->term_id ),
+                                       'embeddable' => true,
+                               );
+                       }
+               }
+
+               $taxonomy_obj = get_taxonomy( $term->taxonomy );
+
+               if ( empty( $taxonomy_obj->object_type ) ) {
+                       return $links;
+               }
+
+               $post_type_links = array();
+
+               foreach ( $taxonomy_obj->object_type as $type ) {
+                       $post_type_object = get_post_type_object( $type );
+
+                       if ( empty( $post_type_object->show_in_rest ) ) {
+                               continue;
+                       }
+
+                       $rest_base = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name;
+                       $post_type_links[] = array(
+                               'href' => add_query_arg( $this->rest_base, $term->term_id, rest_url( sprintf( 'wp/v2/%s', $rest_base ) ) ),
+                       );
+               }
+
+               if ( ! empty( $post_type_links ) ) {
+                       $links['https://api.w.org/post_type'] = $post_type_links;
+               }
+
+               return $links;
+       }
+
+       /**
+        * Retrieves the term's schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Item schema data.
+        */
+       public function get_item_schema() {
+               $schema = array(
+                       '$schema'    => 'http://json-schema.org/schema#',
+                       'title'      => 'post_tag' === $this->taxonomy ? 'tag' : $this->taxonomy,
+                       'type'       => 'object',
+                       'properties' => array(
+                               'id'          => array(
+                                       'description'  => __( 'Unique identifier for the term.' ),
+                                       'type'         => 'integer',
+                                       'context'      => array( 'view', 'embed', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'count'       => array(
+                                       'description'  => __( 'Number of published posts for the term.' ),
+                                       'type'         => 'integer',
+                                       'context'      => array( 'view', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'description' => array(
+                                       'description'  => __( 'HTML description of the term.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'edit' ),
+                               ),
+                               'link'        => array(
+                                       'description'  => __( 'URL of the term.' ),
+                                       'type'         => 'string',
+                                       'format'       => 'uri',
+                                       'context'      => array( 'view', 'embed', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                               'name'        => array(
+                                       'description'  => __( 'HTML title for the term.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'embed', 'edit' ),
+                                       'arg_options'  => array(
+                                               'sanitize_callback' => 'sanitize_text_field',
+                                       ),
+                                       'required'     => true,
+                               ),
+                               'slug'        => array(
+                                       'description'  => __( 'An alphanumeric identifier for the term unique to its type.' ),
+                                       'type'         => 'string',
+                                       'context'      => array( 'view', 'embed', 'edit' ),
+                                       'arg_options'  => array(
+                                               'sanitize_callback' => array( $this, 'sanitize_slug' ),
+                                       ),
+                               ),
+                               'taxonomy'    => array(
+                                       'description'  => __( 'Type attribution for the term.' ),
+                                       'type'         => 'string',
+                                       'enum'         => array_keys( get_taxonomies() ),
+                                       'context'      => array( 'view', 'embed', 'edit' ),
+                                       'readonly'     => true,
+                               ),
+                       ),
+               );
+
+               $taxonomy = get_taxonomy( $this->taxonomy );
+
+               if ( $taxonomy->hierarchical ) {
+                       $schema['properties']['parent'] = array(
+                               'description'  => __( 'The parent term ID.' ),
+                               'type'         => 'integer',
+                               'context'      => array( 'view', 'edit' ),
+                       );
+               }
+
+               $schema['properties']['meta'] = $this->meta->get_field_schema();
+
+               return $this->add_additional_fields_schema( $schema );
+       }
+
+       /**
+        * Retrieves the query params for collections.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Collection parameters.
+        */
+       public function get_collection_params() {
+               $query_params = parent::get_collection_params();
+               $taxonomy = get_taxonomy( $this->taxonomy );
+
+               $query_params['context']['default'] = 'view';
+
+               $query_params['exclude'] = array(
+                       'description'       => __( 'Ensure result set excludes specific IDs.' ),
+                       'type'              => 'array',
+                       'items'             => array(
+                               'type'          => 'integer',
+                       ),
+                       'default'           => array(),
+               );
+
+               $query_params['include'] = array(
+                       'description'       => __( 'Limit result set to specific IDs.' ),
+                       'type'              => 'array',
+                       'items'             => array(
+                               'type'          => 'integer',
+                       ),
+                       'default'           => array(),
+               );
+
+               if ( ! $taxonomy->hierarchical ) {
+                       $query_params['offset'] = array(
+                               'description'       => __( 'Offset the result set by a specific number of items.' ),
+                               'type'              => 'integer',
+                       );
+               }
+
+               $query_params['order'] = array(
+                       'description'       => __( 'Order sort attribute ascending or descending.' ),
+                       'type'              => 'string',
+                       'default'           => 'asc',
+                       'enum'              => array(
+                               'asc',
+                               'desc',
+                       ),
+               );
+
+               $query_params['orderby'] = array(
+                       'description'       => __( 'Sort collection by term attribute.' ),
+                       'type'              => 'string',
+                       'default'           => 'name',
+                       'enum'              => array(
+                               'id',
+                               'include',
+                               'name',
+                               'slug',
+                               'term_group',
+                               'description',
+                               'count',
+                       ),
+               );
+
+               $query_params['hide_empty'] = array(
+                       'description'       => __( 'Whether to hide terms not assigned to any posts.' ),
+                       'type'              => 'boolean',
+                       'default'           => false,
+               );
+
+               if ( $taxonomy->hierarchical ) {
+                       $query_params['parent'] = array(
+                               'description'       => __( 'Limit result set to terms assigned to a specific parent.' ),
+                               'type'              => 'integer',
+                       );
+               }
+
+               $query_params['post'] = array(
+                       'description'       => __( 'Limit result set to terms assigned to a specific post.' ),
+                       'type'              => 'integer',
+                       'default'           => null,
+               );
+
+               $query_params['slug'] = array(
+                       'description'       => __( 'Limit result set to terms with a specific slug.' ),
+                       'type'              => 'string',
+               );
+
+               /**
+                * Filter collection parameters for the terms controller.
+                *
+                * The dynamic part of the filter `$this->taxonomy` refers to the taxonomy
+                * slug for the controller.
+                *
+                * This filter registers the collection parameter, but does not map the
+                * collection parameter to an internal WP_Term_Query parameter.  Use the
+                * `rest_{$this->taxonomy}_query` filter to set WP_Term_Query parameters.
+                *
+                * @since 4.7.0
+                *
+                * @param $params JSON Schema-formatted collection parameters.
+                * @param WP_Taxonomy $taxonomy_obj Taxonomy object.
+                */
+               return apply_filters( 'rest_{$this->taxonomy}_collection_params', $query_params, $taxonomy );
+       }
+
+       /**
+        * Checks that the taxonomy is valid.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param string $taxonomy Taxonomy to check.
+        * @return bool Whether the taxonomy is allowed for REST management.
+        */
+       protected function check_is_taxonomy_allowed( $taxonomy ) {
+               $taxonomy_obj = get_taxonomy( $taxonomy );
+               if ( $taxonomy_obj && ! empty( $taxonomy_obj->show_in_rest ) ) {
+                       return true;
+               }
+               return false;
+       }
+}
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
new file mode 100644 (file)
index 0000000..01542a9
--- /dev/null
@@ -0,0 +1,1358 @@
+<?php
+/**
+ * REST API: WP_REST_Users_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to manage users via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Controller
+ */
+class WP_REST_Users_Controller extends WP_REST_Controller {
+
+       /**
+        * Instance of a user meta fields object.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var WP_REST_User_Meta_Fields
+        */
+       protected $meta;
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        */
+       public function __construct() {
+               $this->namespace = 'wp/v2';
+               $this->rest_base = 'users';
+
+               $this->meta = new WP_REST_User_Meta_Fields();
+       }
+
+       /**
+        * Registers the routes for the objects of the controller.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @see register_rest_route()
+        */
+       public function register_routes() {
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base, array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_items' ),
+                               'permission_callback' => array( $this, 'get_items_permissions_check' ),
+                               'args'                => $this->get_collection_params(),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::CREATABLE,
+                               'callback'            => array( $this, 'create_item' ),
+                               'permission_callback' => array( $this, 'create_item_permissions_check' ),
+                               'args'                => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\d]+)', array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_item' ),
+                               'permission_callback' => array( $this, 'get_item_permissions_check' ),
+                               'args'                => array(
+                                       'context' => $this->get_context_param( array( 'default' => 'view' ) ),
+                               ),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::EDITABLE,
+                               'callback'            => array( $this, 'update_item' ),
+                               'permission_callback' => array( $this, 'update_item_permissions_check' ),
+                               'args'                => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::DELETABLE,
+                               'callback'            => array( $this, 'delete_item' ),
+                               'permission_callback' => array( $this, 'delete_item_permissions_check' ),
+                               'args'                => array(
+                                       'force'    => array(
+                                               'type'        => 'boolean',
+                                               'default'     => false,
+                                               'description' => __( 'Required to be true, as users do not support trashing.' ),
+                                       ),
+                                       'reassign' => array(
+                                               'type'        => 'integer',
+                                               'description' => __( 'Reassign the deleted user\'s posts and links to this user ID.' ),
+                                               'required'    => true,
+                                               'sanitize_callback' => array( $this, 'check_reassign' ),
+                                       ),
+                               ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ) );
+
+               register_rest_route( $this->namespace, '/' . $this->rest_base . '/me', array(
+                       array(
+                               'methods'             => WP_REST_Server::READABLE,
+                               'callback'            => array( $this, 'get_current_item' ),
+                               'args'                => array(
+                                       'context' => $this->get_context_param( array( 'default' => 'view' ) ),
+                               ),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::EDITABLE,
+                               'callback'            => array( $this, 'update_current_item' ),
+                               'permission_callback' => array( $this, 'update_current_item_permissions_check' ),
+                               'args'                => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
+                       ),
+                       array(
+                               'methods'             => WP_REST_Server::DELETABLE,
+                               'callback'            => array( $this, 'delete_current_item' ),
+                               'permission_callback' => array( $this, 'delete_current_item_permissions_check' ),
+                               'args'                => array(
+                                       'force'    => array(
+                                               'type'        => 'boolean',
+                                               'default'     => false,
+                                               'description' => __( 'Required to be true, as users do not support trashing.' ),
+                                       ),
+                                       'reassign' => array(
+                                               'type'        => 'integer',
+                                               'description' => __( 'Reassign the deleted user\'s posts and links to this user ID.' ),
+                                               'required'    => true,
+                                               'sanitize_callback' => array( $this, 'check_reassign' ),
+                                       ),
+                               ),
+                       ),
+                       'schema' => array( $this, 'get_public_item_schema' ),
+               ));
+       }
+
+       /**
+        * Checks for a valid value for the reassign parameter when deleting users.
+        *
+        * The value can be an integer, 'false', false, or ''.
+        *
+        * @since 4.7.0
+        *
+        * @param int|bool        $value   The value passed to the reassign parameter.
+        * @param WP_REST_Request $request Full details about the request.
+        * @param string          $param   The parameter that is being sanitized.
+        *
+        * @return int|bool|WP_Error
+        */
+       public function check_reassign( $value, $request, $param ) {
+               if ( is_numeric( $value ) ) {
+                       return $value;
+               }
+
+               if ( empty( $value ) || false === $value || 'false' === $value ) {
+                       return false;
+               }
+
+               return new WP_Error( 'rest_invalid_param', __( 'Invalid user parameter(s).' ), array( 'status' => 400 ) );
+       }
+
+       /**
+        * Permissions check for getting all users.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has read access, otherwise WP_Error object.
+        */
+       public function get_items_permissions_check( $request ) {
+               // Check if roles is specified in GET request and if user can list users.
+               if ( ! empty( $request['roles'] ) && ! current_user_can( 'list_users' ) ) {
+                       return new WP_Error( 'rest_user_cannot_view', __( 'Sorry, you are not allowed to filter users by role.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( 'edit' === $request['context'] && ! current_user_can( 'list_users' ) ) {
+                       return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to list users.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( in_array( $request['orderby'], array( 'email', 'registered_date' ), true ) && ! current_user_can( 'list_users' ) ) {
+                       return new WP_Error( 'rest_forbidden_orderby', __( 'Sorry, you are not allowed to order users by this parameter.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Retrieves all users.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function get_items( $request ) {
+
+               // Retrieve the list of registered collection query parameters.
+               $registered = $this->get_collection_params();
+
+               /*
+                * This array defines mappings between public API query parameters whose
+                * values are accepted as-passed, and their internal WP_Query parameter
+                * name equivalents (some are the same). Only values which are also
+                * present in $registered will be set.
+                */
+               $parameter_mappings = array(
+                       'exclude'  => 'exclude',
+                       'include'  => 'include',
+                       'order'    => 'order',
+                       'per_page' => 'number',
+                       'search'   => 'search',
+                       'roles'    => 'role__in',
+               );
+
+               $prepared_args = array();
+
+               /*
+                * For each known parameter which is both registered and present in the request,
+                * set the parameter's value on the query $prepared_args.
+                */
+               foreach ( $parameter_mappings as $api_param => $wp_param ) {
+                       if ( isset( $registered[ $api_param ], $request[ $api_param ] ) ) {
+                               $prepared_args[ $wp_param ] = $request[ $api_param ];
+                       }
+               }
+
+               if ( isset( $registered['offset'] ) && ! empty( $request['offset'] ) ) {
+                       $prepared_args['offset'] = $request['offset'];
+               } else {
+                       $prepared_args['offset']  = ( $request['page'] - 1 ) * $prepared_args['number'];
+               }
+
+               if ( isset( $registered['orderby'] ) ) {
+                       $orderby_possibles = array(
+                               'id'              => 'ID',
+                               'include'         => 'include',
+                               'name'            => 'display_name',
+                               'registered_date' => 'registered',
+                               'slug'            => 'user_nicename',
+                               'email'           => 'user_email',
+                               'url'             => 'user_url',
+                       );
+                       $prepared_args['orderby'] = $orderby_possibles[ $request['orderby'] ];
+               }
+
+               if ( ! current_user_can( 'list_users' ) ) {
+                       $prepared_args['has_published_posts'] = true;
+               }
+
+               if ( ! empty( $prepared_args['search'] ) ) {
+                       $prepared_args['search'] = '*' . $prepared_args['search'] . '*';
+               }
+
+               if ( isset( $registered['slug'] ) && ! empty( $request['slug'] ) ) {
+                       $prepared_args['search'] = $request['slug'];
+                       $prepared_args['search_columns'] = array( 'user_nicename' );
+               }
+
+               /**
+                * Filters WP_User_Query arguments when querying users via the REST API.
+                *
+                * @link https://developer.wordpress.org/reference/classes/wp_user_query/
+                *
+                * @since 4.7.0
+                *
+                * @param array           $prepared_args Array of arguments for WP_User_Query.
+                * @param WP_REST_Request $request       The current request.
+                */
+               $prepared_args = apply_filters( 'rest_user_query', $prepared_args, $request );
+
+               $query = new WP_User_Query( $prepared_args );
+
+               $users = array();
+
+               foreach ( $query->results as $user ) {
+                       $data = $this->prepare_item_for_response( $user, $request );
+                       $users[] = $this->prepare_response_for_collection( $data );
+               }
+
+               $response = rest_ensure_response( $users );
+
+               // Store pagination values for headers then unset for count query.
+               $per_page = (int) $prepared_args['number'];
+               $page     = ceil( ( ( (int) $prepared_args['offset'] ) / $per_page ) + 1 );
+
+               $prepared_args['fields'] = 'ID';
+
+               $total_users = $query->get_total();
+
+               if ( $total_users < 1 ) {
+                       // Out-of-bounds, run the query again without LIMIT for total count.
+                       unset( $prepared_args['number'], $prepared_args['offset'] );
+                       $count_query = new WP_User_Query( $prepared_args );
+                       $total_users = $count_query->get_total();
+               }
+
+               $response->header( 'X-WP-Total', (int) $total_users );
+
+               $max_pages = ceil( $total_users / $per_page );
+
+               $response->header( 'X-WP-TotalPages', (int) $max_pages );
+
+               $base = add_query_arg( $request->get_query_params(), rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ) );
+               if ( $page > 1 ) {
+                       $prev_page = $page - 1;
+
+                       if ( $prev_page > $max_pages ) {
+                               $prev_page = $max_pages;
+                       }
+
+                       $prev_link = add_query_arg( 'page', $prev_page, $base );
+                       $response->link_header( 'prev', $prev_link );
+               }
+               if ( $max_pages > $page ) {
+                       $next_page = $page + 1;
+                       $next_link = add_query_arg( 'page', $next_page, $base );
+
+                       $response->link_header( 'next', $next_link );
+               }
+
+               return $response;
+       }
+
+       /**
+        * Checks if a given request has access to read a user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has read access for the item, otherwise WP_Error object.
+        */
+       public function get_item_permissions_check( $request ) {
+
+               $id = (int) $request['id'];
+               $user = get_userdata( $id );
+               $types = get_post_types( array( 'show_in_rest' => true ), 'names' );
+
+               if ( empty( $id ) || empty( $user->ID ) ) {
+                       return new WP_Error( 'rest_user_invalid_id', __( 'Invalid user ID.' ), array( 'status' => 404 ) );
+               }
+
+               if ( get_current_user_id() === $id ) {
+                       return true;
+               }
+
+               if ( 'edit' === $request['context'] && ! current_user_can( 'list_users' ) ) {
+                       return new WP_Error( 'rest_user_cannot_view', __( 'Sorry, you are not allowed to list users.' ), array( 'status' => rest_authorization_required_code() ) );
+               } elseif ( ! count_user_posts( $id, $types ) && ! current_user_can( 'edit_user', $id ) && ! current_user_can( 'list_users' ) ) {
+                       return new WP_Error( 'rest_user_cannot_view', __( 'Sorry, you are not allowed to list users.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Retrieves a single user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function get_item( $request ) {
+               $id   = (int) $request['id'];
+               $user = get_userdata( $id );
+
+               if ( empty( $id ) || empty( $user->ID ) ) {
+                       return new WP_Error( 'rest_user_invalid_id', __( 'Invalid user ID.' ), array( 'status' => 404 ) );
+               }
+
+               $user = $this->prepare_item_for_response( $user, $request );
+               $response = rest_ensure_response( $user );
+
+               return $response;
+       }
+
+       /**
+        * Retrieves the current user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function get_current_item( $request ) {
+               $current_user_id = get_current_user_id();
+
+               if ( empty( $current_user_id ) ) {
+                       return new WP_Error( 'rest_not_logged_in', __( 'You are not currently logged in.' ), array( 'status' => 401 ) );
+               }
+
+               $user     = wp_get_current_user();
+               $response = $this->prepare_item_for_response( $user, $request );
+               $response = rest_ensure_response( $response );
+
+
+               return $response;
+       }
+
+       /**
+        * Checks if a given request has access create users.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has access to create items, WP_Error object otherwise.
+        */
+       public function create_item_permissions_check( $request ) {
+
+               if ( ! current_user_can( 'create_users' ) ) {
+                       return new WP_Error( 'rest_cannot_create_user', __( 'Sorry, you are not allowed to create new users.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Creates a single user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function create_item( $request ) {
+               if ( ! empty( $request['id'] ) ) {
+                       return new WP_Error( 'rest_user_exists', __( 'Cannot create existing user.' ), array( 'status' => 400 ) );
+               }
+
+               $schema = $this->get_item_schema();
+
+               if ( ! empty( $request['roles'] ) && ! empty( $schema['properties']['roles'] ) ) {
+                       $check_permission = $this->check_role_update( $request['id'], $request['roles'] );
+
+                       if ( is_wp_error( $check_permission ) ) {
+                               return $check_permission;
+                       }
+               }
+
+               $user = $this->prepare_item_for_database( $request );
+
+               if ( is_multisite() ) {
+                       $ret = wpmu_validate_user_signup( $user->user_login, $user->user_email );
+
+                       if ( is_wp_error( $ret['errors'] ) && ! empty( $ret['errors']->errors ) ) {
+                               $error = new WP_Error( 'rest_invalid_param', __( 'Invalid user parameter(s).' ), array( 'status' => 400 ) );
+                               foreach ( $ret['errors']->errors as $code => $messages ) {
+                                       foreach ( $messages as $message ) {
+                                               $error->add( $code, $message );
+                                       }
+                                       if ( $error_data = $error->get_error_data( $code ) ) {
+                                               $error->add_data( $error_data, $code );
+                                       }
+                               }
+                               return $error;
+                       }
+               }
+
+               if ( is_multisite() ) {
+                       $user_id = wpmu_create_user( $user->user_login, $user->user_pass, $user->user_email );
+
+                       if ( ! $user_id ) {
+                               return new WP_Error( 'rest_user_create', __( 'Error creating new user.' ), array( 'status' => 500 ) );
+                       }
+
+                       $user->ID = $user_id;
+                       $user_id  = wp_update_user( wp_slash( (array) $user ) );
+
+                       if ( is_wp_error( $user_id ) ) {
+                               return $user_id;
+                       }
+
+                       add_user_to_blog( get_site()->id, $user_id, '' );
+               } else {
+                       $user_id = wp_insert_user( wp_slash( (array) $user ) );
+
+                       if ( is_wp_error( $user_id ) ) {
+                               return $user_id;
+                       }
+               }
+
+               $user = get_user_by( 'id', $user_id );
+
+               /**
+                * Fires immediately after a user is created or updated via the REST API.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_User         $user     Inserted or updated user object.
+                * @param WP_REST_Request $request  Request object.
+                * @param bool            $creating True when creating a user, false when updating.
+                */
+               do_action( 'rest_insert_user', $user, $request, true );
+
+               if ( ! empty( $request['roles'] ) && ! empty( $schema['properties']['roles'] ) ) {
+                       array_map( array( $user, 'add_role' ), $request['roles'] );
+               }
+
+               if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
+                       $meta_update = $this->meta->update_value( $request['meta'], $user_id );
+
+                       if ( is_wp_error( $meta_update ) ) {
+                               return $meta_update;
+                       }
+               }
+
+               $user = get_user_by( 'id', $user_id );
+               $fields_update = $this->update_additional_fields_for_object( $user, $request );
+
+               if ( is_wp_error( $fields_update ) ) {
+                       return $fields_update;
+               }
+
+               $request->set_param( 'context', 'edit' );
+
+               $response = $this->prepare_item_for_response( $user, $request );
+               $response = rest_ensure_response( $response );
+
+               $response->set_status( 201 );
+               $response->header( 'Location', rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->rest_base, $user_id ) ) );
+
+               return $response;
+       }
+
+       /**
+        * Checks if a given request has access to update a user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has access to update the item, WP_Error object otherwise.
+        */
+       public function update_item_permissions_check( $request ) {
+
+               $id = (int) $request['id'];
+
+               if ( ! current_user_can( 'edit_user', $id ) ) {
+                       return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to edit this user.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               if ( ! empty( $request['roles'] ) && ! current_user_can( 'edit_users' ) ) {
+                       return new WP_Error( 'rest_cannot_edit_roles', __( 'Sorry, you are not allowed to edit roles of this user.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Updates a single user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function update_item( $request ) {
+               $id   = (int) $request['id'];
+               $user = get_userdata( $id );
+
+               if ( ! $user ) {
+                       return new WP_Error( 'rest_user_invalid_id', __( 'Invalid user ID.' ), array( 'status' => 404 ) );
+               }
+
+               if ( email_exists( $request['email'] ) && $request['email'] !== $user->user_email ) {
+                       return new WP_Error( 'rest_user_invalid_email', __( 'Invalid email address.' ), array( 'status' => 400 ) );
+               }
+
+               if ( ! empty( $request['username'] ) && $request['username'] !== $user->user_login ) {
+                       return new WP_Error( 'rest_user_invalid_argument', __( "Username isn't editable." ), array( 'status' => 400 ) );
+               }
+
+               if ( ! empty( $request['slug'] ) && $request['slug'] !== $user->user_nicename && get_user_by( 'slug', $request['slug'] ) ) {
+                       return new WP_Error( 'rest_user_invalid_slug', __( 'Invalid slug.' ), array( 'status' => 400 ) );
+               }
+
+               if ( ! empty( $request['roles'] ) ) {
+                       $check_permission = $this->check_role_update( $id, $request['roles'] );
+
+                       if ( is_wp_error( $check_permission ) ) {
+                               return $check_permission;
+                       }
+               }
+
+               $user = $this->prepare_item_for_database( $request );
+
+               // Ensure we're operating on the same user we already checked.
+               $user->ID = $id;
+
+               $user_id = wp_update_user( wp_slash( (array) $user ) );
+
+               if ( is_wp_error( $user_id ) ) {
+                       return $user_id;
+               }
+
+               $user = get_user_by( 'id', $user_id );
+
+               /* This action is documented in lib/endpoints/class-wp-rest-users-controller.php */
+               do_action( 'rest_insert_user', $user, $request, false );
+
+               if ( is_multisite() && ! is_user_member_of_blog( $id ) ) {
+                       add_user_to_blog( get_current_blog_id(), $id, '' );
+               }
+
+               if ( ! empty( $request['roles'] ) ) {
+                       array_map( array( $user, 'add_role' ), $request['roles'] );
+               }
+
+               $schema = $this->get_item_schema();
+
+               if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
+                       $meta_update = $this->meta->update_value( $request['meta'], $id );
+
+                       if ( is_wp_error( $meta_update ) ) {
+                               return $meta_update;
+                       }
+               }
+
+               $user = get_user_by( 'id', $user_id );
+               $fields_update = $this->update_additional_fields_for_object( $user, $request );
+
+               if ( is_wp_error( $fields_update ) ) {
+                       return $fields_update;
+               }
+
+               $request->set_param( 'context', 'edit' );
+
+               $response = $this->prepare_item_for_response( $user, $request );
+               $response = rest_ensure_response( $response );
+
+               return $response;
+       }
+
+       /**
+        * Checks if a given request has access to update the current user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has access to update the item, WP_Error object otherwise.
+        */
+       public function update_current_item_permissions_check( $request ) {
+               $request['id'] = get_current_user_id();
+
+               return $this->update_item_permissions_check( $request );
+       }
+
+       /**
+        * Updates the current user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       function update_current_item( $request ) {
+               $request['id'] = get_current_user_id();
+
+               return $this->update_item( $request );
+       }
+
+       /**
+        * Checks if a given request has access delete a user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has access to delete the item, WP_Error object otherwise.
+        */
+       public function delete_item_permissions_check( $request ) {
+
+               $id = (int) $request['id'];
+
+               if ( ! current_user_can( 'delete_user', $id ) ) {
+                       return new WP_Error( 'rest_user_cannot_delete', __( 'Sorry, you are not allowed to delete this user.' ), array( 'status' => rest_authorization_required_code() ) );
+               }
+
+               return true;
+       }
+
+       /**
+        * Deletes a single user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       public function delete_item( $request ) {
+               // We don't support delete requests in multisite.
+               if ( is_multisite() ) {
+                       return new WP_Error( 'rest_cannot_delete', __( 'The user cannot be deleted.' ), array( 'status' => 501 ) );
+               }
+
+               $id       = (int) $request['id'];
+               $reassign = false === $request['reassign'] ? null : absint( $request['reassign'] );
+               $force    = isset( $request['force'] ) ? (bool) $request['force'] : false;
+
+               // We don't support trashing for users.
+               if ( ! $force ) {
+                       return new WP_Error( 'rest_trash_not_supported', __( 'Users do not support trashing. Set force=true to delete.' ), array( 'status' => 501 ) );
+               }
+
+               $user = get_userdata( $id );
+
+               if ( ! $user ) {
+                       return new WP_Error( 'rest_user_invalid_id', __( 'Invalid user ID.' ), array( 'status' => 404 ) );
+               }
+
+               if ( ! empty( $reassign ) ) {
+                       if ( $reassign === $id || ! get_userdata( $reassign ) ) {
+                               return new WP_Error( 'rest_user_invalid_reassign', __( 'Invalid user ID for reassignment.' ), array( 'status' => 400 ) );
+                       }
+               }
+
+               $request->set_param( 'context', 'edit' );
+
+               $previous = $this->prepare_item_for_response( $user, $request );
+
+               /** Include admin user functions to get access to wp_delete_user() */
+               require_once ABSPATH . 'wp-admin/includes/user.php';
+
+               $result = wp_delete_user( $id, $reassign );
+
+               if ( ! $result ) {
+                       return new WP_Error( 'rest_cannot_delete', __( 'The user cannot be deleted.' ), array( 'status' => 500 ) );
+               }
+
+               $response = new WP_REST_Response();
+               $response->set_data( array( 'deleted' => true, 'previous' => $previous->get_data() ) );
+
+               /**
+                * Fires immediately after a user is deleted via the REST API.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_User          $user     The user data.
+                * @param WP_REST_Response $response The response returned from the API.
+                * @param WP_REST_Request  $request  The request sent to the API.
+                */
+               do_action( 'rest_delete_user', $user, $response, $request );
+
+               return $response;
+       }
+
+       /**
+        * Checks if a given request has access to delete the current user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return true|WP_Error True if the request has access to delete the item, WP_Error object otherwise.
+        */
+       public function delete_current_item_permissions_check( $request ) {
+               $request['id'] = get_current_user_id();
+
+               return $this->delete_item_permissions_check( $request );
+       }
+
+       /**
+        * Deletes the current user.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_REST_Request $request Full details about the request.
+        * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+        */
+       function delete_current_item( $request ) {
+               $request['id'] = get_current_user_id();
+
+               return $this->delete_item( $request );
+       }
+
+       /**
+        * Prepares a single user output for response.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param WP_User         $user    User object.
+        * @param WP_REST_Request $request Request object.
+        * @return WP_REST_Response Response object.
+        */
+       public function prepare_item_for_response( $user, $request ) {
+
+               $data   = array();
+               $schema = $this->get_item_schema();
+
+               if ( ! empty( $schema['properties']['id'] ) ) {
+                       $data['id'] = $user->ID;
+               }
+
+               if ( ! empty( $schema['properties']['username'] ) ) {
+                       $data['username'] = $user->user_login;
+               }
+
+               if ( ! empty( $schema['properties']['name'] ) ) {
+                       $data['name'] = $user->display_name;
+               }
+
+               if ( ! empty( $schema['properties']['first_name'] ) ) {
+                       $data['first_name'] = $user->first_name;
+               }
+
+               if ( ! empty( $schema['properties']['last_name'] ) ) {
+                       $data['last_name'] = $user->last_name;
+               }
+
+               if ( ! empty( $schema['properties']['email'] ) ) {
+                       $data['email'] = $user->user_email;
+               }
+
+               if ( ! empty( $schema['properties']['url'] ) ) {
+                       $data['url'] = $user->user_url;
+               }
+
+               if ( ! empty( $schema['properties']['description'] ) ) {
+                       $data['description'] = $user->description;
+               }
+
+               if ( ! empty( $schema['properties']['link'] ) ) {
+                       $data['link'] = get_author_posts_url( $user->ID, $user->user_nicename );
+               }
+
+               if ( ! empty( $schema['properties']['locale'] ) ) {
+                       $data['locale'] = get_user_locale( $user );
+               }
+
+               if ( ! empty( $schema['properties']['nickname'] ) ) {
+                       $data['nickname'] = $user->nickname;
+               }
+
+               if ( ! empty( $schema['properties']['slug'] ) ) {
+                       $data['slug'] = $user->user_nicename;
+               }
+
+               if ( ! empty( $schema['properties']['roles'] ) ) {
+                       // Defensively call array_values() to ensure an array is returned.
+                       $data['roles'] = array_values( $user->roles );
+               }
+
+               if ( ! empty( $schema['properties']['registered_date'] ) ) {
+                       $data['registered_date'] = date( 'c', strtotime( $user->user_registered ) );
+               }
+
+               if ( ! empty( $schema['properties']['capabilities'] ) ) {
+                       $data['capabilities'] = (object) $user->allcaps;
+               }
+
+               if ( ! empty( $schema['properties']['extra_capabilities'] ) ) {
+                       $data['extra_capabilities'] = (object) $user->caps;
+               }
+
+               if ( ! empty( $schema['properties']['avatar_urls'] ) ) {
+                       $data['avatar_urls'] = rest_get_avatar_urls( $user->user_email );
+               }
+
+               if ( ! empty( $schema['properties']['meta'] ) ) {
+                       $data['meta'] = $this->meta->get_value( $user->ID, $request );
+               }
+
+               $context = ! empty( $request['context'] ) ? $request['context'] : 'embed';
+
+               $data = $this->add_additional_fields_to_object( $data, $request );
+               $data = $this->filter_response_by_context( $data, $context );
+
+               // Wrap the data in a response object.
+               $response = rest_ensure_response( $data );
+
+               $response->add_links( $this->prepare_links( $user ) );
+
+               /**
+                * Filters user data returned from the REST API.
+                *
+                * @since 4.7.0
+                *
+                * @param WP_REST_Response $response The response object.
+                * @param object           $user     User object used to create response.
+                * @param WP_REST_Request  $request  Request object.
+                */
+               return apply_filters( 'rest_prepare_user', $response, $user, $request );
+       }
+
+       /**
+        * Prepares links for the user request.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param WP_Post $user User object.
+        * @return array Links for the given user.
+        */
+       protected function prepare_links( $user ) {
+               $links = array(
+                       'self' => array(
+                               'href' => rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->rest_base, $user->ID ) ),
+                       ),
+                       'collection' => array(
+                               'href' => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ),
+                       ),
+               );
+
+               return $links;
+       }
+
+       /**
+        * Prepares a single user for creation or update.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param WP_REST_Request $request Request object.
+        * @return object $prepared_user User object.
+        */
+       protected function prepare_item_for_database( $request ) {
+               $prepared_user = new stdClass;
+
+               $schema = $this->get_item_schema();
+
+               // required arguments.
+               if ( isset( $request['email'] ) && ! empty( $schema['properties']['email'] ) ) {
+                       $prepared_user->user_email = $request['email'];
+               }
+
+               if ( isset( $request['username'] ) && ! empty( $schema['properties']['username'] ) ) {
+                       $prepared_user->user_login = $request['username'];
+               }
+
+               if ( isset( $request['password'] ) && ! empty( $schema['properties']['password'] ) ) {
+                       $prepared_user->user_pass = $request['password'];
+               }
+
+               // optional arguments.
+               if ( isset( $request['id'] ) ) {
+                       $prepared_user->ID = absint( $request['id'] );
+               }
+
+               if ( isset( $request['name'] ) && ! empty( $schema['properties']['name'] ) ) {
+                       $prepared_user->display_name = $request['name'];
+               }
+
+               if ( isset( $request['first_name'] ) && ! empty( $schema['properties']['first_name'] ) ) {
+                       $prepared_user->first_name = $request['first_name'];
+               }
+
+               if ( isset( $request['last_name'] ) && ! empty( $schema['properties']['last_name'] ) ) {
+                       $prepared_user->last_name = $request['last_name'];
+               }
+
+               if ( isset( $request['nickname'] ) && ! empty( $schema['properties']['nickname'] ) ) {
+                       $prepared_user->nickname = $request['nickname'];
+               }
+
+               if ( isset( $request['slug'] ) && ! empty( $schema['properties']['slug'] ) ) {
+                       $prepared_user->user_nicename = $request['slug'];
+               }
+
+               if ( isset( $request['description'] ) && ! empty( $schema['properties']['description'] ) ) {
+                       $prepared_user->description = $request['description'];
+               }
+
+               if ( isset( $request['url'] ) && ! empty( $schema['properties']['url'] ) ) {
+                       $prepared_user->user_url = $request['url'];
+               }
+
+               if ( isset( $request['locale'] ) && ! empty( $schema['properties']['locale'] ) ) {
+                       $prepared_user->locale = $request['locale'];
+               }
+
+               // setting roles will be handled outside of this function.
+               if ( isset( $request['roles'] ) ) {
+                       $prepared_user->role = false;
+               }
+
+               /**
+                * Filters user data before insertion via the REST API.
+                *
+                * @since 4.7.0
+                *
+                * @param object          $prepared_user User object.
+                * @param WP_REST_Request $request       Request object.
+                */
+               return apply_filters( 'rest_pre_insert_user', $prepared_user, $request );
+       }
+
+       /**
+        * Determines if the current user is allowed to make the desired roles change.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param integer $user_id User ID.
+        * @param array   $roles   New user roles.
+        * @return true|WP_Error True if the current user is allowed to make the role change,
+        *                       otherwise a WP_Error object.
+        */
+       protected function check_role_update( $user_id, $roles ) {
+               global $wp_roles;
+
+               foreach ( $roles as $role ) {
+
+                       if ( ! isset( $wp_roles->role_objects[ $role ] ) ) {
+                               /* translators: %s: role key */
+                               return new WP_Error( 'rest_user_invalid_role', sprintf( __( 'The role %s does not exist.' ), $role ), array( 'status' => 400 ) );
+                       }
+
+                       $potential_role = $wp_roles->role_objects[ $role ];
+
+                       /*
+                        * Don't let anyone with 'edit_users' (admins) edit their own role to something without it.
+                        * Multisite super admins can freely edit their blog roles -- they possess all caps.
+                        */
+                       if ( ! ( is_multisite()
+                               && current_user_can( 'manage_sites' ) )
+                               && get_current_user_id() === $user_id
+                               && ! $potential_role->has_cap( 'edit_users' )
+                       ) {
+                               return new WP_Error( 'rest_user_invalid_role', __( 'Sorry, you are not allowed to give users that role.' ), array( 'status' => rest_authorization_required_code() ) );
+                       }
+
+                       /** Include admin functions to get access to get_editable_roles() */
+                       require_once ABSPATH . 'wp-admin/includes/admin.php';
+
+                       // The new role must be editable by the logged-in user.
+                       $editable_roles = get_editable_roles();
+
+                       if ( empty( $editable_roles[ $role ] ) ) {
+                               return new WP_Error( 'rest_user_invalid_role', __( 'Sorry, you are not allowed to give users that role.' ), array( 'status' => 403 ) );
+                       }
+               }
+
+               return true;
+       }
+
+       /**
+        * Check a username for the REST API.
+        *
+        * Performs a couple of checks like edit_user() in wp-admin/includes/user.php.
+        *
+        * @since 4.7.0
+        *
+        * @param  mixed            $value   The username submitted in the request.
+        * @param  WP_REST_Request  $request Full details about the request.
+        * @param  string           $param   The parameter name.
+        * @return WP_Error|string The sanitized username, if valid, otherwise an error.
+        */
+       public function check_username( $value, $request, $param ) {
+               $username = (string) $value;
+
+               if ( ! validate_username( $username ) ) {
+                       return new WP_Error( 'rest_user_invalid_username', __( 'Username contains invalid characters.' ), array( 'status' => 400 ) );
+               }
+
+               /** This filter is documented in wp-includes/user.php */
+               $illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
+
+               if ( in_array( strtolower( $username ), array_map( 'strtolower', $illegal_logins ) ) ) {
+                       return new WP_Error( 'rest_user_invalid_username', __( 'Sorry, that username is not allowed.' ), array( 'status' => 400 ) );
+               }
+
+               return $username;
+       }
+
+       /**
+        * Check a user password for the REST API.
+        *
+        * Performs a couple of checks like edit_user() in wp-admin/includes/user.php.
+        *
+        * @since 4.7.0
+        *
+        * @param  mixed            $value   The password submitted in the request.
+        * @param  WP_REST_Request  $request Full details about the request.
+        * @param  string           $param   The parameter name.
+        * @return WP_Error|string The sanitized password, if valid, otherwise an error.
+        */
+       public function check_user_password( $value, $request, $param ) {
+               $password = (string) $value;
+
+               if ( empty( $password ) ) {
+                       return new WP_Error( 'rest_user_invalid_password', __( 'Passwords cannot be empty.' ), array( 'status' => 400 ) );
+               }
+
+               if ( false !== strpos( $password, "\\" ) ) {
+                       return new WP_Error( 'rest_user_invalid_password', __( 'Passwords cannot contain the "\\" character.' ), array( 'status' => 400 ) );
+               }
+
+               return $password;
+       }
+
+       /**
+        * Retrieves the user's schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Item schema data.
+        */
+       public function get_item_schema() {
+               $schema = array(
+                       '$schema'    => 'http://json-schema.org/schema#',
+                       'title'      => 'user',
+                       'type'       => 'object',
+                       'properties' => array(
+                               'id'          => array(
+                                       'description' => __( 'Unique identifier for the user.' ),
+                                       'type'        => 'integer',
+                                       'context'     => array( 'embed', 'view', 'edit' ),
+                                       'readonly'    => true,
+                               ),
+                               'username'    => array(
+                                       'description' => __( 'Login name for the user.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'edit' ),
+                                       'required'    => true,
+                                       'arg_options' => array(
+                                               'sanitize_callback' => array( $this, 'check_username' ),
+                                       ),
+                               ),
+                               'name'        => array(
+                                       'description' => __( 'Display name for the user.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'embed', 'view', 'edit' ),
+                                       'arg_options' => array(
+                                               'sanitize_callback' => 'sanitize_text_field',
+                                       ),
+                               ),
+                               'first_name'  => array(
+                                       'description' => __( 'First name for the user.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'edit' ),
+                                       'arg_options' => array(
+                                               'sanitize_callback' => 'sanitize_text_field',
+                                       ),
+                               ),
+                               'last_name'   => array(
+                                       'description' => __( 'Last name for the user.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'edit' ),
+                                       'arg_options' => array(
+                                               'sanitize_callback' => 'sanitize_text_field',
+                                       ),
+                               ),
+                               'email'       => array(
+                                       'description' => __( 'The email address for the user.' ),
+                                       'type'        => 'string',
+                                       'format'      => 'email',
+                                       'context'     => array( 'edit' ),
+                                       'required'    => true,
+                               ),
+                               'url'         => array(
+                                       'description' => __( 'URL of the user.' ),
+                                       'type'        => 'string',
+                                       'format'      => 'uri',
+                                       'context'     => array( 'embed', 'view', 'edit' ),
+                               ),
+                               'description' => array(
+                                       'description' => __( 'Description of the user.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'embed', 'view', 'edit' ),
+                               ),
+                               'link'        => array(
+                                       'description' => __( 'Author URL of the user.' ),
+                                       'type'        => 'string',
+                                       'format'      => 'uri',
+                                       'context'     => array( 'embed', 'view', 'edit' ),
+                                       'readonly'    => true,
+                               ),
+                               'locale'    => array(
+                                       'description' => __( 'Locale for the user.' ),
+                                       'type'        => 'string',
+                                       'enum'        => array_merge( array( '', 'en_US' ), get_available_languages() ),
+                                       'context'     => array( 'edit' ),
+                               ),
+                               'nickname'    => array(
+                                       'description' => __( 'The nickname for the user.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'edit' ),
+                                       'arg_options' => array(
+                                               'sanitize_callback' => 'sanitize_text_field',
+                                       ),
+                               ),
+                               'slug'        => array(
+                                       'description' => __( 'An alphanumeric identifier for the user.' ),
+                                       'type'        => 'string',
+                                       'context'     => array( 'embed', 'view', 'edit' ),
+                                       'arg_options' => array(
+                                               'sanitize_callback' => array( $this, 'sanitize_slug' ),
+                                       ),
+                               ),
+                               'registered_date' => array(
+                                       'description' => __( 'Registration date for the user.' ),
+                                       'type'        => 'string',
+                                       'format'      => 'date-time',
+                                       'context'     => array( 'edit' ),
+                                       'readonly'    => true,
+                               ),
+                               'roles'           => array(
+                                       'description' => __( 'Roles assigned to the user.' ),
+                                       'type'        => 'array',
+                                       'items'       => array(
+                                               'type'    => 'string',
+                                       ),
+                                       'context'     => array( 'edit' ),
+                               ),
+                               'password'        => array(
+                                       'description' => __( 'Password for the user (never included).' ),
+                                       'type'        => 'string',
+                                       'context'     => array(), // Password is never displayed.
+                                       'required'    => true,
+                                       'arg_options' => array(
+                                               'sanitize_callback' => array( $this, 'check_user_password' ),
+                                       ),
+                               ),
+                               'capabilities'    => array(
+                                       'description' => __( 'All capabilities assigned to the user.' ),
+                                       'type'        => 'object',
+                                       'context'     => array( 'edit' ),
+                                       'readonly'    => true,
+                               ),
+                               'extra_capabilities' => array(
+                                       'description' => __( 'Any extra capabilities assigned to the user.' ),
+                                       'type'        => 'object',
+                                       'context'     => array( 'edit' ),
+                                       'readonly'    => true,
+                               ),
+                       ),
+               );
+
+               if ( get_option( 'show_avatars' ) ) {
+                       $avatar_properties = array();
+
+                       $avatar_sizes = rest_get_avatar_sizes();
+
+                       foreach ( $avatar_sizes as $size ) {
+                               $avatar_properties[ $size ] = array(
+                                       /* translators: %d: avatar image size in pixels */
+                                       'description' => sprintf( __( 'Avatar URL with image size of %d pixels.' ), $size ),
+                                       'type'        => 'string',
+                                       'format'      => 'uri',
+                                       'context'     => array( 'embed', 'view', 'edit' ),
+                               );
+                       }
+
+                       $schema['properties']['avatar_urls']  = array(
+                               'description' => __( 'Avatar URLs for the user.' ),
+                               'type'        => 'object',
+                               'context'     => array( 'embed', 'view', 'edit' ),
+                               'readonly'    => true,
+                               'properties'  => $avatar_properties,
+                       );
+               }
+
+               $schema['properties']['meta'] = $this->meta->get_field_schema();
+
+               return $this->add_additional_fields_schema( $schema );
+       }
+
+       /**
+        * Retrieves the query params for collections.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return array Collection parameters.
+        */
+       public function get_collection_params() {
+               $query_params = parent::get_collection_params();
+
+               $query_params['context']['default'] = 'view';
+
+               $query_params['exclude'] = array(
+                       'description'        => __( 'Ensure result set excludes specific IDs.' ),
+                       'type'               => 'array',
+                       'items'              => array(
+                               'type'           => 'integer',
+                       ),
+                       'default'            => array(),
+               );
+
+               $query_params['include'] = array(
+                       'description'        => __( 'Limit result set to specific IDs.' ),
+                       'type'               => 'array',
+                       'items'              => array(
+                               'type'           => 'integer',
+                       ),
+                       'default'            => array(),
+               );
+
+               $query_params['offset'] = array(
+                       'description'        => __( 'Offset the result set by a specific number of items.' ),
+                       'type'               => 'integer',
+               );
+
+               $query_params['order'] = array(
+                       'default'            => 'asc',
+                       'description'        => __( 'Order sort attribute ascending or descending.' ),
+                       'enum'               => array( 'asc', 'desc' ),
+                       'type'               => 'string',
+               );
+
+               $query_params['orderby'] = array(
+                       'default'            => 'name',
+                       'description'        => __( 'Sort collection by object attribute.' ),
+                       'enum'               => array(
+                               'id',
+                               'include',
+                               'name',
+                               'registered_date',
+                               'slug',
+                               'email',
+                               'url',
+                       ),
+                       'type'               => 'string',
+               );
+
+               $query_params['slug']    = array(
+                       'description'        => __( 'Limit result set to users with a specific slug.' ),
+                       'type'               => 'string',
+               );
+
+               $query_params['roles']   = array(
+                       'description'        => __( 'Limit result set to users matching at least one specific role provided. Accepts csv list or single role.' ),
+                       'type'               => 'array',
+                       'items'              => array(
+                               'type'           => 'string',
+                       ),
+               );
+
+               /**
+                * Filter collection parameters for the users controller.
+                *
+                * This filter registers the collection parameter, but does not map the
+                * collection parameter to an internal WP_User_Query parameter.  Use the
+                * `rest_user_query` filter to set WP_User_Query arguments.
+                *
+                * @since 4.7.0
+                *
+                * @param $params JSON Schema-formatted collection parameters.
+                */
+               return apply_filters( 'rest_user_collection_params', $query_params );
+       }
+}
diff --git a/wp-includes/rest-api/fields/class-wp-rest-comment-meta-fields.php b/wp-includes/rest-api/fields/class-wp-rest-comment-meta-fields.php
new file mode 100644 (file)
index 0000000..007f66b
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+/**
+ * REST API: WP_REST_Comment_Meta_Fields class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class to manage comment meta via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Meta_Fields
+ */
+class WP_REST_Comment_Meta_Fields extends WP_REST_Meta_Fields {
+
+       /**
+        * Retrieves the object type for comment meta.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return string The meta type.
+        */
+       protected function get_meta_type() {
+               return 'comment';
+       }
+
+       /**
+        * Retrieves the type for register_rest_field() in the context of comments.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return string The REST field type.
+        */
+       public function get_rest_field_type() {
+               return 'comment';
+       }
+}
diff --git a/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php b/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php
new file mode 100644 (file)
index 0000000..eaf70a5
--- /dev/null
@@ -0,0 +1,470 @@
+<?php
+/**
+ * REST API: WP_REST_Meta_Fields class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class to manage meta values for an object via the REST API.
+ *
+ * @since 4.7.0
+ */
+abstract class WP_REST_Meta_Fields {
+
+       /**
+        * Retrieves the object meta type.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return string One of 'post', 'comment', 'term', 'user', or anything
+        *                else supported by `_get_meta_table()`.
+        */
+       abstract protected function get_meta_type();
+
+       /**
+        * Retrieves the object type for register_rest_field().
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return string The REST field type, such as post type name, taxonomy name, 'comment', or `user`.
+        */
+       abstract protected function get_rest_field_type();
+
+       /**
+        * Registers the meta field.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @see register_rest_field()
+        */
+       public function register_field() {
+               register_rest_field( $this->get_rest_field_type(), 'meta', array(
+                       'get_callback'    => array( $this, 'get_value' ),
+                       'update_callback' => array( $this, 'update_value' ),
+                       'schema'          => $this->get_field_schema(),
+               ));
+       }
+
+       /**
+        * Retrieves the meta field value.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param int             $object_id Object ID to fetch meta for.
+        * @param WP_REST_Request $request   Full details about the request.
+        * @return WP_Error|object Object containing the meta values by name, otherwise WP_Error object.
+        */
+       public function get_value( $object_id, $request ) {
+               $fields   = $this->get_registered_fields();
+               $response = array();
+
+               foreach ( $fields as $meta_key => $args ) {
+                       $name = $args['name'];
+                       $all_values = get_metadata( $this->get_meta_type(), $object_id, $meta_key, false );
+                       if ( $args['single'] ) {
+                               if ( empty( $all_values ) ) {
+                                       $value = $args['schema']['default'];
+                               } else {
+                                       $value = $all_values[0];
+                               }
+                               $value = $this->prepare_value_for_response( $value, $request, $args );
+                       } else {
+                               $value = array();
+                               foreach ( $all_values as $row ) {
+                                       $value[] = $this->prepare_value_for_response( $row, $request, $args );
+                               }
+                       }
+
+                       $response[ $name ] = $value;
+               }
+
+               return $response;
+       }
+
+       /**
+        * Prepares a meta value for a response.
+        *
+        * This is required because some native types cannot be stored correctly
+        * in the database, such as booleans. We need to cast back to the relevant
+        * type before passing back to JSON.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param mixed           $value   Meta value to prepare.
+        * @param WP_REST_Request $request Current request object.
+        * @param array           $args    Options for the field.
+        * @return mixed Prepared value.
+        */
+       protected function prepare_value_for_response( $value, $request, $args ) {
+               if ( ! empty( $args['prepare_callback'] ) ) {
+                       $value = call_user_func( $args['prepare_callback'], $value, $request, $args );
+               }
+
+               return $value;
+       }
+
+       /**
+        * Updates meta values.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param array           $meta      Array of meta parsed from the request.
+        * @param int             $object_id Object ID to fetch meta for.
+        * @return WP_Error|null WP_Error if one occurs, null on success.
+        */
+       public function update_value( $meta, $object_id ) {
+               $fields = $this->get_registered_fields();
+               foreach ( $fields as $meta_key => $args ) {
+                       $name = $args['name'];
+                       if ( ! array_key_exists( $name, $meta ) ) {
+                               continue;
+                       }
+
+                       /*
+                        * A null value means reset the field, which is essentially deleting it
+                        * from the database and then relying on the default value.
+                        */
+                       if ( is_null( $meta[ $name ] ) ) {
+                               $result = $this->delete_meta_value( $object_id, $meta_key, $name );
+                               if ( is_wp_error( $result ) ) {
+                                       return $result;
+                               }
+                               continue;
+                       }
+
+                       $is_valid = rest_validate_value_from_schema( $meta[ $name ], $args['schema'], 'meta.' . $name );
+                       if ( is_wp_error( $is_valid ) ) {
+                               $is_valid->add_data( array( 'status' => 400 ) );
+                               return $is_valid;
+                       }
+
+                       $value = rest_sanitize_value_from_schema( $meta[ $name ], $args['schema'] );
+
+                       if ( $args['single'] ) {
+                               $result = $this->update_meta_value( $object_id, $meta_key, $name, $value );
+                       } else {
+                               $result = $this->update_multi_meta_value( $object_id, $meta_key, $name, $value );
+                       }
+
+                       if ( is_wp_error( $result ) ) {
+                               return $result;
+                       }
+               }
+
+               return null;
+       }
+
+       /**
+        * Deletes a meta value for an object.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param int    $object_id Object ID the field belongs to.
+        * @param string $meta_key  Key for the field.
+        * @param string $name      Name for the field that is exposed in the REST API.
+        * @return bool|WP_Error True if meta field is deleted, WP_Error otherwise.
+        */
+       protected function delete_meta_value( $object_id, $meta_key, $name ) {
+               $meta_type = $this->get_meta_type();
+               if ( ! current_user_can( "delete_{$meta_type}_meta", $object_id, $meta_key ) ) {
+                       return new WP_Error(
+                               'rest_cannot_delete',
+                               /* translators: %s: custom field key */
+                               sprintf( __( 'Sorry, you are not allowed to edit the %s custom field.' ), $name ),
+                               array( 'key' => $name, 'status' => rest_authorization_required_code() )
+                       );
+               }
+
+               if ( ! delete_metadata( $meta_type, $object_id, wp_slash( $meta_key ) ) ) {
+                       return new WP_Error(
+                               'rest_meta_database_error',
+                               __( 'Could not delete meta value from database.' ),
+                               array( 'key' => $name, 'status' => WP_Http::INTERNAL_SERVER_ERROR )
+                       );
+               }
+
+               return true;
+       }
+
+       /**
+        * Updates multiple meta values for an object.
+        *
+        * Alters the list of values in the database to match the list of provided values.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param int    $object_id Object ID to update.
+        * @param string $meta_key  Key for the custom field.
+        * @param string $name      Name for the field that is exposed in the REST API.
+        * @param array  $values    List of values to update to.
+        * @return bool|WP_Error True if meta fields are updated, WP_Error otherwise.
+        */
+       protected function update_multi_meta_value( $object_id, $meta_key, $name, $values ) {
+               $meta_type = $this->get_meta_type();
+               if ( ! current_user_can( "edit_{$meta_type}_meta", $object_id, $meta_key ) ) {
+                       return new WP_Error(
+                               'rest_cannot_update',
+                               /* translators: %s: custom field key */
+                               sprintf( __( 'Sorry, you are not allowed to edit the %s custom field.' ), $name ),
+                               array( 'key' => $name, 'status' => rest_authorization_required_code() )
+                       );
+               }
+
+               $current = get_metadata( $meta_type, $object_id, $meta_key, false );
+
+               $to_remove = $current;
+               $to_add    = $values;
+
+               foreach ( $to_add as $add_key => $value ) {
+                       $remove_keys = array_keys( $to_remove, $value, true );
+
+                       if ( empty( $remove_keys ) ) {
+                               continue;
+                       }
+
+                       if ( count( $remove_keys ) > 1 ) {
+                               // To remove, we need to remove first, then add, so don't touch.
+                               continue;
+                       }
+
+                       $remove_key = $remove_keys[0];
+
+                       unset( $to_remove[ $remove_key ] );
+                       unset( $to_add[ $add_key ] );
+               }
+
+               // `delete_metadata` removes _all_ instances of the value, so only call once.
+               $to_remove = array_unique( $to_remove );
+
+               foreach ( $to_remove as $value ) {
+                       if ( ! delete_metadata( $meta_type, $object_id, wp_slash( $meta_key ), wp_slash( $value ) ) ) {
+                               return new WP_Error(
+                                       'rest_meta_database_error',
+                                       __( 'Could not update meta value in database.' ),
+                                       array( 'key' => $name, 'status' => WP_Http::INTERNAL_SERVER_ERROR )
+                               );
+                       }
+               }
+
+               foreach ( $to_add as $value ) {
+                       if ( ! add_metadata( $meta_type, $object_id, wp_slash( $meta_key ), wp_slash( $value ) ) ) {
+                               return new WP_Error(
+                                       'rest_meta_database_error',
+                                       __( 'Could not update meta value in database.' ),
+                                       array( 'key' => $name, 'status' => WP_Http::INTERNAL_SERVER_ERROR )
+                               );
+                       }
+               }
+
+               return true;
+       }
+
+       /**
+        * Updates a meta value for an object.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @param int    $object_id Object ID to update.
+        * @param string $meta_key  Key for the custom field.
+        * @param string $name      Name for the field that is exposed in the REST API.
+        * @param mixed  $value     Updated value.
+        * @return bool|WP_Error True if the meta field was updated, WP_Error otherwise.
+        */
+       protected function update_meta_value( $object_id, $meta_key, $name, $value ) {
+               $meta_type = $this->get_meta_type();
+               if ( ! current_user_can(  "edit_{$meta_type}_meta", $object_id, $meta_key ) ) {
+                       return new WP_Error(
+                               'rest_cannot_update',
+                               /* translators: %s: custom field key */
+                               sprintf( __( 'Sorry, you are not allowed to edit the %s custom field.' ), $name ),
+                               array( 'key' => $name, 'status' => rest_authorization_required_code() )
+                       );
+               }
+
+               $meta_key   = wp_slash( $meta_key );
+               $meta_value = wp_slash( $value );
+
+               // Do the exact same check for a duplicate value as in update_metadata() to avoid update_metadata() returning false.
+               $old_value = get_metadata( $meta_type, $object_id, $meta_key );
+
+               if ( 1 === count( $old_value ) ) {
+                       if ( $old_value[0] === $meta_value ) {
+                               return true;
+                       }
+               }
+
+               if ( ! update_metadata( $meta_type, $object_id, $meta_key, $meta_value ) ) {
+                       return new WP_Error(
+                               'rest_meta_database_error',
+                               __( 'Could not update meta value in database.' ),
+                               array( 'key' => $name, 'status' => WP_Http::INTERNAL_SERVER_ERROR )
+                       );
+               }
+
+               return true;
+       }
+
+       /**
+        * Retrieves all the registered meta fields.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return array Registered fields.
+        */
+       protected function get_registered_fields() {
+               $registered = array();
+
+               foreach ( get_registered_meta_keys( $this->get_meta_type() ) as $name => $args ) {
+                       if ( empty( $args['show_in_rest'] ) ) {
+                               continue;
+                       }
+
+                       $rest_args = array();
+
+                       if ( is_array( $args['show_in_rest'] ) ) {
+                               $rest_args = $args['show_in_rest'];
+                       }
+
+                       $default_args = array(
+                               'name'             => $name,
+                               'single'           => $args['single'],
+                               'type'             => ! empty( $args['type'] ) ? $args['type'] : null,
+                               'schema'           => array(),
+                               'prepare_callback' => array( $this, 'prepare_value' ),
+                       );
+
+                       $default_schema = array(
+                               'type'        => $default_args['type'],
+                               'description' => empty( $args['description'] ) ? '' : $args['description'],
+                               'default'     => isset( $args['default'] ) ? $args['default'] : null,
+                       );
+
+                       $rest_args = array_merge( $default_args, $rest_args );
+                       $rest_args['schema'] = array_merge( $default_schema, $rest_args['schema'] );
+
+                       $type = ! empty( $rest_args['type'] ) ? $rest_args['type'] : null;
+                       $type = ! empty( $rest_args['schema']['type'] ) ? $rest_args['schema']['type'] : $type;
+
+                       if ( ! in_array( $type, array( 'string', 'boolean', 'integer', 'number' ) ) ) {
+                               continue;
+                       }
+
+                       if ( empty( $rest_args['single'] ) ) {
+                               $rest_args['schema']['items'] = array(
+                                       'type' => $rest_args['type'],
+                               );
+                               $rest_args['schema']['type'] = 'array';
+                       }
+
+                       $registered[ $name ] = $rest_args;
+               }
+
+               return $registered;
+       }
+
+       /**
+        * Retrieves the object's meta schema, conforming to JSON Schema.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return array Field schema data.
+        */
+       public function get_field_schema() {
+               $fields = $this->get_registered_fields();
+
+               $schema = array(
+                       'description' => __( 'Meta fields.' ),
+                       'type'        => 'object',
+                       'context'     => array( 'view', 'edit' ),
+                       'properties'  => array(),
+                       'arg_options' => array(
+                               'sanitize_callback' => null,
+                               'validate_callback' => array( $this, 'check_meta_is_array' ),
+                       ),
+               );
+
+               foreach ( $fields as $args ) {
+                       $schema['properties'][ $args['name'] ] = $args['schema'];
+               }
+
+               return $schema;
+       }
+
+       /**
+        * Prepares a meta value for output.
+        *
+        * Default preparation for meta fields. Override by passing the
+        * `prepare_callback` in your `show_in_rest` options.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param mixed           $value   Meta value from the database.
+        * @param WP_REST_Request $request Request object.
+        * @param array           $args    REST-specific options for the meta key.
+        * @return mixed Value prepared for output. If a non-JsonSerializable object, null.
+        */
+       public static function prepare_value( $value, $request, $args ) {
+               $type = $args['schema']['type'];
+
+               // For multi-value fields, check the item type instead.
+               if ( 'array' === $type && ! empty( $args['schema']['items']['type'] ) ) {
+                       $type = $args['schema']['items']['type'];
+               }
+
+               switch ( $type ) {
+                       case 'string':
+                               $value = (string) $value;
+                               break;
+                       case 'integer':
+                               $value = (int) $value;
+                               break;
+                       case 'number':
+                               $value = (float) $value;
+                               break;
+                       case 'boolean':
+                               $value = (bool) $value;
+                               break;
+               }
+
+               // Don't allow objects to be output.
+               if ( is_object( $value ) && ! ( $value instanceof JsonSerializable ) ) {
+                       return null;
+               }
+
+               return $value;
+       }
+
+       /**
+        * Check the 'meta' value of a request is an associative array.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param  mixed           $value   The meta value submitted in the request.
+        * @param  WP_REST_Request $request Full details about the request.
+        * @param  string          $param   The parameter name.
+        * @return WP_Error|string The meta array, if valid, otherwise an error.
+        */
+       public function check_meta_is_array( $value, $request, $param ) {
+               if ( ! is_array( $value ) ) {
+                       return false;
+               }
+
+               return $value;
+       }
+}
diff --git a/wp-includes/rest-api/fields/class-wp-rest-post-meta-fields.php b/wp-includes/rest-api/fields/class-wp-rest-post-meta-fields.php
new file mode 100644 (file)
index 0000000..17d87fa
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+/**
+ * REST API: WP_REST_Post_Meta_Fields class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to manage meta values for posts via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Meta_Fields
+ */
+class WP_REST_Post_Meta_Fields extends WP_REST_Meta_Fields {
+
+       /**
+        * Post type to register fields for.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var string
+        */
+       protected $post_type;
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param string $post_type Post type to register fields for.
+        */
+       public function __construct( $post_type ) {
+               $this->post_type = $post_type;
+       }
+
+       /**
+        * Retrieves the object meta type.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return string The meta type.
+        */
+       protected function get_meta_type() {
+               return 'post';
+       }
+
+       /**
+        * Retrieves the type for register_rest_field().
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @see register_rest_field()
+        *
+        * @return string The REST field type.
+        */
+       public function get_rest_field_type() {
+               return $this->post_type;
+       }
+}
diff --git a/wp-includes/rest-api/fields/class-wp-rest-term-meta-fields.php b/wp-includes/rest-api/fields/class-wp-rest-term-meta-fields.php
new file mode 100644 (file)
index 0000000..da1349b
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+/**
+ * REST API: WP_REST_Term_Meta_Fields class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to manage meta values for terms via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Meta_Fields
+ */
+class WP_REST_Term_Meta_Fields extends WP_REST_Meta_Fields {
+
+       /**
+        * Taxonomy to register fields for.
+        *
+        * @since 4.7.0
+        * @access protected
+        * @var string
+        */
+       protected $taxonomy;
+
+       /**
+        * Constructor.
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @param string $taxonomy Taxonomy to register fields for.
+        */
+       public function __construct( $taxonomy ) {
+               $this->taxonomy = $taxonomy;
+       }
+
+       /**
+        * Retrieves the object meta type.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return string The meta type.
+        */
+       protected function get_meta_type() {
+               return 'term';
+       }
+
+       /**
+        * Retrieves the type for register_rest_field().
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return string The REST field type.
+        */
+       public function get_rest_field_type() {
+               return 'post_tag' === $this->taxonomy ? 'tag' : $this->taxonomy;
+       }
+}
diff --git a/wp-includes/rest-api/fields/class-wp-rest-user-meta-fields.php b/wp-includes/rest-api/fields/class-wp-rest-user-meta-fields.php
new file mode 100644 (file)
index 0000000..dcc9be6
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+/**
+ * REST API: WP_REST_User_Meta_Fields class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 4.7.0
+ */
+
+/**
+ * Core class used to manage meta values for users via the REST API.
+ *
+ * @since 4.7.0
+ *
+ * @see WP_REST_Meta_Fields
+ */
+class WP_REST_User_Meta_Fields extends WP_REST_Meta_Fields {
+
+       /**
+        * Retrieves the object meta type.
+        *
+        * @since 4.7.0
+        * @access protected
+        *
+        * @return string The user meta type.
+        */
+       protected function get_meta_type() {
+               return 'user';
+       }
+
+       /**
+        * Retrieves the type for register_rest_field().
+        *
+        * @since 4.7.0
+        * @access public
+        *
+        * @return string The user REST field type.
+        */
+       public function get_rest_field_type() {
+               return 'user';
+       }
+}
index 07a986c00318aab77ae03490d8bcb443af26a34c..c166fbf13199bf566709ee46b2153e88733d3671 100644 (file)
@@ -321,9 +321,10 @@ function _wp_put_post_revision( $post = null, $autosave = false ) {
  * @since 2.6.0
  *
  * @param int|WP_Post $post   The post ID or object.
- * @param string      $output Optional. OBJECT, ARRAY_A, or ARRAY_N.
+ * @param string      $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                            a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
  * @param string      $filter Optional sanitation filter. See sanitize_post().
- * @return WP_Post|array|null Null if error or post object if success.
+ * @return WP_Post|array|null WP_Post (or array) on success, or null on failure.
  */
 function wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
        if ( !$revision = get_post( $post, OBJECT, $filter ) )
index 4c3fb15160b3b683eb5804f8a5d75b5ceba64629..208ca720042d0497f333966d49144275f66aa62b 100644 (file)
@@ -60,15 +60,13 @@ class MagpieRSS {
         */
        function __construct( $source ) {
 
-               # if PHP xml isn't compiled in, die
+               # Check if PHP xml isn't compiled
                #
-               if ( !function_exists('xml_parser_create') )
-                       trigger_error( "Failed to load PHP's XML Extension. https://secure.php.net/manual/en/ref.xml.php" );
-
-               $parser = @xml_parser_create();
+               if ( ! function_exists('xml_parser_create') ) {
+                       return trigger_error( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." );
+               }
 
-               if ( !is_resource($parser) )
-                       trigger_error( "Failed to create an instance of PHP's XML parser. https://secure.php.net/manual/en/ref.xml.php");
+               $parser = xml_parser_create();
 
                $this->parser = $parser;
 
@@ -743,7 +741,7 @@ class RSSCache {
 /*=======================================================================*\
        Function:       set
        Purpose:        add an item to the cache, keyed on url
-       Input:          url from wich the rss file was fetched
+       Input:          url from which the rss file was fetched
        Output:         true on success
 \*=======================================================================*/
        function set ($url, $rss) {
@@ -757,7 +755,7 @@ class RSSCache {
 /*=======================================================================*\
        Function:       get
        Purpose:        fetch an item from the cache
-       Input:          url from wich the rss file was fetched
+       Input:          url from which the rss file was fetched
        Output:         cached object on HIT, false on MISS
 \*=======================================================================*/
        function get ($url) {
@@ -778,7 +776,7 @@ class RSSCache {
        Function:       check_cache
        Purpose:        check a url for membership in the cache
                                and whether the object is older then MAX_AGE (ie. STALE)
-       Input:          url from wich the rss file was fetched
+       Input:          url from which the rss file was fetched
        Output:         cached object on HIT, false on MISS
 \*=======================================================================*/
        function check_cache ( $url ) {
@@ -811,7 +809,7 @@ class RSSCache {
 /*=======================================================================*\
        Function:       file_name
        Purpose:        map url to location in cache
-       Input:          url from wich the rss file was fetched
+       Input:          url from which the rss file was fetched
        Output:         a file name
 \*=======================================================================*/
        function file_name ($url) {
index d57dff6baa42c6c64c81155217833f5b7ec7c064..be32073c039323ee5951c7282a346b892af7f12d 100644 (file)
@@ -16,6 +16,9 @@
  * @package WordPress
  */
 
+/** WordPress Dependency Class */
+require( ABSPATH . WPINC . '/class-wp-dependency.php' );
+
 /** WordPress Dependencies Class */
 require( ABSPATH . WPINC . '/class.wp-dependencies.php' );
 
@@ -74,8 +77,10 @@ function wp_default_scripts( &$scripts ) {
 
        $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 );
        did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array(
-               'warnDelete' => __( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." ),
-               'dismiss'    => __( 'Dismiss this notice.' ),
+               'warnDelete'   => __( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." ),
+               'dismiss'      => __( 'Dismiss this notice.' ),
+               'collapseMenu' => __( 'Collapse Main menu' ),
+               'expandMenu'   => __( 'Expand Main menu' ),
        ) );
 
        $scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 );
@@ -226,11 +231,12 @@ function wp_default_scripts( &$scripts ) {
 
        // Strings for 'jquery-ui-autocomplete' live region messages
        did_action( 'init' ) && $scripts->localize( 'jquery-ui-autocomplete', 'uiAutocompleteL10n', array(
-               'noResults' => __( 'No search results.' ),
+               'noResults' => __( 'No results found.' ),
                /* 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.' ),
+               'itemSelected' => __( 'Item selected.' ),
        ) );
 
        // deprecated, not used in core, most functionality is included in jQuery 1.3
@@ -238,7 +244,6 @@ function wp_default_scripts( &$scripts ) {
 
        // jQuery plugins
        $scripts->add( 'jquery-color', "/wp-includes/js/jquery/jquery.color.min.js", array('jquery'), '2.1.1', 1 );
-       $scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array('jquery'), '1.1-20110113', 1 );
        $scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20m', 1 );
        $scripts->add( 'jquery-query', "/wp-includes/js/jquery/jquery.query.js", array('jquery'), '2.1.7', 1 );
        $scripts->add( 'jquery-serialize-object', "/wp-includes/js/jquery/jquery.serialize-object.js", array('jquery'), '0.2', 1 );
@@ -246,6 +251,9 @@ function wp_default_scripts( &$scripts ) {
        $scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), false, 1 );
        $scripts->add( 'jquery-touch-punch', "/wp-includes/js/jquery/jquery.ui.touch-punch.js", array('jquery-ui-widget', 'jquery-ui-mouse'), '0.2.2', 1 );
 
+       // Not used any more, registered for backwards compatibility.
+       $scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array('jquery'), '1.1-20110113', 1 );
+
        // 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( 'imagesloaded', "/wp-includes/js/imagesloaded.min.js", array(), '3.2.0', 1 );
@@ -281,6 +289,7 @@ function wp_default_scripts( &$scripts ) {
                'upload_limit_exceeded' => __('You may only upload 1 file.'),
                'http_error' => __('HTTP error.'),
                'upload_failed' => __('Upload failed.'),
+               /* translators: 1: Opening link tag, 2: Closing link tag */
                'big_upload_failed' => __('Please try uploading this file with the %1$sbrowser uploader%2$s.'),
                'big_upload_queued' => __('%s exceeds the maximum upload size for the multi-file uploader when used in your browser.'),
                'io_error' => __('IO error.'),
@@ -400,7 +409,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.' ),
+               'warnWeak' => __( 'Confirm use of weak password' ),
                'show'     => __( 'Show' ),
                'hide'     => __( 'Hide' ),
                'cancel'   => __( 'Cancel' ),
@@ -444,10 +453,10 @@ function wp_default_scripts( &$scripts ) {
 
        $scripts->add( 'customize-base',     "/wp-includes/js/customize-base$suffix.js",     array( 'jquery', 'json2', 'underscore' ), false, 1 );
        $scripts->add( 'customize-loader',   "/wp-includes/js/customize-loader$suffix.js",   array( 'customize-base' ), false, 1 );
-       $scripts->add( 'customize-preview',  "/wp-includes/js/customize-preview$suffix.js",  array( 'customize-base' ), false, 1 );
+       $scripts->add( 'customize-preview',  "/wp-includes/js/customize-preview$suffix.js",  array( 'wp-a11y', 'customize-base' ), false, 1 );
        $scripts->add( 'customize-models',   "/wp-includes/js/customize-models.js", array( 'underscore', 'backbone' ), false, 1 );
        $scripts->add( 'customize-views',    "/wp-includes/js/customize-views.js",  array( 'jquery', 'underscore', 'imgareaselect', 'customize-models', 'media-editor', 'media-views' ), false, 1 );
-       $scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base', 'wp-a11y' ), false, 1 );
+       $scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base', 'wp-a11y', 'wp-util' ), false, 1 );
        did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array(
                'activate'           => __( 'Save &amp; Activate' ),
                'save'               => __( 'Save &amp; Publish' ),
@@ -459,8 +468,8 @@ function wp_default_scripts( &$scripts ) {
                'notAllowed'         => __( 'Sorry, you are not allowed to customize this site.' ),
                'previewIframeTitle' => __( 'Site Preview' ),
                'loginIframeTitle'   => __( 'Session expired' ),
-               'collapseSidebar'    => __( 'Collapse Sidebar' ),
-               'expandSidebar'      => __( 'Expand Sidebar' ),
+               'collapseSidebar'    => _x( 'Hide Controls', 'label for hide controls button without length constraints' ),
+               'expandSidebar'      => _x( 'Show Controls', 'label for hide controls button without length constraints' ),
                'untitledBlogName'   => __( '(Untitled)' ),
                // Used for overriding the file types allowed in plupload.
                'allowedFiles'       => __( 'Allowed Files' ),
@@ -473,6 +482,8 @@ function wp_default_scripts( &$scripts ) {
        $scripts->add( 'customize-nav-menus', "/wp-admin/js/customize-nav-menus$suffix.js", array( 'jquery', 'wp-backbone', 'customize-controls', 'accordion', 'nav-menu' ), false, 1 );
        $scripts->add( 'customize-preview-nav-menus', "/wp-includes/js/customize-preview-nav-menus$suffix.js", array( 'jquery', 'wp-util', 'customize-preview', 'customize-selective-refresh' ), false, 1 );
 
+       $scripts->add( 'wp-custom-header', "/wp-includes/js/wp-custom-header$suffix.js", array( 'wp-a11y' ), false, 1 );
+
        $scripts->add( 'accordion', "/wp-admin/js/accordion$suffix.js", array( 'jquery' ), false, 1 );
 
        $scripts->add( 'shortcode', "/wp-includes/js/shortcode$suffix.js", array( 'underscore' ), false, 1 );
@@ -493,6 +504,13 @@ function wp_default_scripts( &$scripts ) {
        $scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 );
        $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'jquery', 'media-views', 'media-audiovideo' ), false, 1 );
 
+       $scripts->add( 'wp-api', "/wp-includes/js/wp-api$suffix.js", array( 'jquery', 'backbone', 'underscore' ), false, 1 );
+       did_action( 'init' ) && $scripts->localize( 'wp-api', 'wpApiSettings', array(
+               'root'          => esc_url_raw( get_rest_url() ),
+               'nonce'         => wp_create_nonce( 'wp_rest' ),
+               'versionString' => 'wp/v2/',
+       ) );
+
        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(
@@ -520,9 +538,15 @@ function wp_default_scripts( &$scripts ) {
                        'postBoxEmptyString' => __( 'Drag boxes here' ),
                ) );
 
-               $scripts->add( 'tags-box', "/wp-admin/js/tags-box$suffix.js", array( 'jquery', 'suggest' ), false, 1 );
-               did_action( 'init' ) && $scripts->localize( 'tags-box', 'tagsBoxL10n', array(
+               $scripts->add( 'tags-box', "/wp-admin/js/tags-box$suffix.js", array( 'jquery', 'tags-suggest' ), false, 1 );
+
+               $scripts->add( 'tags-suggest', "/wp-admin/js/tags-suggest$suffix.js", array( 'jquery-ui-autocomplete', 'wp-a11y' ), false, 1 );
+               did_action( 'init' ) && $scripts->localize( 'tags-suggest', 'tagsSuggestL10n', array(
                        'tagDelimiter' => _x( ',', 'tag delimiter' ),
+                       'removeTerm'   => __( 'Remove term:' ),
+                       'termSelected' => __( 'Term selected.' ),
+                       'termAdded'    => __( 'Term added.' ),
+                       'termRemoved'  => __( 'Term removed.' ),
                ) );
 
                $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y' ), false, 1 );
@@ -581,7 +605,7 @@ function wp_default_scripts( &$scripts ) {
 
                $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone', 'wp-a11y' ), false, 1 );
 
-               $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest', 'wp-a11y' ), false, 1 );
+               $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'tags-suggest', 'wp-a11y' ), false, 1 );
                did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
                        'error'      => __( 'Error while saving the changes.' ),
                        'ntdeltitle' => __( 'Remove From Bulk Edit' ),
@@ -603,7 +627,7 @@ function wp_default_scripts( &$scripts ) {
                        'ays' => __('Are you sure you want to install this plugin?')
                ) );
 
-               $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ) );
+               $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 );
                did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array(
                        'ajax_nonce' => wp_create_nonce( 'updates' ),
                        'l10n'       => array(
@@ -837,7 +861,7 @@ function wp_default_styles( &$styles ) {
        $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' ) );
        $styles->add( 'wp-pointer',           "/wp-includes/css/wp-pointer$suffix.css", array( 'dashicons' ) );
-       $styles->add( 'customize-preview',    "/wp-includes/css/customize-preview$suffix.css" );
+       $styles->add( 'customize-preview',    "/wp-includes/css/customize-preview$suffix.css", array( 'dashicons' ) );
        $styles->add( 'wp-embed-template-ie', "/wp-includes/css/wp-embed-template-ie$suffix.css" );
        $styles->add_data( 'wp-embed-template-ie', 'conditional', 'lte IE 8' );
 
@@ -859,7 +883,7 @@ function wp_default_styles( &$styles ) {
        $rtl_styles = array(
                // wp-admin
                'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus',
-               'widgets', 'site-icon', 'l10n', 'install', 'wp-color-picker', 'customize-controls', 'customize-widgets', 'customize-nav-menus',
+               'widgets', 'site-icon', 'l10n', 'install', 'wp-color-picker', 'customize-controls', 'customize-widgets', 'customize-nav-menus', 'customize-preview',
                'ie', 'login', 'press-this',
                // wp-includes
                'buttons', 'admin-bar', 'wp-auth-check', 'editor-buttons', 'media-views', 'wp-pointer',
index 63ab8fe589696fc75c5255f390778a691a93b5e4..d9175c98959dee4b7032dafa0624350e3a3dc473 100644 (file)
 <?php
 /**
- * Abstract class for managing user session tokens.
+ * Session API
  *
  * @since 4.0.0
  */
-abstract class WP_Session_Tokens {
 
-       /**
-        * User ID.
-        *
-        * @since 4.0.0
-        * @access protected
-        * @var int User ID.
-        */
-       protected $user_id;
+_deprecated_file( basename( __FILE__ ), '4.7.0' );
 
-       /**
-        * Protected constructor.
-        *
-        * @since 4.0.0
-        *
-        * @param int $user_id User whose session to manage.
-        */
-       protected function __construct( $user_id ) {
-               $this->user_id = $user_id;
-       }
-
-       /**
-        * Get a session token manager instance for a user.
-        *
-        * This method contains a filter that allows a plugin to swap out
-        * the session manager for a subclass of WP_Session_Tokens.
-        *
-        * @since 4.0.0
-        * @access public
-        * @static
-        *
-        * @param int $user_id User whose session to manage.
-        */
-       final public static function get_instance( $user_id ) {
-               /**
-                * Filters the session token manager used.
-                *
-                * @since 4.0.0
-                *
-                * @param string $session Name of class to use as the manager.
-                *                        Default 'WP_User_Meta_Session_Tokens'.
-                */
-               $manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' );
-               return new $manager( $user_id );
-       }
-
-       /**
-        * Hashes a session token for storage.
-        *
-        * @since 4.0.0
-        * @access private
-        *
-        * @param string $token Session token to hash.
-        * @return string A hash of the session token (a verifier).
-        */
-       final private function hash_token( $token ) {
-               // If ext/hash is not present, use sha1() instead.
-               if ( function_exists( 'hash' ) ) {
-                       return hash( 'sha256', $token );
-               } else {
-                       return sha1( $token );
-               }
-       }
-
-       /**
-        * Get a user's session.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param string $token Session token
-        * @return array User session
-        */
-       final public function get( $token ) {
-               $verifier = $this->hash_token( $token );
-               return $this->get_session( $verifier );
-       }
-
-       /**
-        * Validate a user's session token as authentic.
-        *
-        * Checks that the given token is present and hasn't expired.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param string $token Token to verify.
-        * @return bool Whether the token is valid for the user.
-        */
-       final public function verify( $token ) {
-               $verifier = $this->hash_token( $token );
-               return (bool) $this->get_session( $verifier );
-       }
-
-       /**
-        * Generate a session token and attach session information to it.
-        *
-        * A session token is a long, random string. It is used in a cookie
-        * link that cookie to an expiration time and to ensure the cookie
-        * becomes invalidated upon logout.
-        *
-        * This function generates a token and stores it with the associated
-        * expiration time (and potentially other session information via the
-        * {@see 'attach_session_information'} filter).
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param int $expiration Session expiration timestamp.
-        * @return string Session token.
-        */
-       final public function create( $expiration ) {
-               /**
-                * 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.
-                *
-                * @since 4.0.0
-                *
-                * @param array $session Array of extra data.
-                * @param int   $user_id User ID.
-                */
-               $session = apply_filters( 'attach_session_information', array(), $this->user_id );
-               $session['expiration'] = $expiration;
-
-               // IP address.
-               if ( !empty( $_SERVER['REMOTE_ADDR'] ) ) {
-                       $session['ip'] = $_SERVER['REMOTE_ADDR'];
-               }
-
-               // User-agent.
-               if ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
-                       $session['ua'] = wp_unslash( $_SERVER['HTTP_USER_AGENT'] );
-               }
-
-               // Timestamp
-               $session['login'] = time();
-
-               $token = wp_generate_password( 43, false, false );
-
-               $this->update( $token, $session );
-
-               return $token;
-       }
-
-       /**
-        * Update a session token.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param string $token Session token to update.
-        * @param array  $session Session information.
-        */
-       final public function update( $token, $session ) {
-               $verifier = $this->hash_token( $token );
-               $this->update_session( $verifier, $session );
-       }
-
-       /**
-        * Destroy a session token.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param string $token Session token to destroy.
-        */
-       final public function destroy( $token ) {
-               $verifier = $this->hash_token( $token );
-               $this->update_session( $verifier, null );
-       }
-
-       /**
-        * Destroy all session tokens for this user,
-        * except a single token, presumably the one in use.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param string $token_to_keep Session token to keep.
-        */
-       final public function destroy_others( $token_to_keep ) {
-               $verifier = $this->hash_token( $token_to_keep );
-               $session = $this->get_session( $verifier );
-               if ( $session ) {
-                       $this->destroy_other_sessions( $verifier );
-               } else {
-                       $this->destroy_all_sessions();
-               }
-       }
-
-       /**
-        * Determine whether a session token is still valid,
-        * based on expiration.
-        *
-        * @since 4.0.0
-        * @access protected
-        *
-        * @param array $session Session to check.
-        * @return bool Whether session is valid.
-        */
-       final protected function is_still_valid( $session ) {
-               return $session['expiration'] >= time();
-       }
-
-       /**
-        * Destroy all session tokens for a user.
-        *
-        * @since 4.0.0
-        * @access public
-        */
-       final public function destroy_all() {
-               $this->destroy_all_sessions();
-       }
-
-       /**
-        * Destroy all session tokens for all users.
-        *
-        * @since 4.0.0
-        * @access public
-        * @static
-        */
-       final public static function destroy_all_for_all_users() {
-               $manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' );
-               call_user_func( array( $manager, 'drop_sessions' ) );
-       }
-
-       /**
-        * Retrieve all sessions of a user.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @return array Sessions of a user.
-        */
-       final public function get_all() {
-               return array_values( $this->get_sessions() );
-       }
-
-       /**
-        * This method should retrieve all sessions of a user, keyed by verifier.
-        *
-        * @since 4.0.0
-        * @access protected
-        *
-        * @return array Sessions of a user, keyed by verifier.
-        */
-       abstract protected function get_sessions();
-
-       /**
-        * This method should look up a session by its verifier (token hash).
-        *
-        * @since 4.0.0
-        * @access protected
-        *
-        * @param string $verifier Verifier of the session to retrieve.
-        * @return array|null The session, or null if it does not exist.
-        */
-       abstract protected function get_session( $verifier );
-
-       /**
-        * This method should update a session by its verifier.
-        *
-        * Omitting the second argument should destroy the session.
-        *
-        * @since 4.0.0
-        * @access protected
-        *
-        * @param string $verifier Verifier of the session to update.
-        * @param array  $session  Optional. Session. Omitting this argument destroys the session.
-        */
-       abstract protected function update_session( $verifier, $session = null );
-
-       /**
-        * This method should destroy all session tokens for this user,
-        * except a single session passed.
-        *
-        * @since 4.0.0
-        * @access protected
-        *
-        * @param string $verifier Verifier of the session to keep.
-        */
-       abstract protected function destroy_other_sessions( $verifier );
-
-       /**
-        * This method should destroy all sessions for a user.
-        *
-        * @since 4.0.0
-        * @access protected
-        */
-       abstract protected function destroy_all_sessions();
-
-       /**
-        * This static method should destroy all session tokens for all users.
-        *
-        * @since 4.0.0
-        * @access public
-        * @static
-        */
-       public static function drop_sessions() {}
-}
-
-/**
- * Meta-based user sessions token manager.
- *
- * @since 4.0.0
- */
-class WP_User_Meta_Session_Tokens extends WP_Session_Tokens {
-
-       /**
-        * Get all sessions of a user.
-        *
-        * @since 4.0.0
-        * @access protected
-        *
-        * @return array Sessions of a user.
-        */
-       protected function get_sessions() {
-               $sessions = get_user_meta( $this->user_id, 'session_tokens', true );
-
-               if ( ! is_array( $sessions ) ) {
-                       return array();
-               }
-
-               $sessions = array_map( array( $this, 'prepare_session' ), $sessions );
-               return array_filter( $sessions, array( $this, 'is_still_valid' ) );
-       }
-
-       /**
-        * Converts an expiration to an array of session information.
-        *
-        * @param mixed $session Session or expiration.
-        * @return array Session.
-        */
-       protected function prepare_session( $session ) {
-               if ( is_int( $session ) ) {
-                       return array( 'expiration' => $session );
-               }
-
-               return $session;
-       }
-
-       /**
-        * Retrieve a session by its verifier (token hash).
-        *
-        * @since 4.0.0
-        * @access protected
-        *
-        * @param string $verifier Verifier of the session to retrieve.
-        * @return array|null The session, or null if it does not exist
-        */
-       protected function get_session( $verifier ) {
-               $sessions = $this->get_sessions();
-
-               if ( isset( $sessions[ $verifier ] ) ) {
-                       return $sessions[ $verifier ];
-               }
-
-               return null;
-       }
-
-       /**
-        * Update a session by its verifier.
-        *
-        * @since 4.0.0
-        * @access protected
-        *
-        * @param string $verifier Verifier of the session to update.
-        * @param array  $session  Optional. Session. Omitting this argument destroys the session.
-        */
-       protected function update_session( $verifier, $session = null ) {
-               $sessions = $this->get_sessions();
-
-               if ( $session ) {
-                       $sessions[ $verifier ] = $session;
-               } else {
-                       unset( $sessions[ $verifier ] );
-               }
-
-               $this->update_sessions( $sessions );
-       }
-
-       /**
-        * Update a user's sessions in the usermeta table.
-        *
-        * @since 4.0.0
-        * @access protected
-        *
-        * @param array $sessions Sessions.
-        */
-       protected function update_sessions( $sessions ) {
-               if ( $sessions ) {
-                       update_user_meta( $this->user_id, 'session_tokens', $sessions );
-               } else {
-                       delete_user_meta( $this->user_id, 'session_tokens' );
-               }
-       }
-
-       /**
-        * Destroy all session tokens for a user, except a single session passed.
-        *
-        * @since 4.0.0
-        * @access protected
-        *
-        * @param string $verifier Verifier of the session to keep.
-        */
-       protected function destroy_other_sessions( $verifier ) {
-               $session = $this->get_session( $verifier );
-               $this->update_sessions( array( $verifier => $session ) );
-       }
-
-       /**
-        * Destroy all session tokens for a user.
-        *
-        * @since 4.0.0
-        * @access protected
-        */
-       protected function destroy_all_sessions() {
-               $this->update_sessions( array() );
-       }
-
-       /**
-        * Destroy all session tokens for all users.
-        *
-        * @since 4.0.0
-        * @access public
-        * @static
-        */
-       public static function drop_sessions() {
-               delete_metadata( 'user', 0, 'session_tokens', false, true );
-       }
-}
+require_once( ABSPATH . WPINC . '/class-wp-session-tokens.php' );
+require_once( ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php' );
\ No newline at end of file
index e27670844923d1dce7df034d943af75f92228598..32720cd2768b981c228fd2c3c059561a174b7ab6 100644 (file)
@@ -244,10 +244,11 @@ function do_shortcode( $content, $ignore_html = false ) {
  * 6 - An extra ] to allow for escaping shortcodes with double [[]]
  *
  * @since 2.5.0
+ * @since 4.4.0 Added the `$tagnames` parameter.
  *
  * @global array $shortcode_tags
  *
- * @param array $tagnames List of shortcodes to find. Optional. Defaults to all registered shortcodes.
+ * @param array $tagnames Optional. List of shortcodes to find. Defaults to all registered shortcodes.
  * @return string The shortcode search regular expression
  */
 function get_shortcode_regex( $tagnames = null ) {
@@ -321,13 +322,39 @@ function do_shortcode_tag( $m ) {
                return $m[0];
        }
 
-       if ( isset( $m[5] ) ) {
-               // enclosing tag - extra parameter
-               return $m[1] . call_user_func( $shortcode_tags[$tag], $attr, $m[5], $tag ) . $m[6];
-       } else {
-               // self-closing tag
-               return $m[1] . call_user_func( $shortcode_tags[$tag], $attr, null,  $tag ) . $m[6];
+       /**
+        * Filters whether to call a shortcode callback.
+        *
+        * Passing a truthy value to the filter will effectively short-circuit the
+        * shortcode generation process, returning that value instead.
+        *
+        * @since 4.7.0
+        *
+        * @param bool|string $return      Short-circuit return value. Either false or the value to replace the shortcode with.
+        * @param string      $tag         Shortcode name.
+        * @param array       $attr        Shortcode attributes array,
+        * @param array       $m           Regular expression match array.
+        */
+       $return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
+       if ( false !== $return ) {
+               return $return;
        }
+
+       $content = isset( $m[5] ) ? $m[5] : null;
+
+       $output = $m[1] . call_user_func( $shortcode_tags[ $tag ], $attr, $content, $tag ) . $m[6];
+
+       /**
+        * Filters the output created by a shortcode callback.
+        *
+        * @since 4.7.0
+        *
+        * @param string $output Shortcode output.
+        * @param string $tag    Shortcode name.
+        * @param array  $attr   Shortcode attributes array,
+        * @param array  $m      Regular expression match array.
+        */
+       return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
 }
 
 /**
@@ -579,7 +606,20 @@ function strip_shortcodes( $content ) {
 
        // Find all registered tag names in $content.
        preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
-       $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
+
+       $tags_to_remove = array_keys( $shortcode_tags );
+
+       /**
+        * Filters the list of shortcode tags to remove from the content.
+        *
+        * @since 4.7.0
+        *
+        * @param array  $tag_array Array of shortcode tags to remove.
+        * @param string $content   Content shortcodes are being removed from.
+        */
+       $tags_to_remove = apply_filters( 'strip_shortcodes_tagnames', $tags_to_remove, $content );
+
+       $tagnames = array_intersect( $tags_to_remove, $matches[1] );
 
        if ( empty( $tagnames ) ) {
                return $content;
index 70af35a3264e1db387da76ffefe533a927e98cb3..f5c2f386344569ab3699b7d30f19ab49dc8e9891 100644 (file)
@@ -61,6 +61,15 @@ function create_initial_taxonomies() {
                'show_ui' => true,
                'show_admin_column' => true,
                '_builtin' => true,
+               'capabilities' => array(
+                       'manage_terms' => 'manage_categories',
+                       'edit_terms'   => 'edit_categories',
+                       'delete_terms' => 'delete_categories',
+                       'assign_terms' => 'assign_categories',
+               ),
+               'show_in_rest' => true,
+               'rest_base' => 'categories',
+               'rest_controller_class' => 'WP_REST_Terms_Controller',
        ) );
 
        register_taxonomy( 'post_tag', 'post', array(
@@ -71,6 +80,15 @@ function create_initial_taxonomies() {
                'show_ui' => true,
                'show_admin_column' => true,
                '_builtin' => true,
+               'capabilities' => array(
+                       'manage_terms' => 'manage_post_tags',
+                       'edit_terms'   => 'edit_post_tags',
+                       'delete_terms' => 'delete_post_tags',
+                       'assign_terms' => 'assign_post_tags',
+               ),
+               'show_in_rest' => true,
+               'rest_base' => 'tags',
+               'rest_controller_class' => 'WP_REST_Terms_Controller',
        ) );
 
        register_taxonomy( 'nav_menu', 'nav_menu_item', array(
@@ -181,7 +199,7 @@ function get_object_taxonomies( $object, $output = 'names' ) {
 
        if ( is_object($object) ) {
                if ( $object->post_type == 'attachment' )
-                       return get_attachment_taxonomies($object);
+                       return get_attachment_taxonomies( $object, $output );
                $object = $object->post_type;
        }
 
@@ -211,7 +229,7 @@ function get_object_taxonomies( $object, $output = 'names' ) {
  * @global array $wp_taxonomies The registered taxonomies.
  *
  * @param string $taxonomy Name of taxonomy object to return.
- * @return object|false The Taxonomy Object or false if $taxonomy doesn't exist.
+ * @return WP_Taxonomy|false The Taxonomy Object or false if $taxonomy doesn't exist.
  */
 function get_taxonomy( $taxonomy ) {
        global $wp_taxonomies;
@@ -276,21 +294,20 @@ function is_taxonomy_hierarchical($taxonomy) {
  * @since 4.4.0 The `show_ui` argument is now enforced on the term editing screen.
  * @since 4.4.0 The `public` argument now controls whether the taxonomy can be queried on the front end.
  * @since 4.5.0 Introduced `publicly_queryable` argument.
+ * @since 4.7.0 Introduced `show_in_rest`, 'rest_base' and 'rest_controller_class'
+ *              arguments to register the Taxonomy in REST API.
  *
  * @global array $wp_taxonomies Registered taxonomies.
- * @global WP    $wp            WP instance.
  *
  * @param string       $taxonomy    Taxonomy key, must not exceed 32 characters.
- * @param array|string $object_type Name of the object type for the taxonomy object.
+ * @param array|string $object_type Object type or array of object types with which the taxonomy should be associated.
  * @param array|string $args        {
  *     Optional. Array or query string of arguments for registering a taxonomy.
  *
- *     @type string        $label                 Name of the taxonomy shown in the menu. Usually plural. If not set,
- *                                                `$labels['name']` will be used.
- *     @type array         $labels                An array of labels for this taxonomy. By default, Tag labels are used for
- *                                                non-hierarchical taxonmies, and Category labels are used for hierarchical
- *                                                taxonomies. See accepted values in get_taxonomy_labels().
- *                                                Default empty array.
+ *     @type array         $labels                An array of labels for this taxonomy. By default, Tag labels are
+ *                                                used for non-hierarchical taxonomies, and Category labels are used
+ *                                                for hierarchical taxonomies. See accepted values in
+ *                                                get_taxonomy_labels(). Default empty array.
  *     @type string        $description           A short descriptive summary of what the taxonomy is for. Default empty.
  *     @type bool          $public                Whether a taxonomy is intended for use publicly either via
  *                                                the admin interface or by front-end users. The default settings
@@ -308,6 +325,9 @@ function is_taxonomy_hierarchical($taxonomy) {
  *                                                (default true).
  *     @type bool          $show_in_nav_menus     Makes this taxonomy available for selection in navigation menus. If not
  *                                                set, the default is inherited from `$public` (default true).
+ *     @type bool          $show_in_rest          Whether to include the taxonomy in the REST API.
+ *     @type string        $rest_base             To change the base url of REST API route. Default is $taxonomy.
+ *     @type string        $rest_controller_class REST API Controller class name. Default is 'WP_REST_Terms_Controller'.
  *     @type bool          $show_tagcloud         Whether to list the taxonomy in the Tag Cloud Widget controls. If not set,
  *                                                the default is inherited from `$show_ui` (default true).
  *     @type bool          $show_in_quick_edit    Whether to show the taxonomy in the quick/bulk edit panel. It not set,
@@ -349,134 +369,25 @@ function is_taxonomy_hierarchical($taxonomy) {
  * @return WP_Error|void WP_Error, if errors.
  */
 function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
-       global $wp_taxonomies, $wp;
+       global $wp_taxonomies;
 
        if ( ! is_array( $wp_taxonomies ) )
                $wp_taxonomies = array();
 
        $args = wp_parse_args( $args );
 
-       /**
-        * Filters the arguments for registering a taxonomy.
-        *
-        * @since 4.4.0
-        *
-        * @param array  $args        Array of arguments for registering a taxonomy.
-        * @param string $taxonomy    Taxonomy key.
-        * @param array  $object_type Array of names of object types for the taxonomy.
-        */
-       $args = apply_filters( 'register_taxonomy_args', $args, $taxonomy, (array) $object_type );
-
-       $defaults = array(
-               'labels'                => array(),
-               'description'           => '',
-               'public'                => true,
-               'publicly_queryable'    => null,
-               'hierarchical'          => false,
-               'show_ui'               => null,
-               'show_in_menu'          => null,
-               'show_in_nav_menus'     => null,
-               'show_tagcloud'         => null,
-               'show_in_quick_edit'    => null,
-               'show_admin_column'     => false,
-               'meta_box_cb'           => null,
-               'capabilities'          => array(),
-               'rewrite'               => true,
-               'query_var'             => $taxonomy,
-               'update_count_callback' => '',
-               '_builtin'              => false,
-       );
-       $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.0' );
                return new WP_Error( 'taxonomy_length_invalid', __( 'Taxonomy names must be between 1 and 32 characters in length.' ) );
        }
 
-       // If not set, default to the setting for public.
-       if ( null === $args['publicly_queryable'] ) {
-               $args['publicly_queryable'] = $args['public'];
-       }
+       $taxonomy_object = new WP_Taxonomy( $taxonomy, $object_type, $args );
+       $taxonomy_object->add_rewrite_rules();
 
-       // Non-publicly queryable taxonomies should not register query vars, except in the admin.
-       if ( false !== $args['query_var'] && ( is_admin() || false !== $args['publicly_queryable'] ) && ! empty( $wp ) ) {
-               if ( true === $args['query_var'] )
-                       $args['query_var'] = $taxonomy;
-               else
-                       $args['query_var'] = sanitize_title_with_dashes( $args['query_var'] );
-               $wp->add_query_var( $args['query_var'] );
-       } else {
-               // Force query_var to false for non-public taxonomies.
-               $args['query_var'] = false;
-       }
-
-       if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {
-               $args['rewrite'] = wp_parse_args( $args['rewrite'], array(
-                       'with_front' => true,
-                       'hierarchical' => false,
-                       'ep_mask' => EP_NONE,
-               ) );
+       $wp_taxonomies[ $taxonomy ] = $taxonomy_object;
 
-               if ( empty( $args['rewrite']['slug'] ) )
-                       $args['rewrite']['slug'] = sanitize_title_with_dashes( $taxonomy );
-
-               if ( $args['hierarchical'] && $args['rewrite']['hierarchical'] )
-                       $tag = '(.+?)';
-               else
-                       $tag = '([^/]+)';
-
-               add_rewrite_tag( "%$taxonomy%", $tag, $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=" );
-               add_permastruct( $taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite'] );
-       }
+       $taxonomy_object->add_hooks();
 
-       // 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 setting for public.
-       if ( null === $args['show_in_nav_menus'] )
-               $args['show_in_nav_menus'] = $args['public'];
-
-       // If not set, default to the setting for show_ui.
-       if ( null === $args['show_tagcloud'] )
-               $args['show_tagcloud'] = $args['show_ui'];
-
-       // If not set, default to the setting for show_ui.
-       if ( null === $args['show_in_quick_edit'] ) {
-               $args['show_in_quick_edit'] = $args['show_ui'];
-       }
-
-       $default_caps = array(
-               'manage_terms' => 'manage_categories',
-               'edit_terms'   => 'manage_categories',
-               'delete_terms' => 'manage_categories',
-               'assign_terms' => 'edit_posts',
-       );
-       $args['cap'] = (object) array_merge( $default_caps, $args['capabilities'] );
-       unset( $args['capabilities'] );
-
-       $args['name'] = $taxonomy;
-       $args['object_type'] = array_unique( (array) $object_type );
-
-       $args['labels'] = get_taxonomy_labels( (object) $args );
-       $args['label'] = $args['labels']->name;
-
-       // If not set, use the default meta box
-       if ( null === $args['meta_box_cb'] ) {
-               if ( $args['hierarchical'] )
-                       $args['meta_box_cb'] = 'post_categories_meta_box';
-               else
-                       $args['meta_box_cb'] = 'post_tags_meta_box';
-       }
-
-       $wp_taxonomies[ $taxonomy ] = (object) $args;
-
-       // Register callback handling for meta box.
-       add_filter( 'wp_ajax_add-' . $taxonomy, '_wp_ajax_add_hierarchical_term' );
 
        /**
         * Fires after a taxonomy is registered.
@@ -487,7 +398,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
         * @param array|string $object_type Object type or array of object types.
         * @param array        $args        Array of taxonomy registration arguments.
         */
-       do_action( 'registered_taxonomy', $taxonomy, $object_type, $args );
+       do_action( 'registered_taxonomy', $taxonomy, $object_type, (array) $taxonomy_object );
 }
 
 /**
@@ -508,28 +419,17 @@ function unregister_taxonomy( $taxonomy ) {
                return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
        }
 
-       $taxonomy_args = get_taxonomy( $taxonomy );
+       $taxonomy_object = get_taxonomy( $taxonomy );
 
        // Do not allow unregistering internal taxonomies.
-       if ( $taxonomy_args->_builtin ) {
+       if ( $taxonomy_object->_builtin ) {
                return new WP_Error( 'invalid_taxonomy', __( 'Unregistering a built-in taxonomy is not allowed' ) );
        }
 
-       global $wp, $wp_taxonomies;
-
-       // Remove query var.
-       if ( false !== $taxonomy_args->query_var ) {
-               $wp->remove_query_var( $taxonomy_args->query_var );
-       }
-
-       // Remove rewrite tags and permastructs.
-       if ( false !== $taxonomy_args->rewrite ) {
-               remove_rewrite_tag( "%$taxonomy%" );
-               remove_permastruct( $taxonomy );
-       }
+       global $wp_taxonomies;
 
-       // Unregister callback handling for meta box.
-       remove_filter( 'wp_ajax_add-' . $taxonomy, '_wp_ajax_add_hierarchical_term' );
+       $taxonomy_object->remove_rewrite_rules();
+       $taxonomy_object->remove_hooks();
 
        // Remove the taxonomy.
        unset( $wp_taxonomies[ $taxonomy ] );
@@ -579,7 +479,7 @@ function unregister_taxonomy( $taxonomy ) {
  * @since 4.3.0 Added the `no_terms` label.
  * @since 4.4.0 Added the `items_list_navigation` and `items_list` labels.
  *
- * @param object $tax Taxonomy object.
+ * @param WP_Taxonomy $tax Taxonomy object.
  * @return object object with all the labels as member variables.
  */
 function get_taxonomy_labels( $tax ) {
@@ -814,7 +714,8 @@ function get_tax_sql( $tax_query, $primary_table, $primary_id_column ) {
  *                                 filters and return a `WP_Term` object corresponding to the `$term` data. If `WP_Term`,
  *                                 will return `$term`.
  * @param string     $taxonomy Optional. Taxonomy name that $term is part of.
- * @param string     $output   Constant OBJECT, ARRAY_A, or ARRAY_N
+ * @param string     $output   Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                             a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
  * @param string     $filter   Optional, default is raw or no WordPress defined filter will applied.
  * @return array|WP_Term|WP_Error|null Object of the type specified by `$output` on success. When `$output` is 'OBJECT',
  *                                     a WP_Term instance is returned. If taxonomy does not exist, a WP_Error is
@@ -871,7 +772,7 @@ function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
         * @param int|WP_Term $_term    Term object or ID.
         * @param string      $taxonomy The taxonomy slug.
         */
-       $_term = apply_filters( "get_$taxonomy", $_term, $taxonomy );
+       $_term = apply_filters( "get_{$taxonomy}", $_term, $taxonomy );
 
        // Bail if a filter callback has changed the type of the `$_term` object.
        if ( ! ( $_term instanceof WP_Term ) ) {
@@ -921,10 +822,11 @@ function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
  * @param string     $field    Either 'slug', 'name', 'id' (term_id), or 'term_taxonomy_id'
  * @param string|int $value    Search for this term value
  * @param string     $taxonomy Taxonomy name. Optional, if `$field` is 'term_taxonomy_id'.
- * @param string     $output   Constant OBJECT, ARRAY_A, or ARRAY_N
+ * @param string     $output   Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ *                             a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
  * @param string     $filter   Optional, default is raw or no WordPress defined filter will applied.
- * @return WP_Term|bool WP_Term instance on success. Will return false if `$taxonomy` does not exist
- *                      or `$term` was not found.
+ * @return WP_Term|array|false WP_Term instance (or array) on success. Will return false if `$taxonomy` does not exist
+ *                             or `$term` was not found.
  */
 function get_term_by( $field, $value, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
        global $wpdb;
@@ -1379,7 +1281,7 @@ function update_termmeta_cache( $term_ids ) {
  *
  * @global wpdb $wpdb WordPress database abstraction object.
  *
- * @param int|string $term     The term to check
+ * @param int|string $term     The term to check. Accepts term ID, slug, or name.
  * @param string     $taxonomy The taxonomy name to use
  * @param int        $parent   Optional. ID of parent term under which to confine the exists search.
  * @return mixed Returns null if the term does not exist. Returns the term ID
@@ -1915,7 +1817,7 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
         *                              by the parent function. WP_Error otherwise.
         * @param array   $object_ids   List of term object IDs.
         */
-       do_action( "delete_$taxonomy", $term, $tt_id, $deleted_term, $object_ids );
+       do_action( "delete_{$taxonomy}", $term, $tt_id, $deleted_term, $object_ids );
 
        return true;
 }
@@ -1941,27 +1843,13 @@ function wp_delete_category( $cat_ID ) {
  *              Introduced `$parent` argument.
  * @since 4.4.0 Introduced `$meta_query` and `$update_term_meta_cache` arguments. When `$fields` is 'all' or
  *              'all_with_object_id', an array of `WP_Term` objects will be returned.
+ * @since 4.7.0 Refactored to use WP_Term_Query, and to support any WP_Term_Query arguments.
  *
  * @global wpdb $wpdb WordPress database abstraction object.
  *
  * @param int|array    $object_ids The ID(s) of the object(s) to retrieve.
  * @param string|array $taxonomies The taxonomies to retrieve terms from.
- * @param array|string $args {
- *     Array of arguments.
- *     @type string $orderby                Field by which results should be sorted. Accepts 'name', 'count', 'slug',
- *                                          'term_group', 'term_order', 'taxonomy', 'parent', or 'term_taxonomy_id'.
- *                                          Default 'name'.
- *     @type string $order                  Sort order. Accepts 'ASC' or 'DESC'. Default 'ASC'.
- *     @type string $fields                 Fields to return for matched terms. Accepts 'all', 'ids', 'names', and
- *                                          'all_with_object_id'. Note that 'all' or 'all_with_object_id' will result
- *                                          in an array of term objects being returned, 'ids' will return an array of
- *                                          integers, and 'names' an array of strings.
- *     @type int    $parent                 Optional. Limit results to the direct children of a given term ID.
- *     @type bool   $update_term_meta_cache Whether to prime termmeta cache for matched terms. Only applies when
- *                                          `$fields` is 'all', 'all_with_object_id', or 'term_id'. Default true.
- *     @type array  $meta_query             Meta query clauses to limit retrieved terms by. See `WP_Meta_Query`.
- *                                          Default empty.
- * }
+ * @param array|string $args       See WP_Term_Query::__construct() for supported arguments.
  * @return array|WP_Error The requested term data or empty array if no terms found.
  *                        WP_Error if any of the $taxonomies don't exist.
  */
@@ -1983,185 +1871,26 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
                $object_ids = array($object_ids);
        $object_ids = array_map('intval', $object_ids);
 
-       $defaults = array(
-               'orderby' => 'name',
-               'order'   => 'ASC',
-               'fields'  => 'all',
-               'parent'  => '',
-               'update_term_meta_cache' => true,
-               'meta_query' => '',
-       );
-       $args = wp_parse_args( $args, $defaults );
-
-       $terms = array();
-       if ( count($taxonomies) > 1 ) {
-               foreach ( $taxonomies as $index => $taxonomy ) {
-                       $t = get_taxonomy($taxonomy);
-                       if ( isset($t->args) && is_array($t->args) && $args != array_merge($args, $t->args) ) {
-                               unset($taxonomies[$index]);
-                               $terms = array_merge($terms, wp_get_object_terms($object_ids, $taxonomy, array_merge($args, $t->args)));
-                       }
-               }
-       } else {
-               $t = get_taxonomy($taxonomies[0]);
-               if ( isset($t->args) && is_array($t->args) )
-                       $args = array_merge($args, $t->args);
-       }
-
-       $orderby = $args['orderby'];
-       $order = $args['order'];
-       $fields = $args['fields'];
-
-       if ( in_array( $orderby, array( 'term_id', 'name', 'slug', 'term_group' ) ) ) {
-               $orderby = "t.$orderby";
-       } elseif ( in_array( $orderby, array( 'count', 'parent', 'taxonomy', 'term_taxonomy_id' ) ) ) {
-               $orderby = "tt.$orderby";
-       } elseif ( 'term_order' === $orderby ) {
-               $orderby = 'tr.term_order';
-       } elseif ( 'none' === $orderby ) {
-               $orderby = '';
-               $order = '';
-       } else {
-               $orderby = 't.term_id';
-       }
-
-       // tt_ids queries can only be none or tr.term_taxonomy_id
-       if ( ('tt_ids' == $fields) && !empty($orderby) )
-               $orderby = 'tr.term_taxonomy_id';
-
-       if ( !empty($orderby) )
-               $orderby = "ORDER BY $orderby";
-
-       $order = strtoupper( $order );
-       if ( '' !== $order && ! in_array( $order, array( 'ASC', 'DESC' ) ) )
-               $order = 'ASC';
-
-       $taxonomy_array = $taxonomies;
-       $object_id_array = $object_ids;
-       $taxonomies = "'" . implode("', '", array_map( 'esc_sql', $taxonomies ) ) . "'";
-       $object_ids = implode(', ', $object_ids);
-
-       $select_this = '';
-       if ( 'all' == $fields ) {
-               $select_this = 't.*, tt.*';
-       } elseif ( 'ids' == $fields ) {
-               $select_this = 't.term_id';
-       } elseif ( 'names' == $fields ) {
-               $select_this = 't.name';
-       } elseif ( 'slugs' == $fields ) {
-               $select_this = 't.slug';
-       } elseif ( 'all_with_object_id' == $fields ) {
-               $select_this = 't.*, tt.*, tr.object_id';
-       }
-
-       $where = array(
-               "tt.taxonomy IN ($taxonomies)",
-               "tr.object_id IN ($object_ids)",
-       );
-
-       if ( '' !== $args['parent'] ) {
-               $where[] = $wpdb->prepare( 'tt.parent = %d', $args['parent'] );
-       }
-
-       // Meta query support.
-       $meta_query_join = '';
-       if ( ! empty( $args['meta_query'] ) ) {
-               $mquery = new WP_Meta_Query( $args['meta_query'] );
-               $mq_sql = $mquery->get_sql( 'term', 't', 'term_id' );
-
-               $meta_query_join .= $mq_sql['join'];
-
-               // Strip leading AND.
-               $where[] = preg_replace( '/^\s*AND/', '', $mq_sql['where'] );
-       }
-
-       $where = implode( ' AND ', $where );
-
-       $query = "SELECT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN $wpdb->term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id $meta_query_join WHERE $where $orderby $order";
-
-       $objects = false;
-       if ( 'all' == $fields || 'all_with_object_id' == $fields ) {
-               $_terms = $wpdb->get_results( $query );
-               $object_id_index = array();
-               foreach ( $_terms as $key => $term ) {
-                       $term = sanitize_term( $term, $taxonomy, 'raw' );
-                       $_terms[ $key ] = $term;
+       $args['taxonomy'] = $taxonomies;
+       $args['object_ids'] = $object_ids;
 
-                       if ( isset( $term->object_id ) ) {
-                               $object_id_index[ $key ] = $term->object_id;
-                       }
-               }
-
-               update_term_cache( $_terms );
-               $_terms = array_map( 'get_term', $_terms );
-
-               // Re-add the object_id data, which is lost when fetching terms from cache.
-               if ( 'all_with_object_id' === $fields ) {
-                       foreach ( $_terms as $key => $_term ) {
-                               if ( isset( $object_id_index[ $key ] ) ) {
-                                       $_term->object_id = $object_id_index[ $key ];
-                               }
-                       }
-               }
-
-               $terms = array_merge( $terms, $_terms );
-               $objects = true;
-
-       } elseif ( 'ids' == $fields || 'names' == $fields || 'slugs' == $fields ) {
-               $_terms = $wpdb->get_col( $query );
-               $_field = ( 'ids' == $fields ) ? 'term_id' : 'name';
-               foreach ( $_terms as $key => $term ) {
-                       $_terms[$key] = sanitize_term_field( $_field, $term, $term, $taxonomy, 'raw' );
-               }
-               $terms = array_merge( $terms, $_terms );
-       } elseif ( 'tt_ids' == $fields ) {
-               $terms = $wpdb->get_col("SELECT tr.term_taxonomy_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tr.object_id IN ($object_ids) AND tt.taxonomy IN ($taxonomies) $orderby $order");
-               foreach ( $terms as $key => $tt_id ) {
-                       $terms[$key] = sanitize_term_field( 'term_taxonomy_id', $tt_id, 0, $taxonomy, 'raw' ); // 0 should be the term id, however is not needed when using raw context.
-               }
-       }
-
-       // Update termmeta cache, if necessary.
-       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' );
-               }
-
-               update_termmeta_cache( $term_ids );
-       }
-
-       if ( ! $terms ) {
-               $terms = array();
-       } elseif ( $objects && 'all_with_object_id' !== $fields ) {
-               $_tt_ids = array();
-               $_terms = array();
-               foreach ( $terms as $term ) {
-                       if ( in_array( $term->term_taxonomy_id, $_tt_ids ) ) {
-                               continue;
-                       }
-
-                       $_tt_ids[] = $term->term_taxonomy_id;
-                       $_terms[] = $term;
-               }
-               $terms = $_terms;
-       } elseif ( ! $objects ) {
-               $terms = array_values( array_unique( $terms ) );
-       }
+       $terms = get_terms( $args );
 
        /**
         * Filters the terms for a given object or objects.
         *
         * @since 4.2.0
         *
-        * @param array $terms           An array of terms for the given object or objects.
-        * @param array $object_id_array Array of object IDs for which `$terms` were retrieved.
-        * @param array $taxonomy_array  Array of taxonomies from which `$terms` were retrieved.
-        * @param array $args            An array of arguments for retrieving terms for the given
-        *                               object(s). See wp_get_object_terms() for details.
+        * @param array $terms      An array of terms for the given object or objects.
+        * @param array $object_ids Array of object IDs for which `$terms` were retrieved.
+        * @param array $taxonomies Array of taxonomies from which `$terms` were retrieved.
+        * @param array $args       An array of arguments for retrieving terms for the given
+        *                          object(s). See wp_get_object_terms() for details.
         */
-       $terms = apply_filters( 'get_object_terms', $terms, $object_id_array, $taxonomy_array, $args );
+       $terms = apply_filters( 'get_object_terms', $terms, $object_ids, $taxonomies, $args );
+
+       $object_ids = implode( ',', $object_ids );
+       $taxonomies = implode( ',', $taxonomies );
 
        /**
         * Filters the terms for a given object or objects.
@@ -2340,7 +2069,20 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
 
        $slug = wp_unique_term_slug( $slug, (object) $args );
 
-       if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) ) {
+       $data = compact( 'name', 'slug', 'term_group' );
+
+       /**
+        * Filters term data before it is inserted into the database.
+        *
+        * @since 4.7.0
+        *
+        * @param array  $data     Term data to be inserted.
+        * @param string $taxonomy Taxonomy slug.
+        * @param array  $args     Arguments passed to wp_insert_term().
+        */
+       $data = apply_filters( 'wp_insert_term_data', $data, $taxonomy, $args );
+
+       if ( false === $wpdb->insert( $wpdb->terms, $data ) ) {
                return new WP_Error( 'db_insert_error', __( 'Could not insert term into the database' ), $wpdb->last_error );
        }
 
@@ -2406,7 +2148,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
         * @param int $term_id Term ID.
         * @param int $tt_id   Term taxonomy ID.
         */
-       do_action( "create_$taxonomy", $term_id, $tt_id );
+       do_action( "create_{$taxonomy}", $term_id, $tt_id );
 
        /**
         * Filters the term ID after a new term is created.
@@ -2442,7 +2184,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
         * @param int $term_id Term ID.
         * @param int $tt_id   Term taxonomy ID.
         */
-       do_action( "created_$taxonomy", $term_id, $tt_id );
+       do_action( "created_{$taxonomy}", $term_id, $tt_id );
 
        return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id);
 }
@@ -2513,22 +2255,26 @@ function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) {
                 * Fires immediately before an object-term relationship is added.
                 *
                 * @since 2.9.0
+                * @since 4.7.0 Added the `$taxonomy` parameter.
                 *
-                * @param int $object_id Object ID.
-                * @param int $tt_id     Term taxonomy ID.
+                * @param int    $object_id Object ID.
+                * @param int    $tt_id     Term taxonomy ID.
+                * @param string $taxonomy  Taxonomy slug.
                 */
-               do_action( 'add_term_relationship', $object_id, $tt_id );
+               do_action( 'add_term_relationship', $object_id, $tt_id, $taxonomy );
                $wpdb->insert( $wpdb->term_relationships, array( 'object_id' => $object_id, 'term_taxonomy_id' => $tt_id ) );
 
                /**
                 * Fires immediately after an object-term relationship is added.
                 *
                 * @since 2.9.0
+                * @since 4.7.0 Added the `$taxonomy` parameter.
                 *
-                * @param int $object_id Object ID.
-                * @param int $tt_id     Term taxonomy ID.
+                * @param int    $object_id Object ID.
+                * @param int    $tt_id     Term taxonomy ID.
+                * @param string $taxonomy  Taxonomy slug.
                 */
-               do_action( 'added_term_relationship', $object_id, $tt_id );
+               do_action( 'added_term_relationship', $object_id, $tt_id, $taxonomy );
                $new_tt_ids[] = $tt_id;
        }
 
@@ -2648,11 +2394,13 @@ function wp_remove_object_terms( $object_id, $terms, $taxonomy ) {
                 * Fires immediately before an object-term relationship is deleted.
                 *
                 * @since 2.9.0
+                * @since 4.7.0 Added the `$taxonomy` parameter.
                 *
                 * @param int   $object_id Object ID.
                 * @param array $tt_ids    An array of term taxonomy IDs.
+                * @param string $taxonomy  Taxonomy slug.
                 */
-               do_action( 'delete_term_relationships', $object_id, $tt_ids );
+               do_action( 'delete_term_relationships', $object_id, $tt_ids, $taxonomy );
                $deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) );
 
                wp_cache_delete( $object_id, $taxonomy . '_relationships' );
@@ -2661,11 +2409,13 @@ function wp_remove_object_terms( $object_id, $terms, $taxonomy ) {
                 * Fires immediately after an object-term relationship is deleted.
                 *
                 * @since 2.9.0
+                * @since 4.7.0 Added the `$taxonomy` parameter.
                 *
-                * @param int   $object_id Object ID.
-                * @param array $tt_ids    An array of term taxonomy IDs.
+                * @param int    $object_id Object ID.
+                * @param array  $tt_ids    An array of term taxonomy IDs.
+                * @param string $taxonomy  Taxonomy slug.
                 */
-               do_action( 'deleted_term_relationships', $object_id, $tt_ids );
+               do_action( 'deleted_term_relationships', $object_id, $tt_ids, $taxonomy );
 
                wp_update_term_count( $tt_ids, $taxonomy );
 
@@ -2904,10 +2654,12 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
        if ( $duplicate && $duplicate->term_id != $term_id ) {
                // If an empty slug was passed or the parent changed, reset the slug to something unique.
                // Otherwise, bail.
-               if ( $empty_slug || ( $parent != $term['parent']) )
+               if ( $empty_slug || ( $parent != $term['parent']) ) {
                        $slug = wp_unique_term_slug($slug, (object) $args);
-               else
+               } else {
+                       /* translators: 1: Taxonomy term slug */
                        return new WP_Error('duplicate_term_slug', sprintf(__('The slug &#8220;%s&#8221; is already in use by another term'), $slug));
+               }
        }
 
        $tt_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id) );
@@ -2927,7 +2679,22 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
         * @param string $taxonomy Taxonomy slug.
         */
        do_action( 'edit_terms', $term_id, $taxonomy );
-       $wpdb->update($wpdb->terms, compact( 'name', 'slug', 'term_group' ), compact( 'term_id' ) );
+
+       $data = compact( 'name', 'slug', 'term_group' );
+
+       /**
+        * Filters term data before it is updated in the database.
+        *
+        * @since 4.7.0
+        *
+        * @param array  $data     Term data to be updated.
+        * @param int    $term_id  Term ID.
+        * @param string $taxonomy Taxonomy slug.
+        * @param array  $args     Arguments passed to wp_update_term().
+        */
+       $data = apply_filters( 'wp_update_term_data', $data, $term_id, $taxonomy, $args );
+
+       $wpdb->update( $wpdb->terms, $data, compact( 'term_id' ) );
        if ( empty($slug) ) {
                $slug = sanitize_title($name, $term_id);
                $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) );
@@ -2987,7 +2754,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
         * @param int $term_id Term ID.
         * @param int $tt_id   Term taxonomy ID.
         */
-       do_action( "edit_$taxonomy", $term_id, $tt_id );
+       do_action( "edit_{$taxonomy}", $term_id, $tt_id );
 
        /** This filter is documented in wp-includes/taxonomy.php */
        $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );
@@ -3016,7 +2783,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
         * @param int $term_id Term ID.
         * @param int $tt_id   Term taxonomy ID.
         */
-       do_action( "edited_$taxonomy", $term_id, $tt_id );
+       do_action( "edited_{$taxonomy}", $term_id, $tt_id );
 
        return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id);
 }
@@ -3252,10 +3019,14 @@ function clean_term_cache($ids, $taxonomy = '', $clean_taxonomy = true) {
  * function only fetches relationship data that is already in the cache.
  *
  * @since 2.3.0
+ * @since 4.7.0 Returns a WP_Error object if get_term() returns an error for
+ *              any of the matched terms.
  *
  * @param int    $id       Term object ID.
  * @param string $taxonomy Taxonomy name.
- * @return bool|array Array of `WP_Term` objects, if cached False if cache is empty for `$taxonomy` and `$id`.
+ * @return bool|array|WP_Error Array of `WP_Term` objects, if cached.
+ *                             False if cache is empty for `$taxonomy` and `$id`.
+ *                             WP_Error if get_term() returns an error object for any term.
  */
 function get_object_term_cache( $id, $taxonomy ) {
        $_term_ids = wp_cache_get( $id, "{$taxonomy}_relationships" );
@@ -3280,10 +3051,15 @@ function get_object_term_cache( $id, $taxonomy ) {
 
        $terms = array();
        foreach ( $term_ids as $term_id ) {
-               $terms[] = wp_cache_get( $term_id, 'terms' );
+               $term = get_term( $term_id, $taxonomy );
+               if ( is_wp_error( $term ) ) {
+                       return $term;
+               }
+
+               $terms[] = $term;
        }
 
-       return array_map( 'get_term', $terms );
+       return $terms;
 }
 
 /**
index 025f1a84791d57f6cad9155eb82dfc2a19808d26..1ee7c222c11b56d06882fdb826b725a5e1aa1291 100644 (file)
@@ -60,7 +60,6 @@ if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) :
        elseif ( is_author()         && $template = get_author_template()         ) :
        elseif ( is_date()           && $template = get_date_template()           ) :
        elseif ( is_archive()        && $template = get_archive_template()        ) :
-       elseif ( is_paged()          && $template = get_paged_template()          ) :
        else :
                $template = get_index_template();
        endif;
index 380bb47b390022b07aebed2d76497d83d868c0a8..636cb9005c1d9310d1f6995b003e7935709bbcb4 100644 (file)
@@ -26,6 +26,20 @@ function get_query_template( $type, $templates = array() ) {
        if ( empty( $templates ) )
                $templates = array("{$type}.php");
 
+       /**
+        * Filters the list of template filenames that are searched for when retrieving a template to use.
+        *
+        * The last element in the array should always be the fallback template for this query type.
+        *
+        * Possible values for `$type` include: 'index', '404', 'archive', 'author', 'category', 'tag', 'taxonomy', 'date',
+        * 'embed', home', 'frontpage', 'page', 'paged', 'search', 'single', 'singular', and 'attachment'.
+        *
+        * @since 4.7.0
+        *
+        * @param array $templates A list of template candidates, in descending order of priority.
+        */
+       $templates = apply_filters( "{$type}_template_hierarchy", $templates );
+
        $template = locate_template( $templates );
 
        /**
@@ -36,7 +50,7 @@ function get_query_template( $type, $templates = array() ) {
         * This hook also applies to various types of files loaded as part of the Template Hierarchy.
         *
         * Possible values for `$type` include: 'index', '404', 'archive', 'author', 'category', 'tag', 'taxonomy', 'date',
-        * 'home', 'front_page', 'page', 'paged', 'search', 'single', 'singular', and 'attachment'.
+        * 'embed', home', 'frontpage', 'page', 'paged', 'search', 'single', 'singular', and 'attachment'.
         *
         * @since 1.5.0
         *
@@ -48,8 +62,8 @@ function get_query_template( $type, $templates = array() ) {
 /**
  * Retrieve path of index template in current or parent template.
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'index_template'.
+ * The template hierarchy is filterable via the {@see 'index_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'index_template'} hook.
  *
  * @since 3.0.0
  *
@@ -64,8 +78,8 @@ function get_index_template() {
 /**
  * Retrieve path of 404 template in current or parent template.
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. '404_template'.
+ * The template hierarchy is filterable via the {@see '404_template_hierarchy'} hook.
+ * The template path is filterable via the {@see '404_template'} hook.
  *
  * @since 1.5.0
  *
@@ -80,8 +94,8 @@ function get_404_template() {
 /**
  * Retrieve path of archive template in current or parent template.
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'archive_template'.
+ * The template hierarchy is filterable via the {@see 'archive_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'archive_template'} hook.
  *
  * @since 1.5.0
  *
@@ -106,8 +120,8 @@ function get_archive_template() {
 /**
  * Retrieve path of post type archive template in current or parent template.
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'archive_template'.
+ * The template hierarchy is filterable via the {@see 'archive_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'archive_template'} hook.
  *
  * @since 3.7.0
  *
@@ -130,8 +144,20 @@ function get_post_type_archive_template() {
 /**
  * Retrieve path of author template in current or parent template.
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'author_template'.
+ * The hierarchy for this template looks like:
+ *
+ * 1. author-{nicename}.php
+ * 2. author-{id}.php
+ * 3. author.php
+ *
+ * An example of this is:
+ *
+ * 1. author-john.php
+ * 2. author-1.php
+ * 3. author.php
+ *
+ * The template hierarchy is filterable via the {@see 'author_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'author_template'} hook.
  *
  * @since 1.5.0
  *
@@ -156,14 +182,24 @@ function get_author_template() {
 /**
  * Retrieve path of category template in current or parent template.
  *
- * Works by first retrieving the current slug, for example 'category-default.php',
- * and then trying category ID, for example 'category-1.php', and will finally fall
- * back to category.php template, if those files don't exist.
+ * The hierarchy for this template looks like:
+ *
+ * 1. category-{slug}.php
+ * 2. category-{id}.php
+ * 3. category.php
+ *
+ * An example of this is:
+ *
+ * 1. category-news.php
+ * 2. category-2.php
+ * 3. category.php
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'category_template'.
+ * The template hierarchy is filterable via the {@see 'category_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'category_template'} hook.
  *
  * @since 1.5.0
+ * @since 4.7.0 The decoded form of `category-{slug}.php` was added to the top of the
+ *              template hierarchy when the category slug contains multibyte characters.
  *
  * @see get_query_template()
  *
@@ -175,6 +211,12 @@ function get_category_template() {
        $templates = array();
 
        if ( ! empty( $category->slug ) ) {
+
+               $slug_decoded = urldecode( $category->slug );
+               if ( $slug_decoded !== $category->slug ) {
+                       $templates[] = "category-{$slug_decoded}.php";
+               }
+
                $templates[] = "category-{$category->slug}.php";
                $templates[] = "category-{$category->term_id}.php";
        }
@@ -186,14 +228,24 @@ function get_category_template() {
 /**
  * Retrieve path of tag template in current or parent template.
  *
- * Works by first retrieving the current tag name, for example 'tag-wordpress.php',
- * and then trying tag ID, for example 'tag-1.php', and will finally fall back to
- * tag.php template, if those files don't exist.
+ * The hierarchy for this template looks like:
+ *
+ * 1. tag-{slug}.php
+ * 2. tag-{id}.php
+ * 3. tag.php
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'tag_template'.
+ * An example of this is:
+ *
+ * 1. tag-wordpress.php
+ * 2. tag-3.php
+ * 3. tag.php
+ *
+ * The template hierarchy is filterable via the {@see 'tag_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'tag_template'} hook.
  *
  * @since 2.3.0
+ * @since 4.7.0 The decoded form of `tag-{slug}.php` was added to the top of the
+ *              template hierarchy when the tag slug contains multibyte characters.
  *
  * @see get_query_template()
  *
@@ -205,6 +257,12 @@ function get_tag_template() {
        $templates = array();
 
        if ( ! empty( $tag->slug ) ) {
+
+               $slug_decoded = urldecode( $tag->slug );
+               if ( $slug_decoded !== $tag->slug ) {
+                       $templates[] = "tag-{$slug_decoded}.php";
+               }
+
                $templates[] = "tag-{$tag->slug}.php";
                $templates[] = "tag-{$tag->term_id}.php";
        }
@@ -214,25 +272,30 @@ function get_tag_template() {
 }
 
 /**
- * Retrieve path of taxonomy template in current or parent template.
+ * Retrieve path of custom taxonomy term template in current or parent template.
+ *
+ * The hierarchy for this template looks like:
  *
- * Retrieves the taxonomy and term, if term is available. The template is
- * prepended with 'taxonomy-' and followed by both the taxonomy string and
- * the taxonomy string followed by a dash and then followed by the term.
+ * 1. taxonomy-{taxonomy_slug}-{term_slug}.php
+ * 2. taxonomy-{taxonomy_slug}.php
+ * 3. taxonomy.php
  *
- * The taxonomy and term template is checked and used first, if it exists.
- * Second, just the taxonomy template is checked, and then finally, taxonomy.php
- * template is used. If none of the files exist, then it will fall back on to
- * index.php.
+ * An example of this is:
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'taxonomy_template'.
+ * 1. taxonomy-location-texas.php
+ * 2. taxonomy-location.php
+ * 3. taxonomy.php
+ *
+ * The template hierarchy is filterable via the {@see 'taxonomy_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'taxonomy_template'} hook.
  *
  * @since 2.5.0
+ * @since 4.7.0 The decoded form of `taxonomy-{taxonomy_slug}-{term_slug}.php` was added to the top of the
+ *              template hierarchy when the term slug contains multibyte characters.
  *
  * @see get_query_template()
  *
- * @return string Full path to taxonomy template file.
+ * @return string Full path to custom taxonomy term template file.
  */
 function get_taxonomy_template() {
        $term = get_queried_object();
@@ -241,6 +304,12 @@ function get_taxonomy_template() {
 
        if ( ! empty( $term->slug ) ) {
                $taxonomy = $term->taxonomy;
+
+               $slug_decoded = urldecode( $term->slug );
+               if ( $slug_decoded !== $term->slug ) {
+                       $templates[] = "taxonomy-$taxonomy-{$slug_decoded}.php";
+               }
+
                $templates[] = "taxonomy-$taxonomy-{$term->slug}.php";
                $templates[] = "taxonomy-$taxonomy.php";
        }
@@ -252,8 +321,8 @@ function get_taxonomy_template() {
 /**
  * Retrieve path of date template in current or parent template.
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'date_template'.
+ * The template hierarchy is filterable via the {@see 'date_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'date_template'} hook.
  *
  * @since 1.5.0
  *
@@ -268,11 +337,8 @@ function get_date_template() {
 /**
  * Retrieve path of home template in current or parent template.
  *
- * This is the template used for the page containing the blog posts.
- * Attempts to locate 'home.php' first before falling back to 'index.php'.
- *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'home_template'.
+ * The template hierarchy is filterable via the {@see 'home_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'home_template'} hook.
  *
  * @since 1.5.0
  *
@@ -287,10 +353,10 @@ function get_home_template() {
 }
 
 /**
- * Retrieve path of front-page template in current or parent template.
+ * Retrieve path of front page template in current or parent template.
  *
- * Looks for 'front-page.php'. The template path is filterable via the
- * dynamic {@see '$type_template'} hook, e.g. 'frontpage_template'.
+ * The template hierarchy is filterable via the {@see 'frontpage_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'frontpage_template'} hook.
  *
  * @since 3.0.0
  *
@@ -307,14 +373,26 @@ function get_front_page_template() {
 /**
  * Retrieve path of page template in current or parent template.
  *
- * Will first look for the specifically assigned page template.
- * Then will search for 'page-{slug}.php', followed by 'page-{id}.php',
- * and finally 'page.php'.
+ * The hierarchy for this template looks like:
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'page_template'.
+ * 1. {Page Template}.php
+ * 2. page-{page_name}.php
+ * 3. page-{id}.php
+ * 4. page.php
+ *
+ * An example of this is:
+ *
+ * 1. page-templates/full-width.php
+ * 2. page-about.php
+ * 3. page-4.php
+ * 4. page.php
+ *
+ * The template hierarchy is filterable via the {@see 'page_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'page_template'} hook.
  *
  * @since 1.5.0
+ * @since 4.7.0 The decoded form of `page-{page_name}.php` was added to the top of the
+ *              template hierarchy when the page name contains multibyte characters.
  *
  * @see get_query_template()
  *
@@ -335,8 +413,13 @@ function get_page_template() {
        $templates = array();
        if ( $template && 0 === validate_file( $template ) )
                $templates[] = $template;
-       if ( $pagename )
+       if ( $pagename ) {
+               $pagename_decoded = urldecode( $pagename );
+               if ( $pagename_decoded !== $pagename ) {
+                       $templates[] = "page-{$pagename_decoded}.php";
+               }
                $templates[] = "page-$pagename.php";
+       }
        if ( $id )
                $templates[] = "page-$id.php";
        $templates[] = 'page.php';
@@ -344,27 +427,11 @@ function get_page_template() {
        return get_query_template( 'page', $templates );
 }
 
-/**
- * Retrieve path of paged template in current or parent template.
- *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'paged_template'.
- *
- * @since 1.5.0
- *
- * @see get_query_template()
- *
- * @return string Full path to paged template file.
- */
-function get_paged_template() {
-       return get_query_template('paged');
-}
-
 /**
  * Retrieve path of search template in current or parent template.
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'search_template'.
+ * The template hierarchy is filterable via the {@see 'search_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'search_template'} hook.
  *
  * @since 1.5.0
  *
@@ -377,13 +444,31 @@ function get_search_template() {
 }
 
 /**
- * Retrieve path of single template in current or parent template.
+ * Retrieve path of single template in current or parent template. Applies to single Posts,
+ * single Attachments, and single custom post types.
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'single_template'.
+ * The hierarchy for this template looks like:
+ *
+ * 1. {Post Type Template}.php
+ * 2. single-{post_type}-{post_name}.php
+ * 3. single-{post_type}.php
+ * 4. single.php
+ *
+ * An example of this is:
+ *
+ * 1. templates/full-width.php
+ * 2. single-post-hello-world.php
+ * 3. single-post.php
+ * 4. single.php
+ *
+ * The template hierarchy is filterable via the {@see 'single_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'single_template'} hook.
  *
  * @since 1.5.0
  * @since 4.4.0 `single-{post_type}-{post_name}.php` was added to the top of the template hierarchy.
+ * @since 4.7.0 The decoded form of `single-{post_type}-{post_name}.php` was added to the top of the
+ *              template hierarchy when the post name contains multibyte characters.
+ * @since 4.7.0 {Post Type Template}.php was added to the top of the template hierarchy.
  *
  * @see get_query_template()
  *
@@ -395,6 +480,16 @@ function get_single_template() {
        $templates = array();
 
        if ( ! empty( $object->post_type ) ) {
+               $template = get_page_template_slug( $object );
+               if ( $template && 0 === validate_file( $template ) ) {
+                       $templates[] = $template;
+               }
+
+               $name_decoded = urldecode( $object->post_name );
+               if ( $name_decoded !== $object->post_name ) {
+                       $templates[] = "single-{$object->post_type}-{$name_decoded}.php";
+               }
+
                $templates[] = "single-{$object->post_type}-{$object->post_name}.php";
                $templates[] = "single-{$object->post_type}.php";
        }
@@ -407,10 +502,20 @@ function get_single_template() {
 /**
  * Retrieves an embed template path in the current or parent template.
  *
- * By default the WordPress-template is returned.
+ * The hierarchy for this template looks like:
+ *
+ * 1. embed-{post_type}-{post_format}.php
+ * 2. embed-{post_type}.php
+ * 3. embed.php
+ *
+ * An example of this is:
+ *
+ * 1. embed-post-audio.php
+ * 2. embed-post.php
+ * 3. embed.php
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'embed_template'.
+ * The template hierarchy is filterable via the {@see 'embed_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'embed_template'} hook.
  *
  * @since 4.5.0
  *
@@ -439,8 +544,8 @@ function get_embed_template() {
 /**
  * Retrieves the path of the singular template in current or parent template.
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'singular_template'.
+ * The template hierarchy is filterable via the {@see 'singular_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'singular_template'} hook.
  *
  * @since 4.3.0
  *
@@ -455,18 +560,25 @@ function get_singular_template() {
 /**
  * Retrieve path of attachment template in current or parent template.
  *
- * The attachment path first checks if the first part of the mime type exists.
- * The second check is for the second part of the mime type. The last check is
- * for both types separated by an underscore. If neither are found then the file
- * 'attachment.php' is checked and returned.
+ * The hierarchy for this template looks like:
  *
- * Some examples for the 'text/plain' mime type are 'text.php', 'plain.php', and
- * finally 'text-plain.php'.
+ * 1. {mime_type}-{sub_type}.php
+ * 2. {sub_type}.php
+ * 3. {mime_type}.php
+ * 4. attachment.php
  *
- * The template path is filterable via the dynamic {@see '$type_template'} hook,
- * e.g. 'attachment_template'.
+ * An example of this is:
+ *
+ * 1. image-jpeg.php
+ * 2. jpeg.php
+ * 3. image.php
+ * 4. attachment.php
+ *
+ * The template hierarchy is filterable via the {@see 'attachment_template_hierarchy'} hook.
+ * The template path is filterable via the {@see 'attachment_template'} hook.
  *
  * @since 2.0.0
+ * @since 4.3.0 The order of the mime type logic was reversed so the hierarchy is more logical.
  *
  * @see get_query_template()
  *
@@ -574,4 +686,3 @@ function load_template( $_template_file, $require_once = true ) {
                require( $_template_file );
        }
 }
-
index e71e417e16e5328218ec7be453f7714ce56baa3c..8aac86c9f795ef213ebee491ce4630e5c1d6ea62 100644 (file)
@@ -902,7 +902,7 @@ function set_theme_mod( $name, $value ) {
         * @param string $value     The new value of the theme mod.
         * @param string $old_value The current value of the theme mod.
         */
-       $mods[ $name ] = apply_filters( "pre_set_theme_mod_$name", $value, $old_value );
+       $mods[ $name ] = apply_filters( "pre_set_theme_mod_{$name}", $value, $old_value );
 
        $theme = get_option( 'stylesheet' );
        update_option( "theme_mods_$theme", $mods );
@@ -1027,8 +1027,9 @@ function get_header_image() {
  */
 function get_header_image_tag( $attr = array() ) {
        $header = get_custom_header();
+       $header->url = get_header_image();
 
-       if ( empty( $header->url ) ) {
+       if ( ! $header->url ) {
                return '';
        }
 
@@ -1264,6 +1265,7 @@ function get_custom_header() {
                'thumbnail_url' => '',
                'width'         => get_theme_support( 'custom-header', 'width' ),
                'height'        => get_theme_support( 'custom-header', 'height' ),
+               'video'         => get_theme_support( 'custom-header', 'video' ),
        );
        return (object) wp_parse_args( $data, $default );
 }
@@ -1310,6 +1312,180 @@ function unregister_default_headers( $header ) {
        }
 }
 
+/**
+ * Check whether a header video is set or not.
+ *
+ * @since 4.7.0
+ *
+ * @see get_header_video_url()
+ *
+ * @return bool Whether a header video is set or not.
+ */
+function has_header_video() {
+       return (bool) get_header_video_url();
+}
+
+/* Retrieve header video URL for custom header.
+ *
+ * Uses a local video if present, or falls back to an external video. Returns false if there is no video.
+ *
+ * @since 4.7.0
+ *
+ * @return string|false
+ */
+function get_header_video_url() {
+       $id = absint( get_theme_mod( 'header_video' ) );
+       $url = esc_url( get_theme_mod( 'external_header_video' ) );
+
+       if ( ! $id && ! $url ) {
+               return false;
+       }
+
+       if ( $id ) {
+               // Get the file URL from the attachment ID.
+               $url = wp_get_attachment_url( $id );
+       }
+
+       return esc_url_raw( set_url_scheme( $url ) );
+}
+
+/**
+ * Display header video URL.
+ *
+ * @since 4.7.0
+ */
+function the_header_video_url() {
+       $video = get_header_video_url();
+       if ( $video ) {
+               echo esc_url( $video );
+       }
+}
+
+/**
+ * Retrieve header video settings.
+ *
+ * @since 4.7.0
+ *
+ * @return array
+ */
+function get_header_video_settings() {
+       $header     = get_custom_header();
+       $video_url  = get_header_video_url();
+       $video_type = wp_check_filetype( $video_url, wp_get_mime_types() );
+
+       $settings = array(
+               'mimeType'  => '',
+               'posterUrl' => get_header_image(),
+               'videoUrl'  => $video_url,
+               'width'     => absint( $header->width ),
+               'height'    => absint( $header->height ),
+               'minWidth'  => 900,
+               'minHeight' => 500,
+               'l10n'      => array(
+                       'pause'      => __( 'Pause' ),
+                       'play'       => __( 'Play' ),
+                       'pauseSpeak' => __( 'Video is paused.'),
+                       'playSpeak'  => __( 'Video is playing.'),
+               ),
+       );
+
+       if ( preg_match( '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#', $video_url ) ) {
+               $settings['mimeType'] = 'video/x-youtube';
+       } elseif ( ! empty( $video_type['type'] ) ) {
+               $settings['mimeType'] = $video_type['type'];
+       }
+
+       return apply_filters( 'header_video_settings', $settings );
+}
+
+/**
+ * Check whether a custom header is set or not.
+ *
+ * @since 4.7.0
+ *
+ * @return bool True if a custom header is set. False if not.
+ */
+function has_custom_header() {
+       if ( has_header_image() || ( has_header_video() && is_header_video_active() ) ) {
+               return true;
+       }
+
+       return false;
+}
+
+/**
+ * Checks whether the custom header video is eligible to show on the current page.
+ *
+ * @since 4.7.0
+ *
+ * @return bool True if the custom header video should be shown. False if not.
+ */
+function is_header_video_active() {
+       if ( ! get_theme_support( 'custom-header', 'video' ) ) {
+               return false;
+       }
+
+       $video_active_cb = get_theme_support( 'custom-header', 'video-active-callback' );
+
+       if ( empty( $video_active_cb ) || ! is_callable( $video_active_cb ) ) {
+               $show_video = true;
+       } else {
+               $show_video = call_user_func( $video_active_cb );
+       }
+
+       /**
+        * Modify whether the custom header video is eligible to show on the current page.
+        *
+        * @since 4.7.0
+        *
+        * @param bool $show_video Whether the custom header video should be shown. Returns the value
+        *                         of the theme setting for the `custom-header`'s `video-active-callback`.
+        *                         If no callback is set, the default value is that of `is_front_page()`.
+        */
+       return apply_filters( 'is_header_video_active', $show_video );
+}
+
+/**
+ * Retrieve the markup for a custom header.
+ *
+ * The container div will always be returned in the Customizer preview.
+ *
+ * @since 4.7.0
+ *
+ * @return string The markup for a custom header on success.
+ */
+function get_custom_header_markup() {
+       if ( ! has_custom_header() && ! is_customize_preview() ) {
+               return '';
+       }
+
+       return sprintf(
+               '<div id="wp-custom-header" class="wp-custom-header">%s</div>',
+               get_header_image_tag()
+       );
+}
+
+/**
+ * Print the markup for a custom header.
+ *
+ * A container div will always be printed in the Customizer preview.
+ *
+ * @since 4.7.0
+ */
+function the_custom_header_markup() {
+       $custom_header = get_custom_header_markup();
+       if ( empty( $custom_header ) ) {
+               return;
+       }
+
+       echo $custom_header;
+
+       if ( is_header_video_active() && ( has_header_video() || is_customize_preview() ) ) {
+               wp_enqueue_script( 'wp-custom-header' );
+               wp_localize_script( 'wp-custom-header', '_wpCustomHeaderSettings', get_header_video_settings() );
+       }
+}
+
 /**
  * Retrieve background image for custom background.
  *
@@ -1368,30 +1544,60 @@ function _custom_background_cb() {
                $color = false;
        }
 
-       if ( ! $background && ! $color )
+       if ( ! $background && ! $color ) {
+               if ( is_customize_preview() ) {
+                       echo '<style type="text/css" id="custom-background-css"></style>';
+               }
                return;
+       }
 
        $style = $color ? "background-color: #$color;" : '';
 
        if ( $background ) {
-               $image = " background-image: url('$background');";
+               $image = " background-image: url(" . wp_json_encode( $background ) . ");";
+
+               // Background Position.
+               $position_x = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );
+               $position_y = get_theme_mod( 'background_position_y', get_theme_support( 'custom-background', 'default-position-y' ) );
+
+               if ( ! in_array( $position_x, array( 'left', 'center', 'right' ), true ) ) {
+                       $position_x = 'left';
+               }
+
+               if ( ! in_array( $position_y, array( 'top', 'center', 'bottom' ), true ) ) {
+                       $position_y = 'top';
+               }
 
+               $position = " background-position: $position_x $position_y;";
+
+               // Background Size.
+               $size = get_theme_mod( 'background_size', get_theme_support( 'custom-background', 'default-size' ) );
+
+               if ( ! in_array( $size, array( 'auto', 'contain', 'cover' ), true ) ) {
+                       $size = 'auto';
+               }
+
+               $size = " background-size: $size;";
+
+               // Background Repeat.
                $repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );
-               if ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) )
+
+               if ( ! in_array( $repeat, array( 'repeat-x', 'repeat-y', 'repeat', 'no-repeat' ), true ) ) {
                        $repeat = 'repeat';
-               $repeat = " background-repeat: $repeat;";
+               }
 
-               $position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );
-               if ( ! in_array( $position, array( 'center', 'right', 'left' ) ) )
-                       $position = 'left';
-               $position = " background-position: top $position;";
+               $repeat = " background-repeat: $repeat;";
 
+               // Background Scroll.
                $attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );
-               if ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) )
+
+               if ( 'fixed' !== $attachment ) {
                        $attachment = 'scroll';
+               }
+
                $attachment = " background-attachment: $attachment;";
 
-               $style .= $image . $repeat . $position . $attachment;
+               $style .= $image . $position . $size . $repeat . $attachment;
        }
 ?>
 <style type="text/css" id="custom-background-css">
@@ -1400,6 +1606,199 @@ body.custom-background { <?php echo trim( $style ); ?> }
 <?php
 }
 
+/**
+ * Render the Custom CSS style element.
+ *
+ * @since 4.7.0
+ * @access public
+ */
+function wp_custom_css_cb() {
+       $styles = wp_get_custom_css();
+       if ( $styles || is_customize_preview() ) : ?>
+               <style type="text/css" id="wp-custom-css">
+                       <?php echo strip_tags( $styles ); // Note that esc_html() cannot be used because `div &gt; span` is not interpreted properly. ?>
+               </style>
+       <?php endif;
+}
+
+/**
+ * Fetch the `custom_css` post for a given theme.
+ *
+ * @since 4.7.0
+ * @access public
+ *
+ * @param string $stylesheet Optional. A theme object stylesheet name. Defaults to the current theme.
+ * @return WP_Post|null The custom_css post or null if none exists.
+ */
+function wp_get_custom_css_post( $stylesheet = '' ) {
+       if ( empty( $stylesheet ) ) {
+               $stylesheet = get_stylesheet();
+       }
+
+       $custom_css_query_vars = array(
+               'post_type'              => 'custom_css',
+               'post_status'            => get_post_stati(),
+               'name'                   => sanitize_title( $stylesheet ),
+               'posts_per_page'         => 1,
+               'no_found_rows'          => true,
+               'cache_results'          => true,
+               'update_post_meta_cache' => false,
+               'update_term_meta_cache' => false,
+       );
+
+       $post = null;
+       if ( get_stylesheet() === $stylesheet ) {
+               $post_id = get_theme_mod( 'custom_css_post_id' );
+
+               if ( $post_id > 0 && get_post( $post_id ) ) {
+                       $post = get_post( $post_id );
+               } else {
+                       $query = new WP_Query( $custom_css_query_vars );
+                       $post = $query->post;
+                       /*
+                        * Cache the lookup. See WP_Customize_Custom_CSS_Setting::update().
+                        * @todo This should get cleared if a custom_css post is added/removed.
+                        */
+                       if ( $post ) {
+                               set_theme_mod( 'custom_css_post_id', $post->ID );
+                       } elseif ( -1 !== $post_id ) {
+                               set_theme_mod( 'custom_css_post_id', -1 );
+                       }
+               }
+       } else {
+               $query = new WP_Query( $custom_css_query_vars );
+               $post = $query->post;
+       }
+
+       return $post;
+}
+
+/**
+ * Fetch the saved Custom CSS content for rendering.
+ *
+ * @since 4.7.0
+ * @access public
+ *
+ * @param string $stylesheet Optional. A theme object stylesheet name. Defaults to the current theme.
+ * @return string The Custom CSS Post content.
+ */
+function wp_get_custom_css( $stylesheet = '' ) {
+       $css = '';
+
+       if ( empty( $stylesheet ) ) {
+               $stylesheet = get_stylesheet();
+       }
+
+       $post = wp_get_custom_css_post( $stylesheet );
+       if ( $post ) {
+               $css = $post->post_content;
+       }
+
+       /**
+        * Modify the Custom CSS Output into the <head>.
+        *
+        * @since 4.7.0
+        *
+        * @param string $css        CSS pulled in from the Custom CSS CPT.
+        * @param string $stylesheet The theme stylesheet name.
+        */
+       $css = apply_filters( 'wp_get_custom_css', $css, $stylesheet );
+
+       return $css;
+}
+
+/**
+ * Update the `custom_css` post for a given theme.
+ *
+ * Inserts a `custom_css` post when one doesn't yet exist.
+ *
+ * @since 4.7.0
+ * @access public
+ *
+ * @param string $css CSS, stored in `post_content`.
+ * @param array  $args {
+ *     Args.
+ *
+ *     @type string $preprocessed Pre-processed CSS, stored in `post_content_filtered`. Normally empty string. Optional.
+ *     @type string $stylesheet   Stylesheet (child theme) to update. Optional, defaults to current theme/stylesheet.
+ * }
+ * @return WP_Post|WP_Error Post on success, error on failure.
+ */
+function wp_update_custom_css_post( $css, $args = array() ) {
+       $args = wp_parse_args( $args, array(
+               'preprocessed' => '',
+               'stylesheet' => get_stylesheet(),
+       ) );
+
+       $data = array(
+               'css' => $css,
+               'preprocessed' => $args['preprocessed'],
+       );
+
+       /**
+        * Filters the `css` (`post_content`) and `preprocessed` (`post_content_filtered`) args for a `custom_css` post being updated.
+        *
+        * This filter can be used by plugin that offer CSS pre-processors, to store the original
+        * pre-processed CSS in `post_content_filtered` and then store processed CSS in `post_content`.
+        * When used in this way, the `post_content_filtered` should be supplied as the setting value
+        * instead of `post_content` via a the `customize_value_custom_css` filter, for example:
+        *
+        * <code>
+        * add_filter( 'customize_value_custom_css', function( $value, $setting ) {
+        *     $post = wp_get_custom_css_post( $setting->stylesheet );
+        *     if ( $post && ! empty( $post->post_content_filtered ) ) {
+        *         $css = $post->post_content_filtered;
+        *     }
+        *     return $css;
+        * }, 10, 2 );
+        * </code>
+        *
+        * @since 4.7.0
+        * @param array $data {
+        *     Custom CSS data.
+        *
+        *     @type string $css          CSS stored in `post_content`.
+        *     @type string $preprocessed Pre-processed CSS stored in `post_content_filtered`. Normally empty string.
+        * }
+        * @param array $args {
+        *     The args passed into `wp_update_custom_css_post()` merged with defaults.
+        *
+        *     @type string $css          The original CSS passed in to be updated.
+        *     @type string $preprocessed The original preprocessed CSS passed in to be updated.
+        *     @type string $stylesheet   The stylesheet (theme) being updated.
+        * }
+        */
+       $data = apply_filters( 'update_custom_css_data', $data, array_merge( $args, compact( 'css' ) ) );
+
+       $post_data = array(
+               'post_title' => $args['stylesheet'],
+               'post_name' => sanitize_title( $args['stylesheet'] ),
+               'post_type' => 'custom_css',
+               'post_status' => 'publish',
+               'post_content' => $data['css'],
+               'post_content_filtered' => $data['preprocessed'],
+       );
+
+       // Update post if it already exists, otherwise create a new one.
+       $post = wp_get_custom_css_post( $args['stylesheet'] );
+       if ( $post ) {
+               $post_data['ID'] = $post->ID;
+               $r = wp_update_post( wp_slash( $post_data ), true );
+       } else {
+               $r = wp_insert_post( wp_slash( $post_data ), true );
+
+               // Trigger creation of a revision. This should be removed once #30854 is resolved.
+               if ( ! is_wp_error( $r ) && 0 === count( wp_get_post_revisions( $r ) ) ) {
+                       wp_save_post_revision( $r );
+               }
+       }
+
+       if ( is_wp_error( $r ) ) {
+               return $r;
+       }
+       return get_post( $r );
+}
+
 /**
  * Add callback for custom TinyMCE editor stylesheets.
  *
@@ -1513,6 +1912,271 @@ function get_editor_stylesheets() {
        return apply_filters( 'editor_stylesheets', $stylesheets );
 }
 
+/**
+ * Expand a theme's starter content configuration using core-provided data.
+ *
+ * @since 4.7.0
+ *
+ * @return array Array of starter content.
+ */
+function get_theme_starter_content() {
+       $theme_support = get_theme_support( 'starter-content' );
+       if ( is_array( $theme_support ) && ! empty( $theme_support[0] ) && is_array( $theme_support[0] ) ) {
+               $config = $theme_support[0];
+       } else {
+               $config = array();
+       }
+
+       $core_content = array(
+               'widgets' => array(
+                       'text_business_info' => array( 'text', array(
+                               'title' => _x( 'Find Us', 'Theme starter content' ),
+                               'text' => join( '', array(
+                                       '<p><strong>' . _x( 'Address', 'Theme starter content' ) . '</strong><br />',
+                                       _x( '123 Main Street', 'Theme starter content' ) . '<br />' . _x( 'New York, NY 10001', 'Theme starter content' ) . '</p>',
+                                       '<p><strong>' . _x( 'Hours', 'Theme starter content' ) . '</strong><br />',
+                                       _x( 'Monday&mdash;Friday: 9:00AM&ndash;5:00PM', 'Theme starter content' ) . '<br />' . _x( 'Saturday &amp; Sunday: 11:00AM&ndash;3:00PM', 'Theme starter content' ) . '</p>'
+                               ) ),
+                       ) ),
+                       'text_about' => array( 'text', array(
+                               'title' => _x( 'About This Site', 'Theme starter content' ),
+                               'text' => _x( 'This may be a good place to introduce yourself and your site or include some credits.', 'Theme starter content' ),
+                       ) ),
+                       'archives' => array( 'archives', array(
+                               'title' => _x( 'Archives', 'Theme starter content' ),
+                       ) ),
+                       'calendar' => array( 'calendar', array(
+                               'title' => _x( 'Calendar', 'Theme starter content' ),
+                       ) ),
+                       'categories' => array( 'categories', array(
+                               'title' => _x( 'Categories', 'Theme starter content' ),
+                       ) ),
+                       'meta' => array( 'meta', array(
+                               'title' => _x( 'Meta', 'Theme starter content' ),
+                       ) ),
+                       'recent-comments' => array( 'recent-comments', array(
+                               'title' => _x( 'Recent Comments', 'Theme starter content' ),
+                       ) ),
+                       'recent-posts' => array( 'recent-posts', array(
+                               'title' => _x( 'Recent Posts', 'Theme starter content' ),
+                       ) ),
+                       'search' => array( 'search', array(
+                               'title' => _x( 'Search', 'Theme starter content' ),
+                       ) ),
+               ),
+               'nav_menus' => array(
+                       'page_home' => array(
+                               'type' => 'post_type',
+                               'object' => 'page',
+                               'object_id' => '{{home}}',
+                       ),
+                       'page_about' => array(
+                               'type' => 'post_type',
+                               'object' => 'page',
+                               'object_id' => '{{about}}',
+                       ),
+                       'page_blog' => array(
+                               'type' => 'post_type',
+                               'object' => 'page',
+                               'object_id' => '{{blog}}',
+                       ),
+                       'page_news' => array(
+                               'type' => 'post_type',
+                               'object' => 'page',
+                               'object_id' => '{{news}}',
+                       ),
+                       'page_contact' => array(
+                               'type' => 'post_type',
+                               'object' => 'page',
+                               'object_id' => '{{contact}}',
+                       ),
+
+                       'link_email' => array(
+                               'title' => _x( 'Email', 'Theme starter content' ),
+                               'url' => 'mailto:wordpress@example.com',
+                       ),
+                       'link_facebook' => array(
+                               'title' => _x( 'Facebook', 'Theme starter content' ),
+                               'url' => 'https://www.facebook.com/wordpress',
+                       ),
+                       'link_foursquare' => array(
+                               'title' => _x( 'Foursquare', 'Theme starter content' ),
+                               'url' => 'https://foursquare.com/',
+                       ),
+                       'link_github' => array(
+                               'title' => _x( 'GitHub', 'Theme starter content' ),
+                               'url' => 'https://github.com/wordpress/',
+                       ),
+                       'link_instagram' => array(
+                               'title' => _x( 'Instagram', 'Theme starter content' ),
+                               'url' => 'https://www.instagram.com/explore/tags/wordcamp/',
+                       ),
+                       'link_linkedin' => array(
+                               'title' => _x( 'LinkedIn', 'Theme starter content' ),
+                               'url' => 'https://www.linkedin.com/company/1089783',
+                       ),
+                       'link_pinterest' => array(
+                               'title' => _x( 'Pinterest', 'Theme starter content' ),
+                               'url' => 'https://www.pinterest.com/',
+                       ),
+                       'link_twitter' => array(
+                               'title' => _x( 'Twitter', 'Theme starter content' ),
+                               'url' => 'https://twitter.com/wordpress',
+                       ),
+                       'link_yelp' => array(
+                               'title' => _x( 'Yelp', 'Theme starter content' ),
+                               'url' => 'https://www.yelp.com',
+                       ),
+                       'link_youtube' => array(
+                               'title' => _x( 'YouTube', 'Theme starter content' ),
+                               'url' => 'https://www.youtube.com/channel/UCdof4Ju7amm1chz1gi1T2ZA',
+                       ),
+               ),
+               'posts' => array(
+                       'home' => array(
+                               'post_type' => 'page',
+                               'post_title' => _x( 'Home', 'Theme starter content' ),
+                               'post_content' => _x( 'Welcome to your site! This is your homepage, which is what most visitors will see when they come to your site for the first time.', 'Theme starter content' ),
+                       ),
+                       'about' => array(
+                               'post_type' => 'page',
+                               'post_title' => _x( 'About', 'Theme starter content' ),
+                               'post_content' => _x( 'You might be an artist who would like to introduce yourself and your work here or maybe you&rsquo;re a business with a mission to describe.', 'Theme starter content' ),
+                       ),
+                       'contact' => array(
+                               'post_type' => 'page',
+                               'post_title' => _x( 'Contact', 'Theme starter content' ),
+                               'post_content' => _x( 'This is a page with some basic contact information, such as an address and phone number. You might also try a plugin to add a contact form.', 'Theme starter content' ),
+                       ),
+                       'blog' => array(
+                               'post_type' => 'page',
+                               'post_title' => _x( 'Blog', 'Theme starter content' ),
+                       ),
+                       'news' => array(
+                               'post_type' => 'page',
+                               'post_title' => _x( 'News', 'Theme starter content' ),
+                       ),
+
+                       'homepage-section' => array(
+                               'post_type' => 'page',
+                               'post_title' => _x( 'A homepage section', 'Theme starter content' ),
+                               'post_content' => _x( 'This is an example of a homepage section. Homepage sections can be any page other than the homepage itself, including the page that shows your latest blog posts.', 'Theme starter content' ),
+                       ),
+               ),
+       );
+
+       $content = array();
+
+       foreach ( $config as $type => $args ) {
+               switch( $type ) {
+                       // Use options and theme_mods as-is.
+                       case 'options' :
+                       case 'theme_mods' :
+                               $content[ $type ] = $config[ $type ];
+                               break;
+
+                       // Widgets are grouped into sidebars.
+                       case 'widgets' :
+                               foreach ( $config[ $type ] as $sidebar_id => $widgets ) {
+                                       foreach ( $widgets as $id => $widget ) {
+                                               if ( is_array( $widget ) ) {
+
+                                                       // Item extends core content.
+                                                       if ( ! empty( $core_content[ $type ][ $id ] ) ) {
+                                                               $widget = array(
+                                                                       $core_content[ $type ][ $id ][0],
+                                                                       array_merge( $core_content[ $type ][ $id ][1], $widget ),
+                                                               );
+                                                       }
+
+                                                       $content[ $type ][ $sidebar_id ][] = $widget;
+                                               } elseif ( is_string( $widget ) && ! empty( $core_content[ $type ] ) && ! empty( $core_content[ $type ][ $widget ] ) ) {
+                                                       $content[ $type ][ $sidebar_id ][] = $core_content[ $type ][ $widget ];
+                                               }
+                                       }
+                               }
+                               break;
+
+                       // And nav menu items are grouped into nav menus.
+                       case 'nav_menus' :
+                               foreach ( $config[ $type ] as $nav_menu_location => $nav_menu ) {
+
+                                       // Ensure nav menus get a name.
+                                       if ( empty( $nav_menu['name'] ) ) {
+                                               $nav_menu['name'] = $nav_menu_location;
+                                       }
+
+                                       $content[ $type ][ $nav_menu_location ]['name'] = $nav_menu['name'];
+
+                                       foreach ( $nav_menu['items'] as $id => $nav_menu_item ) {
+                                               if ( is_array( $nav_menu_item ) ) {
+
+                                                       // Item extends core content.
+                                                       if ( ! empty( $core_content[ $type ][ $id ] ) ) {
+                                                               $nav_menu_item = array_merge( $core_content[ $type ][ $id ], $nav_menu_item );
+                                                       }
+
+                                                       $content[ $type ][ $nav_menu_location ]['items'][] = $nav_menu_item;
+                                               } elseif ( is_string( $nav_menu_item ) && ! empty( $core_content[ $type ] ) && ! empty( $core_content[ $type ][ $nav_menu_item ] ) ) {
+                                                       $content[ $type ][ $nav_menu_location ]['items'][] = $core_content[ $type ][ $nav_menu_item ];
+                                               }
+                                       }
+                               }
+                               break;
+
+                       // Attachments are posts but have special treatment.
+                       case 'attachments' :
+                               foreach ( $config[ $type ] as $id => $item ) {
+                                       if ( ! empty( $item['file'] ) ) {
+                                               $content[ $type ][ $id ] = $item;
+                                       }
+                               }
+                               break;
+
+                       // All that's left now are posts (besides attachments). Not a default case for the sake of clarity and future work.
+                       case 'posts' :
+                               foreach ( $config[ $type ] as $id => $item ) {
+                                       if ( is_array( $item ) ) {
+
+                                               // Item extends core content.
+                                               if ( ! empty( $core_content[ $type ][ $id ] ) ) {
+                                                       $item = array_merge( $core_content[ $type ][ $id ], $item );
+                                               }
+
+                                               // Enforce a subset of fields.
+                                               $content[ $type ][ $id ] = wp_array_slice_assoc(
+                                                       $item,
+                                                       array(
+                                                               'post_type',
+                                                               'post_title',
+                                                               'post_excerpt',
+                                                               'post_name',
+                                                               'post_content',
+                                                               'menu_order',
+                                                               'comment_status',
+                                                               'thumbnail',
+                                                               'template',
+                                                       )
+                                               );
+                                       } elseif ( is_string( $item ) && ! empty( $core_content[ $type ][ $item ] ) ) {
+                                               $content[ $type ][ $item ] = $core_content[ $type ][ $item ];
+                                       }
+                               }
+                               break;
+               }
+       }
+
+       /**
+        * Filters the expanded array of starter content.
+        *
+        * @since 4.7.0
+        *
+        * @param array $content Array of starter content.
+        * @param array $config  Array of theme-specific starter content configuration.
+        */
+       return apply_filters( 'get_theme_starter_content', $content, $config );
+}
+
 /**
  * Registers theme support for a given feature.
  *
@@ -1525,12 +2189,13 @@ function get_editor_stylesheets() {
  * @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
+ * @since 4.7.0 The `starter-content` feature was added
  *
  * @global array $_wp_theme_features
  *
  * @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.
+ *                         'custom-header', 'custom-background', 'title-tag', 'starter-content', etc.
  * @param mixed  $args,... Optional extra arguments to pass along with certain features.
  * @return void|bool False on failure, void otherwise.
  */
@@ -1623,6 +2288,8 @@ function add_theme_support( $feature ) {
                                'wp-head-callback' => '',
                                'admin-head-callback' => '',
                                'admin-preview-callback' => '',
+                               'video' => false,
+                               'video-active-callback' => 'is_front_page',
                        );
 
                        $jit = isset( $args[0]['__jit'] );
@@ -1689,8 +2356,11 @@ function add_theme_support( $feature ) {
 
                        $defaults = array(
                                'default-image'          => '',
-                               'default-repeat'         => 'repeat',
+                               'default-preset'         => 'default',
                                'default-position-x'     => 'left',
+                               'default-position-y'     => 'top',
+                               'default-size'           => 'auto',
+                               'default-repeat'         => 'repeat',
                                'default-attachment'     => 'scroll',
                                'default-color'          => '',
                                'wp-head-callback'       => '_custom_background_cb',
@@ -1881,10 +2551,13 @@ function _remove_theme_support( $feature ) {
                        if ( ! did_action( 'wp_loaded' ) )
                                break;
                        $support = get_theme_support( 'custom-header' );
-                       if ( $support[0]['wp-head-callback'] )
+                       if ( isset( $support[0]['wp-head-callback'] ) ) {
                                remove_action( 'wp_head', $support[0]['wp-head-callback'] );
-                       remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) );
-                       unset( $GLOBALS['custom_image_header'] );
+                       }
+                       if ( isset( $GLOBALS['custom_image_header'] ) ) {
+                               remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) );
+                               unset( $GLOBALS['custom_image_header'] );
+                       }
                        break;
 
                case 'custom-background' :
@@ -1958,7 +2631,8 @@ function current_theme_supports( $feature ) {
         *
         * The dynamic portion of the hook name, `$feature`, refers to the specific theme
         * feature. Possible values include 'post-formats', 'post-thumbnails', 'custom-background',
-        * 'custom-header', 'menus', 'automatic-feed-links', 'html5', and `customize-selective-refresh-widgets`.
+        * 'custom-header', 'menus', 'automatic-feed-links', 'html5',
+        * 'starter-content', and 'customize-selective-refresh-widgets'.
         *
         * @since 3.4.0
         *
@@ -2066,9 +2740,9 @@ function check_theme_switched() {
  * Includes and instantiates the WP_Customize_Manager class.
  *
  * Loads the Customizer at plugins_loaded when accessing the customize.php admin
- * page or when any request includes a wp_customize=on param, either as a GET
- * query var or as POST data. This param is a signal for whether to bootstrap
- * the Customizer when WordPress is loading, especially in the Customizer preview
+ * page or when any request includes a wp_customize=on param or a customize_changeset
+ * param (a UUID). This param is a signal for whether to bootstrap the Customizer when
+ * WordPress is loading, especially in the Customizer preview
  * or when making Customizer Ajax requests for widgets or menus.
  *
  * @since 3.4.0
@@ -2076,14 +2750,180 @@ function check_theme_switched() {
  * @global WP_Customize_Manager $wp_customize
  */
 function _wp_customize_include() {
-       if ( ! ( ( isset( $_REQUEST['wp_customize'] ) && 'on' == $_REQUEST['wp_customize'] )
-               || ( is_admin() && 'customize.php' == basename( $_SERVER['PHP_SELF'] ) )
-       ) ) {
+
+       $is_customize_admin_page = ( is_admin() && 'customize.php' == basename( $_SERVER['PHP_SELF'] ) );
+       $should_include = (
+               $is_customize_admin_page
+               ||
+               ( isset( $_REQUEST['wp_customize'] ) && 'on' == $_REQUEST['wp_customize'] )
+               ||
+               ( ! empty( $_GET['customize_changeset_uuid'] ) || ! empty( $_POST['customize_changeset_uuid'] ) )
+       );
+
+       if ( ! $should_include ) {
                return;
        }
 
+       /*
+        * Note that wp_unslash() is not being used on the input vars because it is
+        * called before wp_magic_quotes() gets called. Besides this fact, none of
+        * the values should contain any characters needing slashes anyway.
+        */
+       $keys = array( 'changeset_uuid', 'customize_changeset_uuid', 'customize_theme', 'theme', 'customize_messenger_channel' );
+       $input_vars = array_merge(
+               wp_array_slice_assoc( $_GET, $keys ),
+               wp_array_slice_assoc( $_POST, $keys )
+       );
+
+       $theme = null;
+       $changeset_uuid = null;
+       $messenger_channel = null;
+
+       if ( $is_customize_admin_page && isset( $input_vars['changeset_uuid'] ) ) {
+               $changeset_uuid = sanitize_key( $input_vars['changeset_uuid'] );
+       } elseif ( ! empty( $input_vars['customize_changeset_uuid'] ) ) {
+               $changeset_uuid = sanitize_key( $input_vars['customize_changeset_uuid'] );
+       }
+
+       // Note that theme will be sanitized via WP_Theme.
+       if ( $is_customize_admin_page && isset( $input_vars['theme'] ) ) {
+               $theme = $input_vars['theme'];
+       } elseif ( isset( $input_vars['customize_theme'] ) ) {
+               $theme = $input_vars['customize_theme'];
+       }
+       if ( isset( $input_vars['customize_messenger_channel'] ) ) {
+               $messenger_channel = sanitize_key( $input_vars['customize_messenger_channel'] );
+       }
+
        require_once ABSPATH . WPINC . '/class-wp-customize-manager.php';
-       $GLOBALS['wp_customize'] = new WP_Customize_Manager();
+       $GLOBALS['wp_customize'] = new WP_Customize_Manager( compact( 'changeset_uuid', 'theme', 'messenger_channel' ) );
+}
+
+/**
+ * Publish a snapshot's changes.
+ *
+ * @param string  $new_status     New post status.
+ * @param string  $old_status     Old post status.
+ * @param WP_Post $changeset_post Changeset post object.
+ */
+function _wp_customize_publish_changeset( $new_status, $old_status, $changeset_post ) {
+       global $wp_customize, $wpdb;
+
+       $is_publishing_changeset = (
+               'customize_changeset' === $changeset_post->post_type
+               &&
+               'publish' === $new_status
+               &&
+               'publish' !== $old_status
+       );
+       if ( ! $is_publishing_changeset ) {
+               return;
+       }
+
+       if ( empty( $wp_customize ) ) {
+               require_once ABSPATH . WPINC . '/class-wp-customize-manager.php';
+               $wp_customize = new WP_Customize_Manager( array( 'changeset_uuid' => $changeset_post->post_name ) );
+       }
+
+       if ( ! did_action( 'customize_register' ) ) {
+               /*
+                * When running from CLI or Cron, the customize_register action will need
+                * to be triggered in order for core, themes, and plugins to register their
+                * settings. Normally core will add_action( 'customize_register' ) at
+                * priority 10 to register the core settings, and if any themes/plugins
+                * also add_action( 'customize_register' ) at the same priority, they
+                * will have a $wp_customize with those settings registered since they
+                * call add_action() afterward, normally. However, when manually doing
+                * the customize_register action after the setup_theme, then the order
+                * will be reversed for two actions added at priority 10, resulting in
+                * the core settings no longer being available as expected to themes/plugins.
+                * So the following manually calls the method that registers the core
+                * settings up front before doing the action.
+                */
+               remove_action( 'customize_register', array( $wp_customize, 'register_controls' ) );
+               $wp_customize->register_controls();
+
+               /** This filter is documented in /wp-includes/class-wp-customize-manager.php */
+               do_action( 'customize_register', $wp_customize );
+       }
+       $wp_customize->_publish_changeset_values( $changeset_post->ID ) ;
+
+       /*
+        * Trash the changeset post if revisions are not enabled. Unpublished
+        * changesets by default get garbage collected due to the auto-draft status.
+        * When a changeset post is published, however, it would no longer get cleaned
+        * out. Ths is a problem when the changeset posts are never displayed anywhere,
+        * since they would just be endlessly piling up. So here we use the revisions
+        * feature to indicate whether or not a published changeset should get trashed
+        * and thus garbage collected.
+        */
+       if ( ! wp_revisions_enabled( $changeset_post ) ) {
+               $post = $changeset_post;
+               $post_id = $changeset_post->ID;
+
+               /*
+                * The following re-formulates the logic from wp_trash_post() as done in
+                * wp_publish_post(). The reason for bypassing wp_trash_post() is that it
+                * will mutate the the post_content and the post_name when they should be
+                * untouched.
+                */
+               if ( ! EMPTY_TRASH_DAYS ) {
+                       wp_delete_post( $post_id, true );
+               } else {
+                       /** This action is documented in wp-includes/post.php */
+                       do_action( 'wp_trash_post', $post_id );
+
+                       add_post_meta( $post_id, '_wp_trash_meta_status', $post->post_status );
+                       add_post_meta( $post_id, '_wp_trash_meta_time', time() );
+
+                       $old_status = $post->post_status;
+                       $new_status = 'trash';
+                       $wpdb->update( $wpdb->posts, array( 'post_status' => $new_status ), array( 'ID' => $post->ID ) );
+                       clean_post_cache( $post->ID );
+
+                       $post->post_status = $new_status;
+                       wp_transition_post_status( $new_status, $old_status, $post );
+
+                       /** This action is documented in wp-includes/post.php */
+                       do_action( 'edit_post', $post->ID, $post );
+
+                       /** This action is documented in wp-includes/post.php */
+                       do_action( "save_post_{$post->post_type}", $post->ID, $post, true );
+
+                       /** This action is documented in wp-includes/post.php */
+                       do_action( 'save_post', $post->ID, $post, true );
+
+                       /** This action is documented in wp-includes/post.php */
+                       do_action( 'wp_insert_post', $post->ID, $post, true );
+
+                       /** This action is documented in wp-includes/post.php */
+                       do_action( 'trashed_post', $post_id );
+               }
+       }
+}
+
+/**
+ * Filters changeset post data upon insert to ensure post_name is intact.
+ *
+ * This is needed to prevent the post_name from being dropped when the post is
+ * transitioned into pending status by a contributor.
+ *
+ * @since 4.7.0
+ * @see wp_insert_post()
+ *
+ * @param array $post_data          An array of slashed post data.
+ * @param array $supplied_post_data An array of sanitized, but otherwise unmodified post data.
+ * @returns array Filtered data.
+ */
+function _wp_customize_changeset_filter_insert_post_data( $post_data, $supplied_post_data ) {
+       if ( isset( $post_data['post_type'] ) && 'customize_changeset' === $post_data['post_type'] ) {
+
+               // Prevent post_name from being dropped, such as when contributor saves a changeset post as pending.
+               if ( empty( $post_data['post_name'] ) && ! empty( $supplied_post_data['post_name'] ) ) {
+                       $post_data['post_name'] = $supplied_post_data['post_name'];
+               }
+       }
+       return $post_data;
 }
 
 /**
@@ -2151,6 +2991,7 @@ function wp_customize_url( $stylesheet = null ) {
  * to the body tag by default.
  *
  * @since 3.4.0
+ * @since 4.7.0 Support for IE8 and below is explicitly removed via conditional comments.
  */
 function wp_customize_support_script() {
        $admin_origin = parse_url( admin_url() );
@@ -2158,20 +2999,28 @@ function wp_customize_support_script() {
        $cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) );
 
        ?>
-       <script type="text/javascript">
-               (function() {
-                       var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
-
-<?php          if ( $cross_domain ): ?>
-                       request = (function(){ var xhr = new XMLHttpRequest(); return ('withCredentials' in xhr); })();
-<?php          else: ?>
-                       request = true;
-<?php          endif; ?>
-
-                       b[c] = b[c].replace( rcs, ' ' );
-                       b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
-               }());
-       </script>
+       <!--[if lte IE 8]>
+               <script type="text/javascript">
+                       document.body.className = document.body.className.replace( /(^|\s)(no-)?customize-support(?=\s|$)/, '' ) + ' no-customize-support';
+               </script>
+       <![endif]-->
+       <!--[if gte IE 9]><!-->
+               <script type="text/javascript">
+                       (function() {
+                               var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
+
+               <?php   if ( $cross_domain ) : ?>
+                               request = (function(){ var xhr = new XMLHttpRequest(); return ('withCredentials' in xhr); })();
+               <?php   else : ?>
+                               request = true;
+               <?php   endif; ?>
+
+                               b[c] = b[c].replace( rcs, ' ' );
+                               // The customizer requires postMessage and CORS (if the site is cross domain)
+                               b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
+                       }());
+               </script>
+       <!--<![endif]-->
        <?php
 }
 
index 59b618c31a1445ab3b79912e2d596d91bc5f0d89..f0b999a4cc5a13a637a0b6de355500371c7d866f 100644 (file)
@@ -120,7 +120,14 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) {
 
        $response = wp_remote_post( $url, $options );
        if ( $ssl && is_wp_error( $response ) ) {
-               trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+               trigger_error(
+                       sprintf(
+                               /* translators: %s: support forums URL */
+                               __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                               __( 'https://wordpress.org/support/' )
+                       ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
+                       headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
+               );
                $response = wp_remote_post( $http_url, $options );
        }
 
@@ -303,7 +310,14 @@ function wp_update_plugins( $extra_stats = array() ) {
 
        $raw_response = wp_remote_post( $url, $options );
        if ( $ssl && is_wp_error( $raw_response ) ) {
-               trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+               trigger_error(
+                       sprintf(
+                               /* translators: %s: support forums URL */
+                               __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                               __( 'https://wordpress.org/support/' )
+                       ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
+                       headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
+               );
                $raw_response = wp_remote_post( $http_url, $options );
        }
 
@@ -476,7 +490,14 @@ function wp_update_themes( $extra_stats = array() ) {
 
        $raw_response = wp_remote_post( $url, $options );
        if ( $ssl && is_wp_error( $raw_response ) ) {
-               trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+               trigger_error(
+                       sprintf(
+                               /* translators: %s: support forums URL */
+                               __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
+                               __( 'https://wordpress.org/support/' )
+                       ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
+                       headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
+               );
                $raw_response = wp_remote_post( $http_url, $options );
        }
 
@@ -566,14 +587,21 @@ function wp_get_update_data() {
 
        $counts['total'] = $counts['plugins'] + $counts['themes'] + $counts['wordpress'] + $counts['translations'];
        $titles = array();
-       if ( $counts['wordpress'] )
+       if ( $counts['wordpress'] ) {
+               /* translators: 1: Number of updates available to WordPress */
                $titles['wordpress'] = sprintf( __( '%d WordPress Update'), $counts['wordpress'] );
-       if ( $counts['plugins'] )
+       }
+       if ( $counts['plugins'] ) {
+               /* translators: 1: Number of updates available to plugins */
                $titles['plugins'] = sprintf( _n( '%d Plugin Update', '%d Plugin Updates', $counts['plugins'] ), $counts['plugins'] );
-       if ( $counts['themes'] )
+       }
+       if ( $counts['themes'] ) {
+               /* translators: 1: Number of updates available to themes */
                $titles['themes'] = sprintf( _n( '%d Theme Update', '%d Theme Updates', $counts['themes'] ), $counts['themes'] );
-       if ( $counts['translations'] )
+       }
+       if ( $counts['translations'] ) {
                $titles['translations'] = __( 'Translation Updates' );
+       }
 
        $update_title = $titles ? esc_attr( implode( ', ', $titles ) ) : '';
 
@@ -678,7 +706,7 @@ function wp_clean_update_cache() {
        delete_site_transient( 'update_core' );
 }
 
-if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
+if ( ( ! is_main_site() && ! is_network_admin() ) || wp_doing_ajax() ) {
        return;
 }
 
index 6d473ef4c8485242e43c3e56beae03f45a1078ff..028606385ba315dfe81047c413b3f38418c68ae6 100644 (file)
@@ -559,24 +559,25 @@ function get_users( $args = array() ) {
 }
 
 /**
- * Get the blogs a user belongs to.
+ * Get the sites a user belongs to.
  *
  * @since 3.0.0
+ * @since 4.7.0 Converted to use get_sites().
  *
  * @global wpdb $wpdb WordPress database abstraction object.
  *
  * @param int  $user_id User ID
- * @param bool $all     Whether to retrieve all blogs, or only blogs that are not
+ * @param bool $all     Whether to retrieve all sites, or only sites that are not
  *                      marked as deleted, archived, or spam.
- * @return array A list of the user's blogs. An empty array if the user doesn't exist
- *               or belongs to no blogs.
+ * @return array A list of the user's sites. An empty array if the user doesn't exist
+ *               or belongs to no sites.
  */
 function get_blogs_of_user( $user_id, $all = false ) {
        global $wpdb;
 
        $user_id = (int) $user_id;
 
-       // Logged out users can't have blogs
+       // Logged out users can't have sites
        if ( empty( $user_id ) )
                return array();
 
@@ -588,15 +589,15 @@ function get_blogs_of_user( $user_id, $all = false ) {
         *
         * @since 4.6.0
         *
-        * @param null|array $blogs   An array of WP_Site objects of which the user is a member.
+        * @param null|array $sites   An array of 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 );
+       $sites = apply_filters( 'pre_get_blogs_of_user', null, $user_id, $all );
 
-       if ( null !== $blogs ) {
-               return $blogs;
+       if ( null !== $sites ) {
+               return $sites;
        }
 
        $keys = get_user_meta( $user_id );
@@ -604,38 +605,24 @@ function get_blogs_of_user( $user_id, $all = false ) {
                return array();
 
        if ( ! is_multisite() ) {
-               $blog_id = get_current_blog_id();
-               $blogs = array( $blog_id => new stdClass );
-               $blogs[ $blog_id ]->userblog_id = $blog_id;
-               $blogs[ $blog_id ]->blogname = get_option('blogname');
-               $blogs[ $blog_id ]->domain = '';
-               $blogs[ $blog_id ]->path = '';
-               $blogs[ $blog_id ]->site_id = 1;
-               $blogs[ $blog_id ]->siteurl = get_option('siteurl');
-               $blogs[ $blog_id ]->archived = 0;
-               $blogs[ $blog_id ]->spam = 0;
-               $blogs[ $blog_id ]->deleted = 0;
-               return $blogs;
-       }
-
-       $blogs = array();
+               $site_id = get_current_blog_id();
+               $sites = array( $site_id => new stdClass );
+               $sites[ $site_id ]->userblog_id = $site_id;
+               $sites[ $site_id ]->blogname = get_option('blogname');
+               $sites[ $site_id ]->domain = '';
+               $sites[ $site_id ]->path = '';
+               $sites[ $site_id ]->site_id = 1;
+               $sites[ $site_id ]->siteurl = get_option('siteurl');
+               $sites[ $site_id ]->archived = 0;
+               $sites[ $site_id ]->spam = 0;
+               $sites[ $site_id ]->deleted = 0;
+               return $sites;
+       }
+
+       $site_ids = array();
 
        if ( isset( $keys[ $wpdb->base_prefix . 'capabilities' ] ) && defined( 'MULTISITE' ) ) {
-               $blog = get_blog_details( 1 );
-               if ( $blog && isset( $blog->domain ) && ( $all || ( ! $blog->archived && ! $blog->spam && ! $blog->deleted ) ) ) {
-                       $blogs[ 1 ] = (object) array(
-                               'userblog_id' => 1,
-                               'blogname'    => $blog->blogname,
-                               'domain'      => $blog->domain,
-                               'path'        => $blog->path,
-                               'site_id'     => $blog->site_id,
-                               'siteurl'     => $blog->siteurl,
-                               'archived'    => $blog->archived,
-                               'mature'      => $blog->mature,
-                               'spam'        => $blog->spam,
-                               'deleted'     => $blog->deleted,
-                       );
-               }
+               $site_ids[] = 1;
                unset( $keys[ $wpdb->base_prefix . 'capabilities' ] );
        }
 
@@ -646,39 +633,55 @@ function get_blogs_of_user( $user_id, $all = false ) {
                        continue;
                if ( $wpdb->base_prefix && 0 !== strpos( $key, $wpdb->base_prefix ) )
                        continue;
-               $blog_id = str_replace( array( $wpdb->base_prefix, '_capabilities' ), '', $key );
-               if ( ! is_numeric( $blog_id ) )
+               $site_id = str_replace( array( $wpdb->base_prefix, '_capabilities' ), '', $key );
+               if ( ! is_numeric( $site_id ) )
                        continue;
 
-               $blog_id = (int) $blog_id;
-               $blog = get_blog_details( $blog_id );
-               if ( $blog && isset( $blog->domain ) && ( $all || ( ! $blog->archived && ! $blog->spam && ! $blog->deleted ) ) ) {
-                       $blogs[ $blog_id ] = (object) array(
-                               'userblog_id' => $blog_id,
-                               'blogname'    => $blog->blogname,
-                               'domain'      => $blog->domain,
-                               'path'        => $blog->path,
-                               'site_id'     => $blog->site_id,
-                               'siteurl'     => $blog->siteurl,
-                               'archived'    => $blog->archived,
-                               'mature'      => $blog->mature,
-                               'spam'        => $blog->spam,
-                               'deleted'     => $blog->deleted,
+               $site_ids[] = (int) $site_id;
+       }
+
+       $sites = array();
+
+       if ( ! empty( $site_ids ) ) {
+               $args = array(
+                       'number'   => '',
+                       'site__in' => $site_ids,
+               );
+               if ( ! $all ) {
+                       $args['archived'] = 0;
+                       $args['spam']     = 0;
+                       $args['deleted']  = 0;
+               }
+
+               $_sites = get_sites( $args );
+
+               foreach ( $_sites as $site ) {
+                       $sites[ $site->id ] = (object) array(
+                               'userblog_id' => $site->id,
+                               'blogname'    => $site->blogname,
+                               'domain'      => $site->domain,
+                               'path'        => $site->path,
+                               'site_id'     => $site->network_id,
+                               'siteurl'     => $site->siteurl,
+                               'archived'    => $site->archived,
+                               'mature'      => $site->mature,
+                               'spam'        => $site->spam,
+                               'deleted'     => $site->deleted,
                        );
                }
        }
 
        /**
-        * Filters the list of blogs a user belongs to.
+        * Filters the list of sites a user belongs to.
         *
         * @since MU
         *
-        * @param array $blogs   An array of blog objects belonging to the user.
+        * @param array $sites   An array of site objects belonging to the user.
         * @param int   $user_id User ID.
-        * @param bool  $all     Whether the returned blogs array should contain all blogs, including
+        * @param bool  $all     Whether the returned sites array should contain all sites, including
         *                       those marked 'deleted', 'archived', or 'spam'. Default false.
         */
-       return apply_filters( 'get_blogs_of_user', $blogs, $user_id, $all );
+       return apply_filters( 'get_blogs_of_user', $sites, $user_id, $all );
 }
 
 /**
@@ -700,7 +703,7 @@ function is_user_member_of_blog( $user_id = 0, $blog_id = 0 ) {
                $user_id = get_current_user_id();
        }
 
-       // Technically not needed, but does save calls to get_blog_details and get_user_meta
+       // Technically not needed, but does save calls to get_site and get_user_meta
        // in the event that the function is called when a user isn't logged in
        if ( empty( $user_id ) ) {
                return false;
@@ -719,7 +722,7 @@ function is_user_member_of_blog( $user_id = 0, $blog_id = 0 ) {
                $blog_id = get_current_blog_id();
        }
 
-       $blog = get_blog_details( $blog_id );
+       $blog = get_site( $blog_id );
 
        if ( ! $blog || ! isset( $blog->domain ) || $blog->archived || $blog->spam || $blog->deleted ) {
                return false;
@@ -964,8 +967,7 @@ function setup_userdata($for_user_id = '') {
  *
  * @since 2.3.0
  * @since 4.5.0 Added the 'display_name_with_login' value for 'show'.
- *
- * @global int  $blog_id
+ * @since 4.7.0 Added the `$role`, `$role__in`, and `$role__not_in` parameters.
  *
  * @param array|string $args {
  *     Optional. Array or string of arguments to generate a drop-down of users.
@@ -1006,6 +1008,13 @@ function setup_userdata($for_user_id = '') {
  *     @type int          $blog_id                 ID of blog (Multisite only). Default is ID of the current blog.
  *     @type string       $who                     Which type of users to query. Accepts only an empty string or
  *                                                 'authors'. Default empty.
+ *     @type string|array $role                    An array or a comma-separated list of role names that users must
+ *                                                 match to be included in results. Note that this is an inclusive
+ *                                                 list: users must match *each* role. Default empty.
+ *     @type array        $role__in                An array of role names. Matched users must have at least one of
+ *                                                 these roles. Default empty array.
+ *     @type array        $role__not_in            An array of role names to exclude. Users matching one or more of
+ *                                                 these roles will not be included in results. Default empty array.
  * }
  * @return string String of HTML content.
  */
@@ -1016,15 +1025,18 @@ function wp_dropdown_users( $args = '' ) {
                'include' => '', 'exclude' => '', 'multi' => 0,
                'show' => 'display_name', 'echo' => 1,
                'selected' => 0, 'name' => 'user', 'class' => '', 'id' => '',
-               'blog_id' => $GLOBALS['blog_id'], 'who' => '', 'include_selected' => false,
-               'option_none_value' => -1
+               'blog_id' => get_current_blog_id(), 'who' => '', 'include_selected' => false,
+               'option_none_value' => -1,
+               'role' => '',
+               'role__in' => array(),
+               'role__not_in' => array(),
        );
 
        $defaults['selected'] = is_author() ? get_query_var( 'author' ) : 0;
 
        $r = wp_parse_args( $args, $defaults );
 
-       $query_args = wp_array_slice_assoc( $r, array( 'blog_id', 'include', 'exclude', 'orderby', 'order', 'who' ) );
+       $query_args = wp_array_slice_assoc( $r, array( 'blog_id', 'include', 'exclude', 'orderby', 'order', 'who', 'role', 'role__in', 'role__not_in' ) );
 
        $fields = array( 'ID', 'user_login' );
 
@@ -1042,12 +1054,12 @@ function wp_dropdown_users( $args = '' ) {
        $option_none_value = $r['option_none_value'];
 
        /**
-        * Filters the query arguments for the user drop-down.
+        * Filters the query arguments for the list of users in the dropdown.
         *
         * @since 4.4.0
         *
-        * @param array $query_args The query arguments for wp_dropdown_users().
-        * @param array $r          The default arguments for wp_dropdown_users().
+        * @param array $query_args The query arguments for get_users().
+        * @param array $r          The arguments passed to wp_dropdown_users() combined with the defaults.
         */
        $query_args = apply_filters( 'wp_dropdown_users_args', $query_args, $r );
 
@@ -1346,6 +1358,7 @@ function validate_username( $username ) {
  * @since 2.0.0
  * @since 3.6.0 The `aim`, `jabber`, and `yim` fields were removed as default user contact
  *              methods for new installs. See wp_get_user_contact_methods().
+ * @since 4.7.0 The user's locale can be passed to `$userdata`.
  *
  * @global wpdb $wpdb WordPress database abstraction object.
  *
@@ -1380,6 +1393,7 @@ function validate_username( $username ) {
  *     @type string|bool $show_admin_bar_front Whether to display the Admin Bar for the user on the
  *                                             site's front end. Default true.
  *     @type string      $role                 User's role.
+ *     @type string      $locale               User's locale. Default empty.
  * }
  * @return int|WP_Error The newly created user's ID or a WP_Error object if the user could not
  *                      be created.
@@ -1594,6 +1608,8 @@ function wp_insert_user( $userdata ) {
 
        $meta['show_admin_bar_front'] = empty( $userdata['show_admin_bar_front'] ) ? 'true' : $userdata['show_admin_bar_front'];
 
+       $meta['locale'] = isset( $userdata['locale'] ) ? $userdata['locale'] : '';
+
        $user_nicename_check = $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->users WHERE user_nicename = %s AND user_login != %s LIMIT 1" , $user_nicename, $user_login));
 
        if ( $user_nicename_check ) {
@@ -1785,8 +1801,12 @@ function wp_update_user($userdata) {
 
                $blog_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
 
-               if ( ! empty( $send_password_change_email ) ) {
+               $switched_locale = false;
+               if ( ! empty( $send_password_change_email ) || ! empty( $send_email_change_email ) ) {
+                       $switched_locale = switch_to_locale( get_user_locale( $user_id ) );
+               }
 
+               if ( ! empty( $send_password_change_email ) ) {
                        /* translators: Do not translate USERNAME, ADMIN_EMAIL, EMAIL, SITENAME, SITEURL: those are placeholders. */
                        $pass_change_text = __( 'Hi ###USERNAME###,
 
@@ -1803,6 +1823,7 @@ All at ###SITENAME###
 
                        $pass_change_email = array(
                                'to'      => $user['user_email'],
+                               /* translators: User password change notification email subject. 1: Site name */
                                'subject' => __( '[%s] Notice of Password Change' ),
                                'message' => $pass_change_text,
                                'headers' => '',
@@ -1858,6 +1879,7 @@ All at ###SITENAME###
 
                        $email_change_email = array(
                                'to'      => $user['user_email'],
+                               /* translators: User email change notification email subject. 1: Site name */
                                'subject' => __( '[%s] Notice of Email Change' ),
                                'message' => $email_change_text,
                                'headers' => '',
@@ -1894,6 +1916,10 @@ All at ###SITENAME###
 
                        wp_mail( $email_change_email['to'], sprintf( $email_change_email['subject'], $blog_name ), $email_change_email['message'], $email_change_email['headers'] );
                }
+
+               if ( $switched_locale ) {
+                       restore_previous_locale();
+               }
        }
 
        // Update the cookies if the password changed.
@@ -1953,7 +1979,7 @@ function wp_create_user($username, $password, $email = '') {
  * @return array List of user keys to be populated in wp_update_user().
  */
 function _get_additional_user_keys( $user ) {
-       $keys = array( 'first_name', 'last_name', 'nickname', 'description', 'rich_editing', 'comment_shortcuts', 'admin_color', 'use_ssl', 'show_admin_bar_front' );
+       $keys = array( 'first_name', 'last_name', 'nickname', 'description', 'rich_editing', 'comment_shortcuts', 'admin_color', 'use_ssl', 'show_admin_bar_front', 'locale' );
        return array_merge( $keys, array_keys( wp_get_user_contact_methods( $user ) ) );
 }
 
@@ -2095,7 +2121,6 @@ function get_password_reset_key( $user ) {
 
        // Now insert the key, hashed, into the DB.
        if ( empty( $wp_hasher ) ) {
-               require_once ABSPATH . WPINC . '/class-phpass.php';
                $wp_hasher = new PasswordHash( 8, true );
        }
        $hashed = time() . ':' . $wp_hasher->HashPassword( $key );
@@ -2140,7 +2165,6 @@ function check_password_reset_key($key, $login) {
                return new WP_Error('invalid_key', __('Invalid key'));
 
        if ( empty( $wp_hasher ) ) {
-               require_once ABSPATH . WPINC . '/class-phpass.php';
                $wp_hasher = new PasswordHash( 8, true );
        }
 
@@ -2426,7 +2450,7 @@ function wp_get_users_with_no_role() {
        }
 
        $prefix = $wpdb->get_blog_prefix();
-       $regex  = implode( '|', wp_roles()->get_names() );
+       $regex  = implode( '|', array_keys( wp_roles()->get_names() ) );
        $regex  = preg_replace( '/[^a-zA-Z_\|-]/', '', $regex );
        $users  = $wpdb->get_col( $wpdb->prepare( "
                SELECT user_id
index cf05918443d0467c69e30eedaed918d13a82d0e7..9bbb01e712364035fecb0f703c5546193fcacf30 100644 (file)
@@ -4,21 +4,21 @@
  *
  * @global string $wp_version
  */
-$wp_version = '4.6.3';
+$wp_version = '4.7';
 
 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
  *
  * @global int $wp_db_version
  */
-$wp_db_version = 37965;
+$wp_db_version = 38590;
 
 /**
  * Holds the TinyMCE version
  *
  * @global string $tinymce_version
  */
-$tinymce_version = '4401-20160726';
+$tinymce_version = '4403-20160901';
 
 /**
  * Holds the required PHP version
index 3540be9b30e1b8deab9646b7363ccb555acf9c35..30c1fce53db1db3aeb4f74a66a46454190a17d63 100644 (file)
@@ -1233,7 +1233,7 @@ function wp_widget_rss_output( $rss, $args = array() ) {
 
        if ( is_wp_error($rss) ) {
                if ( is_admin() || current_user_can('manage_options') )
-                       echo '<p>' . sprintf( __('<strong>RSS Error</strong>: %s'), $rss->get_error_message() ) . '</p>';
+                       echo '<p><strong>' . __( 'RSS Error:' ) . '</strong> ' . $rss->get_error_message() . '</p>';
                return;
        }
 
@@ -1342,7 +1342,7 @@ function wp_widget_rss_form( $args, $inputs = null ) {
        $args['show_date']      = isset( $args['show_date'] ) ? (int) $args['show_date'] : (int) $inputs['show_date'];
 
        if ( ! empty( $args['error'] ) ) {
-               echo '<p class="widget-error"><strong>' . sprintf( __( 'RSS Error: %s' ), $args['error'] ) . '</strong></p>';
+               echo '<p class="widget-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . $args['error'] . '</p>';
        }
 
        $esc_number = esc_attr( $args['number'] );
index 336845845716c37a3cd9cdd32ecf18deaae56a40..d7ad82b7e82d0d28a37830b36dfdf6274c1e6c07 100644 (file)
@@ -72,7 +72,7 @@ class WP_Nav_Menu_Widget extends WP_Widget {
                 *     @type callable|bool $fallback_cb Callback to fire if the menu doesn't exist. Default empty.
                 *     @type mixed         $menu        Menu ID, slug, or name.
                 * }
-                * @param stdClass $nav_menu      Nav menu object for the current menu.
+                * @param WP_Term  $nav_menu      Nav menu object for the current menu.
                 * @param array    $args          Display arguments for the current widget.
                 * @param array    $instance      Array of settings for the current widget.
                 */
index ae0832acbffbc37a44a3dc219b22c5474dc5013b..b4adabd0394c942784939d1d27bb8b847fdff64b 100644 (file)
@@ -61,7 +61,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
                 *
                 * @see wp_tag_cloud()
                 *
-                * @param array $current_taxonomy The taxonomy to use in the tag cloud. Default 'tags'.
+                * @param array $args Args used for the tag cloud widget.
                 */
                $tag_cloud = wp_tag_cloud( apply_filters( 'widget_tag_cloud_args', array(
                        'taxonomy' => $current_taxonomy,
index 8057bcc04e7aa2df533283ea471d02491da19faf..74dedd513032a3ce21ad3e365c876d5f4dc8836b 100644 (file)
@@ -1189,18 +1189,19 @@ class wpdb {
         *
         * @uses wpdb::_real_escape()
         * @since  2.8.0
-        * @access private
+        * @access public
         *
         * @param  string|array $data
         * @return string|array escaped
         */
-       function _escape( $data ) {
+       public function _escape( $data ) {
                if ( is_array( $data ) ) {
                        foreach ( $data as $k => $v ) {
-                               if ( is_array($v) )
+                               if ( is_array( $v ) ) {
                                        $data[$k] = $this->_escape( $v );
-                               else
+                               } else {
                                        $data[$k] = $this->_real_escape( $v );
+                               }
                        }
                } else {
                        $data = $this->_real_escape( $data );
@@ -1273,8 +1274,8 @@ class wpdb {
         *
         * 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' );
+        *     $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 https://secure.php.net/sprintf Description of syntax.
         * @since 2.3.0
@@ -1363,10 +1364,13 @@ class wpdb {
 
                wp_load_translations_early();
 
-               if ( $caller = $this->get_caller() )
+               if ( $caller = $this->get_caller() ) {
+                       /* translators: 1: Database error message, 2: SQL query, 3: Name of the calling function */
                        $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this->last_query, $caller );
-               else
+               } else {
+                       /* translators: 1: Database error message, 2: SQL query */
                        $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s' ), $str, $this->last_query );
+               }
 
                error_log( $error_str );
 
@@ -2293,10 +2297,8 @@ class wpdb {
         * @since 0.71
         *
         * @param string|null $query  SQL query.
-        * @param string      $output Optional. one of ARRAY_A | ARRAY_N | OBJECT constants.
-        *                            Return an associative array (column => value, ...),
-        *                            a numerically indexed array (0 => value, ...) or
-        *                            an object ( ->column = value ), respectively.
+        * @param string      $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+        *                            an stdClass object, an associative array, or a numeric array, respectively. Default OBJECT.
         * @param int         $y      Optional. Row to return. Indexed from 0.
         * @return array|object|null|void Database query result in format specified by $output or null on failure
         */
@@ -3033,17 +3035,23 @@ class wpdb {
                                . '|INSERT(?:\s+LOW_PRIORITY|\s+DELAYED|\s+HIGH_PRIORITY)?(?:\s+IGNORE)?(?:\s+INTO)?'
                                . '|REPLACE(?:\s+LOW_PRIORITY|\s+DELAYED)?(?:\s+INTO)?'
                                . '|UPDATE(?:\s+LOW_PRIORITY)?(?:\s+IGNORE)?'
-                               . '|DELETE(?:\s+LOW_PRIORITY|\s+QUICK|\s+IGNORE)*(?:\s+FROM)?'
+                               . '|DELETE(?:\s+LOW_PRIORITY|\s+QUICK|\s+IGNORE)*(?:.+?FROM)?'
                                . ')\s+((?:[0-9a-zA-Z$_.`-]|[\xC2-\xDF][\x80-\xBF])+)/is', $query, $maybe ) ) {
                        return str_replace( '`', '', $maybe[1] );
                }
 
-               // SHOW TABLE STATUS and SHOW TABLES
-               if ( preg_match( '/^\s*(?:'
-                               . 'SHOW\s+TABLE\s+STATUS.+(?:LIKE\s+|WHERE\s+Name\s*=\s*)'
-                               . '|SHOW\s+(?:FULL\s+)?TABLES.+(?:LIKE\s+|WHERE\s+Name\s*=\s*)'
-                               . ')\W((?:[0-9a-zA-Z$_.`-]|[\xC2-\xDF][\x80-\xBF])+)\W/is', $query, $maybe ) ) {
-                       return str_replace( '`', '', $maybe[1] );
+               // SHOW TABLE STATUS and SHOW TABLES WHERE Name = 'wp_posts'
+               if ( preg_match( '/^\s*SHOW\s+(?:TABLE\s+STATUS|(?:FULL\s+)?TABLES).+WHERE\s+Name\s*=\s*("|\')((?:[0-9a-zA-Z$_.-]|[\xC2-\xDF][\x80-\xBF])+)\\1/is', $query, $maybe ) ) {
+                       return $maybe[2];
+               }
+
+               // SHOW TABLE STATUS LIKE and SHOW TABLES LIKE 'wp\_123\_%'
+               // This quoted LIKE operand seldom holds a full table name.
+               // It is usually a pattern for matching a prefix so we just
+               // strip the trailing % and unescape the _ to get 'wp_123_'
+               // which drop-ins can use for routing these SQL statements.
+               if ( preg_match( '/^\s*SHOW\s+(?:TABLE\s+STATUS|(?:FULL\s+)?TABLES)\s+(?:WHERE\s+Name\s+)?LIKE\s*("|\')((?:[\\\\0-9a-zA-Z$_.-]|[\xC2-\xDF][\x80-\xBF])+)%?\\1/is', $query, $maybe ) ) {
+                       return str_replace( '\\_', '_', $maybe[2] );
                }
 
                // Big pattern for the rest of the table-related queries.
@@ -3208,8 +3216,10 @@ class wpdb {
        public function check_database_version() {
                global $wp_version, $required_mysql_version;
                // Make sure the server has the required MySQL version
-               if ( version_compare($this->db_version(), $required_mysql_version, '<') )
+               if ( version_compare($this->db_version(), $required_mysql_version, '<') ) {
+                       /* translators: 1: WordPress version number, 2: Minimum required MySQL version number */
                        return new WP_Error('database_version', sprintf( __( '<strong>ERROR</strong>: WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ));
+               }
        }
 
        /**
index 8eeacddc15327a64ac2abba8931e3ee6dede9f48..8687ed00a45f1b0726fb2231d95dd96fd4106d9a 100644 (file)
 
 if ( ! class_exists( 'Text_Diff', false ) ) {
        /** Text_Diff class */
-       require( dirname(__FILE__).'/Text/Diff.php' );
+       require( ABSPATH . WPINC . '/Text/Diff.php' );
        /** Text_Diff_Renderer class */
-       require( dirname(__FILE__).'/Text/Diff/Renderer.php' );
+       require( ABSPATH . WPINC . '/Text/Diff/Renderer.php' );
        /** Text_Diff_Renderer_inline class */
-       require( dirname(__FILE__).'/Text/Diff/Renderer/inline.php' );
+       require( ABSPATH . WPINC . '/Text/Diff/Renderer/inline.php' );
 }
 
-/**
- * Table renderer to display the diff lines.
- *
- * @since 2.6.0
- * @uses Text_Diff_Renderer Extends
- */
-class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
-
-       /**
-        * @see Text_Diff_Renderer::_leading_context_lines
-        * @var int
-        * @access public
-        * @since 2.6.0
-        */
-       public $_leading_context_lines  = 10000;
-
-       /**
-        * @see Text_Diff_Renderer::_trailing_context_lines
-        * @var int
-        * @access public
-        * @since 2.6.0
-        */
-       public $_trailing_context_lines = 10000;
-
-       /**
-        * Threshold for when a diff should be saved or omitted.
-        *
-        * @var float
-        * @access protected
-        * @since 2.6.0
-        */
-       protected $_diff_threshold = 0.6;
-
-       /**
-        * Inline display helper object name.
-        *
-        * @var string
-        * @access protected
-        * @since 2.6.0
-        */
-       protected $inline_diff_renderer = 'WP_Text_Diff_Renderer_inline';
-
-       /**
-        * Should we show the split view or not
-        *
-        * @var string
-        * @access protected
-        * @since 3.6.0
-        */
-       protected $_show_split_view = true;
-
-       protected $compat_fields = array( '_show_split_view', 'inline_diff_renderer', '_diff_threshold' );
-
-       /**
-        * Constructor - Call parent constructor with params array.
-        *
-        * This will set class properties based on the key value pairs in the array.
-        *
-        * @since 2.6.0
-        *
-        * @param array $params
-        */
-       public function __construct( $params = array() ) {
-               parent::__construct( $params );
-               if ( isset( $params[ 'show_split_view' ] ) )
-                       $this->_show_split_view = $params[ 'show_split_view' ];
-       }
-
-       /**
-        * @ignore
-        *
-        * @param string $header
-        * @return string
-        */
-       public function _startBlock( $header ) {
-               return '';
-       }
-
-       /**
-        * @ignore
-        *
-        * @param array $lines
-        * @param string $prefix
-        */
-       public function _lines( $lines, $prefix=' ' ) {
-       }
-
-       /**
-        * @ignore
-        *
-        * @param string $line HTML-escape the value.
-        * @return string
-        */
-       public function addedLine( $line ) {
-               return "<td class='diff-addedline'>{$line}</td>";
-
-       }
-
-       /**
-        * @ignore
-        *
-        * @param string $line HTML-escape the value.
-        * @return string
-        */
-       public function deletedLine( $line ) {
-               return "<td class='diff-deletedline'>{$line}</td>";
-       }
-
-       /**
-        * @ignore
-        *
-        * @param string $line HTML-escape the value.
-        * @return string
-        */
-       public function contextLine( $line ) {
-               return "<td class='diff-context'>{$line}</td>";
-       }
-
-       /**
-        * @ignore
-        *
-        * @return string
-        */
-       public function emptyLine() {
-               return '<td>&nbsp;</td>';
-       }
-
-       /**
-        * @ignore
-        * @access public
-        *
-        * @param array $lines
-        * @param bool $encode
-        * @return string
-        */
-       public function _added( $lines, $encode = true ) {
-               $r = '';
-               foreach ($lines as $line) {
-                       if ( $encode ) {
-                               $processed_line = htmlspecialchars( $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
-                                * indicating if the line is added, deleted or unchanged.
-                                *
-                                * @since 4.1.0
-                                *
-                                * @param String $processed_line The processed diffed line.
-                                * @param String $line           The unprocessed diffed line.
-                                * @param string null            The line context. Values are 'added', 'deleted' or 'unchanged'.
-                                */
-                               $line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'added' );
-                       }
-
-                       if ( $this->_show_split_view ) {
-                               $r .= '<tr>' . $this->emptyLine() . $this->emptyLine() . $this->addedLine( $line ) . "</tr>\n";
-                       } else {
-                               $r .= '<tr>' . $this->addedLine( $line ) . "</tr>\n";
-                       }
-               }
-               return $r;
-       }
-
-       /**
-        * @ignore
-        * @access public
-        *
-        * @param array $lines
-        * @param bool $encode
-        * @return string
-        */
-       public function _deleted( $lines, $encode = true ) {
-               $r = '';
-               foreach ($lines as $line) {
-                       if ( $encode ) {
-                               $processed_line = htmlspecialchars( $line );
-
-                               /** This filter is documented in wp-includes/wp-diff.php */
-                               $line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'deleted' );
-                       }
-                       if ( $this->_show_split_view ) {
-                               $r .= '<tr>' . $this->deletedLine( $line ) . $this->emptyLine() . $this->emptyLine() . "</tr>\n";
-                       } else {
-                               $r .= '<tr>' . $this->deletedLine( $line ) . "</tr>\n";
-                       }
-
-               }
-               return $r;
-       }
-
-       /**
-        * @ignore
-        * @access public
-        *
-        * @param array $lines
-        * @param bool $encode
-        * @return string
-        */
-       public function _context( $lines, $encode = true ) {
-               $r = '';
-               foreach ($lines as $line) {
-                       if ( $encode ) {
-                               $processed_line = htmlspecialchars( $line );
-
-                               /** This filter is documented in wp-includes/wp-diff.php */
-                               $line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'unchanged' );
-                       }
-                       if (  $this->_show_split_view ) {
-                               $r .= '<tr>' . $this->contextLine( $line ) . $this->emptyLine() . $this->contextLine( $line )  . "</tr>\n";
-                       } else {
-                               $r .= '<tr>' . $this->contextLine( $line ) . "</tr>\n";
-                       }
-               }
-               return $r;
-       }
-
-       /**
-        * Process changed lines to do word-by-word diffs for extra highlighting.
-        *
-        * (TRAC style) sometimes these lines can actually be deleted or added rows.
-        * We do additional processing to figure that out
-        *
-        * @access public
-        * @since 2.6.0
-        *
-        * @param array $orig
-        * @param array $final
-        * @return string
-        */
-       public function _changed( $orig, $final ) {
-               $r = '';
-
-               // Does the aforementioned additional processing
-               // *_matches tell what rows are "the same" in orig and final. Those pairs will be diffed to get word changes
-               //      match is numeric: an index in other column
-               //      match is 'X': no match. It is a new row
-               // *_rows are column vectors for the orig column and the final column.
-               //      row >= 0: an indix of the $orig or $final array
-               //      row  < 0: a blank row for that column
-               list($orig_matches, $final_matches, $orig_rows, $final_rows) = $this->interleave_changed_lines( $orig, $final );
-
-               // These will hold the word changes as determined by an inline diff
-               $orig_diffs  = array();
-               $final_diffs = array();
-
-               // Compute word diffs for each matched pair using the inline diff
-               foreach ( $orig_matches as $o => $f ) {
-                       if ( is_numeric($o) && is_numeric($f) ) {
-                               $text_diff = new Text_Diff( 'auto', array( array($orig[$o]), array($final[$f]) ) );
-                               $renderer = new $this->inline_diff_renderer;
-                               $diff = $renderer->render( $text_diff );
-
-                               // If they're too different, don't include any <ins> or <dels>
-                               if ( preg_match_all( '!(<ins>.*?</ins>|<del>.*?</del>)!', $diff, $diff_matches ) ) {
-                                       // length of all text between <ins> or <del>
-                                       $stripped_matches = strlen(strip_tags( join(' ', $diff_matches[0]) ));
-                                       // since we count lengith of text between <ins> or <del> (instead of picking just one),
-                                       //      we double the length of chars not in those tags.
-                                       $stripped_diff = strlen(strip_tags( $diff )) * 2 - $stripped_matches;
-                                       $diff_ratio = $stripped_matches / $stripped_diff;
-                                       if ( $diff_ratio > $this->_diff_threshold )
-                                               continue; // Too different. Don't save diffs.
-                               }
-
-                               // Un-inline the diffs by removing del or ins
-                               $orig_diffs[$o]  = preg_replace( '|<ins>.*?</ins>|', '', $diff );
-                               $final_diffs[$f] = preg_replace( '|<del>.*?</del>|', '', $diff );
-                       }
-               }
-
-               foreach ( array_keys($orig_rows) as $row ) {
-                       // Both columns have blanks. Ignore them.
-                       if ( $orig_rows[$row] < 0 && $final_rows[$row] < 0 )
-                               continue;
-
-                       // If we have a word based diff, use it. Otherwise, use the normal line.
-                       if ( isset( $orig_diffs[$orig_rows[$row]] ) )
-                               $orig_line = $orig_diffs[$orig_rows[$row]];
-                       elseif ( isset( $orig[$orig_rows[$row]] ) )
-                               $orig_line = htmlspecialchars($orig[$orig_rows[$row]]);
-                       else
-                               $orig_line = '';
-
-                       if ( isset( $final_diffs[$final_rows[$row]] ) )
-                               $final_line = $final_diffs[$final_rows[$row]];
-                       elseif ( isset( $final[$final_rows[$row]] ) )
-                               $final_line = htmlspecialchars($final[$final_rows[$row]]);
-                       else
-                               $final_line = '';
-
-                       if ( $orig_rows[$row] < 0 ) { // Orig is blank. This is really an added row.
-                               $r .= $this->_added( array($final_line), false );
-                       } elseif ( $final_rows[$row] < 0 ) { // Final is blank. This is really a deleted row.
-                               $r .= $this->_deleted( array($orig_line), false );
-                       } else { // A true changed row.
-                               if ( $this->_show_split_view ) {
-                                       $r .= '<tr>' . $this->deletedLine( $orig_line ) . $this->emptyLine() . $this->addedLine( $final_line ) . "</tr>\n";
-                               } else {
-                                       $r .= '<tr>' . $this->deletedLine( $orig_line ) . "</tr><tr>" . $this->addedLine( $final_line ) . "</tr>\n";
-                               }
-                       }
-               }
-
-               return $r;
-       }
-
-       /**
-        * Takes changed blocks and matches which rows in orig turned into which rows in final.
-        *
-        * Returns
-        *      *_matches ( which rows match with which )
-        *      *_rows ( order of rows in each column interleaved with blank rows as
-        *              necessary )
-        *
-        * @since 2.6.0
-        *
-        * @param array $orig
-        * @param array $final
-        * @return array
-        */
-       public function interleave_changed_lines( $orig, $final ) {
-
-               // Contains all pairwise string comparisons. Keys are such that this need only be a one dimensional array.
-               $matches = array();
-               foreach ( array_keys($orig) as $o ) {
-                       foreach ( array_keys($final) as $f ) {
-                               $matches["$o,$f"] = $this->compute_string_distance( $orig[$o], $final[$f] );
-                       }
-               }
-               asort($matches); // Order by string distance.
-
-               $orig_matches  = array();
-               $final_matches = array();
-
-               foreach ( $matches as $keys => $difference ) {
-                       list($o, $f) = explode(',', $keys);
-                       $o = (int) $o;
-                       $f = (int) $f;
-
-                       // Already have better matches for these guys
-                       if ( isset($orig_matches[$o]) && isset($final_matches[$f]) )
-                               continue;
-
-                       // First match for these guys. Must be best match
-                       if ( !isset($orig_matches[$o]) && !isset($final_matches[$f]) ) {
-                               $orig_matches[$o] = $f;
-                               $final_matches[$f] = $o;
-                               continue;
-                       }
-
-                       // Best match of this final is already taken?  Must mean this final is a new row.
-                       if ( isset($orig_matches[$o]) )
-                               $final_matches[$f] = 'x';
-
-                       // Best match of this orig is already taken?  Must mean this orig is a deleted row.
-                       elseif ( isset($final_matches[$f]) )
-                               $orig_matches[$o] = 'x';
-               }
-
-               // We read the text in this order
-               ksort($orig_matches);
-               ksort($final_matches);
-
-               // Stores rows and blanks for each column.
-               $orig_rows = $orig_rows_copy = array_keys($orig_matches);
-               $final_rows = array_keys($final_matches);
-
-               // Interleaves rows with blanks to keep matches aligned.
-               // We may end up with some extraneous blank rows, but we'll just ignore them later.
-               foreach ( $orig_rows_copy as $orig_row ) {
-                       $final_pos = array_search($orig_matches[$orig_row], $final_rows, true);
-                       $orig_pos = (int) array_search($orig_row, $orig_rows, true);
-
-                       if ( false === $final_pos ) { // This orig is paired with a blank final.
-                               array_splice( $final_rows, $orig_pos, 0, -1 );
-                       } elseif ( $final_pos < $orig_pos ) { // This orig's match is up a ways. Pad final with blank rows.
-                               $diff_pos = $final_pos - $orig_pos;
-                               while ( $diff_pos < 0 )
-                                       array_splice( $final_rows, $orig_pos, 0, $diff_pos++ );
-                       } elseif ( $final_pos > $orig_pos ) { // This orig's match is down a ways. Pad orig with blank rows.
-                               $diff_pos = $orig_pos - $final_pos;
-                               while ( $diff_pos < 0 )
-                                       array_splice( $orig_rows, $orig_pos, 0, $diff_pos++ );
-                       }
-               }
-
-               // Pad the ends with blank rows if the columns aren't the same length
-               $diff_count = count($orig_rows) - count($final_rows);
-               if ( $diff_count < 0 ) {
-                       while ( $diff_count < 0 )
-                               array_push($orig_rows, $diff_count++);
-               } elseif ( $diff_count > 0 ) {
-                       $diff_count = -1 * $diff_count;
-                       while ( $diff_count < 0 )
-                               array_push($final_rows, $diff_count++);
-               }
-
-               return array($orig_matches, $final_matches, $orig_rows, $final_rows);
-       }
-
-       /**
-        * Computes a number that is intended to reflect the "distance" between two strings.
-        *
-        * @since 2.6.0
-        *
-        * @param string $string1
-        * @param string $string2
-        * @return int
-        */
-       public function compute_string_distance( $string1, $string2 ) {
-               // Vectors containing character frequency for all chars in each string
-               $chars1 = count_chars($string1);
-               $chars2 = count_chars($string2);
-
-               // L1-norm of difference vector.
-               $difference = array_sum( array_map( array($this, 'difference'), $chars1, $chars2 ) );
-
-               // $string1 has zero length? Odd. Give huge penalty by not dividing.
-               if ( !$string1 )
-                       return $difference;
-
-               // Return distance per character (of string1).
-               return $difference / strlen($string1);
-       }
-
-       /**
-        * @ignore
-        * @since 2.6.0
-        *
-        * @param int $a
-        * @param int $b
-        * @return int
-        */
-       public function difference( $a, $b ) {
-               return abs( $a - $b );
-       }
-
-       /**
-        * Make private properties readable for backward compatibility.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param string $name Property to get.
-        * @return mixed Property.
-        */
-       public function __get( $name ) {
-               if ( in_array( $name, $this->compat_fields ) ) {
-                       return $this->$name;
-               }
-       }
-
-       /**
-        * Make private properties settable for backward compatibility.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param string $name  Property to check if set.
-        * @param mixed  $value Property value.
-        * @return mixed Newly-set property.
-        */
-       public function __set( $name, $value ) {
-               if ( in_array( $name, $this->compat_fields ) ) {
-                       return $this->$name = $value;
-               }
-       }
-
-       /**
-        * Make private properties checkable for backward compatibility.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param string $name Property to check if set.
-        * @return bool Whether the property is set.
-        */
-       public function __isset( $name ) {
-               if ( in_array( $name, $this->compat_fields ) ) {
-                       return isset( $this->$name );
-               }
-       }
-
-       /**
-        * Make private properties un-settable for backward compatibility.
-        *
-        * @since 4.0.0
-        * @access public
-        *
-        * @param string $name Property to unset.
-        */
-       public function __unset( $name ) {
-               if ( in_array( $name, $this->compat_fields ) ) {
-                       unset( $this->$name );
-               }
-       }
-}
-
-/**
- * Better word splitting than the PEAR package provides.
- *
- * @since 2.6.0
- * @uses Text_Diff_Renderer_inline Extends
- */
-class WP_Text_Diff_Renderer_inline extends Text_Diff_Renderer_inline {
-
-       /**
-        * @ignore
-        * @since 2.6.0
-        *
-        * @param string $string
-        * @param string $newlineEscape
-        * @return string
-        */
-       public function _splitOnWords($string, $newlineEscape = "\n") {
-               $string = str_replace("\0", '', $string);
-               $words  = preg_split( '/([^\w])/u', $string, -1, PREG_SPLIT_DELIM_CAPTURE );
-               $words  = str_replace( "\n", $newlineEscape, $words );
-               return $words;
-       }
-
-}
+require( ABSPATH . WPINC . '/class-wp-text-diff-renderer-table.php' );
+require( ABSPATH . WPINC . '/class-wp-text-diff-renderer-inline.php' );
\ No newline at end of file
index ea3a50b49e53d9e575693f8f111586d1f50e069c..42e8b24a9c3482f4870a3b35ba4249cfb707d029 100644 (file)
@@ -26,7 +26,10 @@ echo '<?xml version="1.0"?'.">\n";
 ?>
 <opml version="1.0">
        <head>
-               <title><?php printf( __('Links for %s'), esc_attr(get_bloginfo('name', 'display')) ); ?></title>
+               <title><?php
+                       /* translators: 1: Site name */
+                       printf( __('Links for %s'), esc_attr(get_bloginfo('name', 'display')) );
+               ?></title>
                <dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
                <?php
                /**
index 76dda74b763291416cdb409f3ee6fc83cdfc0d20..a1a9ad6b18979869d8917ee1ba8a7e8b29a5219d 100644 (file)
@@ -13,8 +13,6 @@
  * directory to allow the WordPress directory to remain
  * untouched.
  *
- * @internal This file must be parsable by PHP4.
- *
  * @package WordPress
  */
 
index 01c754f00de1b127f83c024c38397e2386d92dfe..4e189d86b043c8bbeaf12ff3d704075db7d6c0bc 100644 (file)
@@ -36,8 +36,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
        // Don't index any of these forms
        add_action( 'login_head', 'wp_no_robots' );
 
-       if ( wp_is_mobile() )
-               add_action( 'login_head', 'wp_login_viewport_meta' );
+       add_action( 'login_head', 'wp_login_viewport_meta' );
 
        if ( empty($wp_error) )
                $wp_error = new WP_Error();
@@ -99,7 +98,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
 
        if ( is_multisite() ) {
                $login_header_url   = network_home_url();
-               $login_header_title = get_current_site()->site_name;
+               $login_header_title = get_network()->site_name;
        } else {
                $login_header_url   = __( 'https://wordpress.org/' );
                $login_header_title = __( 'Powered by WordPress' );
@@ -124,8 +123,6 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
        $login_header_title = apply_filters( 'login_headertitle', $login_header_title );
 
        $classes = array( 'login-action-' . $action, 'wp-core-ui' );
-       if ( wp_is_mobile() )
-               $classes[] = 'mobile';
        if ( is_rtl() )
                $classes[] = 'rtl';
        if ( $interim_login ) {
@@ -260,8 +257,6 @@ function login_footer($input_id = '') {
  * @since 3.0.0
  */
 function wp_shake_js() {
-       if ( wp_is_mobile() )
-               return;
 ?>
 <script type="text/javascript">
 addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
@@ -285,14 +280,9 @@ function wp_login_viewport_meta() {
 /**
  * Handles sending password retrieval email to user.
  *
- * @global wpdb         $wpdb      WordPress database abstraction object.
- * @global PasswordHash $wp_hasher Portable PHP password hashing framework.
- *
  * @return bool|WP_Error True: when finish. WP_Error on error
  */
 function retrieve_password() {
-       global $wpdb, $wp_hasher;
-
        $errors = new WP_Error();
 
        if ( empty( $_POST['user_login'] ) ) {
@@ -341,15 +331,17 @@ function retrieve_password() {
        $message .= __('To reset your password, visit the following address:') . "\r\n\r\n";
        $message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">\r\n";
 
-       if ( is_multisite() )
-               $blogname = $GLOBALS['current_site']->site_name;
-       else
+       if ( is_multisite() ) {
+               $blogname = get_network()->site_name;
+       } else {
                /*
                 * 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);
+       }
 
+       /* translators: Password reset email subject. 1: Site name */
        $title = sprintf( __('[%s] Password Reset'), $blogname );
 
        /**
@@ -431,7 +423,7 @@ do_action( 'login_init' );
  *
  * @since 2.8.0
  */
-do_action( 'login_form_' . $action );
+do_action( "login_form_{$action}" );
 
 $http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
 $interim_login = isset($_REQUEST['interim-login']);
@@ -444,7 +436,6 @@ case 'postpass' :
                exit();
        }
 
-       require_once ABSPATH . WPINC . '/class-phpass.php';
        $hasher = new PasswordHash( 8, true );
 
        /**
@@ -541,7 +532,7 @@ case 'retrievepassword' :
 
 <form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post">
        <p>
-               <label for="user_login" ><?php _e('Username or Email') ?><br />
+               <label for="user_login" ><?php _e( 'Username or Email Address' ); ?><br />
                <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" /></label>
        </p>
        <?php
@@ -797,10 +788,12 @@ default:
 
        if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
                if ( headers_sent() ) {
+                       /* translators: 1: Browser cookie documentation URL, 2: Support forums URL */
                        $user = new WP_Error( 'test_cookie', sprintf( __( '<strong>ERROR</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
                                __( 'https://codex.wordpress.org/Cookies' ), __( 'https://wordpress.org/support/' ) ) );
                } elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) {
                        // If cookies are disabled we can't log in even with a valid user+pass
+                       /* translators: 1: Browser cookie documentation URL */
                        $user = new WP_Error( 'test_cookie', sprintf( __( '<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
                                __( 'https://codex.wordpress.org/Cookies' ) ) );
                }
@@ -903,11 +896,11 @@ default:
 
 <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
        <p>
-               <label for="user_login"><?php _e('Username or Email') ?><br />
+               <label for="user_login"><?php _e( 'Username or Email Address' ); ?><br />
                <input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" /></label>
        </p>
        <p>
-               <label for="user_pass"><?php _e('Password') ?><br />
+               <label for="user_pass"><?php _e( 'Password' ); ?><br />
                <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input" value="" size="20" /></label>
        </p>
        <?php
@@ -918,7 +911,7 @@ default:
         */
        do_action( 'login_form' );
        ?>
-       <p class="forgetmenot"><label for="rememberme"><input name="rememberme" type="checkbox" id="rememberme" value="forever" <?php checked( $rememberme ); ?> /> <?php esc_attr_e('Remember Me'); ?></label></p>
+       <p class="forgetmenot"><label for="rememberme"><input name="rememberme" type="checkbox" id="rememberme" value="forever" <?php checked( $rememberme ); ?> /> <?php esc_html_e( 'Remember Me' ); ?></label></p>
        <p class="submit">
                <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Log In'); ?>" />
 <?php  if ( $interim_login ) { ?>
index b5af05abf9300f24a80781c4fc2e12a161a8c7ee..e62bbf12158d68ab005b5b73e8f198cf26173eb5 100644 (file)
@@ -12,13 +12,7 @@ require(dirname(__FILE__) . '/wp-load.php');
 
 /** This filter is documented in wp-admin/options.php */
 if ( ! apply_filters( 'enable_post_by_email_configuration', true ) )
-       wp_die( __( 'This action has been disabled by the administrator.' ) );
-
-$mailserver_url = get_option( 'mailserver_url' );
-
-if ( 'mail.example.com' === $mailserver_url || empty( $mailserver_url ) ) {
        wp_die( __( 'This action has been disabled by the administrator.' ), 403 );
-}
 
 /**
  * Fires to allow a plugin to do a complete takeover of Post by Email.
@@ -124,6 +118,7 @@ for ( $i = 1; $i <= $count; $i++ ) {
                                        $author = trim($line);
                                $author = sanitize_email($author);
                                if ( is_email($author) ) {
+                                       /* translators: Post author email address */
                                        echo '<p>' . sprintf(__('Author is %s'), $author) . '</p>';
                                        $userdata = get_user_by('email', $author);
                                        if ( ! empty( $userdata ) ) {
index dc3b25a7cb7b1486c9bc2f64ccad26876a866558..8dd0f4031791d4e86aec104dc9bca25e9ee821c6 100644 (file)
@@ -5,8 +5,6 @@
  *
  * Allows for some configuration in wp-config.php (see default-constants.php)
  *
- * @internal This file must be parsable by PHP4.
- *
  * @package WordPress
  */
 
@@ -20,7 +18,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' );
+require_once( ABSPATH . WPINC . '/plugin.php' );
 
 /*
  * These can't be directly globalized in version.php. When updating,
@@ -82,8 +80,13 @@ wp_debug_mode();
  *                                    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.
+       // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
        WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
+
+       // Re-initialize any hooks added manually by advanced-cache.php
+       if ( $wp_filter ) {
+               $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
+       }
 }
 
 // Define WP_LANG_DIR if not set.
@@ -91,10 +94,13 @@ wp_set_lang_dir();
 
 // Load early WordPress files.
 require( ABSPATH . WPINC . '/compat.php' );
+require( ABSPATH . WPINC . '/class-wp-list-util.php' );
 require( ABSPATH . WPINC . '/functions.php' );
+require( ABSPATH . WPINC . '/class-wp-matchesmapregex.php' );
 require( ABSPATH . WPINC . '/class-wp.php' );
 require( ABSPATH . WPINC . '/class-wp-error.php' );
 require( ABSPATH . WPINC . '/pomo/mo.php' );
+require( ABSPATH . WPINC . '/class-phpass.php' );
 
 // Include the wpdb class and, if present, a db.php database drop-in.
 global $wpdb;
@@ -128,6 +134,8 @@ if ( SHORTINIT )
 
 // Load the L10n library.
 require_once( ABSPATH . WPINC . '/l10n.php' );
+require_once( ABSPATH . WPINC . '/class-wp-locale.php' );
+require_once( ABSPATH . WPINC . '/class-wp-locale-switcher.php' );
 
 // Run the installer if WordPress is not installed.
 wp_not_installed();
@@ -140,6 +148,7 @@ require( ABSPATH . WPINC . '/capabilities.php' );
 require( ABSPATH . WPINC . '/class-wp-roles.php' );
 require( ABSPATH . WPINC . '/class-wp-role.php' );
 require( ABSPATH . WPINC . '/class-wp-user.php' );
+require( ABSPATH . WPINC . '/class-wp-query.php' );
 require( ABSPATH . WPINC . '/query.php' );
 require( ABSPATH . WPINC . '/date.php' );
 require( ABSPATH . WPINC . '/theme.php' );
@@ -147,7 +156,8 @@ require( ABSPATH . WPINC . '/class-wp-theme.php' );
 require( ABSPATH . WPINC . '/template.php' );
 require( ABSPATH . WPINC . '/user.php' );
 require( ABSPATH . WPINC . '/class-wp-user-query.php' );
-require( ABSPATH . WPINC . '/session.php' );
+require( ABSPATH . WPINC . '/class-wp-session-tokens.php' );
+require( ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php' );
 require( ABSPATH . WPINC . '/meta.php' );
 require( ABSPATH . WPINC . '/class-wp-meta-query.php' );
 require( ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php' );
@@ -182,6 +192,7 @@ require( ABSPATH . WPINC . '/cron.php' );
 require( ABSPATH . WPINC . '/deprecated.php' );
 require( ABSPATH . WPINC . '/script-loader.php' );
 require( ABSPATH . WPINC . '/taxonomy.php' );
+require( ABSPATH . WPINC . '/class-wp-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' );
@@ -190,6 +201,7 @@ require( ABSPATH . WPINC . '/canonical.php' );
 require( ABSPATH . WPINC . '/shortcodes.php' );
 require( ABSPATH . WPINC . '/embed.php' );
 require( ABSPATH . WPINC . '/class-wp-embed.php' );
+require( ABSPATH . WPINC . '/class-oembed.php' );
 require( ABSPATH . WPINC . '/class-wp-oembed-controller.php' );
 require( ABSPATH . WPINC . '/media.php' );
 require( ABSPATH . WPINC . '/http.php' );
@@ -201,6 +213,7 @@ 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 . '/class-wp-http-requests-hooks.php' );
 require( ABSPATH . WPINC . '/widgets.php' );
 require( ABSPATH . WPINC . '/class-wp-widget.php' );
 require( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
@@ -211,6 +224,24 @@ require( ABSPATH . WPINC . '/rest-api.php' );
 require( ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php' );
 require( ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php' );
 require( ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php' );
+require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-controller.php' );
+require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-posts-controller.php' );
+require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-attachments-controller.php' );
+require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-types-controller.php' );
+require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-statuses-controller.php' );
+require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-revisions-controller.php' );
+require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-taxonomies-controller.php' );
+require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-terms-controller.php' );
+require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-users-controller.php' );
+require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php' );
+require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php' );
+require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php' );
+require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php' );
+require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-post-meta-fields.php' );
+require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-term-meta-fields.php' );
+require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-user-meta-fields.php' );
+
+$GLOBALS['wp_embed'] = new WP_Embed();
 
 // Load multisite-specific files.
 if ( is_multisite() ) {
@@ -369,9 +400,6 @@ if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
        require( $locale_file );
 unset( $locale_file );
 
-// Pull in locale data after loading text domain.
-require_once( ABSPATH . WPINC . '/locale.php' );
-
 /**
  * WordPress Locale object for loading locale domain date and various strings.
  * @global WP_Locale $wp_locale
@@ -379,6 +407,16 @@ require_once( ABSPATH . WPINC . '/locale.php' );
  */
 $GLOBALS['wp_locale'] = new WP_Locale();
 
+/**
+ *  WordPress Locale Switcher object for switching locales.
+ *
+ * @since 4.7.0
+ *
+ * @global WP_Locale_Switcher $wp_locale_switcher WordPress locale switcher object.
+ */
+$GLOBALS['wp_locale_switcher'] = new WP_Locale_Switcher();
+$GLOBALS['wp_locale_switcher']->init();
+
 // Load the functions for the active theme, for both parent and child theme if applicable.
 if ( ! wp_installing() || 'wp-activate.php' === $pagenow ) {
        if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
index 99bd2afb9fe0b595e40a4d431e453fb8c2f4b74a..6cf96b5cf0e3d419b984cc1ae32e4e8309c0cc18 100644 (file)
@@ -100,7 +100,7 @@ function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {
                $errors = new WP_Error();
        }
 
-       $current_site = get_current_site();
+       $current_network = get_network();
        // Blog name
        if ( !is_subdomain_install() )
                echo '<label for="blogname">' . __('Site Name:') . '</label>';
@@ -112,15 +112,15 @@ function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {
        <?php }
 
        if ( !is_subdomain_install() )
-               echo '<span class="prefix_address">' . $current_site->domain . $current_site->path . '</span><input name="blogname" type="text" id="blogname" value="'. esc_attr($blogname) .'" maxlength="60" /><br />';
+               echo '<span class="prefix_address">' . $current_network->domain . $current_network->path . '</span><input name="blogname" type="text" id="blogname" value="'. esc_attr($blogname) .'" maxlength="60" /><br />';
        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 />';
+               echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="60" /><span class="suffix_address">.' . ( $site_domain = preg_replace( '|^www\.|', '', $current_network->domain ) ) . '</span><br />';
 
        if ( ! is_user_logged_in() ) {
                if ( ! is_subdomain_install() ) {
-                       $site = $current_site->domain . $current_site->path . __( 'sitename' );
+                       $site = $current_network->domain . $current_network->path . __( 'sitename' );
                } else {
-                       $site = __( 'domain' ) . '.' . $site_domain . $current_site->path;
+                       $site = __( 'domain' ) . '.' . $site_domain . $current_network->path;
                }
 
                /* translators: %s: site address */
@@ -304,7 +304,7 @@ function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) {
        $blog_title = $filtered_results['blog_title'];
        $errors = $filtered_results['errors'];
 
-       echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), get_current_site()->site_name ) . '</h2>';
+       echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), get_network()->site_name ) . '</h2>';
 
        if ( $errors->get_error_code() ) {
                echo '<p>' . __( 'There was a problem, please correct the form below and try again.' ) . '</p>';
@@ -532,7 +532,7 @@ function signup_user( $user_name = '', $user_email = '', $errors = '' ) {
 
        <h2><?php
                /* translators: %s: name of the network */
-               printf( __( 'Get your own %s account in seconds' ), get_current_site()->site_name );
+               printf( __( 'Get your own %s account in seconds' ), get_network()->site_name );
        ?></h2>
        <form id="setupform" method="post" action="wp-signup.php" novalidate="novalidate">
                <input type="hidden" name="stage" value="validate-user-signup" />
index 3d211043ebd38efe8972a7326435eab80bd4f034..86e17b965d9092328f3644c83eb41190145b8d57 100644 (file)
@@ -82,7 +82,7 @@ if ( is_single() || is_page() )
        $tb_id = $posts[0]->ID;
 
 if ( !isset($tb_id) || !intval( $tb_id ) )
-       trackback_response(1, 'I really need an ID for this to work.');
+       trackback_response( 1, __( 'I really need an ID for this to work.' ) );
 
 if (empty($title) && empty($tb_url) && empty($blog_name)) {
        // If it doesn't look like a trackback at all.
@@ -91,10 +91,24 @@ if (empty($title) && empty($tb_url) && empty($blog_name)) {
 }
 
 if ( !empty($tb_url) && !empty($title) ) {
+       /**
+       * Fires before the trackback is added to a post.
+       *
+       * @since 4.7.0
+       *
+       * @param int    $tb_id     Post ID related to the trackback.
+       * @param string $tb_url    Trackback URL.
+       * @param string $charset   Character Set.
+       * @param string $title     Trackback Title.
+       * @param string $excerpt   Trackback Excerpt.
+       * @param string $blog_name Blog Name.
+       */
+       do_action( 'pre_trackback_post', $tb_id, $tb_url, $charset, $title, $excerpt, $blog_name );
+
        header('Content-Type: text/xml; charset=' . get_option('blog_charset') );
 
        if ( !pings_open($tb_id) )
-               trackback_response(1, 'Sorry, trackbacks are closed for this item.');
+               trackback_response( 1, __( 'Sorry, trackbacks are closed for this item.' ) );
 
        $title =  wp_html_excerpt( $title, 250, '&#8230;' );
        $excerpt = wp_html_excerpt( $excerpt, 252, '&#8230;' );
@@ -108,7 +122,7 @@ if ( !empty($tb_url) && !empty($title) ) {
 
        $dupe = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $comment_post_ID, $comment_author_url) );
        if ( $dupe )
-               trackback_response(1, 'We already have a ping from that URL for this post.');
+               trackback_response( 1, __( 'We already have a ping from that URL for this post.' ) );
 
        $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type');
 
index e8d5223ff120a98b3f8e67e2ec2e63840c2ff153..12da79b95eb93288424909cc60ac5d048d856ad0 100644 (file)
@@ -61,7 +61,7 @@ exit;
 
 include_once(ABSPATH . 'wp-admin/includes/admin.php');
 include_once(ABSPATH . WPINC . '/class-IXR.php');
-include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php');
+include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php'); 
 
 /**
  * Posts submitted via the XML-RPC interface get that title