Skip to:
Content
Pages
Categories
Search
Top
Bottom

Filtering Content

  • So I’ve messed around and managed to come up with a plugin to include clickable, customed, smilies (by merging a plugin of Otto’s and one of Alex Kings). The catch is that the trick I used to filter the_content and the_excerpt and comment_text isn’t working on the wire.

    I suspect it’s a case of not knowing the right filters.

    I want to filter these:

    bp_the_topic_post_content (for group forum topics)

    bp_wire_post_content (for wire posts)

    I’ve tried this:

    add_filter('bp_wire_post_content', 'my_smilies_fixurl', 10);
    add_filter('bp_the_topic_post_content', 'my_smilies_fixurl', 30);

    with a lot of variations on 10, 30, etc, but the images never filter the way they do for the_content etc. Any ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    I haven’t looked at this at all but I’m just guessing that you might want to try referencing the newer functions whose filters use different ways to set their values:

    add_filter('bp_get_the_topic_post_content', 'my_smilies_fixurl', 30);

    add_filter('bp_get_wire_post_content', 'my_smilies_fixurl', 10);

    I have no idea if this will work.

    AHA! That worked perfectly!

    Thank you! If I can sort out how to make this easy to update without killing someone else’s custom icon, I will.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Great! Glad to hear it!

    Now, all you need to do is set the light to green and we’re good to go!

    Knew I forgot something. 0:)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Filtering Content’ is closed to new replies.