Post toolbar for bbPress 2.0.
The following is about standard push buttons, not panel opening buttons. To see how a panel opening button works just view the bbpress-post-toolbar.php source.
Adding custom buttons to the toolbar is done using by making a plugin and adding a filter to hook into the button. My example below is how I added the Spoiler button to the toolbar, which is my modification of the Tiny Spoiler plugin.
Note: This isn't my only modification to Tiny Spoiler. I had to also build a function to parse the
[spoiler] shortcode inside a bbPress post.
Really, just look inside toolbar.js
testText(tag_s, tag_e)can be used to try to wrap a start- and end-tag around selected text. If there is text selected then the tag will be applied at the end of the post content wrapped around a single space.
These are filters or actions that I have made to make buttons populate the bar:
Requires: WordPress 3.1+ and bbPress 2.0+ or higher
Compatible up to: 3.2.1
Last Updated: 5 years ago
Active Installs: 900+
Got something to say? Need help?