diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index 1509e5a0d8..0ffe623bb3 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -601,6 +601,9 @@ code { text-shadow: none; font-weight: 600; font-size: 13px; + line-height: normal; /* IE8-IE11 need this for buttons */ + cursor: pointer; + outline: 0; } .wrap .add-new-h2:hover, /* deprecated */ diff --git a/src/wp-admin/css/themes.css b/src/wp-admin/css/themes.css index a6e5dafd76..c61dba7489 100644 --- a/src/wp-admin/css/themes.css +++ b/src/wp-admin/css/themes.css @@ -1039,7 +1039,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { box-sizing: border-box; display: none; margin: 0; - padding: 0; + padding: 50px 0; width: 100%; overflow: hidden; position: relative; @@ -1066,13 +1066,9 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { font-size: 18px; font-style: normal; margin: 0; - padding: 40px 0 0; + padding: 0; text-align: center; } -body.show-upload-theme .upload-theme + .wp-filter, -body.show-upload-theme .upload-theme + .wp-filter + .theme-browser { - display: none; -} p.no-themes { clear: both; @@ -1085,14 +1081,10 @@ p.no-themes { display: none; } -body.no-results p.no-themes { +.no-results p.no-themes { display: block; } -body.show-upload-theme p.no-themes { - display: none !important; -} - .theme-install-php .add-new-theme { display: none !important; } diff --git a/src/wp-admin/js/theme.js b/src/wp-admin/js/theme.js index ca43d08a0f..d532618585 100644 --- a/src/wp-admin/js/theme.js +++ b/src/wp-admin/js/theme.js @@ -1745,23 +1745,18 @@ themes.view.Installer = themes.view.Appearance.extend({ searchContainer: $( '.wp-filter .search-form' ), /* - * When a user presses the "Upload Theme" button, show the upload form in place. - * @todo consider to abstract this in a generic, reusable, utility, see plugin-install.js + * When users press the "Upload Theme" button, show the upload form in place. */ uploader: function() { var uploadViewToggle = $( '.upload-view-toggle' ), $body = $( document.body ); - uploadViewToggle - .attr({ - role: 'button', - 'aria-expanded': 'false' - }) - .on( 'click', function( event ) { - event.preventDefault(); - $body.toggleClass( 'show-upload-view' ); - uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) ); - }); + uploadViewToggle.on( 'click', function() { + // Toggle the upload view. + $body.toggleClass( 'show-upload-view' ); + // Toggle the `aria-expanded` button attribute. + uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) ); + }); }, // Toggle the full filters navigation @@ -1815,7 +1810,6 @@ themes.InstallerRouter = Backbone.Router.extend({ routes: { 'theme-install.php?theme=:slug': 'preview', 'theme-install.php?browse=:sort': 'sort', - 'theme-install.php?upload': 'upload', 'theme-install.php?search=:query': 'search', 'theme-install.php': 'sort' }, @@ -1897,11 +1891,6 @@ themes.RunInstaller = { self.view.trigger( 'theme:close' ); }); - // Support the `upload` route by going straight to upload section - themes.router.on( 'route:upload', function() { - $( 'a.upload' ).trigger( 'click' ); - }); - // The `search` route event. The router populates the input field. themes.router.on( 'route:search', function() { $( '.wp-filter-search' ).focus().trigger( 'keyup' ); diff --git a/src/wp-admin/theme-install.php b/src/wp-admin/theme-install.php index 42604d7652..25fe41051d 100644 --- a/src/wp-admin/theme-install.php +++ b/src/wp-admin/theme-install.php @@ -127,17 +127,20 @@ include(ABSPATH . 'wp-admin/admin-header.php'); */ $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) ); if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) { - echo ' ' . __( 'Upload Theme' ) . ''; + echo ' '; } ?> +
+

+
-

+

-
+
@@ -201,7 +204,7 @@ include(ABSPATH . 'wp-admin/admin-header.php');
-

+