Wordpress 删除插件添加的管理标题栏中的某些链接
我已经安装了几个插件,它们倾向于在管理栏上添加链接 我有ultimate affiliate pro,它添加了新的和推荐的affiliate和其他插件,如ithemes security在管理栏上有一个链接,这样现在我的管理栏看起来像下图所示 我如何编辑这是有一个插件,可以删除管理仪表板栏上的某些链接,而不必禁用插件 我试过:Wordpress 删除插件添加的管理标题栏中的某些链接,wordpress,Wordpress,我已经安装了几个插件,它们倾向于在管理栏上添加链接 我有ultimate affiliate pro,它添加了新的和推荐的affiliate和其他插件,如ithemes security在管理栏上有一个链接,这样现在我的管理栏看起来像下图所示 我如何编辑这是有一个插件,可以删除管理仪表板栏上的某些链接,而不必禁用插件 我试过: checking on the screen options but there is no way to uncheck links 下面是如何从管理栏中删除不需要的
checking on the screen options but there is no way to uncheck links
下面是如何从管理栏中删除不需要的链接的示例
function remove_admin_bar_links() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wporg'); // Remove the WordPress.org link
$wp_admin_bar->remove_menu('documentation'); // Remove the WordPress documentation link
$wp_admin_bar->remove_menu('support-forums'); // Remove the support forums link
$wp_admin_bar->remove_menu('feedback'); // Remove the feedback link
$wp_admin_bar->remove_menu('w3tc'); // If you use w3 total cache remove the performance link
$wp_admin_bar->remove_menu('my-account'); // Remove the user details tab
}
add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );
您需要检查菜单名,并通过add_操作将其添加到函数调用中