Skip to content

Instantly share code, notes, and snippets.

@mvaneijgen
Created September 6, 2019 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvaneijgen/8ee723f25f85552cb4422260ac04fb53 to your computer and use it in GitHub Desktop.
Save mvaneijgen/8ee723f25f85552cb4422260ac04fb53 to your computer and use it in GitHub Desktop.
<?php
function add_the_table_button( $buttons ) {
array_push( $buttons, 'separator', 'table' );
return $buttons;
}
add_filter( 'mce_buttons', 'add_the_table_button' );
function add_the_table_plugin( $plugins ) {
$plugins['table'] = get_stylesheet_directory_uri() . '/tinymceplugins/table/plugin.min.js';
return $plugins;
}
add_filter( 'mce_external_plugins', 'add_the_table_plugin' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment