• Hi all,

    working on a plugin, i need to show notice box to the user as a confirm (or not) of an action fired by a POST function.

    Just to clarify, i need to know hot to fire up a notice box inside post hook function like:

    add_action( ‘admin_post_register’, ‘allaround_action_register’ );

    function allaround_action_register() {
    […]
    here i need to show a notice box
    […]
    }

    Thanks.

Viewing 1 replies (of 1 total)
  • I have this:

    
    add_action( 'admin_notices', 'my_errors' );
    function my_errors() {
      global $my_error;
      echo '<div class="notice notice-error"><p>'.$my_error.'</p></div>'.PHP_EOL;
    } // end function
    
Viewing 1 replies (of 1 total)
  • The topic ‘Show notice inside a post hook function’ is closed to new replies.