'.do_shortcode($content).'';
}
add_shortcode('linkbutton', 'tempt_link_button');
// Alert
function tempt_alert( $atts, $content = null ){
return '
' .do_shortcode($content). '
';
}
add_shortcode('alert', 'tempt_alert');
// Info
function tempt_info( $atts, $content = null ){
return '' .do_shortcode($content). '
';
}
add_shortcode('info', 'tempt_info');
// Check
function tempt_check( $atts, $content = null ){
return '' .do_shortcode($content). '
';
}
add_shortcode('check', 'tempt_check');
// Uncheck
function tempt_uncheck( $atts, $content = null ){
return '' .do_shortcode($content). '
';
}
add_shortcode('uncheck', 'tempt_uncheck');
// Infobox
function tempt_infobox( $atts, $content = null ){
return '' .do_shortcode($content). '
';
}
add_shortcode('infobox', 'tempt_infobox');
// Hightlight
function tempt_highlight( $atts, $content = null ){
extract( shortcode_atts( array(
'color' => 'red',
), $atts ) );
return '
' .do_shortcode($content). '';
}
add_shortcode('highlight', 'tempt_highlight');
// clear
function tempt_clear() {
return '';
}
add_shortcode( 'clear', 'tempt_clear' );
// clear
function tempt_divider() {
return '';
}
add_shortcode( 'divider', 'tempt_divider' );
// COLUMNS
//////////////////////////////////////////////////////////////////////
// One Third
function tempt_one_third( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_third', 'tempt_one_third');
function tempt_one_third_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_third_last', 'tempt_one_third_last');
// Two Third
function tempt_two_third( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('two_third', 'tempt_two_third');
function tempt_two_third_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('two_third_last', 'tempt_two_third_last');
// One Half
function tempt_one_half( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_half', 'tempt_one_half');
function tempt_one_half_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_half_last', 'tempt_one_half_last');
// One Fourth
function tempt_one_fourth( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_fourth', 'tempt_one_fourth');
function tempt_one_fourth_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_fourth_last', 'tempt_one_fourth_last');
// One Fifth
function tempt_one_fifth( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_fifth', 'tempt_one_fifth');
function tempt_one_fifth_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_fifth_last', 'tempt_one_fifth_last');
// One sixth
function tempt_one_sixth( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_sixth', 'tempt_one_sixth');
function tempt_one_sixth_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_sixth_last', 'tempt_one_sixth_last');
// TABS
//////////////////////////////////////////////////////////////////////
function tempt_tabgroup( $atts, $content ){
$GLOBALS['tab_count'] = 0;
do_shortcode( $content );
if( is_array( $GLOBALS['tabs'] ) ){
foreach( $GLOBALS['tabs'] as $tab ){
$tabs[] = ''.$tab['title'].'';
$panes[] = ''.$tab['content'].'';
}
$return = "\n".''.implode( "\n", $tabs ).'
'."\n".'
'.implode( "\n", $panes ).'
'."\n";
}
return $return;
}
add_shortcode( 'tabgroup', 'tempt_tabgroup' );
function tempt_tab( $atts, $content ){
extract(shortcode_atts(array(
'title' => '%d',
'id' => '%d'
), $atts));
$x = $GLOBALS['tab_count'];
$GLOBALS['tabs'][$x] = array(
'title' => sprintf( $title, $GLOBALS['tab_count'] ),
'content' => do_shortcode($content),
'id' => $id );
$GLOBALS['tab_count']++;
}
add_shortcode( 'tab', 'tempt_tab' );
// TOGGLE
//////////////////////////////////////////////////////////////////////
function tempt_toggle( $atts, $content = null ) {
extract(shortcode_atts(array(
'title' => '',
'style' => 'list'
), $atts));
$output = '' .$title. '
';
$output .= '
';
$output .= do_shortcode($content);
$output .= '
';
return $output;
}
add_shortcode('toggle', 'tempt_toggle');