Posted By

lajevardi on 02/22/09


Tagged

wordpress idevcenter shortcode


Versions (?)

iDC WordPress Shortcode (param-less)


 / Published in: PHP
 

Shortcode to insert iDevCenter.com rank in a WP blog post. it doesn't need the id parameter to be passed. (more efficient one)

  1. function idcRankHandler(){
  2. $url = rawurlencode(get_permalink($post->ID));
  3. return '<a href="http://idevcenter.com/links/vote?url='. $url .'" class="idcRankAnchor">'
  4. .'<img src="http://idevcenter.com/links/image?url='.$url
  5. .'" title="Vote on iDevCenter.com" alt="Vote on iDevCenter.com" class="idcRankImage" />
  6. </a>';
  7. } add_shortcode("idc","idcRankHandler"); //Attaching iDC handler

Report this snippet  

You need to login to post a comment.