我遗漏了一些东西:
function page_help($contextual_help, $screen_id, $screen) {
if ($screen_id == \'page\') {
$contextual_help = \'
<h5>Shortcodes</h5>
<p>Shortcodes help</p>
\'.$contextual_help;
return $contextual_help;
}
elseif ($screen_id == \'post\') {
$contextual_help = \'
<h5>Post help</h5>
<p>Help is on its way!</p>
\'.$contextual_help;
return $contextual_help;
}
}
add_filter(\'contextual_help\', \'page_help\', 10, 3);
代码正在插入正确的屏幕,但我有两个问题:代码在顶部插入,我想在底部插入。
代码正在删除除上述屏幕之外的所有其他屏幕的帮助。
提前感谢您的提示!
尼尔斯