Skip to content

Instantly share code, notes, and snippets.

@thecodepoetry
Created August 10, 2015 07:46
Show Gist options
  • Save thecodepoetry/4d5f1ec19315cc89b13e to your computer and use it in GitHub Desktop.
Save thecodepoetry/4d5f1ec19315cc89b13e to your computer and use it in GitHub Desktop.
Remove short-code insert from classic text editor
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 );
@thecodepoetry
Copy link
Author

Add this code in functions.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment