Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

gulliver on "Custom message on admin page after disabling visual editor."

$
0
0

I use a mod to disable the visual editor for all users.

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
}

It removes the checkbox and displays the message:'The option to enable the visual editor has been removed (in functions.php). (Formerly:Disable the visual editor when writing.)

In that message, I want to remove '(Formerly:Disable the visual editor when writing.)' but have no idea how and various trial and error hasn't yet worked.


Viewing all articles
Browse latest Browse all 8245

Trending Articles