Index: /trunk/wp-admin/includes/class-wp-upgrader.php =================================================================== --- /trunk/wp-admin/includes/class-wp-upgrader.php (revision 11524) +++ /trunk/wp-admin/includes/class-wp-upgrader.php (revision 11525) @@ -392,7 +392,8 @@ $current = get_transient( 'update_plugins' ); if ( !isset( $current->response[ $plugin ] ) ) { + $this->skin->set_result(false); $this->skin->error('up_to_date'); + $this->skin->after(); return false; - //return new WP_Error('up_to_date', $this->strings['up_to_date']); } @@ -554,7 +555,11 @@ // Is an update available? $current = get_transient( 'update_themes' ); - if ( !isset( $current->response[ $theme ] ) ) - return new WP_Error('up_to_date', $this->strings['up_to_date']); - + if ( !isset( $current->response[ $theme ] ) ) { + $this->skin->set_result(false); + $this->skin->error('up_to_date'); + $this->skin->after(); + return false; + } + $r = $current->response[ $theme ]; @@ -985,24 +990,24 @@ function after() { - if ( empty($this->upgrader->result['destination_name']) ) - return; - - $theme_info = $this->upgrader->theme_info(); - if ( empty($theme_info) ) - return; - $name = $theme_info['Name']; - $stylesheet = $this->upgrader->result['destination_name']; - $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet; - - $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), trailingslashit(esc_url(get_option('home'))) ) ); - $activate_link = wp_nonce_url("themes.php?action=activate&template=" . urlencode($template) . "&stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template); - - $update_actions = array( - 'preview' => '' . __('Preview') . '', - 'activate' => '' . __('Activate') . '', - 'themes_page' => '' . __('Return to Themes page') . '', - ); - if ( ( ! $this->result || is_wp_error($this->result) ) || $stylesheet == get_stylesheet() ) - unset($update_actions['preview'], $update_actions['activate']); + if ( !empty($this->upgrader->result['destination_name']) && + ($theme_info = $this->upgrader->theme_info()) && + !empty($theme_info) ) { + + $name = $theme_info['Name']; + $stylesheet = $this->upgrader->result['destination_name']; + $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet; + + $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), trailingslashit(esc_url(get_option('home'))) ) ); + $activate_link = wp_nonce_url("themes.php?action=activate&template=" . urlencode($template) . "&stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template); + + $update_actions = array( + 'preview' => '' . __('Preview') . '', + 'activate' => '' . __('Activate') . '', + ); + if ( ( ! $this->result || is_wp_error($this->result) ) || $stylesheet == get_stylesheet() ) + unset($update_actions['preview'], $update_actions['activate']); + } + + $update_actions['themes_page'] = '' . __('Return to Themes page') . ''; $update_actions = apply_filters('update_theme_complete_actions', $update_actions, $this->theme); Index: /trunk/wp-admin/themes.php =================================================================== --- /trunk/wp-admin/themes.php (revision 11524) +++ /trunk/wp-admin/themes.php (revision 11525) @@ -113,9 +113,9 @@ if ( ! current_user_can('update_themes') ) - printf( '
' . __('There is a new version of %1$s available. View version %3$s Details.') . '
', $theme_name, $details_url, $update['new_version']); + printf( '' . __('There is a new version of %1$s available. View version %3$s Details.') . '
', $theme_name, $details_url, $update['new_version']); else if ( empty($update->package) ) - printf( '' . __('There is a new version of %1$s available. View version %3$s Details automatic upgrade unavailable for this theme.') . '
', $theme_name, $details_url, $update['new_version']); + printf( '' . __('There is a new version of %1$s available. View version %3$s Details automatic upgrade unavailable for this theme.') . '
', $theme_name, $details_url, $update['new_version']); else - printf( '' . __('There is a new version of %1$s available. View version %3$s Details or upgrade automatically.') . '
', $theme_name, $details_url, $update['new_version'], $update_url, $update_onclick ); + printf( '' . __('There is a new version of %1$s available. View version %3$s Details or upgrade automatically.') . '
', $theme_name, $details_url, $update['new_version'], $update_url, $update_onclick ); } } Index: /trunk/wp-admin/wp-admin.css =================================================================== --- /trunk/wp-admin/wp-admin.css (revision 11524) +++ /trunk/wp-admin/wp-admin.css (revision 11525) @@ -816,9 +816,4 @@ } -#update-nag a, -.plugin-update a { - font-size: 1.1em; -} - #pass-strength-result { border-style: solid;