php – WordPress编辑管理员帮助选项卡
编辑:为了清晰起见,只需添加我要编辑的部分的屏幕截图:
screenshot for clarity
我试图使用我自己的内容创建和修改屏幕右上角的WordPress后端帮助标签,我尝试使用codex但不确定我是否正在查看正确的引用,无论它是否工作或我没有正确实现它但即使在默认使用状态下尝试使用它也没有任何变化.这是我使用的参考:[codex reference] [2] 编辑2:发现这篇文章关于如何编辑文本,但似乎没有工作,它只是放置输出文本,然后打破它,这个代码已被弃用或我在这里丢失的东西,下面是发生了什么和代码的截图从网站上使用.使用索引,因为它似乎是仪表板的一个,但更改它具有相同的效果. screenshot of how the code outputs add_action('load-index-new.php','custom_help_page'); add_action('load-index.php','custom_help_page'); function custom_help_page() { add_filter('contextual_help','custom_page_help'); } function custom_page_help($help) { // echo $help; // Uncomment if you just want to append your custom Help text to the default Help text echo "<h5>Custom Help text</h5>"; echo "<p> HTML goes here.</p>"; } ——删除旧代码,因为它的目的不正确,上面是新的代码—— 解决方法
这可能有所帮助:
How can I add a Submenu to the WordPress Admin Bar Adjusting the admin toolbar menu 但是要添加链接,您可以: add_action( 'admin_bar_menu','toolbar_link_to_mypage',999 ); function toolbar_link_to_mypage( $wp_admin_bar ) { $args = array( 'id' => 'my_page','title' => 'My Page','href' => 'http://example.com/my-page/','meta' => array( 'class' => 'my-toolbar-page' ) ); $wp_admin_bar->add_node( $args ); } 编辑: 要更改帮助选项卡,这将解决问题: Add “Help” Tab to One or All Dashboard Screens (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |