Adminimize不remove 菜单项等等,它只是保留它们visually hidden. 换句话说,您的管理页面仍然可以访问。
将此代码添加到functions.php
文件:
add_action(\'admin_menu\', \'edit_trustees_page\');
function edit_trustees_page() {
global $submenu;
$trustees_page_id = 1; //change this value
$url = get_admin_url() . \'post.php?post=\' . $trustees_page_id . \'&action=edit\';
$submenu[\'index.php\'][] = array( \'Edit Trustees\', \'manage_options\', $url ); // replace manage_options with your custom role
}
它将向
Dashboard
. 你可以改变
index.php
对于其中任何一项:
index.php => Dashboard
edit.php => Posts
upload.php => Media
link-manager.php => Links
edit.php?post_type=page => Pages
edit-comments.php => Comments
themes.php => Appearance
plugins.php => Plugins
users.php => Users
tools.php => Tools
options-general.php => Settings