diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 163e16305..40ac358e7 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -76,7 +76,7 @@ do_action('admin_head'); - +
diff --git a/wp-admin/css/colors-classic.css b/wp-admin/css/colors-classic.css index 61b89bda0..2442dcfd3 100644 --- a/wp-admin/css/colors-classic.css +++ b/wp-admin/css/colors-classic.css @@ -1581,3 +1581,16 @@ fieldset.inline-edit-col-right .inline-edit-col { input[readonly] { background-color: #eee; } + +p.popular-tags { + background-color: #FFFFFF; + border-color: #DFDFDF; +} + +#theme-information .action-button { + border-top-color: #DFDFDF; +} + +.theme-listing br.line { + border-bottom-color: #ccc; +} diff --git a/wp-admin/css/colors-fresh.css b/wp-admin/css/colors-fresh.css index dbded4406..93a2598ab 100644 --- a/wp-admin/css/colors-fresh.css +++ b/wp-admin/css/colors-fresh.css @@ -1581,3 +1581,16 @@ fieldset.inline-edit-col-right .inline-edit-col { input[readonly] { background-color: #eee; } + +p.popular-tags { + background-color: #FFFFFF; + border-color: #DFDFDF; +} + +#theme-information .action-button { + border-top-color: #DFDFDF; +} + +.theme-listing br.line { + border-bottom-color: #ccc; +} diff --git a/wp-admin/css/theme-install.css b/wp-admin/css/theme-install.css index d289ce9bb..b3a223250 100644 --- a/wp-admin/css/theme-install.css +++ b/wp-admin/css/theme-install.css @@ -72,28 +72,43 @@ div.star img { } .theme-listing br.line { - border-bottom: thin solid #ccc; + border-bottom-width: 1px; + border-bottom-style: solid; margin-bottom: 3px; } -#search-field { - padding: 1px; -} - -p.popular-tags { - line-height: 1.8em; -} - .available-theme { - text-align: center; + padding: 20px 15px; } -#theme-information .available-theme a.screenshot { - border: 0 none; - display: inline; +#theme-information .theme-preview-img { + float: left; + margin: 5px 25px 10px 15px; + width: 300px; +} + +#theme-information .action-button { + border-top-width: 1px; + border-top-style: solid; + margin: 10px 5px 20px; +} + +#theme-information .action-button #cancel { + float: left; + margin: 10px 15px; +} + +#theme-information .action-button #install { + float: right; + margin: 10px 15px; } #theme-information .available-theme h3 { margin: 1em 0; } +body#theme-information { + height: auto; +} + + diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index 1bfaecc35..5bf74ccb8 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -125,10 +125,11 @@ function install_dashboard() {

WordPress Plugin Directory or upload a plugin in .zip format via this page.') ?>

+

-

+

@@ -136,7 +137,7 @@ function install_dashboard() {

-

+

$tag['name'], 'id' => sanitize_title_with_dashes($tag['name']), 'count' => $tag['count'] ); - echo '

'; + echo '


'; } @@ -169,7 +170,7 @@ function install_search_form(){ - + if(typeof wpOnload=="function")wpOnload(); '; } diff --git a/wp-admin/includes/theme-install.php b/wp-admin/includes/theme-install.php index 0a372bd3e..42f8fb37d 100644 --- a/wp-admin/includes/theme-install.php +++ b/wp-admin/includes/theme-install.php @@ -140,15 +140,12 @@ function install_theme_search($page) { add_action('install_themes_dashboard', 'install_themes_dashboard'); function install_themes_dashboard() { ?> -

+

-

-

-

-

+

> - @@ -258,7 +255,7 @@ add_action('install_themes_upload', 'install_themes_upload', 10, 1); function install_themes_upload($page = 1) { ?>

-

+

...' . substr($desc, 30) . ''; $preview_link = $theme->preview_url . '?TB_iframe=true&width=600&height=400'; - if ( empty($actions) ) { + if ( !is_array($actions) ) { $actions = array(); $actions[] = '' . __('Install') . ''; + '&TB_iframe=true&tbWidth=500&tbHeight=350') . '" class="thickbox thickbox-preview onclick" title="' . attribute_escape(sprintf(__('Install "%s"'), $name)) . '">' . __('Install') . ''; $actions[] = '' . __('Preview') . ''; $actions = apply_filters('theme_install_action_links', $actions, $theme); } @@ -290,9 +287,9 @@ function display_theme($theme, $actions = null, $show_details = true) { $actions = implode ( ' | ', $actions ); ?> '> - + href='' + title=''> +

@@ -431,7 +428,7 @@ add_action('install_themes_pre_theme-information', 'install_theme_information'); */ function install_theme_information() { //TODO: This function needs a LOT of UI work :) - global $tab, $themes_allowedtags;; + global $tab, $themes_allowedtags; $api = themes_api('theme_information', array('slug' => stripslashes( $_REQUEST['theme'] ) )); @@ -444,67 +441,88 @@ function install_theme_information() { foreach ( array('version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug') as $key ) $api->$key = wp_kses($api->$key, $themes_allowedtags); - $section = isset($_REQUEST['section']) ? stripslashes( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English. - if ( empty($section) || ! isset($api->sections[ $section ]) ) - $section = array_shift( $section_titles = array_keys((array)$api->sections) ); - iframe_header( __('Theme Install') ); + if ( empty($api->download_link) ) { + echo '

' . __('Error: This theme is currently not available. Please try again later.') . '

'; + iframe_footer(); + exit; + } + if ( version_compare($GLOBALS['wp_version'], $api->tested, '>') ) echo '

' . __('Warning: This theme has not been tested with your current version of WordPress.') . '

'; else if ( version_compare($GLOBALS['wp_version'], $api->requires, '<') ) echo '

' . __('Warning: This theme has not been marked as compatible with your version of WordPress.') . '

'; - if ( empty($api->download_link) ) { - // No go - } - ?> - -

response as $file => $theme ) { - if ( $theme->slug === $api->slug ) { - $type = 'update_available'; - $update_file = $file; - break; + $update_themes = get_transient('update_themes'); + if ( is_object($update_themes) ) { + foreach ( (array)$update_themes->response as $file => $theme ) { + if ( $theme->slug === $api->slug ) { + $type = 'update_available'; + $update_file = $file; + break; + } + } } -} -$action = ''; + $themes = get_themes(); + foreach ( $themes as $this_theme ) { + if ( is_array($this_theme) && $this_theme['Stylesheet'] == $api->slug ) { + if ( $this_theme['Version'] == $api->version ) { + $type = 'latest_installed'; + } elseif ( $this_theme['Version'] > $api->version ) { + $type = 'newer_installed'; + $newer_version = $this_theme['Version']; + } + break; + } + } +?> + +

+ +

name; ?>

+

author); ?>

+

version); ?>

+ +' . __('Cancel') . ' '; + switch ( $type ) { - default: - case 'install': - if ( current_user_can('install_themes') ) : - $action = '' . __('Install Now') . ''; +default: +case 'install': + if ( current_user_can('install_themes') ) : + $buttons .= '' . __('Install Now') . ''; endif; break; case 'update_available': if ( current_user_can('update_themes') ) : - ?>' . __('Install Update Now') . ''; endif; break; case 'newer_installed': if ( current_user_can('install_themes') || current_user_can('update_themes') ) : - ?>

-
- +} ?> +
- + +
+

+ +' + text + ''; + } else { + text = $(this).attr('title') || ''; + link = '  ' + text + ''; } - - $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); + + $('#TB_title').css({'background-color':'#222','color':'#dfdfdf'}); $('#TB_closeAjaxWindow').css({'float':'left'}); - $('#TB_ajaxWindowTitle').css({'float':'right'}) - .append(' ' + text + ''); + $('#TB_ajaxWindowTitle').css({'float':'right'}).html(link); $('#TB_iframeContent').width('100%'); + thickDims(); return false; } ); - $(window).resize( function() { thickDims() } ); - - // Theme details disclosure + // Theme details $('.theme-detail').click(function () { $(this).siblings('.themedetaildiv').toggle(); return false; }); + }); -function tb_position() { - thickDims(); -} diff --git a/wp-admin/js/theme-preview.js b/wp-admin/js/theme-preview.js index 52674f4d6..2555af162 100644 --- a/wp-admin/js/theme-preview.js +++ b/wp-admin/js/theme-preview.js @@ -1 +1 @@ -var thickDims;jQuery(document).ready(function(a){thickDims=function(){var d=a("#TB_window"),c=a(window).height(),b=a(window).width();if(d.size()){d.width(b-90).height(c-60);a("#TB_iframeContent").width(b-90).height(c-90);d.css({"margin-left":"-"+parseInt(((b-90)/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){d.css({top:"30px","margin-top":"0"})}}return a("a.thickbox-preview").each(function(){var e=a(this).parents(".available-theme").find(".previewlink").attr("href");if(!e){return}e=e.replace(/&width=[0-9]+/g,"");e=e.replace(/&height=[0-9]+/g,"");a(this).attr("href",e+"&width="+(b-110)+"&height="+(c-100))})};thickDims().click(function(){var c=a(this).parents(".available-theme").find(".activatelink"),b="",d="";if(c.length){b=c.attr("href")||"";d=c.html()||""}a("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});a("#TB_closeAjaxWindow").css({"float":"left"});a("#TB_ajaxWindowTitle").css({"float":"right"}).append(' '+d+"");a("#TB_iframeContent").width("100%");return false});a(window).resize(function(){thickDims()});a(".theme-detail").click(function(){a(this).siblings(".themedetaildiv").toggle();return false})});function tb_position(){thickDims()}; \ No newline at end of file +var thickDims,tbWidth,tbHeight;jQuery(document).ready(function(a){thickDims=function(){var f=a("#TB_window"),d=a(window).height(),b=a(window).width(),c,e;c=(tbWidth&&tbWidth'+f+""}else{f=a(this).attr("title")||"";e='  '+f+""}a("#TB_title").css({"background-color":"#222",color:"#dfdfdf"});a("#TB_closeAjaxWindow").css({"float":"left"});a("#TB_ajaxWindowTitle").css({"float":"right"}).html(e);a("#TB_iframeContent").width("100%");thickDims();return false});a(".theme-detail").click(function(){a(this).siblings(".themedetaildiv").toggle();return false})}); \ No newline at end of file diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 7129955be..3b08eeb27 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -181,14 +181,14 @@ foreach ( $cols as $col => $theme_name ) { $screenshot = $themes[$theme_name]['Screenshot']; $stylesheet_dir = $themes[$theme_name]['Stylesheet Dir']; $preview_link = clean_url( get_option('home') . '/'); - $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true', 'width' => 600, 'height' => 400 ), $preview_link ) ); + $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), $preview_link ) ); $preview_text = attribute_escape( sprintf( __('Preview of "%s"'), $title ) ); $tags = $themes[$theme_name]['Tags']; $thickbox_class = 'thickbox thickbox-preview'; $activate_link = wp_nonce_url("themes.php?action=activate&template=".urlencode($template)."&stylesheet=".urlencode($stylesheet), 'switch-theme_' . $template); $activate_text = attribute_escape( sprintf( __('Activate "%s"'), $title ) ); $actions = array(); - $actions[] = '' . __('Activate') . ''; + $actions[] = '' . __('Activate') . ''; $actions[] = '' . __('Preview') . ''; if ( current_user_can('update_themes') ) $actions[] = '' . __('Delete') . ''; @@ -196,7 +196,7 @@ foreach ( $cols as $col => $theme_name ) { $actions = implode ( ' | ', $actions ); ?> - + @@ -208,8 +208,6 @@ foreach ( $cols as $col => $theme_name ) {

-
-
diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 03672cfa2..88eb60646 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -3006,3 +3006,29 @@ ol { .columns-prefs label { padding: 0 5px; } + +.theme-install-php h4, +.plugin-install-php h4 { + margin: 2.5em 0 8px; +} + +p.install-help { + margin: 8px 0; + font-style: italic; +} + +p.popular-tags { + -moz-border-radius: 8px; + -khtml-border-radius: 8px; + -webkit-border-radius: 8px; + border-radius: 8px; + border-width: 1px; + border-style: solid; + line-height: 2em; + padding: 8px 12px 12px; +} + +p.popular-tags a { + padding: 0 3px; +} + diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index cc3e5fc7f..3718f7c0e 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -353,7 +353,7 @@ function wp_default_scripts( &$scripts ) { 'l10n_print_after' => 'try{convertEntities(wpGearsL10n);}catch(e){};' )); - $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090314' ); + $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090319' ); $scripts->add_data( 'theme-preview', 'group', 1 ); $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery-form', 'suggest' ), '20090125' ); @@ -446,7 +446,7 @@ function wp_default_styles( &$styles ) { $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20081210' ); $styles->add( 'login', '/wp-admin/css/login.css', array(), '20081210' ); $styles->add( 'plugin-install', '/wp-admin/css/plugin-install.css', array(), '20081210' ); - $styles->add( 'theme-install', '/wp-admin/css/theme-install.css', array(), '20090314' ); + $styles->add( 'theme-install', '/wp-admin/css/theme-install.css', array(), '20090319' ); $styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.2' ); foreach ( $rtl_styles as $rtl_style )