WordPress.org

Ready to get started?Download WordPress

Ideas

Universal content filter for widgets

  1. alanft
    Member

    It's nice to use pre-canned widgets, but sometimes you want to tweak the appearance just a teensy bit. How about instead of printing text directly in the widget function it became the norm to return the content as a string.

    The widgets.php that calls the registered function to print the widget could check to see if it conforms and has returned a string, in which case it could then run registered widget filters before ECHO-ing out the string.

    I was thinking about this because I'd like to use the ImageHeadlines plugin to do the H2 headings in all a sites widgets.

    Posted: 6 years ago #
  2. alanft
    Member

    stuff it, i can use PHP output buffering (ob_start etc) and implement this myself in a plugin.

    Posted: 6 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    2 Votes
  • Status

    This is plugin territory

Tags