diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index a84b97b49d..5060fff082 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -1835,13 +1835,6 @@ div.action-links { background-size: 100% auto; } -@media only screen and (max-width: 800px) { - #plugin-information-title.with-banner { - height: 100px; - bottom: 100px; - } -} - #plugin-information-title h2 { font-family: "Helvetica Neue", sans-serif; padding:0; @@ -1868,14 +1861,6 @@ div.action-links { border-radius: 8px; } -@media only screen and (max-width: 800px) { - #plugin-information-title.with-banner h2 { - top: 12px; - font-size: 20px; - line-height: 40px; - } -} - #plugin-information-title div.vignette { display: none; } @@ -1891,14 +1876,6 @@ div.action-links { box-shadow: inset 0 0 50px 4px rgba( 0, 0, 0, 0.2 ), inset 0 -1px 0 rgba( 0, 0, 0, 0.1 ); } -@media only screen and (max-width: 800px) { - #plugin-information-title.with-banner div.vignette { - height: 65px; - bottom: 65px; - width: 800%; - } -} - #plugin-information-tabs { padding: 0 16px; position: absolute; @@ -1910,20 +1887,14 @@ div.action-links { } #plugin-information-tabs.with-banner { - top: 215px; + top: 214px; background: rgba( 255, 255, 255, 0.85 ); } -@media only screen and (max-width: 800px) { - #plugin-information-tabs.with-banner { - top: 65px; - } -} - #plugin-information-tabs a { position: relative; float: left; - padding: 8px 10px 9px; + padding: 9px 10px; margin: 0; height: 18px; line-height: 18px; @@ -1934,13 +1905,19 @@ div.action-links { } #plugin-information-tabs a.current { - margin: -1px -1px 0; + margin: 0 -1px 0; background: #fff; border: 1px solid #ddd; border-bottom: none; + padding-top: 8px; color: #333; } +#plugin-information-tabs.with-banner a.current { + border-top: none; + padding-top: 9px; +} + #plugin-information-tabs a:active, #plugin-information-tabs a:focus { outline: none; @@ -1951,20 +1928,16 @@ div.action-links { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; position: absolute; - top: 90px; + top: 91px; right: 0; bottom: 58px; left: 0; + overflow: auto; } #plugin-information-content.with-banner { - top:249px; -} - -@media only screen and (max-width: 800px) { - #plugin-information-content.with-banner { - top:99px; - } + border-top: none; + top: 250px; } #section-holder { @@ -2024,6 +1997,10 @@ div.action-links { margin: 0 0 10px; } +#plugin-information .counter-container { + margin: 3px 0; +} + #plugin-information .counter-label { float: left; margin-right: 5px; @@ -2118,10 +2095,36 @@ div.action-links { font-size: 13px; } -@media screen and ( max-width: 782px ) { - #plugin-information-content { - overflow: auto; - bottom: 58px; +@media screen and ( max-width: 771px ), screen and ( max-height: 500px ) { + #plugin-information-title.with-banner { + height: 100px; + bottom: 100px; + } + + #plugin-information-title.with-banner h2 { + top: 12px; + font-size: 20px; + line-height: 40px; + } + + #plugin-information-title.with-banner div.vignette { + height: 65px; + bottom: 65px; + width: 800%; + } + + #plugin-information-tabs.with-banner { + top: 63px; + } + + #plugin-information-content.with-banner { + top: 99px; + } +} + +@media screen and ( max-width: 771px ) { + #plugin-information-tabs { + padding: 0; } #plugin-information .fyi { diff --git a/src/wp-admin/includes/plugin-install.php b/src/wp-admin/includes/plugin-install.php index dcb5b7b6cc..950579895e 100644 --- a/src/wp-admin/includes/plugin-install.php +++ b/src/wp-admin/includes/plugin-install.php @@ -311,10 +311,15 @@ function install_plugin_install_status($api, $loop = false) { function install_plugin_information() { global $tab; - $api = plugins_api( 'plugin_information', array( 'slug' => wp_unslash( $_REQUEST['plugin'] ), 'is_ssl' => is_ssl(), 'fields' => array( 'banners' => true, 'reviews' => true ) ) ); + $api = plugins_api( 'plugin_information', array( + 'slug' => wp_unslash( $_REQUEST['plugin'] ), + 'is_ssl' => is_ssl(), + 'fields' => array( 'banners' => true, 'reviews' => true ) + ) ); - if ( is_wp_error( $api ) ) + if ( is_wp_error( $api ) ) { wp_die( $api ); + } $plugins_allowedtags = array( 'a' => array( 'href' => array(), 'title' => array(), 'target' => array() ), @@ -326,49 +331,50 @@ function install_plugin_information() { ); $plugins_section_titles = array( - 'description' => _x('Description', 'Plugin installer section title'), - 'installation' => _x('Installation', 'Plugin installer section title'), - 'faq' => _x('FAQ', 'Plugin installer section title'), - 'screenshots' => _x('Screenshots', 'Plugin installer section title'), - 'changelog' => _x('Changelog', 'Plugin installer section title'), - 'reviews' => _x('Reviews', 'Plugin installer section title'), - 'other_notes' => _x('Other Notes', 'Plugin installer section title') + 'description' => _x( 'Description', 'Plugin installer section title' ), + 'installation' => _x( 'Installation', 'Plugin installer section title' ), + 'faq' => _x( 'FAQ', 'Plugin installer section title' ), + 'screenshots' => _x( 'Screenshots', 'Plugin installer section title' ), + 'changelog' => _x( 'Changelog', 'Plugin installer section title' ), + 'reviews' => _x( 'Reviews', 'Plugin installer section title' ), + 'other_notes' => _x( 'Other Notes', 'Plugin installer section title' ) ); - //Sanitize HTML - foreach ( (array)$api->sections as $section_name => $content ) { - $api->sections[$section_name] = wp_kses($content, $plugins_allowedtags); + // Sanitize HTML + foreach ( (array) $api->sections as $section_name => $content ) { + $api->sections[$section_name] = wp_kses( $content, $plugins_allowedtags ); } foreach ( array( 'version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug' ) as $key ) { - if ( isset( $api->$key ) ) + if ( isset( $api->$key ) ) { $api->$key = wp_kses( $api->$key, $plugins_allowedtags ); + } } $_tab = esc_attr( $tab ); - $section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English. + $section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; // Default to the Description tab, Do not translate, API returns English. if ( empty( $section ) || ! isset( $api->sections[ $section ] ) ) { $section_titles = array_keys( (array) $api->sections ); $section = array_shift( $section_titles ); } - iframe_header( __('Plugin Install') ); + iframe_header( __( 'Plugin Install' ) ); $_with_banner = ''; - if ( !empty( $api->banners ) && ( !empty( $api->banners['low'] ) || !empty( $api->banners['high'] ) ) ) { + if ( ! empty( $api->banners ) && ( ! empty( $api->banners['low'] ) || ! empty( $api->banners['high'] ) ) ) { $_with_banner = 'with-banner'; - $low = ( !empty( $api->banners['low'] ) ) ? $api->banners['low'] : $api->banners['high']; - $high = ( !empty( $api->banners['high'] ) ) ? $api->banners['high'] : $api->banners['low']; + $low = empty( $api->banners['low'] ) ? $api->banners['high'] : $api->banners['low']; + $high = empty( $api->banners['high'] ) ? $api->banners['low'] : $api->banners['high']; ?> @@ -378,16 +384,18 @@ function install_plugin_information() { echo "
' . __('Warning: This plugin has not been tested with your current version of WordPress.') . '
' . __('Warning: This plugin has not been marked as compatible with your version of WordPress.') . '