'no',
'footer' => 'no',
'type' => 'default',
), $atts )
);
// Code
//make sure the panel type is a valid styled type if not revert to default
$panel_types = array('primary','success','info','warning','danger','default');
$type = in_array($type, $panel_types)? $type: 'default';
//start panel markup
$output = '
';
//check if pannel has a header
if ('no' != $header)
$output .= '
'.$header.'
';
//add panel body content and allow shortcode in it
$output .= '
'.trim(do_shortcode( $content )).'
';
//check if pannel has a footer
if ('no' != $footer)
$output .= '';
//add closing div tag
$output .= '
';
//return shortcode output
return $output;
}
add_shortcode( 'bs3_panel', 'shortcode_handler' );