How to Disable Visual Editor Formatting Shortcuts in WordPress 4.3595

Author: InfoBeep - December 13, 2017 | subject to copyright

Sometimes it can be annoying to get visual editor formatting if you are unaware about the shortcut keys. So, if you want to disable it, you just need to follow the procedure below.


Simply go to functions.php file or site-specific pluging and paste the code below:

functiondisable_mce_wptextpattern( $opt) {

    if( isset( $opt['plugins'] ) && $opt['plugins'] ) {

        $opt['plugins'] = explode( ',', $opt['plugins'] );

        $opt['plugins'] = array_diff( $opt['plugins'] , array( 'wptextpattern') );

        $opt['plugins'] = implode( ',', $opt['plugins'] );




add_filter( 'tiny_mce_before_init', 'disable_mce_wptextpattern');

Note: the code above will just remove the shortcuts for visual editor, the shortcuts for WordPress doesn’t change.