Support » Plugin: Pinterest "Pin It" Button » Poor use of the_content filter

  • Resolved Jacob Peattie



    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.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Phil Derksen


    Hi Jacob,

    Thanks for pointing this out. Good timing as we’re in the middle of re-writing a lot of the base code for the plugin. I trust just about all of Pippin’s stuff so I’m pretty sure this will make it’s way in. Look for it in the next update.


    Thanks, that’s great to hear. Looking forward to it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Poor use of the_content filter’ is closed to new replies.