WordPress Custom Editor Quicktag Buttons

If you use WordPress for a blog, you probably use shortcodes. The wordpress editor toolbar has buttons you can click that help automate the use of shortcodes, these buttons are called Quicktag buttons.

In the past if you wanted to add your own custom quicktag buttons, you would have to create a TinyMCE Plugin, just to add your own buttons, it involved some PHP code and a Javascript file. It really wasnt too difficult but it was confusing for some people and now that WordPress version 3.3 is out, the old plugin method does not work anymore, so a lot of people have a broken Plugin and there buttons will not work with version 3.3+

Thankfully I have a solution and it is better then ever, the reason that the old method does not work is because WordPress has completely redone the system that handles these buttons and they have added a nice architecture so you can very easily create custom quicktag buttons directly from your wordpress functions file.

The code is pretty straight forward so I wont go over it, you can see below what you need to modify to add your own custom editor buttons. This is a much nicer and easier to use system them before.

NOTICE: This ONLY adds the buttons to the HTML editor, if you use the Visual editor (I dont know why you would) then this will not show up in that part of the editor, this is for the HTML editor only!

You can read more on the WordPress Codex site