Ejemplo n.º 1
0
//include product files
require_once RS_PLUGIN_PATH . 'includes/globals.class.php';
require_once RS_PLUGIN_PATH . 'includes/operations.class.php';
require_once RS_PLUGIN_PATH . 'includes/slider.class.php';
require_once RS_PLUGIN_PATH . 'includes/output.class.php';
require_once RS_PLUGIN_PATH . 'includes/slide.class.php';
require_once RS_PLUGIN_PATH . 'includes/widget.class.php';
require_once RS_PLUGIN_PATH . 'includes/navigation.class.php';
require_once RS_PLUGIN_PATH . 'includes/template.class.php';
require_once RS_PLUGIN_PATH . 'includes/external-sources.class.php';
require_once RS_PLUGIN_PATH . 'includes/tinybox.class.php';
require_once RS_PLUGIN_PATH . 'includes/extension.class.php';
require_once RS_PLUGIN_PATH . 'public/revslider-front.class.php';
try {
    //register the revolution slider widget
    RevSliderFunctionsWP::registerWidget("RevSliderWidget");
    //add shortcode
    function rev_slider_shortcode($args, $mid_content = null)
    {
        extract(shortcode_atts(array('alias' => ''), $args, 'rev_slider'));
        extract(shortcode_atts(array('settings' => ''), $args, 'rev_slider'));
        extract(shortcode_atts(array('order' => ''), $args, 'rev_slider'));
        if ($settings !== '') {
            $settings = json_decode(str_replace(array('({', '})', "'"), array('[', ']', '"'), $settings), true);
        }
        if ($order !== '') {
            $order = explode(',', $order);
        }
        $sliderAlias = $alias != '' ? $alias : RevSliderFunctions::getVal($args, 0);
        $gal_ids = RevSliderFunctionsWP::check_for_shortcodes($mid_content);
        //check for example on gallery shortcode and do stuff