你认为这可能是你想要的,代码和更多信息来自wpsnipp:
add_filter( \'wp_default_editor\', create_function(\'\', \'return "tinymce";\') );
add_action( \'admin_head\', \'disable_html_editor_wps\' );
function disable_html_editor_wps() {
global $current_user;
get_currentuserinfo();
if ($current_user_can(\'manage_options\') {
echo \'<style type="text/css">#editor-toolbar #edButtonHTML, #quicktags {display: none;}</style>\';
}
}
我将其从使用用户级别改为使用
if ($current_user_can(\'manage_options\') {
因此,除了管理员之外,其他人都应该删除它,代码需要在主题函数中使用gi。php