Skip to:

Re: Which filter/action hook should I use?



To change text you either have to use “pre_post” which is a permanent change saved back to the database (ie. auto close tags) or “post_text” which only affects the outputted text and leaves the source alone (ie. smilies typically use this cause you don’t want the image tags back into the text upon re-editing).

IMHO “post_text” is an “expensive” operation in that it has to be generated on the text each and every time it’s displayed but sometimes there is no other choice.

If you are asking how to automatically insert the button, that’s very tricky because somethings still don’t have hooks in bbpress, ie.

(ironically that’s where I’d put a quote button)

The trick is to start a new post with the old text as a quote. I have no idea how that would be done in bbpress because I don’t think you can have existing text on a new post, old an old one, and you really don’t want to pre-create a post in case the user cancels.

I’d love to see this plugin happen, I just don’t know enough to help you more – hope someone else can help.

ps please make it trim the old post for people who like to quote posts, who quote posts, who quote posts and it ends up being 10 pages long, LOL!

Skip to toolbar