我想我找不到任何钩子可以在不接触核心文件的情况下删除这些区域。。
您可以使用此功能和一些css帮助删除部分管理区域。
To hide Menus
// remove unnecessary menus
function remove_admin_menus () {
global $menu;
// all users
$restrict = explode(\',\', \'Links,Comments\');
// non-administrator users
$restrict_user = explode(\',\', \'Media,Profile,Appearance,Plugins,Users,Tools,Settings,Dashboard,Posts,Pages\');
// WP localization
$f = create_function(\'$v,$i\', \'return __($v);\');
array_walk($restrict, $f);
if (!current_user_can(\'activate_plugins\')) {
array_walk($restrict_user, $f);
$restrict = array_merge($restrict, $restrict_user);
}
// remove menus
end($menu);
while (prev($menu)) {
$k = key($menu);
$v = explode(\' \', $menu[$k][0]);
if(in_array(is_null($v[0]) ? \'\' : $v[0] , $restrict)) unset($menu[$k]);
}
}
add_action(\'admin_menu\', \'remove_admin_menus\');
?>
To Brand your Header
/**REPLACE WP LOGO**/
function custom_admin_css() {
echo \'<link rel="stylesheet" id="custom_admin" type="text/css" href="\' . get_bloginfo(\'template_directory\') . \'/custom/custom_admin.css" />\';
}
add_action(\'admin_head\',\'custom_admin_css\');
/**END REPLACE WP LOGO**/
并创建一个custom\\u admin。带有此行的css文件
#header-logo {background-image: url(images/client_logo.jpg);}
To modify Header Menu
//Edit Top Menu
function custom_favorite_actions($actions) {
unset($actions[\'edit-comments.php\']); //remove Comments from menu
unset($actions[\'media-new.php\']); // remove Upload media menu
unset($actions[\'post-new.php?post_type=page\']); // Remove options/menu for new pages
return $actions;
}
add_filter(\'favorite_actions\', \'custom_favorite_actions\');
To Replace the footer
/**REPLACE FOOTER TEXT**/
function filter_footer_admin() { ?>
Created by <a href="#">Your Company</a> | Built with <a href="http://wordpress.org">WordPress</a>
<?php }
add_filter(\'admin_footer_text\', \'filter_footer_admin\');
/**END REPLACE FOOTER TEXT**/