Warn if the core updater failed to complete. See #7819.

git-svn-id: https://develop.svn.wordpress.org/trunk@9348 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2008-10-25 22:22:29 +00:00
parent fc475f27b2
commit f8bad23493
1 changed files with 14 additions and 0 deletions

View File

@ -395,4 +395,18 @@ function wp_update_core($feedback = '') {
return update_core($working_dir, $wp_dir);
}
function maintenance_nag() {
global $upgrading;
if ( ! isset( $upgrading ) )
return false;
if ( current_user_can('manage_options') )
$msg = sprintf( __('An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.'), 'update.php?action=upgrade-core' );
else
$msg = __('An automated WordPress update has failed to complete! Please notify the site administrator.');
echo "<div id='update-nag'>$msg</div>";
}
add_action( 'admin_notices', 'maintenance_nag' );
?>