diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 8b7d712d66..1429d8126b 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -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 - please attempt the update again now.'), 'update.php?action=upgrade-core' ); + else + $msg = __('An automated WordPress update has failed to complete! Please notify the site administrator.'); + + echo "
$msg
"; +} +add_action( 'admin_notices', 'maintenance_nag' ); + ?>