function osc_theme_sliders($params, $content = null)
{
    global $_oscitas_slider, $_oscitas_slider_counter;
    if (!count($_oscitas_slider)) {
        $_oscitas_slider = array('current_id' => 0);
    }
    ebs_session_start();
    if (!isset($_SESSION['ebs_slider_css'])) {
        $_SESSION['ebs_slider_css'] = array();
    }
    ebs_session_end();
    extract(shortcode_atts(array('id' => count($_oscitas_slider), 'class' => '', 'interval' => '', 'controls' => '', 'bullets' => '', 'pause' => '', 'wrap' => '', 'captioncolor' => '', 'navcolor' => ''), $params));
    wp_enqueue_script('ebs_fit_text', EBS_PLUGIN_URL . 'js/jquery.fittext.js');
    $_oscitas_slider[$id] = array();
    $_oscitas_slider['current_id'] = count($_oscitas_slider) - 1;
    $_oscitas_slider_slides[$_oscitas_slider['current_id']] = array();
    $bulllet_content = '';
    $scontent = do_shortcode($content);
    if (count($_oscitas_slider[$id]['bullets'])) {
        $bulllet_content = isset($_oscitas_slider[$id]['bullets']) && is_array($_oscitas_slider[$id]['bullets']) ? implode('', $_oscitas_slider[$id]['bullets']) : '';
    }
    $output = '';
    if (trim($scontent) != '' || count($_oscitas_slider[$id]['details'])) {
        $scontent = isset($_oscitas_slider[$id]['details']) && is_array($_oscitas_slider[$id]['details']) ? implode('', $_oscitas_slider[$id]['details']) : '';
        $output .= '<div id="oscitas-slider-' . $id . '" class="carousel ebs-carousel slide ' . $class . EBS_CONTAINER_CLASS . '" data-ride="carousel" data-interval="' . $interval . '" data-pause="' . $pause . '" data-wrap="' . $wrap . '">';
        if ($bullets != '') {
            $output .= ' <ol class="carousel-indicators">' . $bulllet_content . '</ol>';
        }
        $output .= ' <div class="carousel-inner ' . EBS_CONTAINER_CLASS . '" >' . $scontent;
        $output .= '</div>';
        if ($controls != '') {
            $output .= ' <a class="left carousel-control" href="#oscitas-slider-' . $id . '" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left"></span>
  </a>
  <a class="right carousel-control" href="#oscitas-slider-' . $id . '" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right"></span>
  </a>';
        }
        $output .= '</div>';
        ebs_session_start();
        $_SESSION['ebs_slider_css'][$id] = $id;
        $_SESSION['ebs_slider_each_' . $id] = "\n#oscitas-slider-{$id} a.carousel-control span{\n    color:{$navcolor};\n}\n#oscitas-slider-{$id} ol.carousel-indicators {\n    margin:0;\n}\n#oscitas-slider-{$id} ol.carousel-indicators li{\n    border-color:{$navcolor};\n    margin :1px;\n    float: left;\n}\n#oscitas-slider-{$id} ol.carousel-indicators li.active{\n    background-color:{$navcolor};\n}\n#oscitas-slider-{$id} .carousel-caption .ebs-caption{\n    color:#FFFFFF;\n    color:{$captioncolor};\n    line-height:1.5;\n    margin:0;\n    padding:0;\n}\n#oscitas-slider-{$id} .carousel-inner > .item > img,  #oscitas-slider-{$id} .carousel-inner > .item > a > img{\n    width:100%;\n}\n        ";
        ebs_session_end();
    }
    $_oscitas_slider['current_id'] -= 1;
    return $output;
}
 function osc_add_dynamic_css()
 {
     ebs_session_start();
     $_SESSION['ebs_dynamic_css'] = get_option('EBS_CUSTOM_CSS', '');
     ebs_session_end();
     wp_enqueue_style('ebs_dynamic_css', plugins_url('/styles/ebs_dynamic_css.php', __FILE__));
 }
Пример #3
0
function osc_theme_servicebox($params, $content = null)
{
    global $_ebsp_servicebox;
    extract(shortcode_atts(array('id' => count($_ebsp_servicebox), 'icon' => '', 'type' => 'icon', 'icontype' => 'glyphicon', 'icon_size' => 40, 'iconbg_size' => 100, 'iconbg_radius' => 50, 'margin_bottom' => 30, 'margin_top' => 30, 'iconbgcolor' => '#FFFFFF', 'iconcolor' => '#777777', 'headingtype' => 'h3', 'heading' => '', 'class' => '', 'readmore' => '', 'readmore_link' => '', 'readmore_text' => '', 'readmore_type' => '', 'readmorestyle' => 'default', 'readmore_bgcolor' => '', 'readmore_fgcolor' => ''), $params));
    $out = '';
    $style = '';
    $_ebsp_servicebox[$id] = array();
    $out .= '<div id="osc_servicebox_' . $id . '" class="osc_servicebox ' . $class . '">';
    if ($icon != '') {
        $out .= '<span class="' . $icontype . ' ' . $icon . ' icon_bg iconcircle"></span>';
    }
    if ($heading != '') {
        $out .= '<' . $headingtype . '>' . $heading . '</' . $headingtype . '>';
    }
    $out .= '<div class="osc_servicebox_content">';
    $out .= do_shortcode($content);
    $out .= '</div>';
    if ($readmore == 'true') {
        if ($readmore_type != '') {
            $btnclass = ' btn ' . $readmore_type;
        } else {
            $btnclass = ' osc_servicebox_readmore';
        }
        $out .= '<a href="' . $readmore_link . '" class="osc_servicebox_readmore_css' . $btnclass . '">' . $readmore_text . '</a>';
    }
    $out .= '</div>';
    if ($readmore == 'true' && $readmorestyle == 'custom') {
        $style .= '
	#osc_servicebox_' . $id . ' .osc_servicebox_readmore_css{
	color:' . $readmore_fgcolor . ';
	background-color:' . $readmore_bgcolor . ';
	}';
    }
    $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;
}