开发者

WordPress admin panel global warning [duplicate]

This question already has answers here: How to display notice in admin panel on Plugin Activation? (6 answers) Closed 4 years ago.

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');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜