/** * Setup Visual Composer for theme. * * Also, this function could be defined in theme "core" plugin. */ function appica_vc_before_init() { vc_disable_frontend(); vc_set_as_theme(true); // Allow post by default vc_set_default_editor_post_types(array('page', 'post', 'appica_portfolio')); // Set path to directory where Visual Composer should look for template files for content elements. $dir = get_template_directory() . '/inc/vc_templates'; vc_set_shortcodes_templates_dir($dir); }
/** * Setup the editor * called on action 'admin_init' */ public function _actionSetup() { // Disable Visual Composers Frontend Editor vc_disable_frontend(); // Get backend editor object through VC_Manager (vc di container) global $vc_manager; $this->editor = $vc_manager->backendEditor(); // VC_Backend_Editor->render() registers all needed scripts // the "real" render came later in $this->html_output(); $this->editor->render($this->post->post_type); }
function ewf_load_composer() { if (function_exists('vc_set_as_theme')) { vc_set_as_theme(); } if (function_exists('vc_set_template_dir')) { $dir = get_template_directory() . '/framework/composer/templates/'; vc_set_template_dir($dir); } if (function_exists('vc_disable_frontend')) { vc_disable_frontend(); } add_filter('vc_shortcodes_css_class', 'ewf_composer_custom_classes', 10, 2); }
function visual_composer_stuff() { if (function_exists('vc_set_as_theme')) { vc_set_as_theme(true); } vc_disable_frontend(); // Modify and remove existing shortcodes from VC include_once 'inc/shortcodes/visual-composer/custom_vc.php'; // VC Templates $vc_templates_dir = get_template_directory() . '/inc/shortcodes/visual-composer/vc_templates/'; vc_set_template_dir($vc_templates_dir); // Add new shortcodes to VC include_once 'inc/shortcodes/visual-composer/from-the-blog.php'; include_once 'inc/shortcodes/visual-composer/social-media-profiles.php'; include_once 'inc/shortcodes/visual-composer/banner.php'; include_once 'inc/shortcodes/visual-composer/title.php'; // Add new Shop shortcodes to VC if (class_exists('WooCommerce')) { include_once 'inc/shortcodes/visual-composer/wc-recent-products.php'; include_once 'inc/shortcodes/visual-composer/wc-featured-products.php'; include_once 'inc/shortcodes/visual-composer/wc-products-by-category.php'; include_once 'inc/shortcodes/visual-composer/wc-products-by-attribute.php'; include_once 'inc/shortcodes/visual-composer/wc-product-by-id-sku.php'; include_once 'inc/shortcodes/visual-composer/wc-products-by-ids-skus.php'; include_once 'inc/shortcodes/visual-composer/wc-sale-products.php'; include_once 'inc/shortcodes/visual-composer/wc-top-rated-products.php'; include_once 'inc/shortcodes/visual-composer/wc-best-selling-products.php'; include_once 'inc/shortcodes/visual-composer/wc-add-to-cart-button.php'; include_once 'inc/shortcodes/visual-composer/wc-product-categories.php'; include_once 'inc/shortcodes/visual-composer/wc-product-categories-grid.php'; } // Add new Options function add_vc_text_separator_no_border() { $param = WPBMap::getParam('vc_text_separator', 'style'); $param['value'][__('No Border', 'mr_tailor')] = 'no_border'; WPBMap::mutateParam('vc_text_separator', $param); } add_action('init', 'add_vc_text_separator_no_border'); // Remove vc_teaser if (is_admin()) { function remove_vc_teaser() { remove_meta_box('vc_teaser', '', 'side'); } add_action('admin_head', 'remove_vc_teaser'); } }
function nectar_set_vc_as_theme() { vc_set_as_theme($disable_updater = true); if (defined('SALIENT_VC_ACTIVE')) { $child_dir = get_stylesheet_directory() . '/nectar/nectar-vc-addons/vc_templates'; $parent_dir = get_template_directory() . '/nectar/nectar-vc-addons/vc_templates'; vc_set_shortcodes_templates_dir($parent_dir); vc_set_shortcodes_templates_dir($child_dir); } else { $child_dir = get_template_directory() . '/nectar/nectar-vc-addons/vc_templates'; $parent_dir = get_template_directory() . '/nectar/nectar-vc-addons/vc_templates'; vc_set_shortcodes_templates_dir($parent_dir); vc_set_shortcodes_templates_dir($child_dir); } vc_disable_frontend(); }
function mk_set_vc_as_theme() { vc_set_as_theme($disable_updater = true); if (defined('MODIFIED_VC_ACTIVATED')) { $child_dir = get_stylesheet_directory() . '/shortcodes'; $parent_dir = get_template_directory() . '/shortcodes'; vc_set_shortcodes_parent_templates_dir($parent_dir); vc_set_shortcodes_templates_dir($child_dir); } else { $child_dir = get_template_directory() . '/shortcodes'; $parent_dir = get_template_directory() . '/shortcodes'; vc_set_shortcodes_templates_dir($parent_dir); vc_set_shortcodes_templates_dir($child_dir); } vc_disable_frontend(); }
function visual_composer_stuff() { //enable vc on post types if (function_exists('vc_set_default_editor_post_types')) { vc_set_default_editor_post_types(array('post', 'page', 'product', 'portfolio')); } if (function_exists('vc_set_as_theme')) { vc_set_as_theme(true); } vc_disable_frontend(); // Modify and remove existing shortcodes from VC include_once 'inc/shortcodes/visual-composer/custom_vc.php'; // VC Templates $vc_templates_dir = get_template_directory() . '/inc/shortcodes/visual-composer/vc_templates/'; vc_set_template_dir($vc_templates_dir); // Add new shortcodes to VC include_once 'inc/shortcodes/visual-composer/from-the-blog.php'; include_once 'inc/shortcodes/visual-composer/social-media-profiles.php'; include_once 'inc/shortcodes/visual-composer/google-map.php'; include_once 'inc/shortcodes/visual-composer/banner.php'; include_once 'inc/shortcodes/visual-composer/icon-box.php'; include_once 'inc/shortcodes/visual-composer/portfolio.php'; // Add new Shop shortcodes to VC if (class_exists('WooCommerce')) { include_once 'inc/shortcodes/visual-composer/wc-recent-products.php'; include_once 'inc/shortcodes/visual-composer/wc-featured-products.php'; include_once 'inc/shortcodes/visual-composer/wc-products-by-category.php'; include_once 'inc/shortcodes/visual-composer/wc-products-by-attribute.php'; include_once 'inc/shortcodes/visual-composer/wc-product-by-id-sku.php'; include_once 'inc/shortcodes/visual-composer/wc-products-by-ids-skus.php'; include_once 'inc/shortcodes/visual-composer/wc-sale-products.php'; include_once 'inc/shortcodes/visual-composer/wc-top-rated-products.php'; include_once 'inc/shortcodes/visual-composer/wc-best-selling-products.php'; include_once 'inc/shortcodes/visual-composer/wc-add-to-cart-button.php'; include_once 'inc/shortcodes/visual-composer/wc-product-categories.php'; include_once 'inc/shortcodes/visual-composer/wc-product-categories-grid.php'; } // Remove vc_teaser if (is_admin()) { function remove_vc_teaser() { remove_meta_box('vc_teaser', '', 'side'); } add_action('admin_head', 'remove_vc_teaser'); } }
/** * 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); } } }
<?php ################################################################################### ## KraftiveComments: Disbale VC front-end editor ## ##################################################################################### if (function_exists('vc_disable_frontend')) { vc_disable_frontend(); } vc_set_as_theme(true); //disable auto updates vc_is_updater_disabled(); ################################################################################### ## KraftiveComments: Remove Custom tesaser from page layout ## ##################################################################################### if (is_admin()) { if (!function_exists('folio_remove_vc_custom_teaser')) { function folio_remove_vc_custom_teaser() { $post_types = get_post_types('', 'names'); foreach ($post_types as $post_type) { remove_meta_box('vc_teaser', $post_type, 'side'); } } } add_action('do_meta_boxes', 'folio_remove_vc_custom_teaser'); } ################################################################################### ## KraftiveComments: Remove unnecessory elemnts ## ##################################################################################### if (function_exists("vc_remove_element")) { vc_remove_element("vc_posts_grid");
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); } }
function td_vc_init() { // Force Visual Composer to initialize as "built into the theme". This will hide certain tabs under the Settings->Visual Composer page if (function_exists('vc_set_as_theme')) { vc_set_as_theme(true); } if (function_exists('wpb_map')) { //map all of our blocks in page builder td_global_blocks::wpb_map_all(); } if (function_exists('vc_disable_frontend')) { vc_disable_frontend(); } // @todo - this may not be requiered anynmore if (class_exists('WPBakeryVisualComposer')) { //disable visual composer updater $td_composer = WPBakeryVisualComposer::getInstance(); $td_composer->disableUpdater(); } }
/** * df_disable_frontend_link * @param - * @return - */ function df_disable_frontend_link() { vc_disable_frontend(); }
function TheShortcodesForVC() { if (!class_exists('WPBakeryVisualComposerAbstract')) { // or using plugins path function return; } // Remove Front End vc_disable_frontend(); // Settings 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"); } // Adding Extra Shortcodes require_once THB_THEME_ROOT_ABS . '/vc_templates/button/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/image/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/styled_header/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/product/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/product_list/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/product_cat/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/post/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/portfolio/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/iconlist/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/iconbox/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/lookbook/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/product_grid/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/counter/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/notification/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/banner/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/progress_bar/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/team_member/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/testimonials/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/clients/shortcode.php'; require_once THB_THEME_ROOT_ABS . '/vc_templates/gap/shortcode.php'; /* Visual Composer Mappings */ // Adding animation to columns vc_add_param("vc_column", array("type" => "dropdown", "class" => "", "heading" => __("Animation"), "admin_label" => true, "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => "")); // Add parameters to rows vc_add_param("vc_row", array("type" => "dropdown", "class" => "", "heading" => "Type", "param_name" => "type", "value" => array("In Container" => "in_container", "Full Width Background" => "full_width_background", "Full Width Content" => "full_width_content"))); vc_add_param("vc_row", array("type" => "checkbox", "class" => "", "heading" => __("Enable parallax"), "param_name" => "enable_parallax", "value" => array("" => "false"))); vc_add_param("vc_row", array("type" => "textfield", "class" => "", "heading" => __("Parallax Speed"), "param_name" => "parallax_speed", "value" => "1", "dependency" => array("element" => "enable_parallax", "not_empty" => true), "description" => __("A value between 0 and 1 is recommended"))); vc_add_param("vc_row", array("type" => "textfield", "class" => "", "heading" => __("Video background (mp4)"), "param_name" => "bg_video_src_mp4", "value" => "", "description" => _("You must include the ogv & the mp4 format to render your video with cross browser compatibility. OGV is optional. Video must be in a 16:9 aspect ratio. The row background image will be used as in mobile devices."))); vc_add_param("vc_row", array("type" => "textfield", "class" => "", "heading" => __("Video background (ogv)"), "param_name" => "bg_video_src_ogv", "value" => "")); vc_add_param("vc_row", array("type" => "textfield", "class" => "", "heading" => __("Video background (webm)"), "param_name" => "bg_video_src_webm", "value" => "")); vc_add_param("vc_row", array("type" => "colorpicker", "class" => "", "heading" => __("Video Overlay Color"), "param_name" => "bg_video_overlay_color", "value" => "", "description" => __("If you want, you can select an overlay color."))); // Button shortcode vc_map(array("name" => __("Button"), "base" => "thb_button", "icon" => "thb_vc_ico_button", "class" => "thb_vc_sc_button", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Caption"), "admin_label" => true, "param_name" => "content", "value" => "", "description" => ""), array("type" => "textfield", "class" => "", "heading" => __("Link URL"), "param_name" => "link", "value" => "", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Icon"), "param_name" => "icon", "value" => getFontAwesomeIconArray(), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Open link in"), "param_name" => "target_blank", "value" => array("Same window" => "", "New window" => "true"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Style"), "param_name" => "size", "value" => array("Small button" => "small", "Medium button" => "medium", "Big button" => "large"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Button color"), "param_name" => "color", "value" => array("White" => "white", "Light Grey" => "grey", "Black" => "black", "Blue" => "blue", "Green" => "green", "Yellow" => "yellow", "Orange" => "orange", "Pink" => "pink", "Petrol Green" => "petrol", "Gray" => "darkgrey"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Animation"), "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => "")))); // Image shortcode vc_map(array("name" => __("Image"), "base" => "thb_image", "icon" => "thb_vc_ico_image", "class" => "thb_vc_sc_image", "category" => "by Fuel Themes", "params" => array(array("type" => "attach_image", "class" => "", "heading" => __("Select Image"), "param_name" => "image", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Animation"), "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""), array("type" => "textfield", "heading" => __("Image size"), "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.")), array("type" => "dropdown", "heading" => __("Image alignment"), "param_name" => "alignment", "value" => array(__("Align left") => "", __("Align right") => "right", __("Align center") => "center"), "description" => __("Select image alignment.")), array("type" => "checkbox", "class" => "", "heading" => __("Link to Full-Width Image?"), "param_name" => "lightbox", "value" => array("" => "true")), array("type" => "vc_link", "heading" => "Image link", "param_name" => "img_link", "description" => "Enter url if you want this image to have link.", "dependency" => array('element' => "lightbox", 'is_empty' => true))))); // Styled Header vc_map(array("name" => __("Styled Header"), "base" => "thb_header", "icon" => "thb_vc_ico_styled", "class" => "thb_vc_sc_styled", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "heading" => __("Title"), "param_name" => "title", "admin_label" => true, "description" => __("Title of the header")), array("type" => "textfield", "heading" => __("Sub-Title"), "param_name" => "sub_title", "description" => __("Sub - Title of the header. It's actually above the title.")), array("type" => "dropdown", "class" => "", "heading" => __("Icon"), "param_name" => "icon", "value" => getFontAwesomeIconArray(), "description" => ""), array("type" => "checkbox", "class" => "", "heading" => __("Use image instead of icon?"), "param_name" => "is_image", "value" => array("" => "true"), "description" => __("20px width is recommended (40px) for retina.")), array("type" => "attach_image", "class" => "", "heading" => __("Select Image"), "param_name" => "image", "description" => "", "dependency" => array('element' => "is_image", 'not_empty' => true))))); // Products vc_map(array("name" => __("Products"), "base" => "thb_product", "icon" => "thb_vc_ico_product", "class" => "thb_vc_sc_product", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "heading" => __("Product Sort"), "param_name" => "product_sort", "value" => array(__('Best Sellers') => "best-sellers", __('Latest Products') => "latest-products", __('Featured Products') => "featured-products", __('Top Rated Products') => "top-rated", __('Sale Products') => "sale-products", __('By Category') => "by-category", __('By Product ID') => "by-id"), "description" => __("Select the order of the products you'd like to show.")), array("type" => "checkbox", "heading" => __("Product Category"), "param_name" => "cat", "value" => thb_productCategories(), "description" => __("Select the order of the products you'd like to show."), "dependency" => array('element' => "product_sort", 'value' => array('by-category'))), array("type" => "textfield", "heading" => __("Product IDs"), "param_name" => "product_ids", "description" => __("Enter the products IDs you would like to display seperated by comma"), "dependency" => array('element' => "product_sort", 'value' => array('by-id'))), array("type" => "dropdown", "heading" => __("Carousel"), "param_name" => "carousel", "value" => array('Yes' => "yes", 'No' => "no"), "description" => __("Select yes to display the products in a carousel.")), array("type" => "textfield", "class" => "", "heading" => __("Number of items"), "param_name" => "item_count", "value" => "4", "description" => __("The number of products to show."), "dependency" => array('element' => "product_sort", 'value' => array('by-category', 'featured-products', 'sale-products', 'top-rated', 'latest-products', 'best-sellers'))), array("type" => "dropdown", "heading" => __("Columns"), "param_name" => "columns", "admin_label" => true, "value" => array(__('Four Columns') => "4", __('Three Columns') => "3", __('Two Columns') => "2"), "description" => __("Select the layout of the products."))))); // Product List vc_map(array("name" => __("Product List"), "base" => "thb_product_list", "icon" => "thb_vc_ico_product_list", "class" => "thb_vc_sc_product_list", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "class" => "", "heading" => __("Title"), "param_name" => "title", "value" => "", "admin_label" => true, "description" => __("Title of the widget")), array("type" => "dropdown", "heading" => __("Product Sort"), "param_name" => "product_sort", "value" => array(__('Best Sellers') => "best-sellers", __('Featured Products') => "featured-products", __('Latest Products') => "latest-products", __('Top Rated') => "top-rated", __('Sale Products') => "sale-products", __('By Product ID') => "by-id"), "admin_label" => true, "description" => __("Select the order of the products you'd like to show.")), array("type" => "textfield", "heading" => __("Product IDs"), "param_name" => "product_ids", "description" => __("Enter the products IDs you would like to display seperated by comma"), "dependency" => array('element' => "product_sort", 'value' => array('by-id'))), array("type" => "textfield", "class" => "", "heading" => __("Number of items"), "param_name" => "item_count", "value" => "4", "description" => __("The number of products to show."), "dependency" => array('element' => "product_sort", 'value' => array('by-category', 'featured-products', 'sale-products', 'top-rated', 'latest-products', 'best-sellers')))))); // Product Categories vc_map(array("name" => __("Product Categories"), "base" => "thb_product_categories", "icon" => "thb_vc_ico_product_categories", "class" => "thb_vc_sc_product_categories", "category" => "by Fuel Themes", "params" => array(array("type" => "checkbox", "heading" => __("Product Category"), "param_name" => "cat", "value" => thb_productCategories(), "description" => __("Select the categories you would like to display")), array("type" => "dropdown", "heading" => __("Carousel"), "param_name" => "carousel", "value" => array('Yes' => "yes", 'No' => "no"), "description" => __("Select yes to display the categories in a carousel.")), array("type" => "dropdown", "heading" => __("Columns"), "param_name" => "columns", "admin_label" => true, "value" => array(__('Four Columns') => "4", __('Three Columns') => "3", __('Two Columns') => "2"), "description" => __("Select the layout of the products."))))); // Posts vc_map(array("name" => __("Posts"), "base" => "thb_post", "icon" => "thb_vc_ico_post", "class" => "thb_vc_sc_post", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "heading" => __("Carousel"), "param_name" => "carousel", "value" => array('Yes' => "yes", 'No' => "no"), "description" => __("Select yes to display the products in a carousel.")), array("type" => "dropdown", "heading" => "Post Source", "param_name" => "source", "value" => array('Most Recent' => "most-recent", 'By Category' => "by-category", 'By Post ID' => "by-id", 'By Tag' => "by-tag", 'By Share Count' => "by-share", 'By Author' => "by-author"), "admin_label" => true, "description" => "Select the source of the posts you'd like to show."), array("type" => "checkbox", "heading" => "Post Categories", "param_name" => "cat", "value" => thb_blogCategories(), "description" => "Which categories would you like to show?", "dependency" => array('element' => "source", 'value' => array('by-category'))), array("type" => "textfield", "class" => "", "heading" => "Number of posts", "param_name" => "item_count", "value" => "4", "description" => "The number of posts to show.", "dependency" => array('element' => "source", 'value' => array('by-category', 'by-tag', 'by-share', 'by-author', 'most-recent'))), array("type" => "textfield", "heading" => "Post IDs", "param_name" => "post_ids", "description" => "Enter the post IDs you would like to display seperated by comma", "dependency" => array('element' => "source", 'value' => array('by-id'))), array("type" => "textfield", "heading" => "Tag slugs", "param_name" => "tag_slugs", "description" => "Enter the tag slugs you would like to display seperated by comma", "dependency" => array('element' => "source", 'value' => array('by-tag'))), array("type" => "textfield", "heading" => "Author IDs", "param_name" => "author_ids", "description" => "Enter the Author IDs you would like to display seperated by comma", "dependency" => array('element' => "source", 'value' => array('by-author'))), array("type" => "dropdown", "heading" => __("Columns"), "param_name" => "columns", "admin_label" => true, "value" => array(__('Four Columns') => "4", __('Three Columns') => "3", __('Two Columns') => "2"), "description" => __("Select the layout of the posts."))))); // Portfolio vc_map(array("name" => __("Portfolios"), "base" => "thb_portfolio", "icon" => "thb_vc_ico_portfolio", "class" => "thb_vc_sc_portfolio", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "heading" => __("Carousel"), "param_name" => "carousel", "value" => array('Yes' => "yes", 'No' => "no"), "description" => __("Select yes to display the portfolios in a carousel.")), array("type" => "textfield", "class" => "", "heading" => __("Number of portfolios"), "param_name" => "item_count", "value" => "4", "description" => __("The number of portfolios to show.")), array("type" => "dropdown", "heading" => __("Columns"), "param_name" => "columns", "value" => array(__('Four Columns') => "4", __('Three Columns') => "3", __('Two Columns') => "2"), "description" => __("Select the layout of the portfolios.")), array("type" => "checkbox", "heading" => __("Categories"), "param_name" => "categories", "value" => thb_portfolioCategories(), "description" => __("Select which categories of portfolios you would like to display."))))); // Icon List shortcode vc_map(array("name" => __("Icon List"), "base" => "thb_iconlist", "icon" => "thb_vc_ico_iconlist", "class" => "thb_vc_sc_iconlist", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Icon"), "param_name" => "icon", "value" => getFontAwesomeIconArray(), "description" => ""), array("type" => "colorpicker", "class" => "", "heading" => __("Icon color"), "param_name" => "color", "value" => "", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Animation"), "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""), array("type" => "exploded_textarea", "class" => "", "heading" => __("List Items"), "admin_label" => true, "param_name" => "content", "value" => "", "description" => __("Every new line will be treated as a list item"))))); // Iconbox shortcode vc_map(array("name" => __("Iconbox"), "base" => "thb_iconbox", "icon" => "thb_vc_ico_iconbox", "class" => "thb_vc_sc_iconbox", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Type"), "param_name" => "type", "value" => array("Top Icon - Type 1" => "top type1", "Top Icon - Type 2" => "top type2", "Top Icon - Type 3" => "top type3", "Left Icon - Round" => "left type1", "Left Icon - Square" => "left type2", "Left Icon - Only Icon" => "left type3", "Right Icon - Round" => "right type1", "Right Icon - Square" => "right type2", "Right Icon - Only Icon" => "right type3"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Icon"), "param_name" => "icon", "value" => getFontAwesomeIconArray(), "description" => ""), array("type" => "colorpicker", "class" => "", "heading" => __("Color"), "param_name" => "color", "value" => "", "description" => __("Leave empty to use default color")), array("type" => "attach_image", "class" => "", "heading" => __("Image"), "param_name" => "image", "description" => __("Use image instead of icon? Image uploaded should be 130*130 or 260*260 for retina. For small icons, 78*78 or 156*156 for retina."), "dependency" => array('element' => "type", 'value' => array('top type1', 'top type2', 'top type3', 'left type1', 'left type2', 'right type1', 'right type2'))), array("type" => "textfield", "class" => "", "heading" => __("Heading"), "param_name" => "heading", "value" => "", "description" => ""), array("type" => "textarea", "class" => "", "heading" => __("Content"), "admin_label" => true, "param_name" => "content", "value" => "", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Animation"), "param_name" => "animation", "value" => array("None" => "", "Left" => "animation right-to-left", "Right" => "animation left-to-right", "Top" => "animation bottom-to-top", "Bottom" => "animation top-to-bottom", "Scale" => "animation scale", "Fade" => "animation fade-in"), "description" => ""), array("type" => "checkbox", "class" => "", "heading" => __("Add Button?"), "param_name" => "use_btn", "value" => array("" => "true"), "description" => __("Check if you want to add a button.")), array("type" => "textfield", "class" => "", "heading" => __("Content"), "admin_label" => true, "param_name" => "btn_content", "value" => "", "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "textfield", "class" => "", "heading" => __("Button Caption"), "admin_label" => true, "param_name" => "btn_content", "value" => "", "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "textfield", "class" => "", "heading" => __("Button Link URL"), "param_name" => "btn_link", "value" => "", "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => __("Button Icon"), "param_name" => "btn_icon", "value" => getFontAwesomeIconArray(), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => __("Button Open link in"), "param_name" => "btn_target_blank", "value" => array("Same window" => "", "New window" => "true"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => __("Button Style"), "param_name" => "btn_size", "value" => array("Small button" => "small", "Medium button" => "medium", "Big button" => "big"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true)), array("type" => "dropdown", "class" => "", "heading" => __("Button color"), "param_name" => "btn_color", "value" => array("White" => "white", "Light Grey" => "lightgrey", "Black" => "black", "Blue" => "blue", "Green" => "green", "Yellow" => "yellow", "Orange" => "orange", "Pink" => "pink", "Petrol Green" => "petrol", "Gray" => "gray"), "description" => "", "dependency" => array('element' => "use_btn", 'not_empty' => true))))); // Look Book vc_map(array("name" => __("Look Book"), "base" => "thb_lookbook", "icon" => "thb_vc_ico_lookbook", "class" => "thb_vc_sc_lookbook", "category" => "by Fuel Themes", "params" => array(array("type" => "checkbox", "heading" => __("Product Category"), "param_name" => "cat", "value" => thb_productCategories(), "description" => __("Select the order of the products you'd like to show.")), array("type" => "textfield", "class" => "", "heading" => __("Number of items"), "param_name" => "item_count", "value" => "4", "description" => __("The number of products to show.")), array("type" => "textarea_html", "class" => "", "heading" => __("Content"), "admin_label" => true, "param_name" => "content", "value" => "", "description" => __("Enter a starting content to be displayed before lookbook products."))))); // Product Grid vc_map(array("name" => __("Product Grid"), "base" => "thb_productgrid", "icon" => "thb_vc_ico_productgrid", "class" => "thb_vc_sc_productgrid", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "heading" => __("Product Sort"), "param_name" => "product_sort", "value" => array(__('Best Sellers') => "best-sellers", __('Latest Products') => "latest-products", __('Top Rated') => "top-rated", __('Sale Products') => "sale-products", __('By Category') => "by-category", __('By Product ID') => "by-id"), "admin_label" => true, "description" => __("Select the order of the products you'd like to show.")), array("type" => "checkbox", "heading" => __("Product Category"), "param_name" => "cat", "value" => thb_productCategories(), "description" => __("Select the order of the products you'd like to show."), "dependency" => array('element' => "product_sort", 'value' => array('by-category'))), array("type" => "textfield", "heading" => __("Product IDs"), "param_name" => "product_ids", "description" => __("Enter the products IDs you would like to display seperated by comma"), "dependency" => array('element' => "product_sort", 'value' => array('by-id'))), array("type" => "textfield", "class" => "", "heading" => __("Number of items"), "param_name" => "item_count", "value" => "4", "description" => __("The number of products to show."))))); // Counter vc_map(array("name" => __("Counter"), "base" => "thb_counter", "icon" => "thb_vc_ico_counter", "class" => "thb_vc_sc_counter", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Icon"), "param_name" => "icon", "value" => getFontAwesomeIconArray(), "description" => ""), array("type" => "colorpicker", "class" => "", "heading" => __("Color"), "param_name" => "color", "value" => "", "description" => __("Leave empty to use default color")), array("type" => "attach_image", "class" => "", "heading" => __("Image"), "param_name" => "image", "description" => __("Use image instead of icon? Image uploaded should be 70*70 or 140*140 for retina.")), array("type" => "textfield", "class" => "", "heading" => __("Number to count to"), "param_name" => "content", "value" => "", "description" => ""), array("type" => "textfield", "class" => "", "heading" => __("Speed of the counter animation"), "param_name" => "speed", "value" => "", "description" => __("Speed of the counter animation, default 1500")), array("type" => "textfield", "class" => "", "heading" => __("Heading"), "param_name" => "heading", "value" => "", "admin_label" => true, "description" => "")))); // Notification shortcode vc_map(array("name" => __("Notification"), "base" => "thb_notification", "icon" => "thb_vc_ico_notification", "class" => "thb_vc_sc_notification", "category" => "by Fuel Themes", "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Type"), "param_name" => "type", "value" => array("Information" => "information", "Success" => "success", "Warning" => "warning", "Error" => "error", "Note" => "note"), "description" => ""), array("type" => "textarea", "class" => "", "heading" => __("Content"), "admin_label" => true, "param_name" => "content", "value" => "", "description" => "")))); // Banner shortcode vc_map(array("name" => __("Banner"), "base" => "thb_banner", "icon" => "thb_vc_ico_banner", "class" => "thb_vc_sc_banner", "category" => "by Fuel Themes", "params" => array(array("type" => "colorpicker", "class" => "", "heading" => __("Background Color"), "param_name" => "banner_color", "value" => "", "description" => __("Select Background Color")), array("type" => "attach_image", "class" => "", "heading" => __("Select Background Image"), "param_name" => "banner_bg", "description" => ""), array("type" => "textfield", "heading" => __("Banner Height"), "param_name" => "banner_height", "description" => __("Enter height of the banner in px.")), array("type" => "textfield", "heading" => __("Padding"), "param_name" => "banner_padding", "description" => __("Enter padding value of the content. <small>This does not affect border offset values, only the content.</small>")), array("type" => "dropdown", "class" => "", "heading" => __("Banner Type"), "param_name" => "type", "value" => array("Type - 1 (5px Border with offset)" => "type1", "Type - 2 (10px Border)" => "type2", "Type - 3 (Call to Action style without border)" => "type3", "Type - 4 (Simple no border)" => "type4", "Type - 5 (With overlay link)" => "type5"), "description" => ""), array("type" => "colorpicker", "class" => "", "heading" => __("Border Color"), "param_name" => "banner_border_color", "value" => "", "description" => __("Select Border Color if the banner type supports it"), "dependency" => array("element" => "type", "value" => array('type1', 'type2'))), array("type" => "textfield", "heading" => __("Title"), "param_name" => "title", "dependency" => array("element" => "type", "value" => array('type3'))), array("type" => "textfield", "heading" => __("Sub Title"), "param_name" => "subtitle", "dependency" => array("element" => "type", "value" => array('type3'))), array("type" => "textfield", "heading" => __("Button Text"), "param_name" => "button_text", "dependency" => array("element" => "type", "value" => array('type3'))), array("type" => "textfield", "heading" => __("Button Link"), "param_name" => "button_link", "dependency" => array("element" => "type", "value" => array('type3'))), array("type" => "textfield", "heading" => __("Overlay Link"), "param_name" => "overlay_link", "dependency" => array("element" => "type", "value" => array('type5'))), array("type" => "checkbox", "class" => "", "heading" => __("Enable parallax"), "param_name" => "enable_parallax", "value" => array("" => "false")), array("type" => "textfield", "class" => "", "heading" => __("Parallax Speed"), "param_name" => "parallax_speed", "value" => "1", "dependency" => array("element" => "enable_parallax", "not_empty" => true), "description" => __("A value between 0 and 10 is recommended. Lower is faster")), array("type" => "dropdown", "heading" => __("Text alignment"), "param_name" => "alignment", "value" => array(__("Align center") => "", __("Align left") => "textleft", __("Align right") => "textright"), "description" => __("Select text alignment."), "dependency" => array("element" => "type", "value" => array('type1', 'type2', 'type4', 'type5'))), array("type" => "textarea_html", "class" => "", "heading" => __("Content"), "param_name" => "content", "value" => "", "admin_label" => true, "description" => __("Content you would like to place inside the banner"), "dependency" => array("element" => "type", "value" => array('type1', 'type2', 'type4', 'type5')))))); // Banner shortcode vc_map(array("name" => __("Gap"), "base" => "thb_gap", "icon" => "thb_vc_ico_gap", "class" => "thb_vc_sc_gap", "category" => "by Fuel Themes", "params" => array(array("type" => "textfield", "heading" => __("Gap Height"), "param_name" => "height", "admin_label" => true, "description" => __("Enter height of the gap in px."))))); // Progress Bar Shortcode vc_map(array("name" => __("Progress Bar"), "base" => "thb_progressbar", "icon" => "thb_vc_ico_progressbar", "class" => "thb_vc_sc_progressbar", "category" => "by Fuel Themes", "params" => array(array("type" => "exploded_textarea", "heading" => __("Graphic values"), "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"), array("type" => "dropdown", "heading" => __("Bar color"), "param_name" => "bgcolor", "value" => array("Light Grey" => "lightgrey", "Black" => "black", "Blue" => "blue", "Green" => "green", "Yellow" => "yellow", "Orange" => "orange", "Pink" => "pink", "Petrol Green" => "petrol", "Gray" => "gray"), "description" => __("Select bar background color."))))); // Testimonials Shortcode vc_map(array("name" => __("Testimonials"), "base" => "thb_testimonials", "icon" => "thb_vc_ico_testimonials", "class" => "thb_vc_sc_testimonials", "category" => "by Fuel Themes", "params" => array(array("type" => "exploded_textarea", "heading" => __("Testimonials"), "param_name" => "values", "admin_label" => true, "description" => __('Enter testimonials here. Divide values with linebreaks (Enter). Example: Abraham Lincoln|Lorem ipsum ....', 'js_composer'), "value" => "Abraham Lincoln|Lorem Ipsum is simply dummy text of the printing and typesetting industry,George Bush|Lorem Ipsum is simply dummy text of the printing and typesetting industry.")))); // Team Member shortcode vc_map(array("name" => __("Team Member"), "base" => "thb_teammember", "icon" => "thb_vc_ico_teammember", "class" => "thb_vc_sc_teammember", "category" => "by Fuel Themes", "params" => array(array("type" => "attach_image", "class" => "", "heading" => __("Select Team Member Image"), "param_name" => "image", "description" => __("Minimum size is 270x270 pixels")), array("type" => "textfield", "heading" => __("Name"), "param_name" => "name", "admin_label" => true, "description" => __("Enter name of the team member")), array("type" => "textfield", "heading" => __("Position"), "param_name" => "position", "description" => __("Enter position/title of the team member")), array("type" => "textfield", "heading" => __("Facebook"), "param_name" => "facebook", "description" => __("Enter Facebook Link")), array("type" => "textfield", "heading" => __("Twitter"), "param_name" => "twitter", "description" => __("Enter Twitter Link")), array("type" => "textfield", "heading" => __("Google Plus"), "param_name" => "googleplus", "description" => __("Enter Google Plus Link")), array("type" => "textfield", "heading" => __("Linkedin"), "param_name" => "linkedin", "description" => __("Enter Linkedin Link"))))); // Clients shortcode vc_map(array("name" => __("Clients"), "base" => "thb_clients", "icon" => "thb_vc_ico_clients", "class" => "thb_vc_sc_clients", "category" => "by Fuel Themes", "params" => array(array("type" => "attach_images", "class" => "", "heading" => __("Select Images"), "param_name" => "images", "description" => __("Add as many client images as possible."))))); 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); } }
public function __construct() { if (function_exists('vc_set_as_theme')) { vc_set_as_theme(true); } if (function_exists('vc_disable_frontend')) { vc_disable_frontend(); } else { if (class_exists('NewVisualComposer')) { NewVisualComposer::disableInline(); } } add_action('init', array(&$this, 'map'), 20); add_action('init', array(&$this, 'add_params'), 50); if (is_admin()) { add_action('do_meta_boxes', array(&$this, 'remove_vc_teaser_meta_box'), 1); add_action('admin_print_scripts-post.php', array(&$this, 'enqueue_scripts'), 100); add_action('admin_print_scripts-post-new.php', array(&$this, 'enqueue_scripts'), 100); $vc_params_js = DHINC_ASSETS_URL . '/js/vc-params.js'; vc_add_shortcode_param('nullfield', array(&$this, 'nullfield_param'), $vc_params_js); vc_add_shortcode_param('product_attribute_filter', array(&$this, 'product_attribute_filter_param'), $vc_params_js); vc_add_shortcode_param('product_attribute', array(&$this, 'product_attribute_param'), $vc_params_js); vc_add_shortcode_param('products_ajax', array(&$this, 'products_ajax_param'), $vc_params_js); vc_add_shortcode_param('product_brand', array(&$this, 'product_brand_param'), $vc_params_js); vc_add_shortcode_param('product_lookbook', array(&$this, 'product_lookbook_param'), $vc_params_js); vc_add_shortcode_param('product_category', array(&$this, 'product_category_param'), $vc_params_js); vc_add_shortcode_param('ui_datepicker', array(&$this, 'ui_datepicker_param')); vc_add_shortcode_param('post_category', array(&$this, 'post_category_param'), $vc_params_js); vc_add_shortcode_param('ui_slider', array(&$this, 'ui_slider_param')); vc_add_shortcode_param('dropdown_group', array(&$this, 'dropdown_group_param')); } }
// add support for automatic feeds add_theme_support('automatic-feed-links') . add_theme_support('post-formats', array('image', 'gallery', 'video', 'link', 'audio', 'quote')); // add support for featured images add_theme_support('post-thumbnails'); // add support for custom background add_theme_support('custom-background'); add_editor_style(OXY_THEME_URI . 'inc/assets/stylesheets/editor-style.css'); /* * Set theme content width. Required * **/ if (!isset($content_width)) { $content_width = 1170; } if (function_exists('vc_disable_frontend')) { vc_disable_frontend(true); } function oxy_create_image_sizes() { if (function_exists('add_image_size')) { add_image_size('square-image', 600, 600, true); add_image_size('portfolio-thumb', oxy_get_option('portfolio_item_width'), oxy_get_option('portfolio_item_height'), oxy_get_option('portfolio_item_crop') === 'on'); } } add_action('init', 'oxy_create_image_sizes'); function oxy_detect_user_agent() { global $oxy_is_iphone, $oxy_is_ipad, $oxy_is_android; $oxy_is_iphone = stripos($_SERVER['HTTP_USER_AGENT'], "iPhone"); $oxy_is_ipad = stripos($_SERVER['HTTP_USER_AGENT'], "iPad"); $oxy_is_android = stripos($_SERVER['HTTP_USER_AGENT'], "Android");
function vc_remove_frontend_links() { vc_disable_frontend(); // this will disable frontend editor }
/** * Disables frontendeditor of if $param equals true * @param $param */ public function disableFrontendEditor($param) { if ($param) { vc_disable_frontend(); } }
function g5plus_vc_remove_frontend_links() { vc_disable_frontend(); }
function __construct() { $this->assets_js = plugin_dir_path(__FILE__) . 'js/'; $this->assets_css = plugin_dir_path(__FILE__) . 'css/'; $this->assets_dir = plugin_dir_path(__FILE__) . 'assets/'; $this->classes_dir = plugin_dir_path(__FILE__) . 'classes/'; $this->elements_dir = plugin_dir_path(__FILE__) . 'elements/'; $this->shortcode_dir = plugin_dir_path(__FILE__) . 'shortcodes/'; $this->plugins_dir = plugin_dir_path(__FILE__) . 'plugins/'; $this->woocommerce_dir = plugin_dir_path(__FILE__) . 'woocommerce/'; $this->bbpress_dir = plugin_dir_path(__FILE__) . 'bbpress/'; $this->posttypes_dir = plugin_dir_path(__FILE__) . 'posttypes/'; $this->images_dir = plugin_dir_path(__FILE__) . 'images/'; $this->icons_dir = plugin_dir_path(__FILE__) . 'icons/'; $this->detector_dir = plugin_dir_path(__FILE__) . 'detector/'; $this->parameters_dir = plugin_dir_path(__FILE__) . 'parameters/'; $this->TS_VCSC_PluginSlug = plugin_basename(__FILE__); $this->TS_VCSC_PluginPath = plugin_dir_url(__FILE__); $this->TS_VCSC_PluginDir = plugin_dir_path(__FILE__); // Check and Store VC Version, Applicable Post Types and Icon Picker // ----------------------------------------------------------------- if (function_exists('vc_editor_post_types')) { $this->TS_VCSC_VisualComposer_Posts = vc_editor_post_types(); } if (defined('WPB_VC_VERSION')) { $this->TS_VCSC_VisualComposer_Version = WPB_VC_VERSION; if (TS_VCSC_VersionCompare(WPB_VC_VERSION, '4.3.0') >= 0) { if (get_option('ts_vcsc_extend_settings_backendPreview', 1) == 1) { $this->TS_VCSC_EditorLivePreview = "true"; } else { $this->TS_VCSC_EditorLivePreview = "false"; } } else { $this->TS_VCSC_EditorLivePreview = "false"; } if (TS_VCSC_VersionCompare(WPB_VC_VERSION, '4.4.0') >= 0) { $this->TS_VCSC_EditorIconFontsInternal = "true"; $this->TS_VCSC_VisualComposer_Compliant = "true"; $this->TS_VCSC_EditorFullWidthInternal = "true"; } else { $this->TS_VCSC_EditorIconFontsInternal = "false"; $this->TS_VCSC_VisualComposer_Compliant = "false"; $this->TS_VCSC_EditorFullWidthInternal = "false"; } } else { $this->TS_VCSC_EditorLivePreview = "false"; $this->TS_VCSC_EditorIconFontsInternal = "false"; $this->TS_VCSC_VisualComposer_Compliant = "false"; $this->TS_VCSC_EditorFullWidthInternal = "false"; } // Check and Set other Global Variables // ------------------------------------ // Check if All Files should be loaded if (get_option('ts_vcsc_extend_settings_loadForcable', 0) == 0) { $this->TS_VCSC_LoadFrontEndForcable = "false"; } else { $this->TS_VCSC_LoadFrontEndForcable = "true"; } // Check if Waypoints should be loaded if (get_option('ts_vcsc_extend_settings_loadWaypoints', 1) == 1) { $this->TS_VCSC_LoadFrontEndWaypoints = "true"; } else { $this->TS_VCSC_LoadFrontEndWaypoints = "false"; } // Check if Modernizr should be loaded if (get_option('ts_vcsc_extend_settings_loadModernizr', 1) == 1) { $this->TS_VCSC_LoadFrontEndModernizr = "true"; } else { $this->TS_VCSC_LoadFrontEndModernizr = "false"; } // Check if CountTo should be loaded if (get_option('ts_vcsc_extend_settings_loadCountTo', 1) == 1) { $this->TS_VCSC_LoadFrontEndCountTo = "true"; } else { $this->TS_VCSC_LoadFrontEndCountTo = "false"; } // Check if CountUp should be loaded if (get_option('ts_vcsc_extend_settings_loadCountUp', 1) == 1) { $this->TS_VCSC_LoadFrontEndCountUp = "true"; } else { $this->TS_VCSC_LoadFrontEndCountUp = "false"; } // Check if Lightbox should be loaded if (get_option('ts_vcsc_extend_settings_loadLightbox', 0) == 1) { $this->TS_VCSC_LoadFrontEndLightbox = "true"; } else { $this->TS_VCSC_LoadFrontEndLightbox = "false"; } // Check if Tooltips should be loaded if (get_option('ts_vcsc_extend_settings_loadTooltip', 0) == 1) { $this->TS_VCSC_LoadFrontEndTooltips = "true"; } else { $this->TS_VCSC_LoadFrontEndTooltips = "false"; } // Check if ForceLoad of jQuery if (get_option('ts_vcsc_extend_settings_loadjQuery', 0) == 1) { $this->TS_VCSC_LoadFrontEndJQuery = "true"; } else { $this->TS_VCSC_LoadFrontEndJQuery = "false"; } // Check for Editor Image Preview if (get_option('ts_vcsc_extend_settings_previewImages', 1) == 1) { $this->TS_VCSC_EditorImagePreview = "true"; } else { $this->TS_VCSC_EditorImagePreview = "false"; } // Check for Background Indicator if (get_option('ts_vcsc_extend_settings_backgroundIndicator', 1) == 1) { $this->TS_VCSC_EditorBackgroundIndicator = "true"; } else { $this->TS_VCSC_EditorBackgroundIndicator = "false"; } // Check for Visual Icon Selector if (get_option('ts_vcsc_extend_settings_visualSelector', 1) == 1) { $this->TS_VCSC_EditorVisualSelector = "true"; } else { $this->TS_VCSC_EditorVisualSelector = "false"; } // Check for Native Icon Selector if (get_option('ts_vcsc_extend_settings_nativeSelector', 1) == 1) { $this->TS_VCSC_EditorNativeSelector = "true"; } else { $this->TS_VCSC_EditorNativeSelector = "false"; } // Check for Built-In Lightbox if (get_option('ts_vcsc_extend_settings_builtinLightbox', 1) == 1) { $this->TS_VCSC_UseInternalLightbox = "true"; } else { $this->TS_VCSC_UseInternalLightbox = "false"; } // Load Public Arrays that Define Element Settings // ----------------------------------------------- require_once $this->assets_dir . 'ts_vcsc_arrays_public.php'; // Load Arrays of Other Selection Items and Variables // -------------------------------------------------- require_once $this->assets_dir . 'ts_vcsc_arrays_other.php'; $this->TS_VCSC_PluginIsMultiSiteActive = is_plugin_active_for_network('ts-visual-composer-extend/ts-visual-composer-extend.php') == true ? "true" : "false"; //ksort($this->TS_VCSC_Visual_Composer_Elements); // Status of WooCommerce Elements // ------------------------------ if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { $this->TS_VCSC_WooCommerceVersion = $this->TS_VCSC_WooCommerceVersion(); $this->TS_VCSC_WooCommerceActive = "true"; if (defined('WPB_VC_VERSION')) { if (TS_VCSC_VersionCompare(WPB_VC_VERSION, '4.4.0') >= 0) { $this->TS_VCSC_WooCommerceRemove = "true"; } else { $this->TS_VCSC_WooCommerceRemove = "false"; } } else { $this->TS_VCSC_WooCommerceRemove = "false"; } } else { $this->TS_VCSC_WooCommerceVersion = ""; $this->TS_VCSC_WooCommerceActive = "false"; $this->TS_VCSC_WooCommerceRemove = "false"; } // Status of bbPress Elements // -------------------------- if (in_array('bbpress/bbpress.php', apply_filters('active_plugins', get_option('active_plugins')))) { $this->TS_VCSC_bbPressVersion = ""; $this->TS_VCSC_bbPressActive = "true"; } else { $this->TS_VCSC_bbPressVersion = ""; $this->TS_VCSC_bbPressActive = "false"; } // Check for Standalone Iconicum Plugin // ------------------------------------ if (in_array('ts-iconicum-icon-fonts/ts-iconicum-icon-fonts.php', apply_filters('active_plugins', get_option('active_plugins'))) || class_exists('ICONICUM_ICON_FONTS')) { $this->TS_VCSC_IconicumStandard = "true"; } else { $this->TS_VCSC_IconicumStandard = "false"; } // Load Icon Shortcode Generator // ----------------------------- if ($this->TS_VCSC_PluginIsMultiSiteActive == "true") { if (get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_iconicum', 1) == 1 && get_option('ts_vcsc_extend_settings_useIconGenerator', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_useIconGenerator', 0) == 1 && get_site_option('ts_vcsc_extend_settings_demo', 1) == 0) { $this->TS_VCSC_IconicumActivated = "true"; } else { $this->TS_VCSC_IconicumActivated = "false"; } } else { if (get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_iconicum', 1) == 1 && get_option('ts_vcsc_extend_settings_useIconGenerator', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_useIconGenerator', 0) == 1 && get_option('ts_vcsc_extend_settings_demo', 1) == 0) { $this->TS_VCSC_IconicumActivated = "true"; } else { $this->TS_VCSC_IconicumActivated = "false"; } } if ($this->TS_VCSC_IconicumStandard == "false") { if ($this->TS_VCSC_IconicumActivated == "true") { require_once $this->assets_dir . 'ts_vcsc_editor_button.php'; } } // Load and Initialize the Auto-Update Class // ----------------------------------------- if ($this->TS_VCSC_PluginIsMultiSiteActive == "true") { if (get_site_option('ts_vcsc_extend_settings_demo', 1) == 0 && get_option('ts_vcsc_extend_settings_extended', 0) == 0 && strpos(get_site_option('ts_vcsc_extend_settings_licenseInfo', ''), get_site_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE) { add_action('admin_init', array($this, 'TS_VCSC_ActivateAutoUpdate')); } } else { if (get_option('ts_vcsc_extend_settings_demo', 1) == 0 && get_option('ts_vcsc_extend_settings_extended', 0) == 0 && strpos(get_option('ts_vcsc_extend_settings_licenseInfo', ''), get_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE) { add_action('admin_init', array($this, 'TS_VCSC_ActivateAutoUpdate')); } } // Load Arrays of Font Settings // ---------------------------- add_action('init', array($this, 'TS_VCSC_IconFontArrays'), 1); // Load Language / Translation Files // --------------------------------- if (get_option('ts_vcsc_extend_settings_translationsDomain', 1) == 1) { add_action('init', array($this, 'TS_VCSC_LoadTextDomains'), 9); } $plugin = plugin_basename(__FILE__); add_filter("plugin_action_links_{$plugin}", array($this, "TS_VCSC_PluginAddSettingsLink")); if ($this->TS_VCSC_PluginIsMultiSiteActive == "true") { if (get_site_option('ts_vcsc_extend_settings_licenseValid', 0) == 1 && strpos(get_site_option('ts_vcsc_extend_settings_licenseInfo', ''), get_site_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE || get_option('ts_vcsc_extend_settings_extended', 0) == 1) { update_site_option('ts_vcsc_extend_settings_demo', 0); } else { update_site_option('ts_vcsc_extend_settings_demo', 1); } } else { if (get_option('ts_vcsc_extend_settings_licenseValid', 0) == 1 && strpos(get_option('ts_vcsc_extend_settings_licenseInfo', ''), get_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE || get_option('ts_vcsc_extend_settings_extended', 0) == 1) { update_option('ts_vcsc_extend_settings_demo', 0); } else { update_option('ts_vcsc_extend_settings_demo', 1); } } // Register Custom CSS and JS Inputs // --------------------------------- if (get_option('ts_vcsc_extend_settings_codeeditors', 1) == 1) { add_action('admin_init', array($this, 'TS_VCSC_RegisterCustomCSS_Setting')); add_action('admin_init', array($this, 'TS_VCSC_RegisterCustomJS_Setting')); } // Function to Register / Load External Files on Back-End // ------------------------------------------------------ add_action('admin_enqueue_scripts', array($this, 'TS_VCSC_Extensions_Admin_Files'), 999999999); add_action('admin_head', array($this, 'TS_VCSC_Extensions_Admin_Variables'), 999999999); // Function to Register / Load External Files on Front-End // ------------------------------------------------------- add_action('wp_enqueue_scripts', array($this, 'TS_VCSC_Extensions_Front_Main'), 999999999); add_action('wp_head', array($this, 'TS_VCSC_Extensions_Front_Variables'), 1); add_action('wp_head', array($this, 'TS_VCSC_Extensions_Front_Head'), 8888); add_action('wp_footer', array($this, 'TS_VCSC_Extensions_Front_Footer'), 8888); // Add Dashboard Widget // -------------------- if (get_option('ts_vcsc_extend_settings_dashboard', 1) == 1) { add_action('wp_dashboard_setup', array($this, 'TS_VCSC_DashboardHelpWidget')); } // Create Custom Post Types // ------------------------ if (get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) { if (get_option('ts_vcsc_extend_settings_posttypeTeam', 1) == 0 && get_option('ts_vcsc_extend_settings_posttypeTestimonial', 1) == 0 && get_option('ts_vcsc_extend_settings_posttypeLogo', 1) == 0 && get_option('ts_vcsc_extend_settings_posttypeSkillset', 1) == 0 && get_option('ts_vcsc_extend_settings_posttypeTimeline', 1) == 0) { update_option('ts_vcsc_extend_settings_posttypes', 0); } } if (get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 0) { $this->TS_VCSC_CustomPostTypesCheckup = "true"; if (get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_customTeam', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypeTeam', 1) == 1 && get_option('ts_vcsc_extend_settings_customTeam', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) { $this->TS_VCSC_CustomPostTypesTeam = "true"; } else { $this->TS_VCSC_CustomPostTypesTeam = "false"; } if (get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_customTestimonial', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypeTestimonial', 1) == 1 && get_option('ts_vcsc_extend_settings_customTestimonial', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) { $this->TS_VCSC_CustomPostTypesTestimonial = "true"; } else { $this->TS_VCSC_CustomPostTypesTestimonial = "false"; } if (get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_customLogo', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypeLogo', 1) == 1 && get_option('ts_vcsc_extend_settings_customLogo', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) { $this->TS_VCSC_CustomPostTypesLogo = "true"; } else { $this->TS_VCSC_CustomPostTypesLogo = "false"; } if (get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_customSkillset', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypeSkillset', 1) == 1 && get_option('ts_vcsc_extend_settings_customSkillset', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) { $this->TS_VCSC_CustomPostTypesSkillset = "true"; } else { $this->TS_VCSC_CustomPostTypesSkillset = "false"; } if (get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_customTimelines', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypeTimeline', 1) == 1 && get_option('ts_vcsc_extend_settings_customTimelines', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) { $this->TS_VCSC_CustomPostTypesTimeline = "true"; } else { $this->TS_VCSC_CustomPostTypesTimeline = "false"; } } else { $this->TS_VCSC_CustomPostTypesCheckup = "false"; $this->TS_VCSC_CustomPostTypesTeam = "false"; $this->TS_VCSC_CustomPostTypesTestimonial = "false"; $this->TS_VCSC_CustomPostTypesLogo = "false"; $this->TS_VCSC_CustomPostTypesSkillset = "false"; $this->TS_VCSC_CustomPostTypesTimeline = "false"; } if ($this->TS_VCSC_CustomPostTypesTeam == "true" || $this->TS_VCSC_CustomPostTypesTestimonial == "true" || $this->TS_VCSC_CustomPostTypesLogo == "true" || $this->TS_VCSC_CustomPostTypesSkillset == "true" || $this->TS_VCSC_CustomPostTypesTimeline == "true") { require_once $this->posttypes_dir . 'ts_vcsc_custom_post_registration.php'; $this->TS_VCSC_CustomPostTypesLoaded = "true"; add_action('init', 'TS_VCSC_CMBMetaBoxes', 7777777777); if ($this->TS_VCSC_CustomPostTypesTeam == "true") { require_once $this->posttypes_dir . 'ts_vcsc_custom_post_team.php'; add_action('admin_menu', array($this, 'TS_VCSC_Remove_MetaBoxes_Teams')); } if ($this->TS_VCSC_CustomPostTypesTestimonial == "true") { require_once $this->posttypes_dir . 'ts_vcsc_custom_post_testimonials.php'; add_action('admin_menu', array($this, 'TS_VCSC_Remove_MetaBoxes_Testimonials')); } if ($this->TS_VCSC_CustomPostTypesSkillset == "true") { require_once $this->posttypes_dir . 'ts_vcsc_custom_post_skillsets.php'; add_action('admin_menu', array($this, 'TS_VCSC_Remove_MetaBoxes_Skillsets')); } if ($this->TS_VCSC_CustomPostTypesTimeline == "true") { require_once $this->posttypes_dir . 'ts_vcsc_custom_post_timeline.php'; add_action('admin_menu', array($this, 'TS_VCSC_Remove_MetaBoxes_Timeline')); } if ($this->TS_VCSC_CustomPostTypesLogo == "true") { require_once $this->posttypes_dir . 'ts_vcsc_custom_post_logos.php'; add_action('admin_menu', array($this, 'TS_VCSC_Remove_MetaBoxes_Logos')); } } // Create Custom Admin Menu for Plugin // ----------------------------------- require_once $this->assets_dir . 'ts_vcsc_registrations_menu.php'; // Load Shortcode Definitions // -------------------------- add_action('init', array($this, 'TS_VCSC_RegisterAllShortcodes'), 888888888); //add_action('vc_before_init', array($this, 'TS_VCSC_RegisterAllShortcodes'), 888888888); // Load Composer Elements // ---------------------- add_action('init', array($this, 'TS_VCSC_RegisterWithComposer'), 999999999); //add_action('after_setup_theme', array($this, 'TS_VCSC_RegisterWithComposer')); //add_action('vc_before_init', array($this, 'TS_VCSC_RegisterWithComposer'), 999999999); add_action('admin_init', array($this, 'TS_VCSC_ChangeDownloadsUploadDirectory'), 999); add_action('admin_notices', array($this, 'TS_VCSC_CustomPackInstalledError')); add_action('wp_ajax_ts_delete_custom_pack', array($this, 'TS_VCSC_DeleteCustomPack_Ajax')); add_action('wp_ajax_ts_savepostmetadata', array($this, 'TS_VCSC_SavePostMetaData')); add_action('wp_ajax_ts_system_download', array($this, 'TS_VCSC_DownloadSystemInfoData')); add_action('wp_ajax_ts_export_settings', array($this, 'TS_VCSC_ExportPluginSettings')); // Allow Shortcodes in Widgets / Sidebar // ------------------------------------- add_filter('widget_text', 'do_shortcode'); // Check Default Settings Arrays // ----------------------------- if (get_option('ts_vcsc_extend_settings_dataRestore', 0) == 1) { add_action('admin_init', array($this, 'TS_VCSC_CheckDefaultOptions'), 888888888); } // Enable / Disable VC Frontend Editor // ----------------------------------- if (function_exists('vc_enabled_frontend') && function_exists('vc_disable_frontend')) { if (get_option('ts_vcsc_extend_settings_frontendEditor', 1) == 0) { vc_disable_frontend(true); } else { if (get_option('ts_vcsc_extend_settings_frontendEditor', 1) == 1) { vc_disable_frontend(false); } } } // Redirect to "About Composium" Page After Activation // --------------------------------------------------- add_action('admin_init', array($this, 'TS_VCSC_ActivationRedirect'), 1); // Lightbox Media Integrations // --------------------------- if (get_option('ts_vcsc_extend_settings_lightboxIntegration', 0) == 1) { add_filter('image_send_to_editor', array($this, 'TS_VCSC_AddLightboxClassMediaEditor'), 10, 3); } }
protected function extendVC() { if (class_exists('Vc_Manager')) { add_action('vc_before_init', array($this, 'wd_vcSetAsTheme')); vc_set_shortcodes_templates_dir(THEME_DIR . "/framework/extension/extendvc/vc_templates"); vc_disable_frontend(); $this->changing_rows_columns_classes(); } // Initialising Shortcodes if (false || class_exists('WPBakeryVisualComposerAbstract')) { require_once THEME_EXTENSION . '/extendvc/vc_includes/vc_functions.php'; require_once THEME_EXTENSION . '/extendvc/vc_includes/vc_images.php'; //require_once THEME_EXTENSION. '/extendvc/vc_includes/vc_shortcodes.php'; function requireVcExtend() { $vc_generates = array('params', 'feature_product_slider', 'recent_product_slider', 'recent_product', 'best_selling_product_slider', 'best_selling_product', 'top_rated_product', 'top_rated_product_slider', 'heading', 'banner', 'testimonial', 'portfolio', 'recent_blogs', 'recent_blogs_slider', 'button', 'code', 'feature', 'feature-slider', 'feature_wpdance', 'slide', 'quote', 'team_member', 'feedbuner', 'countdown', 'pricing_table', 'sale_product', 'sale_product_slider'); foreach ($vc_generates as $vc_generate) { if (file_exists(THEME_EXTENSION . "/extendvc/vc_generate/{$vc_generate}.php")) { require_once THEME_EXTENSION . "/extendvc/vc_generate/{$vc_generate}.php"; } } } add_action('init', 'requireVcExtend', 2); } }