function osc_theme_tabs($params, $content = null) { global $_oscitas_tabs; extract(shortcode_atts(array('id' => count($_oscitas_tabs), 'class' => ''), $params)); $_oscitas_tabs[$id] = array(); do_shortcode($content); $scontent = '<ul class="nav nav-tabs' . EBS_CONTAINER_CLASS . '" id="oscitas-tabs-' . $id . '">' . implode('', $_oscitas_tabs[$id]['tabs']) . '</ul><div class="tab-content' . EBS_CONTAINER_CLASS . '">' . implode('', $_oscitas_tabs[$id]['panes']) . '</div>'; if (trim($scontent) != "") { $output = '<div class="' . $class . '">' . $scontent; $output .= '</div>'; return $output; } else { return ""; } } ebs_backward_compatibility_callback('tabs', 'osc_theme_tabs'); function osc_theme_tab($params, $content = null) { global $_oscitas_tabs; extract(shortcode_atts(array('title' => 'title', 'active' => ''), $params)); $index = count($_oscitas_tabs) - 1; if (!isset($_oscitas_tabs[$index]['tabs'])) { $_oscitas_tabs[$index]['tabs'] = array(); } $pane_id = 'pane-' . $index . '-' . count($_oscitas_tabs[$index]['tabs']); $_oscitas_tabs[$index]['tabs'][] = '<li class="' . $active . EBS_CONTAINER_CLASS . '"><a class="' . EBS_CONTAINER_CLASS . '" href="#' . $pane_id . '" data-toggle="tab">' . $title . '</a></li>'; $_oscitas_tabs[$index]['panes'][] = '<div class="tab-pane ' . $active . EBS_CONTAINER_CLASS . '" id="' . $pane_id . '">' . do_shortcode(trim($content)) . '</div>'; } ebs_backward_compatibility_callback('tab', 'osc_theme_tab');
ebs_session_end(); } $_oscitas_slider['current_id'] -= 1; return $output; } ebs_backward_compatibility_callback('slider', 'osc_theme_sliders'); function osc_theme_slider($params, $content = null) { global $_oscitas_slider, $_oscitas_slider_slides; $index = $_oscitas_slider['current_id']; if (!isset($_oscitas_slider_slides[$index])) { $_oscitas_slider_slides[$index] = array(); } extract(shortcode_atts(array('title' => 'title', 'image' => '', 'caption' => '', 'active' => '', 'slideid' => count($_oscitas_slider_slides[$index])), $params)); $const = get_defined_constants(); if (!empty($image)) { $_oscitas_slider[$index]['bullets'][] = '<li data-target="#oscitas-slider-' . $index . '" data-slide-to="' . $slideid . '" class="' . $active . '"></li>'; $_oscitas_slider_slides[$index][$slideid] = array(); $_oscitas_slider[$index]['details'][] = <<<EOS <div class="item {$active}{$const['EBS_CONTAINER_CLASS']}"> <img src="{$image}" > <div class="carousel-caption{$const['EBS_CONTAINER_CLASS']}"> <h3 class="ebs-caption">{$title}</h3> <p class="ebs-caption">{$caption}</p> </div> </div> EOS; } } ebs_backward_compatibility_callback('slide', 'osc_theme_slider');
} return $output; } ebs_backward_compatibility_callback('toggles', 'osc_theme_toggles'); function osc_theme_toggle($params, $content = null) { global $_oscitas_accordion; extract(shortcode_atts(array('title' => 'title', 'class' => ''), $params)); $con = do_shortcode($content); $index = count($_oscitas_accordion) - 1; $id = isset($_oscitas_accordion[$index]['details']) ? 'details-' . $index . '-' . count($_oscitas_accordion[$index]['details']) : 'details-' . $index . '-0'; $const = get_defined_constants(); $_oscitas_accordion[$index]['details'][] = <<<EOS <div class="panel panel-default{$const['EBS_CONTAINER_CLASS']}"> <div class="panel-heading{$const['EBS_CONTAINER_CLASS']}"> <h4 class="panel-title{$const['EBS_CONTAINER_CLASS']}"> <a class="accordion-toggle{$const['EBS_CONTAINER_CLASS']} collapsed" data-toggle="collapse" data-parent="#oscitas-accordion-{$index}" href="#{$id}"> {$title} </a> </h4> </div> <div id="{$id}" class="panel-collapse collapse {$class}{$const['EBS_CONTAINER_CLASS']}"> <div class="panel-body{$const['EBS_CONTAINER_CLASS']}">{$con}</div> </div> </div> EOS; } ebs_backward_compatibility_callback('toggle', 'osc_theme_toggle');
<?php function osc_theme_notification($atts, $content = null) { extract(shortcode_atts(array('type' => '', 'close' => 'false', 'class' => ''), $atts)); $type = $close == 'true' ? $type . ' alert-dismissable' : $type; $result = '<div class = "alert ' . $type . ' ' . $class . EBS_CONTAINER_CLASS . '">'; if ($close == 'true') { $result .= '<button type = "button" class = "close' . EBS_CONTAINER_CLASS . '" data-dismiss = "alert" aria-hidden = "true">× </button>'; } $result .= do_shortcode($content); $result .= '</div>'; return $result; } ebs_backward_compatibility_callback('notification', 'osc_theme_notification');
<?php /* * ********************************************************* * BUTTONS * ********************************************************* */ function osc_theme_image($params, $content = 'Label') { extract(shortcode_atts(array('src' => '', 'class' => '', 'shape' => ''), $params)); $out = ''; $out = '<img src="' . $src . '" class="' . $class . ' ' . $shape . EBS_CONTAINER_CLASS . '">'; return $out; } ebs_backward_compatibility_callback('image', 'osc_theme_image');
<?php /* * ********************************************************* * Badges * ********************************************************* */ function osc_theme_badge($params, $content = '') { extract(shortcode_atts(array('bgcolor' => '', 'color' => '', 'value' => '', 'float_right' => '', 'class' => ''), $params)); $out = ''; $content = str_replace('<br class="osc" />', '', $content); $content = str_replace('<br class="osc" />\\n', '', $content); $style = $bgcolor != '' ? 'background:' . $bgcolor . ';' : ''; $style .= $color != '' ? 'color:' . $color . ';' : ''; $style = $style != '' ? ' style="' . $style . '"' : ''; $float_right = $float_right == 'true' ? ' pull-right' : ''; $out = '<span class="badge ' . $class . $float_right . EBS_CONTAINER_CLASS . '"' . $style . '>' . $value . '</span>'; return $out; } ebs_backward_compatibility_callback('badge', 'osc_theme_badge');
<?php function osc_theme_list($params, $content = null) { extract(shortcode_atts(array('class' => ''), $params)); $content = str_replace("]<br />", ']', $content); $content = str_replace("]<br />\n", ']', $content); $content = str_replace("<br />\n[", '[', $content); return '<ul class="list-group ' . $class . EBS_CONTAINER_CLASS . '">' . do_shortcode($content) . '</ul>'; } ebs_backward_compatibility_callback('list', 'osc_theme_list'); function osc_theme_li($params, $content = null) { extract(shortcode_atts(array('type' => ''), $params)); if ($type != '') { $osc_class = '<span class="glyphicon ' . $type . '"></span> '; } else { $osc_class = ''; } return '<li class="list-group-item' . EBS_CONTAINER_CLASS . '">' . $osc_class . do_shortcode($content) . '</li>'; } ebs_backward_compatibility_callback('li', 'osc_theme_li');
$result = '<div class="panel ' . $style . ' ' . $class . EBS_CONTAINER_CLASS . '">'; $result .= do_shortcode($content); $result .= '</div>'; return $result; } ebs_backward_compatibility_callback('panel', 'osc_theme_panel'); function osc_theme_panel_footer($atts, $content = null) { $result = '<div class="panel-footer' . EBS_CONTAINER_CLASS . '">'; $result .= do_shortcode($content); $result .= '</div>'; return $result; } ebs_backward_compatibility_callback('panel-footer', 'osc_theme_panel_footer'); function osc_theme_panel_heading($atts, $content = null) { $result = '<div class="panel-heading' . EBS_CONTAINER_CLASS . '">'; $result .= do_shortcode($content); $result .= '</div>'; return $result; } ebs_backward_compatibility_callback('panel-header', 'osc_theme_panel_heading'); function osc_theme_panel_content($atts, $content = null) { $result = '<div class="panel-body' . EBS_CONTAINER_CLASS . '">'; $result .= do_shortcode($content); $result .= '</div>'; return $result; } ebs_backward_compatibility_callback('panel-content', 'osc_theme_panel_content');
} $lineheight = intval($iconbg_size) - 10; $style .= ' #osc_servicebox_' . $id . ' .iconcircle{ } #osc_servicebox_' . $id . ' span.iconcircle { color:' . $iconcolor . '; font-size:' . $icon_size . 'px; line-height:' . $lineheight . 'px; background-color:' . $iconbgcolor . '; height:' . $iconbg_size . 'px; width:' . $iconbg_size . 'px; margin-top:' . $margin_top . 'px; margin-bottom:' . $margin_bottom . 'px; border-radius:' . $iconbg_radius . '%; -moz-border-radius: ' . $iconbg_radius . '%; -webkit-border-radius: ' . $iconbg_radius . '%; -ms-border-radius: ' . $iconbg_radius . '%; -o-border-radius: ' . $iconbg_radius . '%; ; }'; ebs_session_start(); $_SESSION['ebs_servicebox_css'][] = 'ebs_servicebox_css_id_' . $id; $_SESSION['ebs_servicebox_css_id_' . $id] = $style; ebs_session_end(); wp_enqueue_style('ebs-dstyle', EBS_PLUGIN_URL . 'styles/ebs-dstyle.php'); return $out; } ebs_backward_compatibility_callback('servicebox', 'osc_theme_servicebox');
<?php /* * ********************************************************* * BUTTONS * ********************************************************* */ function osc_theme_icon($params, $content = null) { extract(shortcode_atts(array('type' => '', 'color' => '', 'class' => '', 'fontsize' => ''), $params)); if ($color != '') { $color = 'color:' . $color . ';'; } if ($fontsize != '') { $fontsize = ' font-size:' . $fontsize . 'px;'; } $iconcount = explode(' ', $type); array_filter($iconcount); if (count($iconcount) == 1) { $type = 'glyphicon ' . $type; } $out = '<i class=" ' . $type . ' ' . $class . '" style="' . $color . $fontsize . '"></i>'; return $out; } ebs_backward_compatibility_callback('icon', 'osc_theme_icon');
<?php /* * ********************************************************* * Jumbotron * ********************************************************* */ function osc_theme_jumbotron($params, $content = 'Label') { extract(shortcode_atts(array('bgcolor' => '', 'class' => ''), $params)); $out = ''; $content = str_replace('<br class="osc" />', '', $content); $content = str_replace('<br class="osc" />\\n', '', $content); $style = $bgcolor != '' ? ' style="background:' . $bgcolor . ';"' : ''; $out = '<div class="jumbotron ' . $class . EBS_CONTAINER_CLASS . '"' . $style . '>' . do_shortcode($content) . '</div>'; return $out; } ebs_backward_compatibility_callback('jumbotron', 'osc_theme_jumbotron');
<?php function osc_theme_btngrp($params, $content = null) { extract(shortcode_atts(array('style' => '', 'class' => ''), $params)); $content = str_replace("]<br />", ']', $content); $content = str_replace("]<br />\n", ']', $content); $content = str_replace("<br />\n[", '[', $content); $out = ''; if ($style == 'vertical') { $out .= '<div class="btn-group-vertical ' . $class . EBS_CONTAINER_CLASS . '">' . do_shortcode($content) . '</div>'; } elseif ($style == 'justified') { $out .= '<div class="btn-group btn-group-justified ' . $class . EBS_CONTAINER_CLASS . '">' . do_shortcode($content) . '</div>'; } else { $out .= '<div class="btn-group ' . $class . EBS_CONTAINER_CLASS . '">' . do_shortcode($content) . '</div>'; } return $out; } ebs_backward_compatibility_callback('buttongroup', 'osc_theme_btngrp');
<?php /* * ********************************************************* * BUTTONS * ********************************************************* */ function osc_theme_labels($params, $content = 'Label') { extract(shortcode_atts(array('type' => 'label-default', 'class' => ''), $params)); $out = ''; $content = str_replace("<br />", '', $content); $content = str_replace("<br />\n", '', $content); $out = '<span class="label ' . $type . ' ' . $class . EBS_CONTAINER_CLASS . '">' . do_shortcode($content) . '</span>'; return $out; } ebs_backward_compatibility_callback('label', 'osc_theme_labels');
<?php /* * ********************************************************* * BUTTONS * ********************************************************* */ function osc_theme_well($params, $content = 'Label') { extract(shortcode_atts(array('type' => '', 'class' => ''), $params)); $out = ''; $content = str_replace('<br class="osc" />', '', $content); $content = str_replace('<br class="osc" />\\n', '', $content); $out = '<div class="well ' . $type . ' ' . EBS_CONTAINER_CLASS . ' ' . $class . '">' . do_shortcode($content) . '</div>'; return $out; } ebs_backward_compatibility_callback('well', 'osc_theme_well');
<?php /* * ********************************************************* * BUTTONS * ********************************************************* */ function osc_theme_oscitasthumbnail($params, $content = 'Label') { extract(shortcode_atts(array('src' => '', 'class' => '', 'link' => '', 'border' => '', 'target' => '_self', 'alt' => ''), $params)); $out = ''; if ($border != '') { $borderClass = 'img-thumbnail'; } else { $borderClass = 'img-responsive'; } //$out = ' <div class="img-thumbnail ' . $class . '">'; if ($link != '') { $out .= '<a href="' . $link . '" target="' . $target . '">'; } $out .= '<img src="' . $src . '" class="' . $borderClass . EBS_CONTAINER_CLASS . ' oscitas-res-image" alt="' . $alt . '">'; if ($link != '') { $out .= '</a>'; } return $out; } ebs_backward_compatibility_callback('thumbnail', 'osc_theme_oscitasthumbnail');
<?php function osc_theme_iconhead($params, $content = null) { extract(shortcode_atts(array('class' => '', 'style' => '', 'type' => 'h1', 'color' => ''), $params)); $out = ''; if ($color != '') { $color = 'style="color:' . $color . ';"'; } if ($style != '') { $iconcount = explode(' ', $style); array_filter($iconcount); if (count($iconcount) == 1) { $style = 'glyphicon ' . $style; } $style = ' <span class=" ' . $style . '" ' . $color . '></span> '; } $out = '<' . $type . ' class="' . $class . EBS_CONTAINER_CLASS . '" >' . $style . do_shortcode($content) . '</' . $type . '>'; return $out; } ebs_backward_compatibility_callback('iconheading', 'osc_theme_iconhead');
$out = ''; $iconcount = array(); if ($icon) { $iconcount = explode(' ', $icon); } array_filter($iconcount); if (count($iconcount) == 1) { $icon = 'glyphicon ' . $icon; } if ($icon != '') { if ($iconcolor != '') { $iconcolor = 'style="color:' . $iconcolor . ';"'; } if ($align == 'right') { $value = $title . ' <i class="' . $icon . '" ' . $iconcolor . '></i>'; } else { $value = '<i class="' . $icon . '" ' . $iconcolor . '></i> ' . $title; } } else { $value = $title; } $target = ' target="' . ($target != 'false' ? '_blank' : '_self') . '"'; if ($type == 'link') { $out = '<a class="btn ' . $style . ' ' . $class . ' ' . EBS_CONTAINER_CLASS . '" href="' . $link . '" ' . $target . '>' . $value . '</a>'; } elseif ($type == 'button') { $out = '<button class="btn ' . $style . ' ' . $class . ' ' . EBS_CONTAINER_CLASS . '" >' . $value . '</button>'; } return $out; } ebs_backward_compatibility_callback('button', 'osc_theme_button');
function osc_theme_popover($params, $content = 'Popover') { extract(shortcode_atts(array('trigger' => '', 'title' => '', 'pop_content' => '', 'style' => '', 'size' => '', 'type' => '', 'class' => ''), $params)); $out = ''; $out = '<button class="osc_popover btn ' . $size . ' ' . $type . ' ' . $class . EBS_CONTAINER_CLASS . '" data-content="' . $pop_content . '" data-placement="' . $style . '" data-toggle="popover" data-trigger="' . $trigger . '" data-container="body" type="button" data-title="' . $title . '"> ' . do_shortcode($content) . ' </button>'; if (EBS_POPOVER_TEMPLATE == '') { $out .= "\n <script>\n jQuery(document).ready(function(){\n jQuery('.osc_popover').popover();\n });\n </script>\n "; } else { $out .= "\n <script>\n jQuery(document).ready(function(){\n jQuery('.osc_popover').popover({template:'" . EBS_POPOVER_TEMPLATE . "'});\n });\n </script>\n "; } return $out; } $_osc_popover_array = array('count' => 0); function osc_theme_popover_new($params, $content = '') { global $_osc_popover_array; extract(shortcode_atts(array('id' => count($_osc_popover_array), 'trigger' => '', 'title' => '', 'button_text' => 'Popover', 'style' => '', 'size' => '', 'type' => '', 'class' => ''), $params)); $_osc_popover_array[$id] = array(); $out = ''; $out = '<button class="osc_popover_new btn ' . $size . ' ' . $type . ' ' . $class . EBS_CONTAINER_CLASS . '" data-placement="' . $style . '" data-toggle="popover" data-trigger="' . $trigger . '" data-container="body" type="button" data-title="' . $title . '" data-contentwrapper="osc_popover_' . $id . '"> ' . $button_text . ' </button>'; $out .= '<div id="osc_popover_' . $id . '" style="display:none;">' . do_shortcode($content) . '</div>'; if (EBS_POPOVER_TEMPLATE == '') { $out .= "\n <script>\n jQuery(document).ready(function(){\n jQuery('.osc_popover_new').popover({\n html:true,\n content:function(){\n return jQuery('#'+jQuery(this).data('contentwrapper')).html();\n }\n\n });\n });\n </script>\n "; } else { $out .= "\n <script>\n jQuery(document).ready(function(){\n jQuery('.osc_popover_new').popover({\n template:'" . EBS_POPOVER_TEMPLATE . "',\n html:true,\n content:function(){\n return jQuery('#'+jQuery(this).data('contentwrapper')).html();\n }\n });\n });\n </script>\n "; } return $out; } ebs_backward_compatibility_callback('popover', 'osc_theme_popover'); ebs_backward_compatibility_callback('popovernew', 'osc_theme_popover_new');
<?php /* * ********************************************************* * Tooltip * ********************************************************* */ function osc_theme_tooltip($params, $content = 'Tooltip') { extract(shortcode_atts(array('type' => '', 'link' => '', 'tooltip' => '', 'style' => '', 'class' => '', 'target' => ''), $params)); $out = ''; if ($type == 'link') { $out = '<a href="' . $link . '" data-placement="' . $style . '" title="' . $tooltip . '" class="osc_tooltip ' . $class . '" target="' . $target . '">' . do_shortcode($content) . '</a> '; } elseif ($type == 'button') { $out = '<button type="button" data-toggle="tooltip" data-placement="' . $style . '" title="' . $tooltip . '" class="btn osc_tooltip ' . $class . '">' . do_shortcode($content) . '</button>'; } if (EBS_TOOLTIP_TEMPLATE == '') { $out .= "\n <script>\n jQuery(document).ready(function() {\n jQuery('.osc_tooltip').tooltip();\n });\n </script>\n "; } else { $out .= "\n <script>\n jQuery(document).ready(function(){\n jQuery('.osc_tooltip').tooltip({template:'" . EBS_TOOLTIP_TEMPLATE . "'});\n });\n </script>\n "; } return $out; } ebs_backward_compatibility_callback('tooltip', 'osc_theme_tooltip');
function osc_theme_os_table_body($params, $content = null) { $out = '<tbody>' . do_shortcode($content) . '</tbody>'; return $out; } ebs_backward_compatibility_callback('table_body', 'osc_theme_os_table_body'); function osc_theme_os_table_row($params, $content = null) { $out = '<tr>'; $out .= do_shortcode($content); $out .= '</tr>'; return $out; } ebs_backward_compatibility_callback('table_row', 'osc_theme_os_table_row'); function osc_theme_os_row_column($params, $content = null) { $out = '<td>'; $out .= do_shortcode($content); $out .= '</td>'; return $out; } ebs_backward_compatibility_callback('row_column', 'osc_theme_os_row_column'); function osc_theme_os_th_column($params, $content = null) { $out = '<th>'; $out .= do_shortcode($content); $out .= '</th>'; return $out; } ebs_backward_compatibility_callback('th_column', 'osc_theme_os_th_column');
<?php /* * ********************************************************* * BUTTONS * ********************************************************* */ function osc_theme_progressbar($params, $content = null) { extract(shortcode_atts(array('value' => '50', 'barstyle' => '', 'bartype' => '', 'class' => '', 'label' => ''), $params)); $out = $label != '' ? '<div class="osc_bar_outer"><label class="osc-progressbar-label' . EBS_CONTAINER_CLASS . '">' . $label . '</label>' : ''; $out .= '<div class="progress ' . $barstyle . ' ' . $class . ' osc-progressbar' . EBS_CONTAINER_CLASS . '"> <div class="progress-bar ' . $bartype . EBS_CONTAINER_CLASS . '" role="progressbar" aria-valuenow="' . $value . '" aria-valuemin="0" aria-valuemax="100" style="width: ' . $value . '%"> <span class="sr-only' . EBS_CONTAINER_CLASS . '">' . $value . '% Complete</span> </div> </div>'; $out .= $label != '' ? '</div>' : ''; return $out; } ebs_backward_compatibility_callback('progressbar', 'osc_theme_progressbar');
} return $out; } ebs_backward_compatibility_callback('dropdownhead', 'osc_theme_dropdown_head'); function osc_theme_dropdown_body($params, $content = null) { $content = str_replace("]<br />", ']', $content); $content = str_replace("]<br />\n", ']', $content); $content = str_replace("<br />\n[", '[', $content); $out = '<ul class="dropdown-menu' . EBS_CONTAINER_CLASS . '" role="menu">' . do_shortcode($content) . '</ul>'; return $out; } ebs_backward_compatibility_callback('dropdownbody', 'osc_theme_dropdown_body'); function osc_theme_dropdown_items($params, $content = null) { extract(shortcode_atts(array('type' => '', 'link' => '', 'disabled' => ''), $params)); $out = ''; $out = ''; if ($type == "divider") { $out = '<li class="divider' . EBS_CONTAINER_CLASS . '"></li>'; } elseif ($type == "menuitem") { if ($disabled == 'disabled') { $out = '<li class="disabled' . EBS_CONTAINER_CLASS . '"><a class="' . EBS_CONTAINER_CLASS . '" href="' . $link . '">' . do_shortcode($content) . '</a></li>'; } else { $out = '<li><a class="' . EBS_CONTAINER_CLASS . '" href="' . $link . '">' . do_shortcode($content) . '</a></li>'; } } return $out; } ebs_backward_compatibility_callback('dropdownitem', 'osc_theme_dropdown_items');
<?php function osc_theme_deslist($params, $content = null) { extract(shortcode_atts(array('class' => '', 'style' => ''), $params)); $content = str_replace("]<br />", ']', $content); $content = str_replace("]<br />\n", ']', $content); $content = str_replace("<br />\n[", '[', $content); return '<dl class="osc-deslist ' . $style . ' ' . $class . EBS_CONTAINER_CLASS . '">' . do_shortcode($content) . '</dl>'; } ebs_backward_compatibility_callback('dl', 'osc_theme_deslist'); function osc_theme_dlitem($params, $content = null) { extract(shortcode_atts(array('heading' => ''), $params)); $out = '<dt>' . do_shortcode($heading) . '</dt>'; $out .= '<dd>' . do_shortcode($content) . '</dd>'; return $out; } ebs_backward_compatibility_callback('dlitem', 'osc_theme_dlitem');
<?php function osc_theme_btngrptoolbar($params, $content = null) { extract(shortcode_atts(array('style' => '', 'class' => ''), $params)); $content = str_replace("]<br />", ']', $content); $content = str_replace("]<br />\n", ']', $content); $content = str_replace("<br />\n[", '[', $content); $out = '<div class="btn-toolbar ' . $class . EBS_CONTAINER_CLASS . '" role="toolbar">' . do_shortcode($content) . '</div>'; return $out; } ebs_backward_compatibility_callback('btngrptoolbar', 'osc_theme_btngrptoolbar');