aggiungere un bottone al tenymce modalità teeny
-
Ciao a tutti,
sono riuscito ad aggiungere un bottone al tinymce con questo codice:add_action ('admin_init', 'my_tinymce_button'); function my_tinymce_button() { if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) ) { add_filter( 'mce_buttons', 'my_register_tinymce_button' ); add_filter( 'mce_external_plugins', 'my_add_tinymce_button' ); } } //This callback registers our plug-in function my_add_tinymce_button( $plugin_array ) { $plugin_array['year_button_plugin'] = plugin_dir_url(__FILE__) . "index.js"; return $plugin_array; } //This callback adds our button to the toolbar function my_register_tinymce_button($buttons) { //register buttons with their id. array_push($buttons, "green"); return $buttons; } add_filter("mce_buttons", "my_register_tinymce_button");
Vorrei però aggiungerlo all’editor quando usa la versione ristretta cioè la teeny, qualcuno sa come si fa?
Grazie in anticipo
Stai visualizzando 2 risposte - dal 1 al 2 (di 2 totali)
Stai visualizzando 2 risposte - dal 1 al 2 (di 2 totali)
- Il topic ‘aggiungere un bottone al tenymce modalità teeny’ è chiuso a nuove risposte.