WordPress admin panel global warning [duplicate]
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.
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');
精彩评论