目前,我已经搜索了很多涉及上下文帮助选项卡的页面和信息(很像这里:50787、51861、77308。搜索词::Centextural help),虽然有很多有用的信息,但我并不是在静静地磨练我要找的内容,否则我就不能很好地将信息组合在一起。
主题/功能。php/上下文帮助选项卡/全局
其目的是“避免安装更多插件”。此外,我对任何特定页面、帖子或插件都不感兴趣,这是根据defualt worpress帮助选项卡提供的全局帮助。
我已经设法拼凑了一些代码片段,以便能够开始调整当前的“帮助”选项卡,但是,在调用和删除旧链接方面,我做得不够。
目前,下面的编码删除和添加/替换了右侧栏的全局内容,但在左侧菜单中,它是添加新内容,而不是删除/替换旧内容。
function add_context_menu_help(){
// get the current screen object
$current_screen = get_current_screen();
// content for help tab
$content = \'<p>Has this replaced it?</p>\';
// register our main help tab - Overview
$current_screen->add_help_tab( array(
\'id\' => \'overview-link\',
\'title\' => __(\'Overview\'),
\'content\' => $content
)
);
// content for help tab
$content = \'<p>Im a help tab, woo!</p>\';
// register our main help tab
$current_screen->add_help_tab( array(
\'id\' => \'sp_basic_help_tab\',
\'title\' => __(\'Basic Help Tab\'),
\'content\' => $content
)
);
// register our secondary help tab (with a callback instead of content)
$current_screen->add_help_tab( array(
\'id\' => \'sp_help_tab_callback\',
\'title\' => __(\'Help Tab With Callback\'),
\'callback\' => \'display_help_tab\'
)
);
// This sets the sidebar, which is common for all tabs of this screen
get_current_screen()->set_help_sidebar(
\'<p><strong>\' . __(\'For more information:\') . \'</strong></p>\' .
\'<p>\' . __(\'<a href="http://domainname.com/" title="SCS Help Files " target="_blank">SCS Knowledgebase</a>\') . \'</p>\' .
\'<p>\' . __(\'<a href="http://domainname.com/support/" target="_blank">Support Forums</a>\') . \'</p>\'
);
}
add_filter(\'admin_head\', \'add_context_menu_help\');
//function used to display the second help tab
function display_help_tab(){
$content = \'<p>This is text from our output function</p>\';
echo $content;
}
我知道我错过了什么,不是为了寻找;我如何调用相关的“id和标题”来删除或覆盖它,或者我必须调用诸如仪表板/主页或更新等链接?非常感谢您的帮助
KR,约翰