Created
August 10, 2015 07:46
-
-
Save thecodepoetry/4d5f1ec19315cc89b13e to your computer and use it in GitHub Desktop.
Remove short-code insert from classic text editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dt_editor_remove_short_code_buttons( $plugin_array ) { | |
if( isset( $plugin_array['vogue_shortcodes'] ) ) { | |
unset( $plugin_array['vogue_shortcodes'] ); | |
} | |
return $plugin_array; | |
} | |
add_filter( 'mce_external_plugins', 'dt_editor_remove_short_code_buttons', 99, 1 ); | |
function dt_editor_cancel_short_code_buttons( $buttons ) { | |
if(isset( $buttons['vogue_chortcodes_megabutton'] ) ) { | |
unset( $buttons['vogue_chortcodes_megabutton'] ); | |
} | |
return $buttons; | |
} | |
add_filter( 'mce_buttons', 'dt_editor_cancel_short_code_buttons', 99, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this code in functions.php