Advertisement
hogash

old_btns

Aug 4th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. function am_bigbutton( $atts, $content = null ) {
  2. //[big-button color="" link=""][/big-button]
  3. extract(shortcode_atts(array(
  4. "color" => 'yellow',
  5. "link" => '#'
  6. ), $atts));
  7.  
  8. return '<a href="'.$atts['link'].'" class="big-button '.$atts['color'].'">'.$content.'</a>';
  9. }
  10. add_shortcode('big-button', 'am_bigbutton');
  11.  
  12. function am_mediumbutton( $atts, $content = null ) {
  13. //[medium-button color="" link=""][/medium-button]
  14. extract(shortcode_atts(array(
  15. "color" => 'yellow',
  16. "link" => '#'
  17. ), $atts));
  18.  
  19. return '<a href="'.$atts['link'].'" class="medium-button '.$atts['color'].'">'.$content.'</a>';
  20. }
  21. add_shortcode('medium-button', 'am_mediumbutton');
  22.  
  23. //small button
  24. function am_smallbutton( $atts, $content = null ) {
  25. //[small-button color="" link=""][/small-button]
  26. extract(shortcode_atts(array(
  27. "color" => 'yellow',
  28. "link" => '#'
  29. ), $atts));
  30.  
  31. return '<a href="'.$atts['link'].'" class="small-button '.$atts['color'].'">'.$content.'</a>';
  32. }
  33. add_shortcode('small-button', 'am_smallbutton');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement