Created
February 16, 2015 01:11
-
-
Save mAAdhaTTah/20e1eae2e1a7679c8aaa to your computer and use it in GitHub Desktop.
Register TinyMCE Plugin and Button
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
add_filter( 'mce_external_plugins', 'plugin_slug_add_button' ); | |
function plugin_slug_add_button( $plugins ) { | |
$plugins['plugin_slug'] = 'path/to/editor/plugin.js'; | |
return $plugins; | |
} | |
add_filter( 'mce_buttons', 'plugin_slug_register_button' ); | |
function plugin_slug_register_button( $buttons ) { | |
array_push( $buttons, 'plugin_slug' ); | |
return $buttons; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment