function thefox_vc_remove_cf7() { if (is_plugin_active('contact-form-7/wp-contact-form-7.php')) { vc_remove_element('contact-form-7'); // Add other elements that should be removed here } }
function stm_update_existing_shortcodes() { if (function_exists('vc_add_params')) { vc_add_params('vc_gallery', array(array('type' => 'dropdown', 'heading' => __('Gallery type', STM_DOMAIN), 'param_name' => 'type', 'value' => array(__('Image grid', STM_DOMAIN) => 'image_grid', __('Slick slider', STM_DOMAIN) => 'slick_slider', __('Slick slider 2', STM_DOMAIN) => 'slick_slider_2')), array('type' => 'textfield', 'heading' => __('Thumbnail size', STM_DOMAIN), 'param_name' => 'thumbnail_size', 'dependency' => array('element' => 'type', 'value' => array('slick_slider_2'))), array('type' => 'css_editor', 'heading' => __('Css', STM_DOMAIN), 'param_name' => 'css', 'group' => __('Design options', STM_DOMAIN)))); vc_add_params('vc_column_inner', array(array('type' => 'column_offset', 'heading' => __('Responsiveness', 'js_composer'), 'param_name' => 'offset', 'group' => __('Width & Responsiveness', 'js_composer'), 'description' => __('Adjust column for different screen sizes. Control width, offset and visibility settings.', 'js_composer')))); vc_add_params('vc_separator', array(array('type' => 'dropdown', 'heading' => __('Type', STM_DOMAIN), 'param_name' => 'type', 'value' => array(__('Type 1', STM_DOMAIN) => 'type_1', __('Type 2', STM_DOMAIN) => 'type_2')), array('type' => 'css_editor', 'heading' => __('Css', STM_DOMAIN), 'param_name' => 'css', 'group' => __('Design options', STM_DOMAIN)))); vc_add_params('vc_video', array(array('type' => 'textfield', 'heading' => __('Iframe Link', STM_DOMAIN), 'param_name' => 'link'), array('type' => 'attach_image', 'heading' => __('Preview Image', STM_DOMAIN), 'param_name' => 'image'))); vc_add_params('vc_wp_pages', array(array('type' => 'css_editor', 'heading' => __('Css', STM_DOMAIN), 'param_name' => 'css', 'group' => __('Design options', STM_DOMAIN)))); vc_add_params('vc_basic_grid', array(array('type' => 'dropdown', 'heading' => __('Gap', 'js_composer'), 'param_name' => 'gap', 'value' => array(__('0px', 'js_composer') => '0', __('1px', 'js_composer') => '1', __('2px', 'js_composer') => '2', __('3px', 'js_composer') => '3', __('4px', 'js_composer') => '4', __('5px', 'js_composer') => '5', __('10px', 'js_composer') => '10', __('15px', 'js_composer') => '15', __('20px', 'js_composer') => '20', __('25px', 'js_composer') => '25', __('30px', 'js_composer') => '30', __('35px', 'js_composer') => '35', __('40px', 'js_composer') => '40', __('45px', 'js_composer') => '45', __('50px', 'js_composer') => '50', __('55px', 'js_composer') => '55', __('60px', 'js_composer') => '60'), 'std' => '30', 'description' => __('Select gap between grid elements.', 'js_composer'), 'edit_field_class' => 'vc_col-sm-6 vc_column'))); } if (function_exists('vc_remove_param')) { vc_remove_param('vc_cta_button2', 'h2'); vc_remove_param('vc_cta_button2', 'content'); vc_remove_param('vc_cta_button2', 'btn_style'); vc_remove_param('vc_cta_button2', 'color'); vc_remove_param('vc_cta_button2', 'size'); vc_remove_param('vc_cta_button2', 'css_animation'); } if (function_exists('vc_remove_element')) { vc_remove_element("vc_cta_button"); vc_remove_element("vc_posts_slider"); vc_remove_element("vc_icon"); vc_remove_element("vc_pinterest"); vc_remove_element("vc_googleplus"); vc_remove_element("vc_facebook"); vc_remove_element("vc_tweetmeme"); } }
public function javo_vb_basic_shortcodes_trash_callback() { $javo_remove_shortcodes = array('get_items', 'vc_posts_grid'); foreach ($javo_remove_shortcodes as $element) { vc_remove_element($element); } }
/** * Removes all standard modules witch is not a port of the array $whiteList * @param array $whiteList (Standard modules to keep) */ public function enabledStdModules(array $whiteList) { foreach ($this->stdModules as $moduleName) { if (!in_array($moduleName, $whiteList)) { vc_remove_element($moduleName); } } }
/** * Visual composer theme shortcodes map * * @since 1.0.0 */ function presscore_js_composer_load_bridge() { $shortcodes_to_remove = apply_filters('presscore_js_composer_shortcodes_to_remove', array("vc_wp_search", "vc_wp_meta", "vc_wp_recentcomments", "vc_wp_calendar", "vc_wp_pages", "vc_wp_tagcloud", "vc_wp_custommenu", "vc_wp_text", "vc_wp_posts", "vc_wp_links", "vc_wp_categories", "vc_wp_archives", "vc_wp_rss", "vc_gallery", "vc_teaser_grid", "vc_button", "vc_cta_button", "vc_posts_grid", "vc_carousel", "vc_images_carousel", "vc_posts_slider", "vc_cta_button2", "vc_pie")); foreach ($shortcodes_to_remove as $shortcode) { vc_remove_element($shortcode); } require_once locate_template('/inc/shortcodes/js_composer_bridge.php'); }
public function remove_vc_shortcodes() { vc_remove_element('vc_toggle'); vc_remove_element('vc_posts_grid'); vc_remove_element('vc_gallery'); vc_remove_element('vc_images_carousel'); vc_remove_element('vc_posts_slider'); vc_remove_element('vc_carousel'); }
function wpc_theme_remove_unwanted_vc_elements() { // Array of unwanted elements to remove $remove_elements = array('vc_wp_categories', 'vc_wp_rss', 'vc_wp_text', 'vc_wp_meta', 'vc_wp_recentcomments', 'vc_wp_tagcloud', 'vc_wp_archives', 'vc_wp_calendar', 'vc_wp_pages', 'vc_wp_links', 'vc_wp_posts', 'vc_wp_search', 'vc_wp_custommenu', 'vc_cta_button', 'vc_cta_button2', 'vc_facebook', 'vc_tweetmeme', 'vc_googleplus', 'vc_pinterest', 'vc_flickr', 'vc_progress_bar', 'vc_pie', 'vc_carousel', 'vc_posts_slider', 'vc_images_carousel', 'vc_gallery', 'vc_toggle'); // Apply filters for tweaking $remove_elements = apply_filters('wpc_theme_remove_vc_elements', $remove_elements); // Remove VC elements if (is_array($remove_elements)) { foreach ($remove_elements as $remove_element) { vc_remove_element($remove_element); } } }
function rt_remove_vc_shortcodes() { //vc_remove_element( 'vc_column_text' ); //vc_remove_element( 'vc_separator' ); //vc_remove_element( 'vc_text_separator' ); //vc_remove_element( 'vc_message' ); //vc_remove_element( 'vc_facebook' ); //vc_remove_element( 'vc_tweetmeme' ); //vc_remove_element( 'vc_googleplus' ); //vc_remove_element( 'vc_pinterest' ); //vc_remove_element( 'vc_toggle' ); //vc_remove_element( 'vc_single_image' ); //vc_remove_element( 'vc_gallery' ); //vc_remove_element( 'vc_images_carousel' ); //vc_remove_element( 'vc_tabs' ); vc_remove_element('vc_tour'); //vc_remove_element( 'vc_accordion' ); //vc_remove_element( 'vc_posts_grid' ); //vc_remove_element( 'vc_carousel' ); //vc_remove_element( 'vc_posts_slider' ); //vc_remove_element( 'vc_widget_sidebar' ); //vc_remove_element( 'vc_button' ); //vc_remove_element( 'vc_cta_button' ); //vc_remove_element( 'vc_video' ); vc_remove_element('vc_gmaps'); //vc_remove_element( 'vc_raw_html' ); //vc_remove_element( 'vc_raw_js' ); //vc_remove_element( 'vc_flickr' ); //vc_remove_element( 'vc_progress_bar' ); //vc_remove_element( 'vc_pie' ); //vc_remove_element( 'contact-form-7' ); //vc_remove_element( 'rev_slider_vc' ); //vc_remove_element( 'vc_wp_search' ); //vc_remove_element( 'vc_wp_meta' ); //vc_remove_element( 'vc_wp_recentcomments' ); //vc_remove_element( 'vc_wp_calendar' ); //vc_remove_element( 'vc_wp_pages' ); //vc_remove_element( 'vc_wp_tagcloud' ); //vc_remove_element( 'vc_wp_custommenu' ); //vc_remove_element( 'vc_wp_text' ); //vc_remove_element( 'vc_wp_posts' ); //vc_remove_element( 'vc_wp_links' ); //vc_remove_element( 'vc_wp_categories' ); //vc_remove_element( 'vc_wp_archives' ); //vc_remove_element( 'vc_wp_rss' ); //vc_remove_element( 'vc_button2' ); //vc_remove_element( 'vc_cta_button2' ); }
function wt_vc_modules_remove() { /* vc_remove_element("vc_widget_sidebar"); */ vc_remove_element("vc_wp_search"); vc_remove_element("vc_wp_meta"); vc_remove_element("vc_wp_recentcomments"); vc_remove_element("vc_wp_calendar"); vc_remove_element("vc_wp_pages"); vc_remove_element("vc_wp_tagcloud"); vc_remove_element("vc_wp_custommenu"); vc_remove_element("vc_wp_text"); vc_remove_element("vc_wp_posts"); vc_remove_element("vc_wp_links"); vc_remove_element("vc_wp_categories"); vc_remove_element("vc_wp_archives"); vc_remove_element("vc_wp_rss"); vc_remove_element("vc_empty_space"); vc_remove_element("vc_custom_heading"); }
function sd_vc_remove_elements() { vc_remove_element('vc_wp_tagcloud'); vc_remove_element('vc_wp_archives'); vc_remove_element('vc_wp_calendar'); vc_remove_element('vc_wp_pages'); vc_remove_element('vc_wp_links'); vc_remove_element('vc_wp_posts'); vc_remove_element('vc_gallery'); vc_remove_element('vc_wp_rss'); vc_remove_element('vc_wp_text'); vc_remove_element('vc_wp_meta'); vc_remove_element('vc_wp_recentcomments'); vc_remove_element('vc_wp_categories'); vc_remove_element('vc_button2'); vc_remove_element('vc_cta_button2'); vc_remove_element('vc_gmaps'); vc_remove_element('vc_posts_grid'); vc_remove_element('vc_carousel'); vc_remove_element('vc_widget_sidebar'); }
function rehub_vc_remove_woocommerce() { if (is_plugin_active('woocommerce/woocommerce.php')) { vc_remove_element('woocommerce_cart'); vc_remove_element('woocommerce_checkout'); vc_remove_element('woocommerce_order_tracking'); vc_remove_element('woocommerce_my_account'); vc_remove_element('recent_products'); vc_remove_element('featured_products'); vc_remove_element('product'); vc_remove_element('products'); vc_remove_element('add_to_cart'); vc_remove_element('add_to_cart_url'); vc_remove_element('product_page'); vc_remove_element('product_category'); vc_remove_element('product_categories'); vc_remove_element('sale_products'); vc_remove_element('best_selling_products'); vc_remove_element('top_rated_products'); vc_remove_element('product_attribute'); } }
function vcex_vc_modules_remove() { vc_remove_element('vc_teaser_grid'); vc_remove_element('vc_posts_grid'); vc_remove_element('vc_posts_slider'); vc_remove_element('vc_carousel'); vc_remove_element('vc_wp_tagcloud'); vc_remove_element('vc_wp_archives'); vc_remove_element('vc_wp_calendar'); vc_remove_element('vc_wp_pages'); vc_remove_element('vc_wp_links'); vc_remove_element('vc_wp_posts'); vc_remove_element('vc_separator'); vc_remove_element('vc_gallery'); vc_remove_element('vc_button'); vc_remove_element('vc_cta_button'); vc_remove_element('vc_wp_categories'); vc_remove_element('vc_wp_rss'); vc_remove_element('vc_wp_text'); vc_remove_element('vc_wp_meta'); vc_remove_element('vc_wp_recentcomments'); vc_remove_element('vc_images_carousel'); }
vc_remove_element("vc_pie"); vc_remove_element("vc_wp_search"); vc_remove_element("vc_wp_meta"); vc_remove_element("vc_wp_archives"); vc_remove_element("vc_wp_recentcomments"); vc_remove_element("vc_wp_calendar"); vc_remove_element("vc_wp_pages"); vc_remove_element("vc_wp_tagcloud"); vc_remove_element("vc_wp_custommenu"); vc_remove_element("vc_wp_text"); vc_remove_element("vc_wp_posts"); vc_remove_element("vc_wp_links"); vc_remove_element("vc_wp_rss"); vc_remove_element("vc_wp_categories"); vc_remove_element("vc_carousel"); vc_remove_element("vc_gmaps"); } /*################################################################################### /## KraftiveComments: Custom Functions ##/ #####################################################################################*/ //getting post name and ids for slider module fields function folio_rev_sliders() { if (is_plugin_active('revslider/revslider.php')) { global $wpdb; $rs = $wpdb->get_results("\r\n\t\t\t\t SELECT id, title, alias\r\n\t\t\t\t FROM " . $wpdb->prefix . "revslider_sliders\r\n\t\t\t\t ORDER BY id ASC LIMIT 999\r\n\t\t\t\t "); $revsliders = array(); if ($rs) { foreach ($rs as $slider) { $revsliders[$slider->title] = $slider->alias; }
function etheme_VC_setup() { if (!class_exists('WPBakeryVisualComposerAbstract')) { return; } global $vc_params_list; $vc_params_list[] = 'icon'; vc_remove_element("vc_carousel"); vc_remove_element("vc_images_carousel"); vc_remove_element("vc_tour"); $target_arr = array(__("Same window", "js_composer") => "_self", __("New window", "js_composer") => "_blank"); $add_css_animation = array("type" => "dropdown", "heading" => __("CSS Animation", "js_composer"), "param_name" => "css_animation", "admin_label" => true, "value" => array(__("No", "js_composer") => '', __("Top to bottom", "js_composer") => "top-to-bottom", __("Bottom to top", "js_composer") => "bottom-to-top", __("Left to right", "js_composer") => "left-to-right", __("Right to left", "js_composer") => "right-to-left", __("Appear from center", "js_composer") => "appear"), "description" => __("Select animation type if you want this element to be animated when it enters into the browsers viewport. Note: Works only in modern browsers.", "js_composer")); // **********************************************************************// // ! Row (add anchor field) // **********************************************************************// vc_add_param('vc_row', array('type' => 'textfield', 'heading' => __('Anchor for one page navigation', 'js_composer'), 'param_name' => 'anchor')); // **********************************************************************// // ! Separator // **********************************************************************// $setting_vc_separator = array("show_settings_on_create" => true, 'params' => array(array("type" => "dropdown", "heading" => __("Type", "js_composer"), "param_name" => "type", "value" => array("", __("Default", ETHEME_DOMAIN) => "", __("Double", ETHEME_DOMAIN) => "double", __("Dashed", ETHEME_DOMAIN) => "dashed", __("Dotted", ETHEME_DOMAIN) => "dotted", __("Double Dotted", ETHEME_DOMAIN) => "double dotted", __("Double Dashed", ETHEME_DOMAIN) => "double dashed", __("Horizontal break", ETHEME_DOMAIN) => "horizontal-break", __("Space", ETHEME_DOMAIN) => "space")), array("type" => "textfield", "heading" => __("Height", "js_composer"), "param_name" => "height", "dependency" => array('element' => "type", 'value' => array('space'))), array("type" => "textfield", "heading" => __("Extra class", "js_composer"), "param_name" => "class"))); vc_map_update('vc_separator', $setting_vc_separator); function vc_theme_vc_separator($atts, $content = null) { $output = $color = $el_class = $css_animation = ''; extract(shortcode_atts(array('type' => '', 'class' => '', 'height' => ''), $atts)); $output .= do_shortcode('[hr class="' . $type . ' ' . $class . '" height="' . $height . '"]'); return $output; } // **********************************************************************// // ! Alert boxes // **********************************************************************// function vc_theme_vc_message($atts, $content = null) { $output = $color = $el_class = $css_animation = ''; extract(shortcode_atts(array('color' => 'alert-info', 'el_class' => '', 'css_animation' => ''), $atts)); $color = $color != '' ? ' ' . $color : ''; $css_class = $color . $el_class; $css_class .= getCSSAnimation($css_animation); $output .= '<div class="' . $css_class . '">' . wpb_js_remove_wpautop($content) . '<span class="close-parent"></span></div>'; return $output; } // **********************************************************************// // ! FAQ toggle elements // **********************************************************************// $toggle_params = array("name" => __("FAQ", "js_composer"), "icon" => "icon-wpb-toggle-small-expand", "category" => __('Content', 'js_composer'), "description" => __('Toggle element for Q&A block', 'js_composer'), "params" => array(array("type" => "textfield", "holder" => "h4", "class" => "toggle_title", "heading" => __("Toggle title", "js_composer"), "param_name" => "title", "value" => __("Toggle title", "js_composer"), "description" => __("Toggle block title.", "js_composer")), array("type" => "textarea_html", "holder" => "div", "class" => "toggle_content", "heading" => __("Toggle content", "js_composer"), "param_name" => "content", "value" => __("<p>Toggle content goes here, click edit button to change this text.</p>", "js_composer"), "description" => __("Toggle block content.", "js_composer")), array("type" => "dropdown", "heading" => __("Default state", "js_composer"), "param_name" => "open", "value" => array(__("Closed", "js_composer") => "false", __("Open", "js_composer") => "true"), "description" => __('Select "Open" if you want toggle to be open by default.', "js_composer")), array("type" => "dropdown", "heading" => __("Style", "js_composer"), "param_name" => "style", "value" => array(__("Default", "js_composer") => "default", __("Bordered", "js_composer") => "bordered")), $add_css_animation, 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"))), "js_view" => 'VcToggleView'); vc_map_update('vc_toggle', $toggle_params); function vc_theme_vc_toggle($atts, $content = null) { $output = $title = $css_class = $el_class = $open = $css_animation = ''; extract(shortcode_atts(array('title' => __("Click to toggle", "js_composer"), 'el_class' => '', 'style' => 'default', 'open' => 'false', 'css_animation' => ''), $atts)); $open = $open == 'true' ? 1 : 0; $css_class .= getCSSAnimation($css_animation); $css_class .= ' ' . $el_class; $output .= '<div class="toggle-block ' . $css_class . ' ' . $style . '">' . do_shortcode('[toggle title="' . $title . '" class="' . $css_class . '" active="' . $open . '"]' . wpb_js_remove_wpautop($content) . '[/toggle]') . '</div>'; return $output; } // **********************************************************************// // ! Sliders // **********************************************************************// $setting_vc_gallery = array("name" => __("Image Gallery", "js_composer"), "icon" => "icon-wpb-images-stack", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "description" => __("What text use as a widget title. Leave blank if no title is needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Gallery type", "js_composer"), "param_name" => "type", "value" => array(__("OWL slider", "js_composer") => "owl", __("Nivo slider", "js_composer") => "nivo", __("Carousel", "js_composer") => "carousel", __("Image grid", "js_composer") => "image_grid"), "description" => __("Select gallery type.", "js_composer")), array("type" => "dropdown", "heading" => __("Auto rotate slides", "js_composer"), "param_name" => "interval", "value" => array(3, 5, 10, 15, __("Disable", "js_composer") => 0), "description" => __("Auto rotate slides each X seconds.", "js_composer"), "dependency" => array('element' => "type", 'value' => array('flexslider_fade', 'flexslider_slide', 'nivo'))), array("type" => "attach_images", "heading" => __("Images", "js_composer"), "param_name" => "images", "value" => "", "description" => __("Select images from media library.", "js_composer")), array("type" => "textfield", "heading" => __("Image size", "js_composer"), "param_name" => "img_size", "description" => __("Enter image size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use 'thumbnail' size.", "js_composer")), array("type" => "dropdown", "heading" => __("On click", "js_composer"), "param_name" => "onclick", "value" => array(__("Open prettyPhoto", "js_composer") => "link_image", __("Do nothing", "js_composer") => "link_no", __("Open custom link", "js_composer") => "custom_link"), "description" => __("What to do when slide is clicked?", "js_composer")), array("type" => "exploded_textarea", "heading" => __("Custom links", "js_composer"), "param_name" => "custom_links", "description" => __('Enter links for each slide here. Divide links with linebreaks (Enter).', 'js_composer'), "dependency" => array('element' => "onclick", 'value' => array('custom_link'))), array("type" => "dropdown", "heading" => __("Custom link target", "js_composer"), "param_name" => "custom_links_target", "description" => __('Select where to open custom links.', 'js_composer'), "dependency" => array('element' => "onclick", 'value' => array('custom_link')), 'value' => $target_arr), 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")))); vc_map_update('vc_gallery', $setting_vc_gallery); function vc_theme_vc_gallery($atts, $content = null) { $output = $title = $type = $onclick = $custom_links = $img_size = $custom_links_target = $images = $el_class = $interval = ''; extract(shortcode_atts(array('title' => '', 'type' => 'flexslider', 'onclick' => 'link_image', 'custom_links' => '', 'custom_links_target' => '', 'img_size' => 'thumbnail', 'images' => '', 'el_class' => '', 'interval' => '5'), $atts)); $gal_images = ''; $link_start = ''; $link_end = ''; $el_start = ''; $el_end = ''; $slides_wrap_start = ''; $slides_wrap_end = ''; $rand = rand(1000, 9999); $el_class = ' ' . $el_class . ' '; if ($type == 'nivo') { $type = ' wpb_slider_nivo theme-default'; wp_enqueue_script('nivo-slider'); wp_enqueue_style('nivo-slider-css'); wp_enqueue_style('nivo-slider-theme'); $slides_wrap_start = '<div class="nivoSlider">'; $slides_wrap_end = '</div>'; } else { if ($type == 'flexslider' || $type == 'flexslider_fade' || $type == 'flexslider_slide' || $type == 'fading') { $el_start = '<li>'; $el_end = '</li>'; $slides_wrap_start = '<ul class="slides">'; $slides_wrap_end = '</ul>'; } else { if ($type == 'image_grid') { $el_start = '<li class="gallery-item">'; $el_end = '</li>'; $slides_wrap_start = '<ul class="wpb_images_grid_ul">'; $slides_wrap_end = '</ul>'; } else { if ($type == 'carousel') { $el_start = '<li class="">'; $el_end = '</li>'; $slides_wrap_start = '<ul class="images-carousel carousel-' . $rand . '">'; $slides_wrap_end = '</ul>'; } } } } $flex_fx = ''; $flex = false; $owl = false; if ($type == 'flexslider' || $type == 'flexslider_fade' || $type == 'fading') { $flex = true; $type = ' wpb_flexslider' . $rand . ' flexslider_fade flexslider'; $flex_fx = ' data-flex_fx="fade"'; } else { if ($type == 'flexslider_slide') { $flex = true; $type = ' wpb_flexslider' . $rand . ' flexslider_slide flexslider'; $flex_fx = ' data-flex_fx="slide"'; } else { if ($type == 'image_grid') { $type = ' wpb_image_grid'; } else { if ($type == 'owl') { $type = ' owl_slider' . $rand . ' owl_slider'; $owl = true; } } } } /* else if ( $type == 'fading' ) { $type = ' wpb_slider_fading'; $el_start = '<li>'; $el_end = '</li>'; $slides_wrap_start = '<ul class="slides">'; $slides_wrap_end = '</ul>'; wp_enqueue_script( 'cycle' ); }*/ //if ( $images == '' ) return null; if ($images == '') { $images = '-1,-2,-3'; } $pretty_rel_random = 'rel-' . rand(); if ($onclick == 'custom_link') { $custom_links = explode(',', $custom_links); } $images = explode(',', $images); $i = -1; foreach ($images as $attach_id) { $i++; if ($attach_id > 0) { $post_thumbnail = wpb_getImageBySize(array('attach_id' => $attach_id, 'thumb_size' => $img_size)); } else { $different_kitten = 400 + $i; $post_thumbnail = array(); $post_thumbnail['thumbnail'] = '<img src="http://placekitten.com/g/' . $different_kitten . '/300" />'; $post_thumbnail['p_img_large'][0] = 'http://placekitten.com/g/1024/768'; } $thumbnail = $post_thumbnail['thumbnail']; $p_img_large = $post_thumbnail['p_img_large']; $link_start = $link_end = ''; if ($onclick == 'link_image') { $link_start = '<a rel="lightboxGall" href="' . $p_img_large[0] . '">'; $link_end = '</a>'; } else { if ($onclick == 'custom_link' && isset($custom_links[$i]) && $custom_links[$i] != '') { $link_start = '<a href="' . $custom_links[$i] . '"' . (!empty($custom_links_target) ? ' target="' . $custom_links_target . '"' : '') . '>'; $link_end = '</a>'; } } $gal_images .= $el_start . $link_start . $thumbnail . $link_end . $el_end; } $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_gallery wpb_content_element' . $el_class . ' clearfix'); $output .= "\n\t" . '<div class="' . $css_class . '">'; $output .= "\n\t\t" . '<div class="wpb_wrapper">'; $output .= wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_gallery_heading')); $output .= '<div class="wpb_gallery_slides' . $type . '" data-interval="' . $interval . '"' . $flex_fx . '>' . $slides_wrap_start . $gal_images . $slides_wrap_end . '</div>'; $output .= "\n\t\t" . '</div> '; $output .= "\n\t" . '</div> '; if ($owl) { $items = '[[0, 1], [479, 1], [619, 1], [768, 1], [1200, 1], [1600, 1]]'; $output .= '<script type="text/javascript">'; //$output .= ' jQuery(".images-carousel").etFullWidth();'; $output .= ' jQuery(".owl_slider' . $rand . '").owlCarousel({'; $output .= ' items:4, '; $output .= ' navigation: true,'; $output .= ' navigationText:false,'; $output .= ' rewindNav: false,'; $output .= ' itemsCustom: ' . $items . ''; $output .= ' });'; $output .= ' </script>'; } if ($type == 'carousel') { $items = '[[0, 1], [479,2], [619,2], [768,4], [1200, 4], [1600, 4]]'; $output .= '<script type="text/javascript">'; //$output .= ' jQuery(".images-carousel").etFullWidth();'; $output .= ' jQuery(".carousel-' . $rand . '").owlCarousel({'; $output .= ' items:4, '; $output .= ' navigation: true,'; $output .= ' navigationText:false,'; $output .= ' rewindNav: false,'; $output .= ' itemsCustom: ' . $items . ''; $output .= ' });'; $output .= ' </script>'; } return $output; } // **********************************************************************// // ! Single Image // **********************************************************************// $setting_vc_single_image = array("params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "description" => __("What text use as a widget title. Leave blank if no title is needed.", "js_composer")), array("type" => "attach_image", "heading" => __("Image", "js_composer"), "param_name" => "image", "value" => "", "description" => __("Select image from media library.", "js_composer")), $add_css_animation, array("type" => "textfield", "heading" => __("Image size", "js_composer"), "param_name" => "img_size", "description" => __("Enter image size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use 'thumbnail' size.", "js_composer")), array("type" => 'checkbox', "heading" => __("Link to large image?", "js_composer"), "param_name" => "img_link_large", "description" => __("If selected, image will be linked to the bigger image.", "js_composer"), "value" => array(__("Yes, please", "js_composer") => 'yes')), array('type' => 'href', 'heading' => __('Image link', 'js_composer'), 'param_name' => 'link', 'description' => __('Enter URL if you want this image to have a link.', 'js_composer'), 'dependency' => array('element' => 'img_link_large', 'is_empty' => true, 'callback' => 'wpb_single_image_img_link_dependency_callback')), array('type' => 'dropdown', 'heading' => __('Link Target', 'js_composer'), 'param_name' => 'img_link_target', 'value' => $target_arr, 'dependency' => array('element' => 'link', 'not_empty' => true)), 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")))); vc_map_update('vc_single_image', $setting_vc_single_image); function vc_theme_vc_single_image($atts, $content = null) { $output = $a_class = $el_class = $image = $img_size = $img_link = $img_link_target = $img_link_large = $title = $css_animation = ''; extract(shortcode_atts(array('title' => '', 'image' => '', 'img_src' => '', 'img_size' => 'thumbnail', 'img_link_large' => false, 'link' => '', 'img_link_target' => '_self', 'el_class' => '', 'css_animation' => ''), $atts)); $img_id = preg_replace('/[^\\d]/', '', $image); $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size)); $link_to = ''; if ($img_link_large == true) { $link_to = wp_get_attachment_image_src($img_id, 'large'); $link_to = $link_to[0]; } else { if (!empty($link)) { $link_to = $link; } } if ($img == NULL) { if ($img_link_large == true) { $link_to = $img_src; } $img = array('thumbnail' => '<img src="' . $img_src . '">'); } $el_class = ' ' . $el_class . ' '; if ($img_link_large == true) { $a_class = ' rel="lightbox"'; } $image_string = !empty($link_to) ? '<a' . $a_class . ' href="' . $link_to . '"' . ($img_link_target != '_self' ? ' target="' . $img_link_target . '"' : '') . '>' . $img['thumbnail'] . '</a>' : $img['thumbnail']; $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_single_image wpb_content_element' . $el_class); $css_class .= getCSSAnimation($css_animation); $output .= "\n\t" . '<div class="' . $css_class . '">'; $output .= "\n\t\t" . '<div class="wpb_wrapper">'; $output .= "\n\t\t\t" . wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_singleimage_heading')); $output .= "\n\t\t\t" . $image_string; $output .= "\n\t\t" . '</div> '; $output .= "\n\t" . '</div> '; return $output; } // **********************************************************************// // ! Accordion // **********************************************************************// function vc_theme_vc_accordion($atts, $content = null) { wp_enqueue_script('jquery-ui-accordion'); $output = $title = $interval = $el_class = $collapsible = $active_tab = ''; // extract(shortcode_atts(array('title' => '', 'interval' => 0, 'el_class' => '', 'collapsible' => 'no', 'active_tab' => '1'), $atts)); $el_class = ' ' . $el_class . ' '; $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_accordion wpb_content_element ' . $el_class . ' not-column-inherit'); $output .= wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_accordion_heading')); $output .= "\n\t" . '<div class=" tabs accordion" data-active="' . $active_tab . '">'; $output .= "\n\t\t\t" . wpb_js_remove_wpautop($content); $output .= "\n\t" . '</div> '; return $output; } function vc_theme_vc_accordion_tab($atts, $content = null) { global $tab_count; $output = $title = ''; extract(shortcode_atts(array('title' => __("Section", "js_composer")), $atts)); $tab_count++; $output .= "\n\t\t\t\t" . '<a href="#tab_' . $tab_count . '" id="tab_' . $tab_count . '" class="tab-title">' . $title . '</a>'; $output .= "\n\t\t\t\t" . '<div id="content_tab_' . $tab_count . '" class="tab-content"><div class="tab-content-inner">'; $output .= $content == '' || $content == ' ' ? __("Empty section. Edit page to add content here.", "js_composer") : "\n\t\t\t\t" . wpb_js_remove_wpautop($content); $output .= "\n\t\t\t\t" . '</div></div>'; return $output; } // **********************************************************************// // ! Tabs // **********************************************************************// $tab_id_1 = time() . '-1-' . rand(0, 100); $tab_id_2 = time() . '-2-' . rand(0, 100); $setting_vc_tabs = array("name" => __("Tabs", "js_composer"), "show_settings_on_create" => true, "is_container" => true, "icon" => "icon-wpb-ui-tab-content", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "description" => __("What text use as a widget title. Leave blank if no title is needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Tabs type", "js_composer"), "param_name" => "type", "value" => array(__("Default", "js_composer") => '', __("Products Tabs", "js_composer") => 'products-tabs', __("Accordion", "js_composer") => 'accordion', __("Left bar", "js_composer") => 'left-bar', __("Right bar", "js_composer") => 'right-bar')), 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"))), "custom_markup" => ' <div class="wpb_tabs_holder wpb_holder vc_container_for_children"> <ul class="tabs_controls"> </ul> %content% </div>', 'default_content' => ' [vc_tab title="' . __('Tab 1', 'js_composer') . '" tab_id="' . $tab_id_1 . '"][/vc_tab] [vc_tab title="' . __('Tab 2', 'js_composer') . '" tab_id="' . $tab_id_2 . '"][/vc_tab] '); vc_map_update('vc_tabs', $setting_vc_tabs); // **********************************************************************// // ! Posts Slider // **********************************************************************// $setting_vc_posts_slider = array('params' => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "description" => __("What text use as a widget title. Leave blank if no title is needed.", "js_composer")), array("type" => "textfield", "heading" => __("Slides count", "js_composer"), "param_name" => "count", "description" => __('How many slides to show? Enter number or word "All".', "js_composer")), array("type" => "posttypes", "heading" => __("Post types", "js_composer"), "param_name" => "posttypes", "description" => __("Select post types to populate posts from.", "js_composer")), array("type" => "dropdown", "heading" => __("Layout", "js_composer"), "param_name" => "layout", "value" => array(__("Horizontal", "js_composer") => "horizontal", __("Vertical", "js_composer") => "vertical")), array("type" => "textfield", "heading" => __("Number of items on desktop", ETHEME_DOMAIN), "param_name" => "desktop"), array("type" => "textfield", "heading" => __("Number of items on notebook", ETHEME_DOMAIN), "param_name" => "notebook"), array("type" => "textfield", "heading" => __("Number of items on tablet", ETHEME_DOMAIN), "param_name" => "tablet"), array("type" => "textfield", "heading" => __("Number of items on phones", ETHEME_DOMAIN), "param_name" => "phones"), array("type" => 'checkbox', "heading" => __("Output post date?", "js_composer"), "param_name" => "slides_date", "description" => __("If selected, date will be printed before the teaser text.", "js_composer"), "value" => array(__("Yes, please", "js_composer") => true)), array("type" => "dropdown", "heading" => __("Description", "js_composer"), "param_name" => "slides_content", "value" => array(__("No description", "js_composer") => "", __("Teaser (Excerpt)", "js_composer") => "teaser"), "description" => __("Some sliders support description text, what content use for it?", "js_composer"), "dependency" => array('element' => "type", 'value' => array('flexslider_fade', 'flexslider_slide'))), array("type" => 'checkbox', "heading" => __("Output post title?", "js_composer"), "param_name" => "slides_title", "description" => __("If selected, title will be printed before the teaser text.", "js_composer"), "value" => array(__("Yes, please", "js_composer") => true), "dependency" => array('element' => "slides_content", 'value' => array('teaser'))), array("type" => "dropdown", "heading" => __("Link", "js_composer"), "param_name" => "link", "value" => array(__("Link to post", "js_composer") => "link_post", __("Link to bigger image", "js_composer") => "link_image", __("Open custom link", "js_composer") => "custom_link", __("No link", "js_composer") => "link_no"), "description" => __("Link type.", "js_composer")), array("type" => "exploded_textarea", "heading" => __("Custom links", "js_composer"), "param_name" => "custom_links", "dependency" => array('element' => "link", 'value' => 'custom_link'), "description" => __('Enter links for each slide here. Divide links with linebreaks (Enter).', 'js_composer')), array("type" => "textfield", "heading" => __("Thumbnail size", "js_composer"), "param_name" => "thumb_size", "description" => __('Enter thumbnail size. Example: 200x100 (Width x Height).', "js_composer")), array("type" => "textfield", "heading" => __("Post/Page IDs", "js_composer"), "param_name" => "posts_in", "description" => __('Fill this field with page/posts IDs separated by commas (,), to retrieve only them. Use this in conjunction with "Post types" field.', "js_composer")), array("type" => "exploded_textarea", "heading" => __("Categories", "js_composer"), "param_name" => "categories", "description" => __("If you want to narrow output, enter category names here. Note: Only listed categories will be included. Divide categories with linebreaks (Enter).", "js_composer")), array("type" => "dropdown", "heading" => __("Order by", "js_composer"), "param_name" => "orderby", "value" => array("", __("Date", "js_composer") => "date", __("ID", "js_composer") => "ID", __("Author", "js_composer") => "author", __("Title", "js_composer") => "title", __("Modified", "js_composer") => "modified", __("Random", "js_composer") => "rand", __("Comment count", "js_composer") => "comment_count", __("Menu order", "js_composer") => "menu_order"), "description" => sprintf(__('Select how to sort retrieved posts. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array("type" => "dropdown", "heading" => __("Order by", "js_composer"), "param_name" => "order", "value" => array(__("Descending", "js_composer") => "DESC", __("Ascending", "js_composer") => "ASC"), "description" => sprintf(__('Designates the ascending or descending order. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), 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")))); vc_map_update('vc_posts_slider', $setting_vc_posts_slider); function vc_theme_vc_posts_slider($atts, $content = null) { $output = $title = $type = $count = $interval = $slides_content = $link = ''; $custom_links = $thumb_size = $posttypes = $posts_in = $categories = ''; $orderby = $order = $el_class = $link_image_start = ''; extract(shortcode_atts(array('title' => '', 'type' => 'flexslider_fade', 'count' => 10, 'interval' => 3, 'layout' => 'vertical', 'slides_content' => '', 'slides_title' => '', 'link' => 'link_post', 'more_link' => 1, 'custom_links' => site_url() . '/', 'thumb_size' => '300x200', 'posttypes' => '', 'posts_in' => '', 'slides_date' => false, 'categories' => '', 'orderby' => NULL, 'order' => 'DESC', 'el_class' => '', 'desktop' => 3, 'notebook' => 3, 'tablet' => 2, 'phones' => 1), $atts)); $gal_images = ''; $link_start = ''; $link_end = ''; $el_start = ''; $el_end = ''; $slides_wrap_start = ''; $slides_wrap_end = ''; $el_class = ' ' . $el_class . ' '; $query_args = array(); //exclude current post/page from query if ($posts_in == '') { global $post; $query_args['post__not_in'] = array($post->ID); } else { if ($posts_in != '') { $query_args['post__in'] = explode(",", $posts_in); } } // Post teasers count if ($count != '' && !is_numeric($count)) { $count = -1; } if ($count != '' && is_numeric($count)) { $query_args['posts_per_page'] = $count; } // Post types $pt = array(); if ($posttypes != '') { $posttypes = explode(",", $posttypes); foreach ($posttypes as $post_type) { array_push($pt, $post_type); } $query_args['post_type'] = $pt; } // Narrow by categories if ($categories != '') { $categories = explode(",", $categories); $gc = array(); foreach ($categories as $grid_cat) { array_push($gc, $grid_cat); } $gc = implode(",", $gc); ////http://snipplr.com/view/17434/wordpress-get-category-slug/ $query_args['category_name'] = $gc; $taxonomies = get_taxonomies('', 'object'); $query_args['tax_query'] = array('relation' => 'OR'); foreach ($taxonomies as $t) { if (in_array($t->object_type[0], $pt)) { $query_args['tax_query'][] = array('taxonomy' => $t->name, 'terms' => $categories, 'field' => 'slug'); } } } // Order posts if ($orderby != NULL) { $query_args['orderby'] = $orderby; } $query_args['order'] = $order; $thumb_size = explode('x', $thumb_size); $width = $thumb_size[0]; $height = $thumb_size[1]; $crop = true; $customItems = array('desktop' => $desktop, 'notebook' => $notebook, 'tablet' => $tablet, 'phones' => $phones); ob_start(); etheme_create_posts_slider($query_args, $title, $more_link, $slides_date, $slides_content, $width, $height, $crop, $layout, $customItems, $el_class); $output = ob_get_contents(); ob_end_clean(); return $output; } // **********************************************************************// // ! Button // **********************************************************************// $setting_vc_button = array("params" => array(array("type" => "textfield", "heading" => __("Text on the button", "js_composer"), "holder" => "button", "class" => "wpb_button", "param_name" => "title", "value" => __("Text on the button", "js_composer"), "description" => __("Text on the button.", "js_composer")), array("type" => "textfield", "heading" => __("URL (Link)", "js_composer"), "param_name" => "href", "description" => __("Button link.", "js_composer")), array("type" => "dropdown", "heading" => __("Target", "js_composer"), "param_name" => "target", "value" => $target_arr, "dependency" => array('element' => "href", 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Type", "js_composer"), "param_name" => "type", "value" => array('bordered', 'filled'), "description" => __("Button type.", "js_composer")), array('type' => 'icon', "heading" => __("Icon", ETHEME_DOMAIN), "param_name" => "icon"), array("type" => "dropdown", "heading" => __("Size", "js_composer"), "param_name" => "size", "value" => array('small', 'medium', 'big'), "description" => __("Button size.", "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")))); vc_map_update('vc_button', $setting_vc_button); function vc_theme_vc_button($atts, $content = null) { return etheme_btn_shortcode($atts, $content); } // **********************************************************************// // ! Call To Action // **********************************************************************// $setting_cta_button = array("params" => array(array("type" => "textarea_html", "heading" => __("Text", "js_composer"), "param_name" => "content", "value" => __("Click edit button to change this text.", "js_composer"), "description" => __("Enter your content.", "js_composer")), array("type" => "dropdown", "heading" => __("Block Style", "js_composer"), "param_name" => "style", "value" => array("" => "", __("Default", "js_composer") => "default", __("Full width", "js_composer") => "fullwidth", __("Filled", "js_composer") => "filled", __("Without Border", "js_composer") => "without-border", __("Dark", "js_composer") => "dark")), array("type" => "textfield", "heading" => __("Text on the button", "js_composer"), "param_name" => "title", "description" => __("Text on the button.", "js_composer")), array("type" => "textfield", "heading" => __("URL (Link)", "js_composer"), "param_name" => "href", "description" => __("Button link.", "js_composer")), array("type" => "dropdown", "heading" => __("Button position", "js_composer"), "param_name" => "position", "value" => array(__("Align right", "js_composer") => "right", __("Align left", "js_composer") => "left"), "description" => __("Select button alignment.", "js_composer")))); vc_map_update('vc_cta_button', $setting_cta_button); function vc_theme_vc_cta_button($atts, $content = null) { $output = $call_title = $href = $title = $call_text = $el_class = ''; extract(shortcode_atts(array('href' => '', 'style' => '', 'title' => '', 'position' => 'right'), $atts)); return do_shortcode('[callto btn_position="' . $position . '" btn="' . $title . '" style="' . $style . '" link="' . $href . '"]' . $content . '[/callto]'); } // **********************************************************************// // ! Teaser grid // **********************************************************************// $setting_vc_posts_grid = array("params" => array(array("type" => "textfield", "heading" => __("Widget title", "js_composer"), "param_name" => "title", "description" => __("What text use as a widget title. Leave blank if no title is needed.", "js_composer")), array("type" => "dropdown", "heading" => __("Columns count", "js_composer"), "param_name" => "grid_columns_count", "value" => array(4, 3, 2, 1), "admin_label" => true, "description" => __("Select columns count.", "js_composer")), array("type" => "posttypes", "heading" => __("Post types", "js_composer"), "param_name" => "grid_posttypes", "description" => __("Select post types to populate posts from.", "js_composer")), array("type" => "textfield", "heading" => __("Teasers count", "js_composer"), "param_name" => "grid_teasers_count", "description" => __('How many teasers to show? Enter number or word "All".', "js_composer")), array("type" => "dropdown", "heading" => __("Pagination", "js_composer"), "param_name" => "pagination", "value" => array(__("Show Pagination", "js_composer") => "show", __("Hide", "js_composer") => "hide")), array("type" => "dropdown", "heading" => __("Content", "js_composer"), "param_name" => "grid_content", "value" => array(__("Teaser (Excerpt)", "js_composer") => "teaser", __("Full Content", "js_composer") => "content"), "description" => __("Teaser layout template.", "js_composer")), array("type" => "dropdown", "heading" => __("'Posted by' block", "js_composer"), "param_name" => "posted_block", "value" => array(__("Show", "js_composer") => "show", __("Hide", "js_composer") => "hide")), array("type" => "dropdown", "heading" => __("Hover mask", "js_composer"), "param_name" => "hover_mask", "value" => array(__("Show", "js_composer") => "show", __("Hide", "js_composer") => "hide")), array("type" => "dropdown", "heading" => __("Layout", "js_composer"), "param_name" => "grid_layout", "value" => array(__("Title + Thumbnail + Text", "js_composer") => "title_thumbnail_text", __("Thumbnail + Title + Text", "js_composer") => "thumbnail_title_text", __("Thumbnail + Text", "js_composer") => "thumbnail_text", __("Thumbnail + Title", "js_composer") => "thumbnail_title", __("Thumbnail only", "js_composer") => "thumbnail", __("Title + Text", "js_composer") => "title_text"), "description" => __("Teaser layout.", "js_composer")), array("type" => "dropdown", "heading" => __("Teaser grid layout", "js_composer"), "param_name" => "grid_template", "value" => array(__("Grid", "js_composer") => "grid", __("Grid with filter", "js_composer") => "filtered_grid"), "description" => __("Teaser layout template.", "js_composer")), array("type" => "taxonomies", "heading" => __("Taxonomies", "js_composer"), "param_name" => "grid_taxomonies", "dependency" => array('element' => 'grid_template', 'value' => array('filtered_grid'), 'callback' => 'wpb_grid_post_types_for_taxonomies_handler'), "description" => __("Select taxonomies from.", "js_composer")), array("type" => "textfield", "heading" => __("Thumbnail size", "js_composer"), "param_name" => "grid_thumb_size", "description" => __('Enter thumbnail size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height).', "js_composer")), array("type" => "textfield", "heading" => __("Post/Page IDs", "js_composer"), "param_name" => "posts_in", "description" => __('Fill this field with page/posts IDs separated by commas (,) to retrieve only them. Use this in conjunction with "Post types" field.', "js_composer")), array("type" => "textfield", "heading" => __("Exclude Post/Page IDs", "js_composer"), "param_name" => "posts_not_in", "description" => __('Fill this field with page/posts IDs separated by commas (,) to exclude them from query.', "js_composer")), array("type" => "exploded_textarea", "heading" => __("Categories", "js_composer"), "param_name" => "grid_categories", "description" => __("If you want to narrow output, enter category names here. Note: Only listed categories will be included. Divide categories with linebreaks (Enter).", "js_composer")), array("type" => "dropdown", "heading" => __("Order by", "js_composer"), "param_name" => "orderby", "value" => array("", __("Date", "js_composer") => "date", __("ID", "js_composer") => "ID", __("Author", "js_composer") => "author", __("Title", "js_composer") => "title", __("Modified", "js_composer") => "modified", __("Random", "js_composer") => "rand", __("Comment count", "js_composer") => "comment_count", __("Menu order", "js_composer") => "menu_order"), "description" => sprintf(__('Select how to sort retrieved posts. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array("type" => "dropdown", "heading" => __("Order way", "js_composer"), "param_name" => "order", "value" => array(__("Descending", "js_composer") => "DESC", __("Ascending", "js_composer") => "ASC"), "description" => sprintf(__('Designates the ascending or descending order. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), 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")))); vc_map_update('vc_posts_grid', $setting_vc_posts_grid); function vc_theme_vc_posts_grid($atts, $content = null) { return etheme_teaser($atts, $content = null); } // **********************************************************************// // ! Progress bar // **********************************************************************// $setting_progress_bar = array("params" => array(array("type" => "exploded_textarea", "heading" => __("Graphic values", "js_composer"), "param_name" => "values", "description" => __('Input graph values here. Divide values with linebreaks (Enter). Example: 90|Development', 'js_composer'), "value" => "90|Development,80|Design,70|Marketing"))); vc_map_update('vc_progress_bar', $setting_progress_bar); function vc_theme_vc_progress_bar($atts, $content = null) { $output = $title = ''; extract(shortcode_atts(array('title' => '', 'values' => ''), $atts)); $graph_lines = explode(",", $values); $output .= '<div class="progress-bars">'; foreach ($graph_lines as $line) { $single_val = explode("|", $line); $output .= do_shortcode('[progress title="' . $single_val[1] . '" complete="' . $single_val[0] . '"]'); } $output .= '</div>'; return $output; } // **********************************************************************// // ! Video player // **********************************************************************// $setting_video = array("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" => "textfield", "heading" => __("Video link", "js_composer"), "param_name" => "link", "admin_label" => true, "description" => sprintf(__('Link to the video. More about supported formats at %s.', "js_composer"), '<a href="http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank">WordPress codex page</a>')), array("type" => "dropdown", "heading" => __("Open in popup", "js_composer"), "param_name" => "popup", "value" => array("", __("Yes", "js_composer") => "yes", __("No", "js_composer") => "no")), array('type' => 'attach_image', "heading" => __("Image placeholder", ETHEME_DOMAIN), "dependency" => array('element' => "popup", 'value' => array('yes')), "param_name" => "img"), array("type" => "textfield", "heading" => __("Image size", "js_composer"), "param_name" => "img_size", "dependency" => array('element' => "popup", 'value' => array('yes')), "description" => __("Enter image size. Example: thumbnail, medium, large, full or other sizes defined by current theme. Alternatively enter image size in pixels: 200x100 (Width x Height). Leave empty to use 'thumbnail' size.", "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")), array("type" => "css_editor", "heading" => __('Css', "js_composer"), "param_name" => "css", "group" => __('Design options', 'js_composer')))); vc_map_update('vc_video', $setting_video); function vc_theme_vc_video($atts) { $output = $title = $link = $size = $el_class = $img_src = ''; extract(shortcode_atts(array('title' => '', 'link' => 'http://vimeo.com/23237102', 'size' => isset($content_width) ? $content_width : 500, 'popup' => 'no', 'img' => '', 'img_size' => '300x200', 'el_class' => '', 'css' => ''), $atts)); if ($link == '') { return null; } $src = ''; if ($popup == 'yes') { $img_size = explode('x', $img_size); $width = $img_size[0]; $height = $img_size[1]; if ($img != '') { $src = etheme_get_image($img, $width, $height); } elseif ($img_src != '') { $src = do_shortcode($img_src); } $text = __('Show video', ETHEME_DOMAIN); if ($src != '') { $text = '<img src="' . $src . '">'; } } $video_w = isset($content_width) ? $content_width : 500; $video_h = $video_w / 1.61; //1.61 golden ratio global $wp_embed; $embed = $wp_embed->run_shortcode('[embed width="' . $video_w . '"' . $video_h . ']' . $link . '[/embed]'); $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_video_widget wpb_content_element' . $el_class . $el_class . vc_shortcode_custom_css_class($css, ' '), 'vc_video'); $rand = rand(1000, 9999); $css_class .= ' video-' . $rand; $output .= "\n\t" . '<div class="' . $css_class . '">'; $output .= "\n\t\t" . '<div class="wpb_wrapper">'; $output .= wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_video_heading')); if ($popup == 'yes') { $output .= '<a href="#" class="open-video-popup">' . $text . '</a>'; $output .= "\n\t" . '<script type="text/javascript">'; $output .= "\n\t\t" . 'jQuery(document).ready(function() { jQuery(".video-' . $rand . ' .open-video-popup").magnificPopup({ items: [ { src: "' . $link . '", type: "iframe" }, ], }); });'; $output .= "\n\t" . '</script> '; } else { $output .= '<div class="wpb_video_wrapper">' . $embed . '</div>'; } $output .= "\n\t\t" . '</div> '; $output .= "\n\t" . '</div> '; return $output; } // **********************************************************************// // ! Register New Element: Product categories // **********************************************************************// $brands_params = array('name' => 'Product categories', 'base' => 'etheme_product_categories', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "textfield", "heading" => __("Title", ETHEME_DOMAIN), "param_name" => "title"), array("type" => "textfield", "heading" => __("Number of categories", ETHEME_DOMAIN), "param_name" => "number"), array("type" => "textfield", "heading" => __("Parent ID", ETHEME_DOMAIN), "param_name" => "parent", "description" => __('Get direct children of this term (only terms whose explicit parent is this value). If 0 is passed, only top-level terms are returned. Default is an empty string.', ETHEME_DOMAIN)), array("type" => "dropdown", "heading" => __("Display type", ETHEME_DOMAIN), "param_name" => "display_type", "value" => array(__("Grid", ETHEME_DOMAIN) => 'grid', __("Slider", ETHEME_DOMAIN) => 'slider', __("Menu", ETHEME_DOMAIN) => 'menu')), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "class"))); vc_map($brands_params); // **********************************************************************// // ! Register New Element: Brands // **********************************************************************// $brands_params = array('name' => 'Brands', 'base' => 'brands', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "textfield", "heading" => __("Title", ETHEME_DOMAIN), "param_name" => "title"), array("type" => "dropdown", "heading" => __("Display type", ETHEME_DOMAIN), "param_name" => "display_type", "value" => array(__("Slider", ETHEME_DOMAIN) => 'slider', __("Grid", ETHEME_DOMAIN) => 'grid')), array("type" => "dropdown", "heading" => __("Number of columns", ETHEME_DOMAIN), "param_name" => "columns", "dependency" => array('element' => "display_type", 'value' => array('grid')), "value" => array('2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6)), array("type" => "textfield", "heading" => __("Number of brands", ETHEME_DOMAIN), "param_name" => "number"), array("type" => "dropdown", "heading" => __("Order by", "js_composer"), "param_name" => "orderby", "value" => array("", __("ID", "js_composer") => "id", __("Count", "js_composer") => "count", __("Name", "js_composer") => "name", __("Slug", "js_composer") => "slug")), array("type" => "dropdown", "heading" => __("Order way", "js_composer"), "param_name" => "order", "value" => array(__("Descending", "js_composer") => "DESC", __("Ascending", "js_composer") => "ASC"), "description" => sprintf(__('Designates the ascending or descending order. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">WordPress codex page</a>')), array("type" => "textfield", "heading" => __("Parent ID", ETHEME_DOMAIN), "param_name" => "parent", "description" => __('Get direct children of this term (only terms whose explicit parent is this value). If 0 is passed, only top-level terms are returned. Default is an empty string.', ETHEME_DOMAIN)), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "class"))); vc_map($brands_params); // **********************************************************************// // ! Register New Element: Search Form // **********************************************************************// $search_params = array('name' => 'Mega Search Form', 'base' => 'etheme_search', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "dropdown", "heading" => __("Search for products", "js_composer"), "param_name" => "products", "value" => array("", __("Yes", ETHEME_DOMAIN) => 1, __("No", ETHEME_DOMAIN) => 0)), array("type" => "dropdown", "heading" => __("Display images for products", ETHEME_DOMAIN), "param_name" => "images", "value" => array("", __("Yes", ETHEME_DOMAIN) => 1, __("No", ETHEME_DOMAIN) => 0)), array("type" => "dropdown", "heading" => __("Search for posts", "js_composer"), "param_name" => "posts", "value" => array("", __("Yes", ETHEME_DOMAIN) => 1, __("No", ETHEME_DOMAIN) => 0)), array("type" => "dropdown", "heading" => __("Search in portfolio", "js_composer"), "param_name" => "portfolio", "value" => array("", __("Yes", ETHEME_DOMAIN) => 1, __("No", ETHEME_DOMAIN) => 0)), array("type" => "dropdown", "heading" => __("Search for pages", "js_composer"), "param_name" => "pages", "value" => array("", __("Yes", ETHEME_DOMAIN) => 1, __("No", ETHEME_DOMAIN) => 0)), array("type" => "textfield", "heading" => __("Number of items from each section", ETHEME_DOMAIN), "param_name" => "count"), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "class"))); vc_map($search_params); // **********************************************************************// // ! Register New Element: Twitter Slider // **********************************************************************// $twitter_params = array('name' => 'Twitter Slider', 'base' => 'twitter_slider', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "textfield", "heading" => __("Title", ETHEME_DOMAIN), "param_name" => "title"), array("type" => "textfield", "heading" => __("User account name", ETHEME_DOMAIN), "param_name" => "user"), array("type" => "textfield", "heading" => __("Consumer Key", ETHEME_DOMAIN), "param_name" => "consumer_key"), array("type" => "textfield", "heading" => __("Consumer Secret", ETHEME_DOMAIN), "param_name" => "consumer_secret"), array("type" => "textfield", "heading" => __("User Token", ETHEME_DOMAIN), "param_name" => "user_token"), array("type" => "textfield", "heading" => __("User Secret", ETHEME_DOMAIN), "param_name" => "user_secret"), array("type" => "textfield", "heading" => __("Limit", ETHEME_DOMAIN), "param_name" => "limit"), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "class"))); vc_map($twitter_params); // **********************************************************************// // ! Register New Element: Testimonials Widget // **********************************************************************// $testimonials_params = array('name' => 'Testimonials widget', 'base' => 'testimonials', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "textfield", "heading" => __("Limit", ETHEME_DOMAIN), "param_name" => "limit", "description" => __('How many testimonials to show? Enter number.', ETHEME_DOMAIN)), array("type" => "dropdown", "heading" => __("Display type", "js_composer"), "param_name" => "type", "value" => array("", __("Slider", ETHEME_DOMAIN) => 'slider', __("Grid", ETHEME_DOMAIN) => 'grid')), array("type" => "textfield", "heading" => __("Interval", ETHEME_DOMAIN), "param_name" => "interval", "description" => __('Interval between slides. In milliseconds. Default: 10000', ETHEME_DOMAIN), "dependency" => array('element' => "type", 'value' => array('slider'))), array("type" => "dropdown", "heading" => __("Show Control Navigation", "js_composer"), "param_name" => "navigation", "dependency" => array('element' => "type", 'value' => array('slider')), "value" => array("", __("Hide", ETHEME_DOMAIN) => false, __("Show", ETHEME_DOMAIN) => true)), array("type" => "textfield", "heading" => __("Category", ETHEME_DOMAIN), "param_name" => "category", "description" => __('Display testimonials from category.', ETHEME_DOMAIN)))); vc_map($testimonials_params); // **********************************************************************// // ! Register New Element: Recent Comments Widget // **********************************************************************// $recent_comments_params = array('name' => 'Recent comments widget', 'base' => 'et_recent_comments', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array('type' => 'textfield', "heading" => __("Widget title", ETHEME_DOMAIN), "param_name" => "title", "description" => __("What text use as a widget title. Leave blank if no title is needed.", ETHEME_DOMAIN)), array("type" => "textfield", "heading" => __("Limit", ETHEME_DOMAIN), "param_name" => "number", "description" => __('How many testimonials to show? Enter number.', ETHEME_DOMAIN)))); vc_map($recent_comments_params); // **********************************************************************// // ! Register New Element: Recent Posts Widget // **********************************************************************// $recent_posts_params = array('name' => 'Recent posts widget', 'base' => 'et_recent_posts_widget', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array('type' => 'textfield', "heading" => __("Widget title", ETHEME_DOMAIN), "param_name" => "title", "description" => __("What text use as a widget title. Leave blank if no title is needed.", ETHEME_DOMAIN)), array("type" => "dropdown", "heading" => __("Enable slider", "js_composer"), "param_name" => "slider", "value" => array("", __("Enable", ETHEME_DOMAIN) => 1, __("Disable", ETHEME_DOMAIN) => 0)), array("type" => "textfield", "heading" => __("Limit", ETHEME_DOMAIN), "param_name" => "number", "description" => __('How many testimonials to show? Enter number.', ETHEME_DOMAIN)))); vc_map($recent_posts_params); // **********************************************************************// // ! Register New Element: Team Member // **********************************************************************// $team_member_params = array('name' => 'Team member', 'base' => 'team_member', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array('type' => 'textfield', "heading" => __("Member name", ETHEME_DOMAIN), "param_name" => "name"), array('type' => 'textfield', "heading" => __("Member email", ETHEME_DOMAIN), "param_name" => "email"), array('type' => 'textfield', "heading" => __("Position", ETHEME_DOMAIN), "param_name" => "position"), array('type' => 'attach_image', "heading" => __("Avatar", ETHEME_DOMAIN), "param_name" => "img"), array("type" => "textfield", "heading" => __("Image size", "js_composer"), "param_name" => "img_size", "description" => __("Enter image size. Example in pixels: 200x100 (Width x Height).", "js_composer")), array("type" => "textarea_html", "holder" => "div", "heading" => __("Member information", "js_composer"), "param_name" => "content", "value" => __("Member description", "js_composer")), array("type" => "dropdown", "heading" => __("Display Type", "js_composer"), "param_name" => "type", "value" => array("", __("Vertical", ETHEME_DOMAIN) => 1, __("Horizontal", ETHEME_DOMAIN) => 2)), array('type' => 'textfield', "heading" => __("Twitter link", ETHEME_DOMAIN), "param_name" => "twitter"), array('type' => 'textfield', "heading" => __("Facebook link", ETHEME_DOMAIN), "param_name" => "facebook"), array('type' => 'textfield', "heading" => __("Linkedin", ETHEME_DOMAIN), "param_name" => "linkedin"), array('type' => 'textfield', "heading" => __("Skype name", ETHEME_DOMAIN), "param_name" => "skype"), array('type' => 'textfield', "heading" => __("Instagram", ETHEME_DOMAIN), "param_name" => "instagram"), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "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.', ETHEME_DOMAIN)))); vc_map($team_member_params); // **********************************************************************// // ! Register New Element: Icon // **********************************************************************// $icon_params = array('name' => 'Awesome Icon', 'base' => 'icon', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array('type' => 'icon', "heading" => __("Icon", ETHEME_DOMAIN), "param_name" => "name"), array('type' => 'textfield', "heading" => __("Size", ETHEME_DOMAIN), "param_name" => "size", "description" => __('For example: 64', ETHEME_DOMAIN)), array('type' => 'colorpicker', "heading" => __("Color", ETHEME_DOMAIN), "param_name" => "color"), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "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.', ETHEME_DOMAIN)))); //vc_map($icon_params); // **********************************************************************// // ! Register New Element: Icon Box // **********************************************************************// $icon_box_params = array('name' => 'Icon Box', 'base' => 'icon_box', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array('type' => 'textfield', "heading" => __("Box title", ETHEME_DOMAIN), "param_name" => "title"), array('type' => 'icon', "heading" => __("Icon", ETHEME_DOMAIN), "param_name" => "icon"), array('type' => 'colorpicker', "heading" => __("Icon Color", ETHEME_DOMAIN), "param_name" => "color"), array('type' => 'colorpicker', "heading" => __("Background Color", ETHEME_DOMAIN), "param_name" => "bg_color"), array('type' => 'colorpicker', "heading" => __("Icon Color [HOVER]", ETHEME_DOMAIN), "param_name" => "color_hover"), array('type' => 'colorpicker', "heading" => __("Background Color [HOVER]", ETHEME_DOMAIN), "param_name" => "bg_color_hover"), array("type" => "textarea_html", 'admin_label' => true, "heading" => __("Text", "js_composer"), "param_name" => "content", "value" => __("Click edit button to change this text.", "js_composer"), "description" => __("Enter your content.", "js_composer")), array("type" => "dropdown", "heading" => __("Icon Position", "js_composer"), "param_name" => "icon_position", "value" => array("", __("Top", ETHEME_DOMAIN) => 'top', __("Left", ETHEME_DOMAIN) => 'left')), array("type" => "dropdown", "heading" => __("Icon Style", "js_composer"), "param_name" => "icon_style", "value" => array(__("Encircled", ETHEME_DOMAIN) => 'encircled', __("Small", ETHEME_DOMAIN) => 'small', __("Large", ETHEME_DOMAIN) => 'large')), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "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.', ETHEME_DOMAIN)))); //vc_map($icon_box_params); // **********************************************************************// // ! Register New Element: Banner with mask // **********************************************************************// $banner_params = array('name' => 'Banner', 'base' => 'banner', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array('type' => 'attach_image', "heading" => __("Banner Image", ETHEME_DOMAIN), "param_name" => "img"), array("type" => "textfield", "heading" => __("Banner size", "js_composer"), "param_name" => "img_size", "description" => __("Enter image size. Example in pixels: 200x100 (Width x Height).", "js_composer")), array("type" => "textfield", "heading" => __("Link", "js_composer"), "param_name" => "link"), array("type" => "textarea_html", "holder" => "div", "heading" => "Banner Mask Text", "param_name" => "content", "value" => "Some promo text"), array("type" => "dropdown", "heading" => __("Horizontal align", ETHEME_DOMAIN), "param_name" => "align", "value" => array("", __("Left", ETHEME_DOMAIN) => "left", __("Center", ETHEME_DOMAIN) => "center", __("Right", ETHEME_DOMAIN) => "right")), array("type" => "dropdown", "heading" => __("Vertical align", ETHEME_DOMAIN), "param_name" => "valign", "value" => array(__("Top", ETHEME_DOMAIN) => "top", __("Middle", ETHEME_DOMAIN) => "middle", __("Bottom", ETHEME_DOMAIN) => "bottom")), array("type" => "dropdown", "heading" => __("Hover effect", ETHEME_DOMAIN), "param_name" => "hover", "value" => array("", __("zoom", ETHEME_DOMAIN) => "zoom", __("fade", ETHEME_DOMAIN) => "fade")), array("type" => 'checkbox', "heading" => __("Responsive fonts", ETHEME_DOMAIN), "param_name" => "responsive_zoom", "value" => array(__("Yes, please", "js_composer") => 'yes')), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "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.', ETHEME_DOMAIN)))); vc_map($banner_params); // **********************************************************************// // ! Register New Element:Pricing Table // **********************************************************************// $demoTable = "\n\t" . '<ul>'; $demoTable .= "\n\t\t" . '<li class="row-title">Free</li>'; $demoTable .= "\n\t\t" . '<li class="row-price"><sup class="currency">$</sup>19<sup>00</sup><sub>per month</sub></li>'; $demoTable .= "\n\t\t" . '<li>512 mb</li>'; $demoTable .= "\n\t\t" . '<li>0.6 GHz</li>'; $demoTable .= "\n\t\t" . '<li>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</li>'; $demoTable .= "\n\t\t" . '<li><a href="#" class="button">Add to Cart</a></li>'; $demoTable .= "\n\t" . '</ul>'; $ptable_params = array('name' => 'Pricing Table', 'base' => 'ptable', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "textarea_html", "holder" => "div", "heading" => "Table", "param_name" => "content", "value" => $demoTable), array("type" => "dropdown", "heading" => __("Style", ETHEME_DOMAIN), "param_name" => "style", "value" => array("", __("default", ETHEME_DOMAIN) => "default", __("Style 2", ETHEME_DOMAIN) => "style2")), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "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.', ETHEME_DOMAIN)))); vc_map($ptable_params); // **********************************************************************// // ! Register New Element: Single post // **********************************************************************// $fpost_params = array('name' => 'Single blog post', 'base' => 'single_post', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "textfield", "heading" => __("Title", ETHEME_DOMAIN), "param_name" => "title"), array("type" => "textfield", "heading" => __("Post ID", ETHEME_DOMAIN), "param_name" => "id"), array("type" => "dropdown", "heading" => __("Show more posts link", ETHEME_DOMAIN), "param_name" => "more_posts", "value" => array("", __("Show", ETHEME_DOMAIN) => 1, __("Hide", ETHEME_DOMAIN) => 0)), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "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.', ETHEME_DOMAIN)))); //vc_map($fpost_params); // **********************************************************************// // ! Register New Element: Teaser Box // **********************************************************************// $teaser_box_params = array('name' => 'Teaser Box', 'base' => 'teaser_box', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "textfield", "heading" => __("Title", ETHEME_DOMAIN), "param_name" => "title"), array('type' => 'attach_image', "heading" => __("Image", ETHEME_DOMAIN), "param_name" => "img"), array("type" => "textfield", "heading" => __("Image size", "js_composer"), "param_name" => "img_size", "description" => __("Enter image size. Example in pixels: 200x100 (Width x Height).", "js_composer")), array("type" => "textarea_html", 'admin_label' => true, "heading" => __("Text", "js_composer"), "param_name" => "content", "value" => __("Click edit button to change this text.", "js_composer"), "description" => __("Enter your content.", "js_composer")), array("type" => "dropdown", "heading" => __("Style", ETHEME_DOMAIN), "param_name" => "style", "value" => array(__("Default", ETHEME_DOMAIN) => 'default', __("Bordered", ETHEME_DOMAIN) => 'bordered')), array("type" => "textfield", "heading" => __("Extra Class", ETHEME_DOMAIN), "param_name" => "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.', ETHEME_DOMAIN)))); vc_map($teaser_box_params); // **********************************************************************// // ! Register New Element: Products // **********************************************************************// $static_blocks = array('--choose--' => ''); foreach (et_get_static_blocks() as $value) { $static_blocks[$value['label']] = $value['value']; } $fpost_params = array('name' => 'Products', 'base' => 'etheme_products', 'icon' => 'icon-wpb-etheme', 'category' => 'Eight Theme', 'params' => array(array("type" => "textfield", "heading" => __("Title", ETHEME_DOMAIN), "param_name" => "title"), array("type" => "textfield", "heading" => __("IDs", ETHEME_DOMAIN), "param_name" => "ids"), array("type" => "textfield", "heading" => __("SKUs", ETHEME_DOMAIN), "param_name" => "skus"), array("type" => "dropdown", "heading" => __("Hover effect", ETHEME_DOMAIN), "param_name" => "product_img_hover", "value" => array(__("", ETHEME_DOMAIN) => '', __("Disable", ETHEME_DOMAIN) => 'disable', __("Swap", ETHEME_DOMAIN) => 'swap', __("Images Slider", ETHEME_DOMAIN) => 'slider', __("Mask with information", ETHEME_DOMAIN) => 'mask')), array("type" => "dropdown", "heading" => __("Display Type", ETHEME_DOMAIN), "param_name" => "type", "value" => array(__("Slider", ETHEME_DOMAIN) => 'slider', __("Slider full width (LOOK BOOK)", ETHEME_DOMAIN) => 'full-width', __("Grid", ETHEME_DOMAIN) => 'grid', __("List", ETHEME_DOMAIN) => 'list')), array("type" => "dropdown", "dependency" => array('element' => "type", 'value' => array('full-width')), "heading" => __("Static block for the first slide of the LOOK BOOK", ETHEME_DOMAIN), "param_name" => "block_id", "value" => $static_blocks), array("type" => "textfield", "heading" => __("Columns", ETHEME_DOMAIN), "param_name" => "columns", "dependency" => array('element' => "type", 'value' => array('grid'))), array("type" => "dropdown", "heading" => __("Product view", ETHEME_DOMAIN), "param_name" => "style", "dependency" => array('element' => "type", 'value' => array('slider')), "value" => array(__("Default", ETHEME_DOMAIN) => 'default', __("Advanced", ETHEME_DOMAIN) => 'advanced')), array("type" => "textfield", "heading" => __("Number of items on desktop", ETHEME_DOMAIN), "param_name" => "desktop", "dependency" => array('element' => "type", 'value' => array('slider'))), array("type" => "textfield", "heading" => __("Number of items on notebook", ETHEME_DOMAIN), "param_name" => "notebook", "dependency" => array('element' => "type", 'value' => array('slider'))), array("type" => "textfield", "heading" => __("Number of items on tablet", ETHEME_DOMAIN), "param_name" => "tablet", "dependency" => array('element' => "type", 'value' => array('slider'))), array("type" => "textfield", "heading" => __("Number of items on phones", ETHEME_DOMAIN), "param_name" => "phones", "dependency" => array('element' => "type", 'value' => array('slider'))), array("type" => "dropdown", "heading" => __("Products type", ETHEME_DOMAIN), "param_name" => "products", "value" => array(__("All", ETHEME_DOMAIN) => '', __("Featured", ETHEME_DOMAIN) => 'featured', __("New", ETHEME_DOMAIN) => 'new', __("Sale", ETHEME_DOMAIN) => 'sale', __("Recently viewed", ETHEME_DOMAIN) => 'recently_viewed', __("Bestsellings", ETHEME_DOMAIN) => 'bestsellings')), array("type" => "textfield", "heading" => __("Limit", ETHEME_DOMAIN), "param_name" => "limit"), array("type" => "textfield", "heading" => __("Categories IDs", ETHEME_DOMAIN), "param_name" => "categories"))); vc_map($fpost_params); }
function removeElements() { if (defined('WPB_VC_VERSION')) { vc_remove_element("vc_facebook"); vc_remove_element("vc_tweetmeme"); vc_remove_element("vc_googleplus"); vc_remove_element("vc_pinterest"); vc_remove_element("vc_images_carousel"); vc_remove_element("vc_tabs"); vc_remove_element("vc_tour"); vc_remove_element("vc_accordion"); vc_remove_element("vc_posts_grid"); vc_remove_element("vc_carousel"); vc_remove_element("vc_video"); vc_remove_element("vc_progress_bar"); vc_remove_element("vc_pie"); vc_remove_element("vc_wp_search"); vc_remove_element("vc_wp_meta"); vc_remove_element("vc_wp_calendar"); vc_remove_element("vc_wp_recentcomments"); vc_remove_element("vc_wp_pages"); vc_remove_element("vc_wp_tagcloud"); vc_remove_element("vc_wp_custommenu"); vc_remove_element("vc_wp_text"); vc_remove_element("vc_wp_posts"); vc_remove_element("vc_wp_categories"); vc_remove_element("vc_wp_archives"); vc_remove_element("vc_wp_rss"); vc_remove_element("vc_wp_search"); vc_remove_element("vc_flickr"); vc_remove_element("rev_slider_vc"); vc_remove_element("vc_gmaps"); vc_remove_element("contact-form-7"); vc_remove_element("vc_widget_sidebar"); vc_remove_element("vc_toggle"); } }
vc_remove_param('vc_separator', 'style'); vc_remove_param('vc_separator', 'border_width'); vc_remove_param('vc_separator', 'color'); vc_remove_param('vc_separator', 'accent_color'); vc_remove_param('vc_separator', 'el_width'); vc_remove_param('vc_separator', 'align'); vc_remove_param('vc_column_text', 'css_animation'); vc_remove_param('vc_gmaps', 'title'); vc_remove_param('vc_progress_bar', 'title'); vc_remove_param('vc_progress_bar', 'bgcolor'); vc_remove_param('vc_progress_bar', 'custombgcolor'); vc_remove_param('vc_progress_bar', 'options'); vc_remove_element('vc_button'); vc_remove_element('vc_button2'); vc_remove_element('vc_cta_button'); vc_remove_element('vc_cta_button2'); if (defined('WPCF7_VERSION')) { // contact form 7 vc_remove_param('contact-form-7', 'title'); } } /* Disable front end editor */ if (function_exists('vc_disable_frontend')) { vc_disable_frontend(); } if (!function_exists('single_file_settings_field')) { /** * We will create a custom attribute for videos & images */ function single_file_settings_field($settings, $value) {
function TheShortcodesForVC() { if (!class_exists('WPBakeryVisualComposerAbstract')) { // or using plugins path function return; } // Remove Front End vc_disable_frontend(); // Set as Theme WPBakeryVisualComposerAbstract::$config['USER_DIR_NAME'] = 'inc/shortcodes'; vc_set_default_editor_post_types(array('post', 'page', 'product')); vc_set_as_theme(true); // Removing Default shortcodes vc_remove_element("vc_widget_sidebar"); vc_remove_element("vc_wp_search"); vc_remove_element("vc_wp_meta"); vc_remove_element("vc_wp_recentcomments"); vc_remove_element("vc_wp_calendar"); vc_remove_element("vc_wp_pages"); vc_remove_element("vc_wp_tagcloud"); vc_remove_element("vc_wp_custommenu"); vc_remove_element("vc_wp_text"); vc_remove_element("vc_wp_posts"); vc_remove_element("vc_wp_links"); vc_remove_element("vc_wp_categories"); vc_remove_element("vc_wp_archives"); vc_remove_element("vc_wp_rss"); vc_remove_element("vc_teaser_grid"); vc_remove_element("vc_button"); vc_remove_element("vc_button2"); vc_remove_element("vc_cta_button"); vc_remove_element("vc_message"); vc_remove_element("vc_progress_bar"); vc_remove_element("vc_pie"); vc_remove_element("vc_posts_slider"); vc_remove_element("vc_posts_grid"); vc_remove_element("vc_images_carousel"); vc_remove_element("vc_carousel"); vc_remove_element("vc_gallery"); vc_remove_element("vc_single_image"); vc_remove_element("vc_facebook"); vc_remove_element("vc_tweetmeme"); vc_remove_element("vc_googleplus"); vc_remove_element("vc_pinterest"); vc_remove_element("vc_single_image"); vc_remove_element("vc_cta_button2"); vc_remove_element("vc_gmaps"); vc_remove_element("vc_raw_js"); vc_remove_element("vc_flickr"); vc_remove_element("vc_separator"); vc_remove_element("vc_text_separator"); vc_remove_element("vc_empty_space"); vc_remove_element("vc_custom_heading"); add_action('admin_head', 'remove_my_meta_box'); function remove_my_meta_box() { remove_meta_box("vc_teaser", "portfolio", "side"); remove_meta_box("vc_teaser", "page", "side"); remove_meta_box("vc_teaser", "product", "side"); } // Shortcodes require_once 'visualcomposer-extend.php'; /* Columns */ function thb_translateColumnWidthToSpan($width) { switch ($width) { case "1/6": $w = "medium-2"; break; case "1/4": $w = "medium-3"; break; case "1/3": $w = "medium-4"; break; case "2/4": $w = "medium-6"; case "1/2": $w = "medium-6"; break; case "4/6": $w = "medium-8"; break; case "2/3": $w = "medium-8"; break; case "3/4": $w = "medium-9"; break; case "10/12": $w = "medium-10"; break; case "5/6": $w = "medium-10"; break; case "1/1": $w = "medium-12"; break; case "1/12": $w = "medium-1"; break; case "2/12": $w = "medium-2"; break; case "5/12": $w = "medium-5"; break; case "7/12": $w = "medium-7"; break; default: $w = $width; } return $w; } /* Offsets */ function thb_column_offset_class_merge($column_offset, $width) { /* Remove VC */ $column_offset = preg_replace('/vc_col-/', '', $column_offset); /* Change responsive columns */ $column_offset = preg_replace('/lg/', 'large', $column_offset); $column_offset = preg_replace('/md/', 'medium', $column_offset); $column_offset = preg_replace('/sm/', 'small', $column_offset); $column_offset = preg_replace('/xs/', 'small', $column_offset); /* Check If no Small setting */ if (!preg_match('/vc_col\\-(sm|xs)[^\\s]*/', $column_offset)) { $column_offset = 'small-12 ' . $column_offset; } /* Change visibility */ $column_offset = preg_replace('/vc_hidden-large/', 'hide-for-large-up', $column_offset); $column_offset = preg_replace('/vc_hidden-medium/', 'hide-for-medium-only', $column_offset); $column_offset = preg_replace('/vc_hidden-smallall/', 'hide-for-small-only', $column_offset); return $width . (empty($column_offset) ? '' : ' ' . $column_offset); } }
<?php // Remove VC Elements vc_remove_element('vc_posts_slider'); vc_remove_element('vc_posts_grid'); vc_remove_element('vc_carousel'); vc_remove_element('vc_cta_button'); vc_remove_element('vc_cta_button2'); vc_remove_element('vc_button'); vc_remove_element('vc_button2'); vc_remove_element('vc_gallery'); vc_remove_element('vc_images_carousel'); // Custom Column Classes // ............................................................... function custom_css_classes_for_vc_row_and_vc_column($class_string, $tag) { if ($tag == 'vc_row' || $tag == 'vc_row_inner') { $class_string = str_replace('vc_row-fluid', '', $class_string); } if ($tag == 'vc_column' || $tag == 'vc_column_inner') { $class_string = str_replace('vc_col', 'col', $class_string); } return $class_string; } // Filter to Replace default css class for vc_row shortcode and vc_column add_filter('vc_shortcodes_css_class', 'custom_css_classes_for_vc_row_and_vc_column', 10, 2); # --------------------------------------------------------------- # Modified or added options for Visual Composer default elements # --------------------------------------------------------------- function add_media_center_vc_params() {
vc_remove_element("vc_tab"); vc_remove_element("vc_images_carousel"); // Remove standard WP widgets vc_remove_element("vc_wp_archives"); vc_remove_element("vc_wp_calendar"); vc_remove_element("vc_wp_categories"); vc_remove_element("vc_wp_custommenu"); vc_remove_element("vc_wp_links"); vc_remove_element("vc_wp_meta"); vc_remove_element("vc_wp_pages"); vc_remove_element("vc_wp_posts"); vc_remove_element("vc_wp_recentcomments"); vc_remove_element("vc_wp_rss"); vc_remove_element("vc_wp_search"); vc_remove_element("vc_wp_tagcloud"); vc_remove_element("vc_wp_text"); // Common arrays and strings $THEMEREX_VC_category = __("ThemeREX shortcodes", "themerex"); // Current element id $THEMEREX_VC_id = array("param_name" => "id", "heading" => __("Element ID", "themerex"), "description" => __("ID for current element", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => "", "type" => "textfield"); // Current element class $THEMEREX_VC_class = array("param_name" => "class", "heading" => __("Element CSS class", "themerex"), "description" => __("CSS class for current element", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => "", "type" => "textfield"); // Current element style $THEMEREX_VC_style = array("param_name" => "style", "heading" => __("CSS styles", "themerex"), "description" => __("Any additional CSS rules (if need)", "themerex"), "group" => __('Size & Margins', 'themerex'), "class" => "", "value" => "", "type" => "textfield"); // Width and height params function THEMEREX_VC_width($w = "") { return array("param_name" => "width", "heading" => __("Width", "themerex"), "description" => __("Width (in pixels or percent) of the current element", "themerex"), "group" => __('Size & Margins', 'themerex'), "value" => $w, "type" => "textfield"); } function THEMEREX_VC_height($h = '') {
/** * Add Visual Composer plugin support * * @link texthttp://vc.wpbakery.com/ * * @todo Support for Frontend Editor (VC4+) * * @since 1.0 * @version 1.2.3 * * @access public */ public function visual_composer_support() { //VC 4+ disabling Frontend Editor if (function_exists('vc_disable_frontend')) { vc_disable_frontend(); } //VC additional shortcodes admin interface $vc_shortcodes_admin_tweaks = apply_filters('wmhook_shortcode_' . 'vc_shortcodes_admin_tweaks_file', $this->page_builder_dir . 'visual-composer/visual-composer.php'); require_once $vc_shortcodes_admin_tweaks; //VC setup screen modifications add_filter('vc_settings_tabs', array($this, 'visual_composer_setup')); delete_option('wpb_js_use_custom'); //Disable VC Guide Tour if (function_exists('vc_editor_post_types')) { foreach (vc_editor_post_types() as $post_type) { add_filter('vc_ui-pointers-' . $post_type, '__return_empty_array', 999); } } //VC extending shortcode parameters add_shortcode_param('wm_radio', array($this, 'visual_composer_custom_field_wm_radio')); //Remove default VC elements (only if current theme supports this) if (function_exists('vc_remove_element') && (wma_supports_subfeature('remove_vc_shortcodes') || wma_supports_subfeature('remove-vc-shortcodes')) && class_exists('WPBMap')) { $vc_shortcodes_all = array_keys(WPBMap::getShortCodes()); $vc_shortcodes_keep = array('vc_row', 'vc_row_inner', 'vc_column', 'vc_column_inner', 'vc_raw_html', 'vc_raw_js', 'contact-form-7', 'gravityform', 'layerslider_vc', 'rev_slider_vc'); // Do not remove custom mapped shortcodes via WP admin if (class_exists('Vc_Automap_Model') && is_callable('Vc_Automap_Model::findAll')) { $vc_shortcodes_custom = Vc_Automap_Model::findAll(); foreach ($vc_shortcodes_custom as $shortcode) { $vc_shortcodes_keep[] = $shortcode->tag; } } $vc_shortcodes_keep = apply_filters('wmhook_shortcode_' . 'vc_keep', $vc_shortcodes_keep); $vc_shortcodes_remove = apply_filters('wmhook_shortcode_' . 'vc_remove', array_diff($vc_shortcodes_all, $vc_shortcodes_keep)); //Array check required due to filter applied above if (is_array($vc_shortcodes_remove) && !empty($vc_shortcodes_remove)) { foreach ($vc_shortcodes_remove as $shortcode) { vc_remove_element($shortcode); } } } //Add custom VC elements if (function_exists('vc_map') && !empty(self::$codes['vc_plugin'])) { ksort(self::$codes['vc_plugin']); foreach (self::$codes['vc_plugin'] as $shortcode) { //simple validation (as of http://kb.wpbakery.com/index.php?title=Vc_map, the below 2 parameters are required) if (!isset($shortcode['name']) || !isset($shortcode['base'])) { continue; } //sort shortcode parameters array if (isset($shortcode['params'])) { ksort($shortcode['params']); } // Fix required for Visual Composer 4.5.2+ $shortcode['params'] = array_values($shortcode['params']); vc_map($shortcode); } } }
vc_remove_element('vc_pinterest'); vc_remove_element('vc_button'); vc_remove_element('vc_button2'); vc_remove_element('vc_cta_button'); vc_remove_element('vc_cta_button2'); //vc_remove_element('vc_message'); //vc_remove_element('vc_toggle'); vc_remove_element('vc_tour'); vc_remove_element('vc_tabs'); vc_remove_element('vc_accordion'); //vc_remove_element('vc_progress_bar'); //vc_remove_element('vc_pie'); vc_remove_element('vc_gallery'); vc_remove_element('vc_carousel'); //vc_remove_element('vc_images_carousel'); vc_remove_element('vc_posts_slider'); //vc_remove_element('vc_gmaps'); //vc_remove_element('vc_video'); if (function_exists('vc_remove_param')) { vc_remove_param('vc_row', 'full_width'); } if (function_exists('vc_set_as_theme')) { vc_set_as_theme(true); } if (function_exists('vc_disable_frontend')) { vc_disable_frontend(); } if (function_exists('vc_set_default_editor_post_types')) { vc_set_default_editor_post_types(array('page', 'st_portfolio', 'st_service')); } /*-----------------------------------------------------------------------------------*/
vc_remove_element("vc_carousel"); vc_remove_element("vc_cta_button"); // Remove default WordPress widgets vc_remove_element("vc_wp_search"); vc_remove_element("vc_wp_meta"); vc_remove_element("vc_wp_recentcomments"); vc_remove_element("vc_wp_calendar"); vc_remove_element("vc_wp_pages"); vc_remove_element("vc_wp_tagcloud"); vc_remove_element("vc_wp_custommenu"); vc_remove_element("vc_wp_text"); vc_remove_element("vc_wp_posts"); vc_remove_element("vc_wp_links"); vc_remove_element("vc_wp_categories"); vc_remove_element("vc_wp_archives"); vc_remove_element("vc_wp_rss"); vc_add_param("vc_row", array("type" => "dropdown", "class" => "", "heading" => __("Row style", "vh"), "admin_label" => true, "param_name" => "type", "value" => array(__("Default", "vh") => "0", __("Full Width - White", "vh") => "1"), "description" => "")); // Gap vc_map(array("name" => __("Gap", "vh"), "base" => "vh_gap", "icon" => "icon-wpb-ui-gap-content", "class" => "vh_vc_sc_gap", "category" => __("by Seatera", "vh"), "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Gap height", "vh"), "admin_label" => true, "param_name" => "height", "value" => "10", "description" => __("In pixels", "vh"))))); $colors_arr = array(__("Red", "vh") => "red", __("Blue", "vh") => "blue", __("Yellow", "vh") => "yellow", __("Green", "vh") => "green"); // Pricing table wpb_map(array("name" => __("Pricing Table", "vh"), "base" => "vh_pricing_table", "class" => "vh-pricing-tables-class", "icon" => "icon-wpb-ui-pricing_table-content", "category" => __("by Seatera", "vh"), "params" => array(array("type" => "dropdown", "heading" => __("Color", "vh"), "param_name" => "pricing_block_color", "value" => $colors_arr, "description" => __("Pricing block color.", "vh")), array("type" => "textfield", "heading" => __("Title", "vh"), "param_name" => "pricing_title", "value" => "", "description" => __("Please add offer title.", "vh")), array("type" => "textarea", "heading" => __("Description text 1", "vh"), "param_name" => "content1", "value" => "", "description" => __("Please add first part of your offer text.", "vh")), array("type" => "textarea_html", "heading" => __("Description text 2", "vh"), "param_name" => "content2", "value" => "", "description" => __("Please add second part of your offer text.", "vh")), array("type" => "textfield", "heading" => __("Price", "vh"), "param_name" => "price", "value" => "", "description" => __("Please add offer price.", "vh")), array("type" => "vc_link", "heading" => __("", "vh"), "param_name" => "button_link", "value" => "", "description" => __("Please add offer button link.", "vh")), array("type" => "textfield", "heading" => __("Extra class name", "vh"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name.", "vh"))))); // Update Buttons map $colors_arr = array(__("Transparent", "vh") => "btn-transparent", __("Blue", "vh") => "btn-primary", __("Light Blue", "vh") => "btn-info", __("Green", "vh") => "btn-success", __("Yellow", "vh") => "btn-warning", __("Red", "vh") => "btn-danger", __("Inverse", "vh") => "btn-inverse"); $icons_arr = array(__("None", "vh") => "none", __("Address book icon", "vh") => "wpb_address_book", __("Alarm clock icon", "vh") => "wpb_alarm_clock", __("Anchor icon", "vh") => "wpb_anchor", __("Application Image icon", "vh") => "wpb_application_image", __("Arrow icon", "vh") => "wpb_arrow", __("Asterisk icon", "vh") => "wpb_asterisk", __("Hammer icon", "vh") => "wpb_hammer", __("Balloon icon", "vh") => "wpb_balloon", __("Balloon Buzz icon", "vh") => "wpb_balloon_buzz", __("Balloon Facebook icon", "vh") => "wpb_balloon_facebook", __("Balloon Twitter icon", "vh") => "wpb_balloon_twitter", __("Battery icon", "vh") => "wpb_battery", __("Binocular icon", "vh") => "wpb_binocular", __("Document Excel icon", "vh") => "wpb_document_excel", __("Document Image icon", "vh") => "wpb_document_image", __("Document Music icon", "vh") => "wpb_document_music", __("Document Office icon", "vh") => "wpb_document_office", __("Document PDF icon", "vh") => "wpb_document_pdf", __("Document Powerpoint icon", "vh") => "wpb_document_powerpoint", __("Document Word icon", "vh") => "wpb_document_word", __("Bookmark icon", "vh") => "wpb_bookmark", __("Camcorder icon", "vh") => "wpb_camcorder", __("Camera icon", "vh") => "wpb_camera", __("Chart icon", "vh") => "wpb_chart", __("Chart pie icon", "vh") => "wpb_chart_pie", __("Clock icon", "vh") => "wpb_clock", __("Fire icon", "vh") => "wpb_fire", __("Heart icon", "vh") => "wpb_heart", __("Mail icon", "vh") => "wpb_mail", __("Play icon", "vh") => "wpb_play", __("Shield icon", "vh") => "wpb_shield", __("Video icon", "vh") => "wpb_video"); $target_arr = array(__("Same window", "vh") => "_self", __("New window", "vh") => "_blank"); $size_arr = array(__("Regular size", "vh") => "wpb_regularsize", __("Large", "vh") => "btn-large", __("Small", "vh") => "btn-small", __("Mini", "vh") => "btn-mini"); vc_map(array("name" => __("Button", "vh"), "base" => "vc_button", "icon" => "icon-wpb-ui-button", "category" => __('Content', 'vh'), "params" => array(array("type" => "textfield", "heading" => __("Text on the button", "vh"), "holder" => "button", "class" => "wpb_button", "param_name" => "title", "value" => __("Text on the button", "vh"), "description" => __("Text on the button.", "vh")), array("type" => "textfield", "heading" => __("URL (Link)", "vh"), "param_name" => "href", "description" => __("Button link.", "vh")), array("type" => "dropdown", "heading" => __("Target", "vh"), "param_name" => "target", "value" => $target_arr, "dependency" => array('element' => "href", 'not_empty' => true)), array("type" => "dropdown", "heading" => __("Color", "vh"), "param_name" => "color", "value" => $colors_arr, "description" => __("Button color.", "vh")), array("type" => "dropdown", "heading" => __("Icon", "vh"), "param_name" => "icon", "value" => $icons_arr, "description" => __("Button icon.", "vh")), array("type" => "dropdown", "heading" => __("Size", "vh"), "param_name" => "size", "value" => $size_arr, "description" => __("Button size.", "vh")), array("type" => "textfield", "heading" => __("Extra class name", "vh"), "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.", "vh"))), "js_view" => 'VcButtonView')); $event_categorie = get_terms('event_categories', array('fields' => 'names')); foreach ($event_categorie as $value) { $event_categories[] = $value;
{ require get_template_directory() . '/vc_params/vc_rows.php'; require get_template_directory() . '/vc_params/vc_column.php'; require get_template_directory() . '/vc_params/vc_btn.php'; require get_template_directory() . '/vc_params/vc_separator.php'; require get_template_directory() . '/vc_params/vc_tabs.php'; require get_template_directory() . '/vc_params/vc_pie.php'; require get_template_directory() . '/vc_params/vc_custom_heading.php'; require get_template_directory() . '/vc_params/vc_images_carousel.php'; } } /* Remove Element VC */ if (class_exists('Vc_Manager')) { vc_remove_element("vc_button"); vc_remove_element("vc_cta_button"); vc_remove_element("vc_cta_button2"); } /* Add SCSS */ if (!class_exists('scssc')) { require get_template_directory() . '/inc/libs/scss.inc.php'; } /* Add Meta Core Options */ if (is_admin()) { if (!class_exists('ZoCoreControl')) { /* add mete core */ require get_template_directory() . '/inc/metacore/core.options.php'; /* add meta options */ require get_template_directory() . '/inc/options/meta.options.php'; } /* tmp plugins. */ require get_template_directory() . '/inc/options/require.plugins.php';
function nm_vc_remove_plugin_elements() { vc_remove_element('contact-form-7'); }
* @package Alaya_framework * @subpackage City News * @since 1.0 */ /*------------------------------------------------------- Add Exist Shortcodes To Visual Composer --------------------------------------------------------*/ require_once "custom_blog.php"; require_once "custom_scroll_posts.php"; require_once "custom_categories_loop.php"; require_once "custom_recent_posts.php"; require_once "custom_recent_comments.php"; require_once "custom_sticky.php"; /*Remove exist shortcode*/ vc_remove_element("vc_images_carousel"); vc_remove_element("vc_carousel"); vc_remove_param('vc_row', 'full_width'); /*Load custom CSS*/ add_action('wp_enqueue_scripts', 'vc_custom_css', 30); function vc_custom_css() { wp_enqueue_style("vc-custom", get_template_directory_uri() . "/vc_extends/vc_custom.css", false, null, "all"); } /*Disable frontend Interface*/ //vc_disable_frontend(); /*Set the default editor to Visual composer*/ //add_action('vc_after_init','my_custom_function',100); function my_custom_function() { $vcGroupAccess = vc_settings()->get('groups_access_rules'); $vcGroupAccess["administrator"]["show"] = "only";
vc_remove_element("vc_wp_custommenu"); vc_remove_element("vc_wp_text"); vc_remove_element("vc_wp_posts"); vc_remove_element("vc_wp_links"); vc_remove_element("vc_wp_categories"); vc_remove_element("vc_wp_archives"); vc_remove_element("vc_wp_rss"); vc_remove_element("vc_posts_slider"); vc_remove_element("vc_posts_grid"); vc_remove_element("vc_carousel"); vc_remove_element("vc_cta_button"); vc_remove_element("vc_cta_button2"); vc_remove_element("vc_button"); vc_remove_element("vc_flickr"); vc_remove_element("vc_gallery"); vc_remove_element("vc_images_carousel"); /*vc_remove_element("product"); vc_remove_element("top_rated_products"); vc_remove_element("recent_products"); vc_remove_element("featured_products"); vc_remove_element("products"); vc_remove_element("product_category"); vc_remove_element("sale_products"); vc_remove_element("best_selling_products"); vc_remove_element("product_attribute"); vc_remove_element("add_to_cart"); vc_remove_element("add_to_cart_url"); vc_remove_element("product_page");*/ // [vc_row] vc_add_param("vc_row", array("type" => "dropdown", "class" => "hide_in_vc_editor", "admin_label" => true, "heading" => "Row Type", "param_name" => "type", "value" => array("Full Width" => "full_width", "Boxed" => "boxed"))); vc_add_param("vc_row", array("type" => "textfield", "class" => "hide_in_vc_editor", "admin_label" => true, "heading" => __("Height"), "param_name" => "height", "value" => "", "description" => ""));
/** * Remove short codes * * @access private */ private function unRegister() { foreach (self::$un_register as $short_code) { vc_remove_element($short_code); } }
vc_remove_element("vc_wp_posts"); vc_remove_element("vc_wp_links"); vc_remove_element("vc_wp_categories"); vc_remove_element("vc_wp_archives"); vc_remove_element("vc_wp_rss"); vc_remove_element("vc_cta_button"); vc_remove_element("vc_cta_button2"); vc_remove_element("vc_gmaps"); vc_remove_element("vc_carousel"); vc_remove_element("vc_media_grid"); vc_remove_element("vc_masonry_grid"); vc_remove_element("vc_masonry_media_grid"); vc_remove_element("vc_icon"); vc_remove_element("woocommerce_cart"); vc_remove_element("woocommerce_checkout"); vc_remove_element("woocommerce_order_tracking"); vc_remove_element("woocommerce_my_account"); vc_remove_element("recent_products"); vc_remove_element("featured_products"); vc_remove_element("product"); vc_remove_element("products"); vc_remove_element("add_to_cart"); vc_remove_element("add_to_cart_url"); vc_remove_element("product_page"); vc_remove_element("product_category"); vc_remove_element("product_categories"); vc_remove_element("sale_products"); vc_remove_element("best_selling_products"); vc_remove_element("top_rated_products"); vc_remove_element("product_attribute");
function wpb_remove($shortcode) { vc_remove_element($shortcode); }
vc_remove_element("vc_wp_rss"); vc_remove_element("vc_teaser_grid"); vc_remove_element("vc_button"); vc_remove_element("vc_button2"); vc_remove_element("vc_cta_button"); vc_remove_element("vc_cta_button2"); vc_remove_element("vc_message"); vc_remove_element("vc_tour"); vc_remove_element("vc_progress_bar"); vc_remove_element("vc_pie"); vc_remove_element("vc_posts_slider"); vc_remove_element("vc_toggle"); vc_remove_element("vc_images_carousel"); vc_remove_element("vc_posts_grid"); vc_remove_element("vc_carousel"); vc_remove_element("vc_custom_heading"); /*** Remove unused parameters ***/ if (function_exists('vc_remove_param')) { vc_remove_param('vc_single_image', 'css_animation'); vc_remove_param('vc_column_text', 'css_animation'); vc_remove_param('vc_row', 'bg_image'); vc_remove_param('vc_row', 'bg_color'); vc_remove_param('vc_row', 'font_color'); vc_remove_param('vc_row', 'margin_bottom'); vc_remove_param('vc_row', 'bg_image_repeat'); vc_remove_param('vc_tabs', 'interval'); vc_remove_param('vc_separator', 'style'); vc_remove_param('vc_separator', 'color'); vc_remove_param('vc_separator', 'accent_color'); vc_remove_param('vc_separator', 'el_width'); vc_remove_param('vc_text_separator', 'style');