0

I would like to hide below message you see on dashboard after a WordPress upgrade in Wordpress MU.

I know for hiding version upgrade notice there is one filter as

add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );

But I want to disable the following notice

"Thank you for Updating! Please visit the Update Network page to update all your sites."

enter image description here

1 Answer 1

0

This message was fired on two hooks.

add_action( 'admin_notices', 'site_admin_notice' );
add_action( 'network_admin_notices', 'site_admin_notice' );

Remove this and you remove the message, use remove_action.

To remove this function use a function, like the follow example.

add_action( 'admin_menu','fb_hide_site_notice' );
function fb_hide_site_notice() {
    remove_action( 'admin_notices', 'site_admin_notice' );
}

Now for the network ares:

add_action( 'network_admin_menu', 'fb_hide_network_notice' );
function fb_hide_network_notice() {
    remove_action( 'network_admin_notices', 'site_admin_notice' );
}
5
  • I have tried adding .........remove_action( 'admin_notices', 'site_admin_notice' ); remove_action( 'network_admin_notices', 'site_admin_notice' ); ...........in functions.php of my themes folder.........but with no luck ........I don't want to edit the wordpress core files. Mar 7, 2014 at 13:18
  • No, never change the core files. I have update my answer with a example to remove the notice.
    – bueltge
    Mar 7, 2014 at 13:45
  • Thanks that worked!!! can't give upvote as am not having enough reputation Mar 7, 2014 at 14:01
  • It's still active at the network dashboard. Mar 7, 2014 at 16:16
  • Yes, you must also deactivate the hook network_admin_notices. I update the answer, now you have the completely source.
    – bueltge
    Mar 8, 2014 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.