WYSIWYG Button Manager for WordPress

Have you ever managed a large list of content authors on a WordPress site? Ever want to allow certain authors to use more advanced WYSIWYG editor functionality? Keep reading.

Problem

As most users of WordPress 2.x and 2.0.x are aware WordPress come with a very small list of the editor buttons enabled. In order to enable these other buttons you had to open a file (tiny_mce_gzip.php) and add the buttons manually. Now editing the php file is fine for most programmers or folks familiar with WordPress. but for the average user this might be a hard task. Another problem with this option is you are in fact enabling the buttons for all users. If you happen to manage a site with a large list of authors you may want to only allow more advanced WYSIWYG buttons for the authors you trust.

Solution

Announcing the beta version of the WYSIWYG Button Manager for the TinyMCE Editor that comes as part of WordPress. This plug-in allow an administrator user to define WYSIWYG Panels. Each Panel is a set of three rows of allowed buttons. Via this plug-in you can define each button row custom to the users needs. Simple.

So how does this plug-in work? All WYSIWYG Panels are stored as a data structure (array) into the wp_options table. the key for this options record is ‘WYSIWYG_button_manager_data’. when you associate the Panel with the user a new usermeta record is added to the wp_usermeta table. The key for these records are ‘WYSIWYG_panel’.

When the user goes to edit/author an entry a couple of filters are called from WordPress. These filters are ‘mce_buttons’, ‘mce_buttons2’ and ‘mce_buttons3’. If you have defined a Panel that contains any buttons then these will be used over the default WordPress buttons. Really this only overrides the first ‘mce_buttons’ since this is the only variable defined via WordPress. The second and third row are left blank.

Testing

I’ve installed this plug-in into three version of WordPress. I know this plug-in will work with version 2.0.2, 2.0.5 and the latest SVN nightly grab.

Download

The beta version of this plug-in can be downloaded here

Problems

If you use this plug-in and have any problems please do not hesitate to contact me.

Installation

Drop the unzipped file into your wp-content/plugins folder. Via the WordPress Admin interface navigate to the Plugins page. Activate the plug-in. you should see a new menu under the Manage section ‘WYSIWYG Manager’. Only Admin-level users will see this options.

Future

As mentioned this is only a beta version. It’s functional but lacks some of the ‘bling’ options in today’s web 2.0 interfaces. I’d like to provide a complete list of dragable buttons to the user and let them build the editor rows instead of needing to type in the button name. Other ideas include making this plug-in aware of external MCE plug-ins used.

About Paul Menard

Mis-placed Texas Geek now living on North Carolina. Lover of all things coding especially WordPress, Node.js, Objective-C and Swift. Love to work on interesting projects and come away with some new knowledge. Trying to keep my head on while I try to staying abreast of all the latest technologies. Lover of books and cats.