예제 #1
0
파일: revslider.php 프로젝트: epiii/aros
require_once $folderIncludes . 'base_front.class.php';
//include product files
require_once $currentFolder . '/inc_php/revslider_settings_product.class.php';
require_once $currentFolder . '/inc_php/revslider_globals.class.php';
require_once $currentFolder . '/inc_php/revslider_operations.class.php';
require_once $currentFolder . '/inc_php/revslider_slider.class.php';
require_once $currentFolder . '/inc_php/revslider_output.class.php';
require_once $currentFolder . '/inc_php/revslider_slide.class.php';
require_once $currentFolder . '/inc_php/revslider_widget.class.php';
require_once $currentFolder . '/inc_php/revslider_params.class.php';
require_once $currentFolder . '/inc_php/revslider_tinybox.class.php';
require_once $currentFolder . '/inc_php/fonts.class.php';
//punchfonts
try {
    //register the revolution slider widget
    UniteFunctionsWPRev::registerWidget("RevSlider_Widget");
    //add shortcode
    function rev_slider_shortcode($args)
    {
        extract(shortcode_atts(array('alias' => ''), $args, 'rev_slider'));
        $sliderAlias = $alias != '' ? $alias : UniteFunctionsRev::getVal($args, 0);
        ob_start();
        $slider = RevSliderOutput::putSlider($sliderAlias);
        $content = ob_get_contents();
        ob_clean();
        ob_end_clean();
        // Do not output Slider if we are on mobile
        $disable_on_mobile = $slider->getParam("disable_on_mobile", "off");
        if ($disable_on_mobile == 'on') {
            $mobile = strstr($_SERVER['HTTP_USER_AGENT'], 'Android') || strstr($_SERVER['HTTP_USER_AGENT'], 'webOS') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPad') ? true : false;
            if ($mobile) {