public function load() { if (defined('WPCF7_VERSION') && (vc_is_frontend_ajax() || vc_is_frontend_editor())) { require_once WPCF7_PLUGIN_DIR . '/includes/controller.php'; function_exists('wpcf7_add_shortcodes') && wpcf7_add_shortcodes(); } }
public function init() { add_action('wp_ajax_wpb_show_edit_form', array(&$this, 'build')); if (vc_is_frontend_ajax()) { add_filter('vc_single_param_edit', array(&$this, 'changeFrontendEditFormFieldParams')); add_filter('vc_edit_form_class', array(&$this, 'changeFrontendEditFormParams')); } }
/** * @since 4.3 */ public function buildShortcode() { if (class_exists('RevSlider')) { vc_lean_map('rev_slider_vc', array($this, 'addShortcodeSettings')); if (vc_is_frontend_ajax() || vc_is_frontend_editor()) { add_filter('vc_revslider_shortcode', array(&$this, 'setId')); } } }
/** * Add shortcode and filters for layerslider id * @since 4.3 */ public function buildShortcode() { if (!class_exists('LS_Sliders')) { include_once LS_ROOT_PATH . '/classes/class.ls.sliders.php'; } $ls = LS_Sliders::find(array('limit' => 999, 'order' => 'ASC')); $layer_sliders = array(); if (!empty($ls)) { foreach ($ls as $slider) { $layer_sliders[$slider['name']] = $slider['id']; } } else { $layer_sliders[__('No sliders found', 'js_composer')] = 0; } vc_map(array('base' => 'layerslider_vc', 'name' => __('Layer Slider', 'js_composer'), 'icon' => 'icon-wpb-layerslider', 'category' => __('Content', 'js_composer'), 'description' => __('Place LayerSlider', 'js_composer'), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('LayerSlider ID', 'js_composer'), 'param_name' => 'id', 'admin_label' => true, 'value' => $layer_sliders, 'description' => __('Select your LayerSlider.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))))); // Load layer slider shortcode && change id if (vc_is_frontend_ajax() || vc_is_frontend_editor()) { add_filter('vc_layerslider_shortcode', array(&$this, 'setId')); } }
public function buildShortcode() { if (is_plugin_active('revslider/revslider.php')) { global $wpdb; $rs = $wpdb->get_results("\n SELECT id, title, alias\n FROM " . $wpdb->prefix . "revslider_sliders\n ORDER BY id ASC LIMIT 999\n "); $revsliders = array(); if ($rs) { foreach ($rs as $slider) { $revsliders[$slider->title] = $slider->alias; } } else { $revsliders[__('No sliders found', 'js_composer')] = 0; } vc_map(array('base' => 'rev_slider_vc', 'name' => __('Revolution Slider', 'js_composer'), 'icon' => 'icon-wpb-revslider', 'category' => __('Content', 'js_composer'), 'description' => __('Place Revolution slider', 'js_composer'), "params" => array(array('type' => 'textfield', 'heading' => __('Widget title', 'js_composer'), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', 'js_composer')), array('type' => 'dropdown', 'heading' => __('Revolution Slider', 'js_composer'), 'param_name' => 'alias', 'admin_label' => true, 'value' => $revsliders, 'description' => __('Select your Revolution Slider.', 'js_composer')), array('type' => 'textfield', 'heading' => __('Extra class name', 'js_composer'), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'js_composer'))))); } // if revslider plugin active if (vc_is_frontend_ajax() || vc_is_frontend_editor()) { add_filter('vc_revslider_shortcode', array(&$this, 'setId')); } }
/** * @since 4.3 */ public function buildShortcode() { if (class_exists('RevSlider')) { $slider = new RevSlider(); $arrSliders = $slider->getArrSliders(); $revsliders = array(); if ($arrSliders) { foreach ($arrSliders as $slider) { /** @var $slider RevSlider */ $revsliders[$slider->getTitle()] = $slider->getAlias(); } } else { $revsliders[__('No sliders found', 'js_composer')] = 0; } // add shortcode to visual composer $this->mapShortcode($revsliders); // Add fixes for frontend editor to regenerate id if (vc_is_frontend_ajax() || vc_is_frontend_editor()) { add_filter('vc_revslider_shortcode', array(&$this, 'setId')); } } }
public function buildShortcode() { if (is_plugin_active('LayerSlider/layerslider.php')) { global $wpdb; $ls = $wpdb->get_results("\n SELECT id, name, date_c\n FROM " . $wpdb->prefix . "layerslider\n WHERE flag_hidden = '0' AND flag_deleted = '0'\n ORDER BY date_c ASC LIMIT 999\n "); $layer_sliders = array(); if ($ls) { foreach ($ls as $slider) { $layer_sliders[$slider->name] = $slider->id; } } else { $layer_sliders[__('No sliders found', LANGUAGE_ZONE)] = 0; } vc_map(array('base' => 'layerslider_vc', 'name' => __('Layer Slider', LANGUAGE_ZONE), 'icon' => 'icon-wpb-layerslider', 'category' => __('Content', LANGUAGE_ZONE), 'description' => __('Place LayerSlider', LANGUAGE_ZONE), 'params' => array(array('type' => 'textfield', 'heading' => __('Widget title', LANGUAGE_ZONE), 'param_name' => 'title', 'description' => __('Enter text which will be used as widget title. Leave blank if no title is needed.', LANGUAGE_ZONE)), array('type' => 'dropdown', 'heading' => __('LayerSlider ID', LANGUAGE_ZONE), 'param_name' => 'id', 'admin_label' => true, 'value' => $layer_sliders, 'description' => __('Select your LayerSlider.', LANGUAGE_ZONE)), array('type' => 'textfield', 'heading' => __('Extra class name', LANGUAGE_ZONE), 'param_name' => 'el_class', 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', LANGUAGE_ZONE))))); // Load layer slider shortcode && change id if (vc_is_frontend_ajax() || vc_is_frontend_editor()) { include LS_ROOT_PATH . '/wp/shortcodes.php'; add_filter('vc_layerslider_shortcode', array(&$this, 'setId')); } } // if layer slider plugin active }