• I’ve disabled the visual editor by adding a filter to functions.php.

    I also want to remove either any reference to it, or the ‘Disable the visual editor when writing’ text which appears on the user page.

    Currently, I’m only able to add clarifying text with this:

    add_filter ( 'user_can_richedit' , create_function ( '$a' , 'return false;' ) , 50 );
    add_action( 'admin_print_styles-profile.php', 'hide_rich_edit_option' );
    add_action( 'admin_print_styles-user-edit.php', 'hide_rich_edit_option' );
    function hide_rich_edit_option() {
    ?>
    <style type="text/css">
    label[for=rich_editing] input { display: none; }
    label[for=rich_editing]:before { content: 'The option to enable the visual editor has been removed (in functions.php). (Formerly: ' }
    label[for=rich_editing]:after { content: '.)'; }
    </style><?php
    }

The topic ‘Disable visual editor’ is closed to new replies.