Simple Image Widget
the_content filter on the text (2 posts)

  1. katazina
    Posted 2 years ago #


    this is not so good idea to use a filter named "the_content" which is in use by wordpress also.
    Now I added something on the "the_content" filter, but it showed up on the image widget as well, because of the same filter name.

    This is the line in your files:
    $output .= apply_filters( 'the_content', $instance['text'] );
    You should use another name for it.


  2. Brady Vercher
    Plugin Author

    Posted 2 years ago #

    It's fairly common to use the_content filter outside the loop to apply formatting and sanitize text.

    If you do use it for appending text to posts, you may want to look into in_the_loop() or other ways to limit the context in which it's applied. You can find more information about this filter here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Image Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic