Skip to content

Instantly share code, notes, and snippets.

@WerdsWords
Last active December 19, 2015 23:49
Show Gist options
  • Save WerdsWords/6037572 to your computer and use it in GitHub Desktop.
Save WerdsWords/6037572 to your computer and use it in GitHub Desktop.
#9 teeny_mce_buttons
<?php
/**
* Register a new teeny mce button for Press This
*
* @param array $buttons The teeny mce buttons array.
* @param int $editor_id The editor id.
*
* @return array The filtered teeny mce buttons.
*/
function wpdocs_teeny_mce_button( $buttons, $editor_id ) {
array_push( $buttons, 'separator', 'my_new_button' );
return $buttons;
}
add_filter( 'teeny_mce_buttons', 'wpdocs_teeny_mce_button', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment