Restore the update message in the dashboard, removed in 3.8.

props obenland.
fixes #26664.

Built from https://develop.svn.wordpress.org/trunk@27711


git-svn-id: http://core.svn.wordpress.org/trunk@27550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-03-25 14:36:15 +00:00
parent 7d3b9ccb22
commit fbd1443a0b
6 changed files with 26 additions and 5 deletions

View File

@ -362,6 +362,7 @@ div.dashboard-widget-notice {
} }
#dashboard_right_now .main { #dashboard_right_now .main {
overflow: hidden;
padding: 0 12px 11px; padding: 0 12px 11px;
} }
@ -369,6 +370,13 @@ div.dashboard-widget-notice {
margin: 0; margin: 0;
} }
#dashboard_right_now #wp-version-message .button {
clear: left;
float: left;
position: relative;
top: -5px;
}
.mu-storage { .mu-storage {
overflow: hidden; overflow: hidden;
} }

View File

@ -362,6 +362,7 @@ div.dashboard-widget-notice {
} }
#dashboard_right_now .main { #dashboard_right_now .main {
overflow: hidden;
padding: 0 12px 11px; padding: 0 12px 11px;
} }
@ -369,6 +370,13 @@ div.dashboard-widget-notice {
margin: 0; margin: 0;
} }
#dashboard_right_now #wp-version-message .button {
clear: right;
float: right;
position: relative;
top: -5px;
}
.mu-storage { .mu-storage {
overflow: hidden; overflow: hidden;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -281,8 +281,8 @@ function wp_dashboard_right_now() {
?> ?>
</ul> </ul>
<p><?php printf( __( 'WordPress %1$s running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name ); ?></p>
<?php <?php
update_right_now_message();
// Check if search engines are asked not to index this site. // Check if search engines are asked not to index this site.
if ( ! is_network_admin() && ! is_user_admin() && current_user_can( 'manage_options' ) && '1' != get_option( 'blog_public' ) ) { if ( ! is_network_admin() && ! is_user_admin() && current_user_can( 'manage_options' ) && '1' != get_option( 'blog_public' ) ) {

View File

@ -221,7 +221,12 @@ add_action( 'network_admin_notices', 'update_nag', 3 );
// Called directly from dashboard // Called directly from dashboard
function update_right_now_message() { function update_right_now_message() {
$msg = sprintf( __( 'You are using <span class="b">WordPress %s</span>.' ), get_bloginfo( 'version', 'display' ) ); $theme_name = wp_get_theme();
if ( current_user_can( 'switch_themes' ) ) {
$theme_name = sprintf( '<a href="themes.php">%1$s</a>', $theme_name );
}
$msg = sprintf( __( 'WordPress %1$s running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name );
if ( current_user_can('update_core') ) { if ( current_user_can('update_core') ) {
$cur = get_preferred_from_update_core(); $cur = get_preferred_from_update_core();
@ -230,7 +235,7 @@ function update_right_now_message() {
$msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>'; $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
} }
echo "<span id='wp-version-message'>$msg</span>"; echo "<p id='wp-version-message'>$msg</p>";
} }
function get_plugin_updates() { function get_plugin_updates() {