- LRH Enterprises - http://lrh.net/wpblog_lrh -

WP Widget: Conditional Text

My latest WordPress widget is a simple text display. Currently a single widget lets you show text based on one or more conditions:

There is also a rudimentary format control where you can specify how the text is processed for output:

It’s easily expandable to handle other formats or conditions. Conditions are especially easy, because I just create a new ‘condition tester’ class and register it with the widget.