Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pp_button($atts, $content = null) {
- extract(shortcode_atts(array(
- "url" => '',
- "color" => 'color',
- "customcolor" => '',
- "size" => 'medium',
- "iconcolor" => 'white',
- "icon" => '',
- "target"=> '_self',
- ), $atts));
- $output = '<a target="'.$target.'" class="button '.$size.' '.$color.'" href="'.$url.'" ';
- if(!empty($customcolor)) { $output .= 'style="background-color:'.$customcolor.'"'; }
- $output .= '>';
- if(!empty($icon)) { $output .= '<i class="'.$icon.' mini-'.$iconcolor.'"></i>'; }
- $output .= $content.'</a>';
- return $output;
- }
- add_shortcode('button', 'pp_button');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement