Useful Snippets


This blog is used to collect useful snippets related to Linux, PHP, MySQL and more. Feel free to post comments with improvements or questions!

Are your smart devices spying on you? Make better purchasing choices and find products that respect your privacy at

RSS Latest posts from my personal blog

Most viewed posts

Subscribe to RSS feed

Disable TGM Plugin Activation nag screen.

Stanislav KhromovStanislav Khromov

Seeing this?


Here’s a quick way to disable it globally and permanently. Save the below snippet and put it in your /wp-content/mu-plugins folder (create it if it doesn’t exist), and you’re done!

Plugin Name: Disable TGM Plugin Activation Notices
Plugin URI:
Description: Disables notices about recommended plugins.
Version: 2014.03.27
Author: khromov
Author URI:
License: GPL2

add_filter('get_user_metadata', function($val, $object_id, $meta_key, $single)
    if($meta_key === 'tgmpa_dismissed_notice')
        return true;
        return null;

}, 10, 4);

Web Developer at Aftonbladet (Schibsted Media Group)
Any opinions on this blog are my own and do not reflect the views of my employer.
Twitter Profile
Visit my other blog

Comments 6
  • Iain Mars
    Posted on

    Iain Mars Iain Mars

    Reply Author

    Hi Stanislav is there a way to get this snippet in the functions.php file?


    • Stanislav Khromov
      Posted on

      Stanislav Khromov Stanislav Khromov

      Reply Author

      Hey Iain,

      Just copy row 12-19 into your themes functions.php and you’re golden. :-)

  • Antonio Tamayo
    Posted on

    Antonio Tamayo Antonio Tamayo

    Reply Author

    Sorry but not work for me. I am using the 2.5.2 tgm-plugin-activation version and this snippet not work. I need help thanks.

  • Antonio Tamayo
    Posted on

    Antonio Tamayo Antonio Tamayo

    Reply Author

    Already have the solution for my issue. Change “tgmpa_dismissed_notice” by “tgmpa_dismissed_notice_tgmpa”. This work fine for me.

  • David
    Posted on

    David David

    Reply Author

    Just thank you very much! I also add to change `tgmpa_dismissed_notice` by `tgmpa_dismissed_notice_tgmpa` but every thing was just nerve saving!

    Thank you :-)