Dec 26, 2009
WordPress
Update: Ryan has made this into a plugin — Code Comments.
Add this to your theme’s functions.php to allow readers post fragments of code in their comments (wrapped in <code>...</code>) which are automatically encoded (think of < and <)
add_filter('pre_comment_content', 'encode_code_in_comment');
function encode_code_in_comment($source) {
$encoded = preg_replace_callback('/<code>(.*?)<\/code>/ims',
create_function(
'$matches',
'$matches[1] = preg_replace(
array("/^[\r|\n]+/i", "/[\r|\n]+$/i"), "",
$matches[1]);
return "<code>" . htmlentities($matches[1]) . "</code>";'
),
$source);
if ($encoded)
return $encoded;
else
return $source;
}
Worth noting:
- Everything wrapped in
<code>...</code> is encoded.
- Line breaks after opening
<code> and before closing </code> are removed in order to avoid unnecessary <br /> tags.
#
Dec 15, 2009
Web Design
Can you think of any reason why placing article credits before the headline, like this:
<p>August 18, 2009 by Author Name</p>
<h1>Title of the Post</h1>
<p>Post body goes here.</p>
is semantically worse than moving credits after the title:
<h1>Title of the Post</h1>
<p>August 18, 2009 by Author Name</p>
<p>Post body goes here.</p>
#
Dec 14, 2009
WordPress
Tabbed Widgets plugin has been updated — fixed default javascript variables.
#
Dec 11, 2009
WordPress
I found the time to update one of my most popular plugins — Tabbed Widgets. Test it (version 0.81) and report your findings at WordPress support forum.
Your support and donations are much appreciated and encourage further updates and development.
#
Dec 6, 2009
WordPress
Ever wanted to have multiple galleries on the same post or page? Currently most of the solutions require you to manually edit gallery shortcode and add something like include="img_id_1 img_id2". Luckily, WordPress 2.9 will have this include/exclude feature built in core, but you still don’t have an easy way to select images which to include or to insert multiple galleries.
Therefore, I created a plugin called Multiple Galleries which adds checkboxes next to images in the Insert Gallery window which makes selecting images to be included in galleries fast and easy. If no checkbox is selected, all images are included.

I created this plugin because I am designing a new WordPress theme for designers, artists, architects and all of the creative types where the ability to have multiple galleries per portfolio entry is very important.
#