WordPress.org

Make WordPress Core

Ticket #25777: 25777.2.diff

File 25777.2.diff, 770 bytes (added by jdgrimes, 7 years ago)

Unhook site_admin_notice() when we are displaying the update nag.

  • src/wp-admin/includes/update.php

     
    209209        if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )
    210210                return false;
    211211
     212        // Make sure the site admin update notice won't be displayed too.
     213        remove_action( 'admin_notices', 'site_admin_notice' );
     214        remove_action( 'network_admin_notices', 'site_admin_notice' );
     215
    212216        if ( current_user_can('update_core') ) {
    213217                $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, network_admin_url( 'update-core.php' ) );
    214218        } else {