[Resolved] Poor use of the_content filter
I’m running into an issue where this plugin is adding buttons to things it shouldn’t. I have a couple of widgets that use the the_content filter, which causes this button to appear in annoying places.
Doing some research it looks like the plugin is not being discerning enough when it comes to modifying the filter.
See this post which mentions the issue:
Looks pretty good right? Actually no, there is still a major problem with this code. The thing that you must understand and acknowledge is that the “the_content” filter may NOT only get applied when we call the_content(). Often times plugin and theme developers will use something like the following to help format their custom queries:
echo apply_filters('the_content', $custom_content_here);
Doing this will pass whatever content is stored in the $custom_content_here variable and perform all of the nice formatting that we expect with the the_content() function. This also means that our pippin_filter_content_sample() function will attach its custom content to this other text as well, and that’s not good.
A fix for this issue would be much appreciated.
- The topic ‘[Resolved] Poor use of the_content filter’ is closed to new replies.