Skip to:
Content
Pages
Categories
Search
Top
Bottom

add_filter with activity content

  • Avatar of joeyday
    JoeyDay
    Participant

    @joeyday

    I’m trying to wrangle The Holy Scripturizer into auto-linking Bible references in my BuddyPress activity stream, using the add_filter() function to add the custom filter to the bp content functions. I have no idea what I’m doing wrong. Help!

    You can see my code here.

    This is an out-of-the-box copy of The Holy Scripturizer, which you can find here.

    I have simply added lines 1040 through 1045. The code doesn’t throw any errors, but it also doesn’t work as intended. You can see it in action here.

    What am I doing wrong?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of joeyday
    JoeyDay
    Participant

    @joeyday

    Aw, crud. Should’ve searched more before posting this. This thread helped me see that I was using the wrong filter.

    add_filter('bp_activity_content_body','scripturize');

    …should have been…

    add_filter('bp_get_activity_content_body','scripturize');

    Resolved.

    Avatar of joeyday
    JoeyDay
    Participant

    @joeyday

    Okay, another question: how can I do the same thing with forum post content now?

    I’ve tried:

    add_filter('post_text','scripturize');

    …and…

    add_filter('get_post_text','scripturize');

    …and…

    add_filter('bp_forums_get_post','scripturize');

    …and…

    add_filter('bp_forums_get_post_text','scripturize');

    …and none of these has worked. Suggestions?

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Check out the /plugins/buddypress/bp-forums/bp-forums-filter.php file

    All the default filters for forum posts can be found there.

    Avatar of joeyday
    JoeyDay
    Participant

    @joeyday

    You’re awesome. I as able to find:

    add_filter('bp_get_the_topic_post_content','scripturize');

    It worked.

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

You must be logged in to reply to this topic.