Skip to:
Content
Pages
Categories
Search
Top
Bottom

Plugin API: Adding new shortcodes to bbpress


  • jezza101
    Participant

    @jezza101

    I wanted to enable a WP shortcode I have written within bbpress, it seems the common way to do this is to use do_shortcodes($content) on the post, this works fine and I’ve seen it in a number of published plugins.

    The problem with this is that it enables all shortcodes including the bbpress ones such as login, stats etc. In fact a number of published plugins suffer from this issue (oops).

    The best solution I’ve come across is using the whitelist plugin:
    http://wordpress.org/plugins/bbpress2-shortcode-whitelist/

    But I was wondering if anyone had any other ideas?
    Could a new bbpress action for registering shortcodes be added? Then any plugin author just has to register their own new one and not have to worry.
    My other idea is to do a find/replace on “[” before my do_shortcodes call, switch them to something else, and then switch them back after, but leaving my own shortcodes unchanged.

    Anyone else had this prob? Anyone using a plugin that hasn’t taken this into consideration?! (try adding a bbpress shortcode to a post and seeing what happens!)

  • You must be logged in to reply to this topic.
Skip to toolbar