我想用钩子in_plugin_update_message
以便在“管理插件列表”部分的“我的插件”名称下方显示一行消息。但是,钩子中调用的函数似乎没有触发:没有显示消息。
我不知道我做错了什么。
Building the hook
global $pagenow;
if ( \'plugins.php\' === $pagenow )
{
$file = basename( __FILE__ );
$folder = basename( dirname( __FILE__ ) );
$hook = "in_plugin_update_message-{$folder}/{$file}";
add_action( $hook, \'your_update_message_cb\');
}
Callback function
function your_update_message_cb( $plugin_data, $r )
{
echo \'Hello World\';
$output = \'Hello World\';
return print $output;
}
我应该使用另一个钩子还是代码中有错误?谢谢你的帮助