'', 'class' =>'', 'style' =>'', 'border_color' =>'', 'border_width' =>'0', 'border_position' =>'left', 'background_color' =>'', 'button_color' =>'', 'button_link' =>'#', 'button_icon' =>'', 'button_text' =>'', 'button_text_color' =>'', ), $args ); extract( $defaults ); self::$args = $defaults; if(is_numeric($border_width)) $border_width = $border_width.'px'; $uniq_class = uniqid('promo_box-'); $action_class = uniqid('promo-action-'); $class .= ' '.$uniq_class; $html = ''; if($button_text == ''){ $html .= '' ; } $textstyle = sprintf('.'.$uniq_class.'.boxed{border-'.esc_attr($border_position).'-width: %s; background-color:%s;border-'.esc_attr($border_position).'-color:%s;}',$border_width,$background_color,$border_color); $css_style = ''; if( $button_color !='' ) $css_style .=sprintf('.'.$uniq_class.' .promo-action a{background-color:%s;',$button_color); if($button_text_color !='') $css_style .=sprintf('.'.$uniq_class.' .promo-action a{color:%s;',$button_text_color); if( $style == 'boxed'){ $class .= ' boxed'; $html .= sprintf( '', $textstyle); } if( $css_style !='' ) $html .= sprintf( '', $css_style); $html .= '
'. do_shortcode( Magee_Core::fix_shortcodes($content)).'
'; if( stristr($button_icon,'fa-')): $html .= ''; else: $html .= ''; endif; $html .= esc_attr($button_text).'
'; return $html; } } new Magee_Promo_Box(); endif;