'#',
'target' => '_self',
'position' => 'left'
), $atts));
$out = "".do_shortcode($content)." ";
return $out;
}
add_shortcode('button-brown', 'mnm_button_brown');
function mnm_button_blue( $atts, $content = null ) {
extract(shortcode_atts(array(
'url' => '#',
'target' => '_self',
'position' => 'left'
), $atts));
$out = "".do_shortcode($content)." ";
return $out;
}
add_shortcode('button-blue', 'mnm_button_blue');
function mnm_button_green( $atts, $content = null ) {
extract(shortcode_atts(array(
'url' => '#',
'target' => '_self',
'position' => 'left'
), $atts));
$out = "".do_shortcode($content)." ";
return $out;
}
add_shortcode('button-green', 'mnm_button_green');
function mnm_button_red( $atts, $content = null ) {
extract(shortcode_atts(array(
'url' => '#',
'target' => '_self',
'position' => 'left'
), $atts));
$out = "".do_shortcode($content)." ";
return $out;
}
add_shortcode('button-red', 'mnm_button_red');
function mnm_button_white( $atts, $content = null ) {
extract(shortcode_atts(array(
'url' => '#',
'target' => '_self',
'position' => 'left'
), $atts));
$out = "".do_shortcode($content)." ";
return $out;
}
add_shortcode('button-white', 'mnm_button_white');
function mnm_button_yellow( $atts, $content = null ) {
extract(shortcode_atts(array(
'url' => '#',
'target' => '_self',
'position' => 'left'
), $atts));
$out = "".do_shortcode($content)." ";
return $out;
}
add_shortcode('button-yellow', 'mnm_button_yellow');
/*-----------------------------------------------------------------------------------*/
/* Alert Shortcodes
/*-----------------------------------------------------------------------------------*/
function mnm_alert_note( $atts, $content = null ) {
extract(shortcode_atts(array(
'style' => 'note'
), $atts));
$out = "
".do_shortcode($content)."
";
return $out;
}
add_shortcode('alert-note', 'mnm_alert_note');
function mnm_alert_announce( $atts, $content = null ) {
extract(shortcode_atts(array(
'style' => 'announce'
), $atts));
$out = "".do_shortcode($content)."
";
return $out;
}
add_shortcode('alert-announce', 'mnm_alert_announce');
function mnm_alert_success( $atts, $content = null ) {
extract(shortcode_atts(array(
'style' => 'success'
), $atts));
$out = "".do_shortcode($content)."
";
return $out;
}
add_shortcode('alert-success', 'mnm_alert_success');
function mnm_alert_warning( $atts, $content = null ) {
extract(shortcode_atts(array(
'style' => 'warning'
), $atts));
$out = "".do_shortcode($content)."
";
return $out;
}
add_shortcode('alert-warning', 'mnm_alert_warning');
/*-----------------------------------------------------------------------------------*/
/* Column Shortcodes
/*-----------------------------------------------------------------------------------*/
function mnm_one_third( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_third', 'mnm_one_third');
function mnm_one_third_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_third_last', 'mnm_one_third_last');
function mnm_two_third( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('two_third', 'mnm_two_third');
function mnm_two_third_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('two_third_last', 'mnm_two_third_last');
function mnm_one_half( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_half', 'mnm_one_half');
function mnm_one_half_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_half_last', 'mnm_one_half_last');
function mnm_one_fourth( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_fourth', 'mnm_one_fourth');
function mnm_one_fourth_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_fourth_last', 'mnm_one_fourth_last');
function mnm_three_fourth( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('three_fourth', 'mnm_three_fourth');
function mnm_three_fourth_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('three_fourth_last', 'mnm_three_fourth_last');
function mnm_one_fifth( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_fifth', 'mnm_one_fifth');
function mnm_one_fifth_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_fifth_last', 'mnm_one_fifth_last');
function mnm_two_fifth( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('two_fifth', 'mnm_two_fifth');
function mnm_two_fifth_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('two_fifth_last', 'mnm_two_fifth_last');
function mnm_three_fifth( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('three_fifth', 'mnm_three_fifth');
function mnm_three_fifth_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('three_fifth_last', 'mnm_three_fifth_last');
function mnm_four_fifth( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('four_fifth', 'mnm_four_fifth');
function mnm_four_fifth_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('four_fifth_last', 'mnm_four_fifth_last');
function mnm_one_sixth( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_sixth', 'mnm_one_sixth');
function mnm_one_sixth_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('one_sixth_last', 'mnm_one_sixth_last');
function mnm_five_sixth( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('five_sixth', 'mnm_five_sixth');
function mnm_five_sixth_last( $atts, $content = null ) {
return '' . do_shortcode($content) . '
';
}
add_shortcode('five_sixth_last', 'mnm_five_sixth_last');
/*-----------------------------------------------------------------------------------*/
/* Video Shortcodes
/*-----------------------------------------------------------------------------------*/
function mnm_youtube_video( $atts, $content = null ) {
extract(shortcode_atts( array(
'id' => '',
'width' => '600',
'height' => '340',
'position' => 'left'
), $atts));
$out = "VIDEO
";
return $out;
}
add_shortcode('youtube', 'mnm_youtube_video');
function mnm_vimeo_video( $atts, $content = null ) {
extract(shortcode_atts( array(
'id' => '',
'width' => '600',
'height' => '340',
'position' => 'left'
), $atts));
$out = "
";
return $out;
}
add_shortcode('vimeo', 'mnm_vimeo_video');
/*-----------------------------------------------------------------------------------*/
/* GoogleMaps Shortcode
/*-----------------------------------------------------------------------------------*/
function mnm_googleMaps($atts, $content = null) {
extract(shortcode_atts(array(
'width' => '640',
'height' => '480',
"src" => '',
'position' => 'left'
), $atts));
$out = "
";
return $out;
}
add_shortcode("googlemap", "mnm_googleMaps");
/*-----------------------------------------------------------------------------------*/
/* Tabs
/*-----------------------------------------------------------------------------------*/
function mnm_tabs( $atts, $content = null ) {
if (!preg_match_all("/(.?)\[(tab)\b(.*?)(?:(\/))?\](?:(.+?)\[\/tab\])?(.?)/s", $content, $matches)) {
return do_shortcode($content);
} else {
for($i = 0; $i < count($matches[0]); $i++) {
$matches[3][$i] = shortcode_parse_atts($matches[3][$i]);
$tabid[$i] = 'tab-'.mt_rand(10, 100000).'-'.strtolower(str_replace(array("!","@","#","$","%","^","&","*",")","(","+","=","[","]","/","\\",";","{","}","|",'"',":","<",">","?","~","`"," "),"",$matches[3][$i]['title']));
}
$tabnav = '';
$tabcontent = '';
for($i = 0; $i < count($matches[0]); $i++) {
$tabcontent .= '
' . do_shortcode(trim($matches[5][$i])) . '
';
}
$tabcontent .= '
';
$tabwidgetid = 'tabwidget-'.mt_rand(10, 100000);
$script = '';
return '' . $tabnav . $tabcontent . '
'.$script;
}
}
add_shortcode('tabs', 'mnm_tabs');
/*--------------------------------------------------------
Toggles
--------------------------------------------------------*/
function mnm_toggle( $atts, $content = null ) {
extract(shortcode_atts(array(
'title' => 'Toggle Title'
), $atts));
return '' . $title . '
' . do_shortcode(trim($content)) . '
';
}
add_shortcode('toggle', 'mnm_toggle');
/*-----------------------------------------------------------------------------------*/
/* Divider with an anchor link to top of page.
/*-----------------------------------------------------------------------------------*/
// simple divider
function mnm_divider( $atts ) {
return '
';
}
add_shortcode('divider', 'mnm_divider');
// Divider with an anchor link to top of page.
function mnm_divider_top( $atts ) {
return '';
}
add_shortcode('divider_top', 'mnm_divider_top');
// Used to clear an element of its neighbors, no floating elements are allowed on the left or the right side.
function mnm_clear( $atts ) {
return '
';
}
add_shortcode('clear', 'mnm_clear');
?>