Skip to main content
2 of 2
Correcting typos
Sven
  • 3.7k
  • 1
  • 34
  • 48

There is a global variable called $pagenow for the use within WP Admin:

global $pagenow;
if ( $pagenow == 'upload.php' ) :

    function custom_admin_notice() {
        echo '<div class="updated"><p>Updated!</p></div>';
    }
    add_action( 'admin_notices', 'custom_admin_notice' );

endif;

UPDATE: Simply include the snippet in your themes or plugins functions.php

Sven
  • 3.7k
  • 1
  • 34
  • 48