Warn if the core updater failed to complete. See #7819.
git-svn-id: http://svn.automattic.com/wordpress/trunk@9348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9133214dba
commit
e393417401
@ -395,4 +395,18 @@ function wp_update_core($feedback = '') {
|
|||||||
return update_core($working_dir, $wp_dir);
|
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' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user