Hijacking 'the_content' filter on every query

Running the latest WP, BuddyPress, bbPress, and RTMedia.

Our theme framework (built by me) can display content on various parts of the page (header, sidebar, footer) using ‘the_content’ filter. After updating to the latest versions of RTMedia, BuddyPress, and bbPress, and viewing the “Media” tab on a profile screen, the content of the ‘main.php’ template file is replacing all instances of ‘the_content’ filter on the page.

All other BuddyPress/bbPress pages/tabs still function normally - it’s only the “Media” tab. And this functioned properly before the updates.

What’s the deal?

Hi brettshumaker

You will need to remove below filter in your theme’s functions.php file.

add_filter( 'the_content', array( &$this, 'rt_replace_the_content' ) );

Here is the link which will guide, how you can remove a filter of an anonymous object -> http://wordpress.stackexchange.com/questions/57079/how-to-remove-a-filter-that-is-an-anonymous-object

Thank you

Hi - thanks for the reply! I should have specified that I do, in fact, have it working properly by removing the filter (before my other content is processed) and then adding it back (after my other content is processed). Although, I do get a PHP Strict Standards warning when trying to re-add the filter.

But I was really just trying to point out that something in the way this plugin interacts with BuddyPress/bbPress has recently changed. And also that the plugin developers could do more to make the instance of the RTMedia class(es) more accessible. Some plugin devs opt for creating a global instance of their class, while others follow this approach.

Either way, my particular case is working fine, I just wanted to bring this to your attention. :slight_smile: