This old code was literally a 5-minute fix to a problem a friend was having on his website. He wanted a lightweight option for an expanding blind that would reveal "hidden" content. It was literally written and posted via my Nokia E72 (back when they were cutting-edge) while I was a passenger in a car.
We've just revisited this code ourselves because we want to print the change log under each download. Rather than display it by default we'll provide an opening and closing blind for those that are interested. Consistent with our new mantra of simple design, this shortcode feature more than meets our needs.
[ Show content ]
■ ■ ■
Shortcode used is in the following format:
[blind text="Add Your Link Text Here"]Your Content is here (wrapped in blind tags).[/blind].
text attribute is optional. If you have default link text, you only need to use the opening and closing
Copy and paste the WordPress function into your theme's
functions.php file or, if you sensibly have one installed, your custom functions plugin. You may optionally download and install our plugin from the bottom of of the page.
- We're looking forward to revisiting this in the future in an attempt to clean it up and make it a little fancy.
- The plugin below displays JS and CSS inline. The operation of checking for the shortcode in the post text (to determine if we load the CSS and JS) was more expensive than just serving it.
- While multiple instances of the blind may be used on the same page, it's a
badterrible idea. To avoid the CSS and JS loading for each blind, copy the relevant code into your custom functions file. We wrote it so we could use it once on every page.