Aller au contenu
FR

Add TinyMCE WordPress Buttons by Default

Version audio de cet article

With this tutorial, we will show how to add a function which will automatically add TinyMCE WordPress buttons by default. This tutorial was created after a lot of our clients noticed the buttons had disappeared after a core WordPress update.

With this function, all of your TinyMCE buttons will be accessible in your WordPress pages and posts.

Copy/paste this function in your functions.php file:

/////////////////////////////////////////////// ENABLE ALL EDITOR ///////////////////////////////////////////////////// 
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
function enable_more_buttons($buttons) { 
	$buttons[] = 'fontselect'; $buttons[] = 'fontsizeselect'; 
	$buttons[] = 'styleselect'; $buttons[] = 'backcolor'; 
	$buttons[] = 'newdocument'; $buttons[] = 'cut'; 
	$buttons[] = 'copy'; $buttons[] = 'charmap'; 
	$buttons[] = 'hr'; $buttons[] = 'visualaid'; 
	return $buttons; 
} 

add_filter('mce_buttons_3', 'enable_more_buttons'); 


function myformatTinyMCE( $in ) { 
   $in['wordpress_adv_hidden'] = FALSE; return $in; 
}
add_filter( 'tiny_mce_before_init', 'myformatTinyMCE' ); 

Short, but very important, tutorial for managing your pages or posts.