File: //home/globfdxw/diasporameetsafrica.com/wp-content/plugins/lavelo-core/kc/shortcodes/cta/cta.php
<?php
/* ==========================================================
Accordion Info
=========================================================== */
if ( !function_exists('lavelo_cta_shortcode_function')) {
function lavelo_cta_shortcode_function( $atts, $content = true ) {
extract($atts);
$e_uniqid = uniqid();
$inline_style = '';
if ( $title_color || $title_size ) {
$inline_style .= '.welcome-area-'. $e_uniqid .'.welcome-area .welcome-content h2 {';
$inline_style .= ( $title_color ) ? 'color:'. $title_color .';' : '';
$inline_style .= ( $title_size ) ? 'font-size:'.lavelo_core_check_px($title_size) .';' : '';
$inline_style .= '}';
}
if ( $desc_color || $desc_size ) {
$inline_style .= '.welcome-area-'. $e_uniqid .'.welcome-area .welcome-content p {';
$inline_style .= ( $desc_color ) ? 'color:'. $desc_color .';' : '';
$inline_style .= ( $desc_size ) ? 'font-size:'.lavelo_core_check_px($desc_size) .';' : '';
$inline_style .= '}';
}
if ( $btn_size || $btn_color || $btn_bg) {
$inline_style .= '.page-wrapper .welcome-area-'. $e_uniqid .'.welcome-area .welcome-content .btn a {';
$inline_style .= ( $btn_color ) ? 'color:'. $btn_color .';' : '';
$inline_style .= ( $btn_bg ) ? 'background-color:'. $btn_bg .';' : '';
$inline_style .= ( $btn_size ) ? 'font-size:'.lavelo_core_check_px($btn_size) .';' : '';
$inline_style .= '}';
}
if ( $btn_hover_bg ) {
$inline_style .= '.page-wrapper .welcome-area-'. $e_uniqid .'.welcome-area .welcome-content .btn a:hover {';
$inline_style .= ( $btn_hover_bg ) ? 'background-color:'. $btn_hover_bg .';' : '';
$inline_style .= '}';
}
// add inline style
add_inline_style( $inline_style );
$styled_class = ' welcome-area-'. $e_uniqid.' ';
ob_start(); ?>
<div class="welcome-area <?php echo esc_attr( $styled_class.$class ); ?>">
<div class="welcome-content">
<?php if ( $title ) { ?>
<h2><?php echo esc_html( $title ); ?></h2>
<?php } if ( $desc ) { ?>
<p><?php echo esc_html( $desc ); ?></p>
<?php } ?>
<div class="btn"><a href="<?php echo esc_url( $link ); ?>"><?php echo esc_html( $link_text ); ?></a></div>
<div class="btn"><a class="popup-gmaps" href="<?php echo esc_url( $link2 ); ?>"><?php echo esc_html( $link_text2 ); ?></a></div>
</div>
</div>
<?php return ob_get_clean();
}
}
add_shortcode( 'reg_cta', 'lavelo_cta_shortcode_function' );