我不知道我是否涵盖了帖子功能链接的所有地方,但添加了以下代码functions.php
应至少从“管理”菜单、工具栏和仪表板中删除注释链接:
add_action( \'admin_menu\', \'remove_admin_menus\' );
add_action( \'wp_before_admin_bar_render\', \'remove_toolbar_menus\' );
add_action( \'wp_dashboard_setup\', \'remove_dashboard_widgets\' );
function remove_admin_menus() {
remove_menu_page( \'edit.php\' );
}
function remove_toolbar_menus() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu( \'new-post\' );
}
function remove_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes[\'dashboard\'][\'side\'][\'core\'][\'dashboard_quick_press\']);
unset($wp_meta_boxes[\'dashboard\'][\'normal\'][\'core\'][\'dashboard_recent_comments\']);
}
我能看到的唯一剩下的链接是在仪表板上的“现在”元框中;您还可以通过将以下代码添加到
remove_dashboard_widgets
功能:
unset($wp_meta_boxes[\'dashboard\'][\'normal\'][\'core\'][\'dashboard_right_now\']);