Posted By

Scoldy on 05/09/13


Tagged

twitter follow


Versions (?)

Follow me on twitter short code


 / Published in: PHP
 

Follow me on twitter flexible user and message Add to post [twitter username='VeronicaDjeneva']Follow me Somebody[/twitter]

  1. <?php
  2. /*
  3. Plugin Name: Twitter Shower
  4. Plugin URI: http://www.scoldy.com
  5. Discription: Simple shortcode
  6. Version: 1.0
  7. Author: Ronnie
  8. Author URI: http://www.scoldy.com
  9. */
  10.  
  11. add_shortcode('twitter', function($atts,$content) {
  12. if( !isset($atts['username'])) $atts['username'] = 'VeronicaDjeneva';
  13. if( empty($content)) $content = 'Follow me on Twitter';
  14. return '<a href="http://twitter.com/' .$atts['username'].'">' .$content.'</a>';
  15. });
  16.  
  17. ?>

Report this snippet  

You need to login to post a comment.