WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. katazina
    Member
    Posted 6 months ago #

    Hi,

    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.

    http://wordpress.org/plugins/simple-image-widget/

  2. Brady Vercher
    Member
    Plugin Author

    Posted 6 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic