为什么不把这段代码放在插件中呢。
add_action( \'init\', \'wpsites_remove_file_viewing\' );
function wpsites_remove_file_viewing() {
$author = get_role( \'admin\' );
$caps = array(
\'edit_files\',
\'edit_theme_options\',
\'edit_plugins\',
\'edit_themes\',
);
foreach ( $caps as $cap ) {
$administrator->remove_cap( $cap );
}
}