Skip to content

Instantly share code, notes, and snippets.

View michaelkpate's full-sized avatar

Michael K Pate michaelkpate

View GitHub Profile
@michaelkpate
michaelkpate / mkp_comments_phrase
Created February 9, 2011 17:16
a textpattern plugin for returning a phrase based on the number of comments attached to an article
function mkp_comments_phrase($atts)
{
global $thisarticle,$comments_mode;
if (empty($thisarticle)) return;
extract(lAtts(array(
'default' => '0',
'zero' => 'Comments',
'one' => 'Comment',
'more' => 'Comments'
@michaelkpate
michaelkpate / mkp_comments_link
Created February 9, 2011 17:14
a textpattern plug for getting a simple link to article comments