'theme-1', // theme-1, theme-2, theme-3
'plan_name' => 'Plan Name', // For theme 1 & 3
'price' => '4',
'currency' => '$',
'period' => 'Per Month',
'btn_text' => 'Buy Now',
'btn_url' => 'http://wpbean.com/plugins/',
'features' => 'Responsive design, Free update & support, Three different theme, Advance settings', // comma seperated different features
'highlight' => '', // yes or empty
'color' => '',
), $atts));
if( isset($features) && !empty($features) ){
$features = explode(',', $features);
}
if( isset($highlight) && !empty($highlight) ){
$highlight = 'wpb-highlighted-plan';
}
ob_start();
?>
>
'.$currency.$price.'' : '' );?>
'.$period.'' : '' );?>
>
'.$period.'' : '' );?>
'.$currency.''.$price.'' : '' );?>
'.$feature.'';
}
}
?>
'.$btn_text.'' : '' ); ?>
>
'.$price.''.$currency.'
' : '' );?>
'.$period.'' : '' );?>
'', // color code
'primary_color' => '#e74c3c', // Primary color code
), $atts));
$output = '';
if( $bg && !empty($bg) ){
$output .= '
';
}
$output .= wpb_apt_remove_wpautop($content);
if( $bg && !empty($bg) ){
$output .='
';
}
$output .='';
$output .='
';
return $output;
}
add_shortcode('wpb-row','wpb_apt_row_function');
/* ==========================================================================
Column shortcode function
========================================================================== */
function wpb_apt_col_function($atts, $content = null){
extract(shortcode_atts(array(
'col' => '4',
), $atts));
$output = ''.wpb_apt_remove_wpautop($content).'
';
return $output;
}
add_shortcode('wpb-column','wpb_apt_col_function');
/* ==========================================================================
remove auto P tag
========================================================================== */
function wpb_apt_remove_wpautop( $content, $autop = false ) {
if ( $autop ) { // Possible to use !preg_match('('.WPBMap::getTagsRegexp().')', $content)
$content = wpautop( preg_replace( '/<\/?p\>/', "\n", $content ) . "\n" );
}
return do_shortcode( shortcode_unautop( $content) );
}
/* ==========================================================================
remove br tags form shortcode
========================================================================== */
function wpb_the_content_unautop($content) {
$block = join("|",array("wpb-row", "wpb-column"));
$rep = preg_replace("/()?\[($block)(\s[^\]]+)?\](<\/p>|
)?/","[$2$3]",$content);
$rep = preg_replace("/(
)?\[\/($block)](<\/p>|
)?/","[/$2]",$rep);
return $rep;
}
add_filter("the_content", "wpb_the_content_unautop");