WordPress Snippets at WPcustoms

Add admin notices on edit screen

Create custom admin notices with this function. I used the EDIT parent_base to use it as some kind of conditional tag.
You can check for more on the codex searching for “get_current_screen”

 * Snippet Name: Add admin notices on edit screen
 * Snippet URL: https://wpcustoms.net/snippets/add-admin-notices-edit-screen/
  function wpc_admin_notices(){
     global $current_screen;
     if ( $current_screen->parent_base == 'edit' )
          echo '

This info will show on top of your edit post screens

'; } add_action( 'admin_notices', 'wpc_admin_notices' );