1

I try to find out how to register a global warning for WordPress administration panel.

I create a plugin that after activation must be enabled, in order to work.

The question not is, how can I create a warning message that will be displayed sidewide in the WordPress admin panel ?

In example.

The plugin X is no yet enabled. Please click here to enable it.

KodeFor.Me
  • 13,069
  • 27
  • 98
  • 166

1 Answers1

4

There's a WordPress hook for admin_notices.

Put something like the following in your plugin and it will call activation_notice() during the output of the page.

add_action( 'admin_notices', 'activation_notice');
Jason McCreary
  • 71,546
  • 23
  • 135
  • 174