$bg_color,
'color' => $text_color,
)
);
// Button keys that will be parsed
$btn_prefixes = array( 'btn' );
if ( $second_button ) {
$btn_prefixes[] = 'btn2';
}
// Preparing buttons
$buttons = array();
foreach ( $btn_prefixes as $prefix ) {
if ( empty( ${$prefix . '_label'} ) ) {
continue;
}
$icon_html = '';
$btn_classes = ' us-btn-style_' . ${$prefix . '_style'};
if ( ! isset( ${$prefix . '_size'} ) OR trim( ${$prefix . '_size'} ) == ( us_get_option( 'body_fontsize' ) ) ) {
${$prefix . '_size'} = '';
}
$btn_inline_css = us_prepare_inline_css(
array(
'font-size' => ${$prefix . '_size'},
)
);
if ( ! empty( ${$prefix . '_icon'} ) ) {
$btn_classes .= ' icon_at' . ${$prefix . '_iconpos'};
$icon_html = us_prepare_icon_tag( ${$prefix . '_icon'} );
}
$btn_link_atts = us_generate_link_atts( ${$prefix . '_link'} );
$buttons[ $prefix ] = '';
$buttons[ $prefix ] .= ( ${$prefix . '_iconpos'} == 'left' ) ? $icon_html : '';
$buttons[ $prefix ] .= '' . strip_tags( ${$prefix . '_label'}, '
' ) . '';
$buttons[ $prefix ] .= ( ${$prefix . '_iconpos'} == 'right' ) ? $icon_html : '';
$buttons[ $prefix ] .= '';
}
// Output the element
$output = '
' . do_shortcode( $content ) . '
'; } $output .= '