Testimonial Rotator
[resolved] Conflict with Ninja Forms (3 posts)

  1. kitchin
    Posted 2 years ago #

    see: http://wordpress.org/support/topic/duplicate-forms-shown-on-page-bug-with-slideshows
    I think the bug is in Ninja Forms, but I guess it could be a matter of opinion. The problem in many authors use the 'the_content' filter to add plugin content to pages, and it's hard to detect if the filter's being called from inside a widget or whatever (which is what Testimonial Rotator does). I think it's legit to filter excerpts with 'the_content', but if you want to be extra safe you can iterate through the default WP content filters and apply them directly, instead of using apply_filters('the_content',...).


  2. kitchin
    Posted 2 years ago #

    Fixed in Testimonial Rotator 3.4! Thanks!

    For those interested, Testimonial Rotator no longer applies "the_content" filters. Instead it calls "do_shortcodes" which comes down to a subset of "the_content" filters.
    apply_filters( 'the_content', get_the_content()
    do_shortcode(nl2br(get_the_content(' ')).

    This is great, no more problems with Ninja Forms. I still wonder what is the best way for plugins like that to use "the_content" for what is really serving special pages. I've done it myself in code. Maybe it's an OK way to do it, rather than getting into the query before the page is loaded. The technique is to add a "the_content" filter and look at post->ID to see if you want to serve up your special content. Seems simple until you notice other apply_filter's of "the_content". I think you're pretty safe with WP core itself.

  3. Hal Gatewood
    Plugin Author

    Posted 2 years ago #

    Yeah, I think plugin authors who attach into that filter need to do a good amount of filtering with is_single, is_archive, etc.

    Glad this fixed it for you. I was having more and more complaints about this one and just had to make the switch. Not sure when it will cause problems for others, but I think this is the best solution for now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Testimonial Rotator
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic