• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vc_disable_frontend函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vc_disable_frontend函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_disable_frontend函数的具体用法?PHP vc_disable_frontend怎么用?PHP vc_disable_frontend使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了vc_disable_frontend函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: appica_vc_before_init

 /**
  * 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);
 }
开发者ID:narendra-addweb,项目名称:m1,代码行数:15,代码来源:vc.php


示例2: _actionSetup

 /**
  * 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);
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:15,代码来源:backend.php


示例3: ewf_load_composer

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);
}
开发者ID:narendra-addweb,项目名称:SwitchedOn,代码行数:14,代码来源:components.php


示例4: visual_composer_stuff

 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');
     }
 }
开发者ID:quyendam2612,项目名称:quanao,代码行数:48,代码来源:functions.php


示例5: nectar_set_vc_as_theme

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();
}
开发者ID:ryuqing,项目名称:cake,代码行数:16,代码来源:nectar-addons.php


示例6: mk_set_vc_as_theme

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();
}
开发者ID:namleduc,项目名称:thqc,代码行数:16,代码来源:vc-integration.php


示例7: visual_composer_stuff

 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');
     }
 }
开发者ID:Junaid-Farid,项目名称:gocnex,代码行数:46,代码来源:functions.php


示例8: visual_composer_support

 /**
  * 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);
         }
     }
 }
开发者ID:pab44,项目名称:pab44,代码行数:70,代码来源:class-shortcodes.php


示例9: vc_disable_frontend

<?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");
开发者ID:javalidigital,项目名称:multipla,代码行数:31,代码来源:vc-xtend.php


示例10: TheShortcodesForVC

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";
//.........这里部分代码省略.........
开发者ID:ardiqghenatya,项目名称:web4,代码行数:101,代码来源:visualcomposer.php


示例11: td_vc_init

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();
    }
}
开发者ID:weerapat,项目名称:wp-daily,代码行数:20,代码来源:td_wp_booster_functions.php


示例12: df_disable_frontend_link

 /**
  * df_disable_frontend_link
  * @param - 
  * @return -
  */
 function df_disable_frontend_link()
 {
     vc_disable_frontend();
 }
开发者ID:willi-dev,项目名称:vc_extender,代码行数:9,代码来源:df-vc-extender.php


示例13: TheShortcodesForVC

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'))))));
//.........这里部分代码省略.........
开发者ID:primarydesign,项目名称:the-color-mint,代码行数:101,代码来源:visualcomposer.php


示例14: __construct

 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'));
     }
 }
开发者ID:jonasbelcina,项目名称:platinumdxb,代码行数:32,代码来源:visual-composer.php


示例15: add_theme_support

// 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");
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:31,代码来源:frontend.php


示例16: vc_remove_frontend_links

function vc_remove_frontend_links()
{
    vc_disable_frontend();
    // this will disable frontend editor
}
开发者ID:nosval,项目名称

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vc_editor_post_types函数代码示例发布时间:2022-05-23
下一篇:
PHP vc_default_editor_post_types函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap