Return to Snippet

Revision: 11865
at February 22, 2009 20:19 by lajevardi


Initial Code
function idcRankHandler($args){
	extract(shortcode_atts(array('link' => null),$args));
	$idcRef = !is_null($link) ? "http://idevcenter/link/$link" : "http://www.idevcenter.com/links/post/?url=".$hold=rawurlencode(get_permalink($post->ID));
	return '<a href="'.$idcRef .'" class="idcRankAnchor">'
					.'<img src="http://idevcenter.com/links/image?url='.$hold
					.'" title="Vote on iDevCenter.com" alt="Vote on iDevCenter.com" class="idcRankImage" />
				</a>';
} 
add_shortcode("idc","idcRankHandler"); //Attaching iDC handler

Initial URL


Initial Description
Shortcode to insert iDevCenter.com rank in a WP blog post.

Initial Title
iDC WordPress Shortcode

Initial Tags
wordpress

Initial Language
PHP