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

PHP WPBakeryVisualComposer类代码示例

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

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



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

示例1: singleParamHtmlHolder

 public function singleParamHtmlHolder($param, $value)
 {
     $output = '';
     // Compatibility fixes
     $old_names = array('yellow_message', 'blue_message', 'green_message', 'button_green', 'button_grey', 'button_yellow', 'button_blue', 'button_red', 'button_orange');
     $new_names = array('alert-block', 'alert-info', 'alert-success', 'btn-success', 'btn', 'btn-info', 'btn-primary', 'btn-danger', 'btn-warning');
     $value = str_ireplace($old_names, $new_names, $value);
     //$value = __($value, "js_composer");
     //
     $param_name = isset($param['param_name']) ? $param['param_name'] : '';
     $type = isset($param['type']) ? $param['type'] : '';
     $class = isset($param['class']) ? $param['class'] : '';
     if (isset($param['holder']) == false || $param['holder'] == 'hidden') {
         $output .= '<input type="hidden" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '" />';
         if ($param['type'] == 'attach_image') {
             $img = wpb_getImageBySize(array('attach_id' => (int) preg_replace('/[^\\d]/', '', $value), 'thumb_size' => 'thumbnail'));
             $output .= ($img ? $img['thumbnail'] : '<img width="150" height="150" src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/blank.gif') . '" class="attachment-thumbnail"  data-name="' . $param_name . '" alt="" title="" style="display: none;" />') . '<img src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/elements_icons/single_image.png') . '" class="no_image_image' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '" /><a href="#" class="column_edit_trigger' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '">' . __('Add image', 'js_composer') . '</a>';
         } else {
             if ($param['type'] == 'attach_video') {
                 $img = wpb_getImageBySize(array('attach_id' => (int) preg_replace('/[^\\d]/', '', $value), 'thumb_size' => 'thumbnail'));
                 $output .= ($img ? $img['thumbnail'] : '<img width="150" height="150" src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/blank.gif') . '" class="attachment-thumbnail"  data-name="' . $param_name . '" alt="" title="" style="display: none;" />') . '<img src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/elements_icons/single_image.png') . '" class="no_image_image' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '" /><a href="#" class="column_edit_trigger' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '">' . __('Add image', 'js_composer') . '</a>';
             }
         }
     } else {
         $output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
     }
     return $output;
 }
开发者ID:Quartermain,项目名称:strategic,代码行数:28,代码来源:single_image.php


示例2: jsCssScripts

 public function jsCssScripts()
 {
     // wp_register_script('vc_bxslider', WPBakeryVisualComposer::getInstance()->assetURL('lib/bxslider-4/jquery.bxslider.min.js'));
     // wp_register_style('vc_bxslider_css', WPBakeryVisualComposer::getInstance()->assetURL('lib/bxslider-4/jquery.bxslider.css'));
     wp_register_script('vc_swiper', WPBakeryVisualComposer::getInstance()->assetURL('lib/swiper/dist/idangerous.swiper-2.2.js'), array(), time());
     wp_register_style('vc_swiper_css', WPBakeryVisualComposer::getInstance()->assetURL('lib/swiper/dist/idangerous.swiper.css'));
 }
开发者ID:sniezekjp,项目名称:staging-fs,代码行数:7,代码来源:carousel.php


示例3: singleParamHtmlHolder

 public function singleParamHtmlHolder($param, $value)
 {
     $output = '';
     // Compatibility fixes
     $old_names = array('yellow_message', 'blue_message', 'green_message', 'button_green', 'button_grey', 'button_yellow', 'button_blue', 'button_red', 'button_orange');
     $new_names = array('alert-block', 'alert-info', 'alert-success', 'btn-success', 'btn', 'btn-info', 'btn-primary', 'btn-danger', 'btn-warning');
     $value = str_ireplace($old_names, $new_names, $value);
     //$value = __($value, LANGUAGE_ZONE);
     //
     $param_name = isset($param['param_name']) ? $param['param_name'] : '';
     $type = isset($param['type']) ? $param['type'] : '';
     $class = isset($param['class']) ? $param['class'] : '';
     if (isset($param['holder']) == true && $param['holder'] !== 'hidden') {
         $output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
     }
     if ($param_name == 'images') {
         $images_ids = empty($value) ? array() : explode(',', trim($value));
         $output .= '<ul class="attachment-thumbnails' . (empty($images_ids) ? ' image-exists' : '') . '" data-name="' . $param_name . '">';
         foreach ($images_ids as $image) {
             $img = wpb_getImageBySize(array('attach_id' => (int) $image, 'thumb_size' => 'thumbnail'));
             $output .= $img ? '<li>' . $img['thumbnail'] . '</li>' : '<li><img width="150" height="150" test="' . $image . '" src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/blank.gif') . '" class="attachment-thumbnail" alt="" title="" /></li>';
         }
         $output .= '</ul>';
         $output .= '<a href="#" class="column_edit_trigger' . (!empty($images_ids) ? ' image-exists' : '') . '">' . __('Add images', LANGUAGE_ZONE) . '</a>';
     }
     return $output;
 }
开发者ID:scottnkerr,项目名称:eeco,代码行数:27,代码来源:image_gallery.php


示例4: vc_set_as_theme

/**
 * Sets plugin as theme plugin.
 * @param bool $disable_updater - If value is true disables auto updater options.
 */
function vc_set_as_theme($disable_updater = false)
{
    $composer = WPBakeryVisualComposer::getInstance();
    $composer->setSettingsAsTheme();
    if ($disable_updater) {
        $composer->disableUpdater();
    }
}
开发者ID:scottnkerr,项目名称:eeco,代码行数:12,代码来源:helpers_api.php


示例5: init

 public function init($settings)
 {
     parent::init($settings);
     $this->composer = WPBakeryVisualComposer::getInstance();
     $this->composer->createColumnShortCode();
     // Refactored
     $this->addAction('init', 'setUp');
 }
开发者ID:abdulhadikaryana,项目名称:kebudayaan,代码行数:8,代码来源:build.php


示例6: __construct

 function __construct($dir)
 {
     $this->dir = $dir;
     $this->base_url = plugin_basename($this->dir);
     $this->composer = WPBakeryVisualComposer::getInstance();
     $this->addAction('admin_bar_menu', "adminBarEditLink", 1000);
     $this->setPost();
     $this->initIfActive();
 }
开发者ID:roycocup,项目名称:enclothed,代码行数:9,代码来源:editor.php


示例7: jsCssScripts

 public function jsCssScripts()
 {
     // wp_register_script('vc_bxslider', WPBakeryVisualComposer::getInstance()->assetURL('lib/bxslider-4/jquery.bxslider.min.js'));
     // wp_register_style('vc_bxslider_css', WPBakeryVisualComposer::getInstance()->assetURL('lib/bxslider-4/jquery.bxslider.css'));
     // wp_register_script('vc_swiper', WPBakeryVisualComposer::getInstance()->assetURL('lib/swiper/dist/idangerous.swiper-2.2.js'), array(), time());
     // wp_register_style('vc_swiper_css', WPBakeryVisualComposer::getInstance()->assetURL('lib/swiper/dist/idangerous.swiper.css'));
     wp_register_script('vc_transition_bootstrap_js', WPBakeryVisualComposer::getInstance()->assetURL('lib/vc_carousel/js/transition.js'), array(), time());
     wp_register_script('vc_carousel_js', WPBakeryVisualComposer::getInstance()->assetURL('lib/vc_carousel/js/vc_carousel.js'), array('vc_transition_bootstrap_js'), time());
     wp_register_style('vc_carousel_css', WPBakeryVisualComposer::getInstance()->assetURL('lib/vc_carousel/css/vc_carousel.css'));
     // try bootstap http://jsfiddle.net/HHsxc/2/
 }
开发者ID:ksingh812,项目名称:thub-old,代码行数:11,代码来源:images_carousel.php


示例8: init

 public function init($settings)
 {
     parent::init($settings);
     $this->composer = WPBakeryVisualComposer::getInstance();
     $this->composer->createColumnShortCode();
     // Refactored
     $this->composer->setTheme();
     $this->setUpTheme();
     if (function_exists('add_theme_support')) {
         add_theme_support('post-thumbnails', array('page'));
     }
     load_plugin_textdomain('js_composer', false, self::$config['APP_ROOT'] . '/locale/');
     add_post_type_support('page', 'excerpt');
 }
开发者ID:rabisahar,项目名称:Spring,代码行数:14,代码来源:build.php


示例9: findShortcodeTemplate

 /**
  * Find html template for shortcode output.
  */
 protected function findShortcodeTemplate()
 {
     // Check template path in shortcode's mapping settings
     if (!empty($this->settings['html_template']) && is_file($this->settings('html_template'))) {
         return $this->setTemplate($this->settings['html_template']);
     }
     // Check template in theme directory
     $user_template = WPBakeryVisualComposer::getUserTemplate($this->getFilename() . '.php');
     if (is_file($user_template)) {
         return $this->setTemplate($user_template);
     }
     // Check default place
     $default_dir = $this->getVcTableDefaultDir();
     if (is_file($default_dir . $this->getFilename() . '.php')) {
         return $this->setTemplate($default_dir . $this->getFilename() . '.php');
     }
 }
开发者ID:Anciela,项目名称:anciela.info,代码行数:20,代码来源:vc_table_shortcode.php


示例10: singleParamHtmlHolder

 public function singleParamHtmlHolder($param, $value, $settings = array(), $atts = array())
 {
     $output = '';
     // Compatibility fixes
     $old_names = array('yellow_message', 'blue_message', 'green_message', 'button_green', 'button_grey', 'button_yellow', 'button_blue', 'button_red', 'button_orange');
     $new_names = array('alert-block', 'alert-info', 'alert-success', 'btn-success', 'btn', 'btn-info', 'btn-primary', 'btn-danger', 'btn-warning');
     $value = str_ireplace($old_names, $new_names, $value);
     //$value 		= __($value, "ts_visual_composer_extend");
     //
     $param_name = isset($param['param_name']) ? $param['param_name'] : '';
     $heading = isset($param['heading']) ? $param['heading'] : '';
     $type = isset($param['type']) ? $param['type'] : '';
     $class = isset($param['class']) ? $param['class'] : '';
     if (isset($param['holder']) === true && in_array($param['holder'], array('div', 'span', 'p', 'pre', 'code'))) {
         $output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
     } else {
         if (isset($param['holder']) === true && $param['holder'] == 'input') {
             $output .= '<' . $param['holder'] . ' readonly="true" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '">';
         } else {
             if (isset($param['holder']) === true && in_array($param['holder'], array('img', 'iframe'))) {
                 if (!empty($value)) {
                     $output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" src="' . $value . '">';
                 }
             } else {
                 if (isset($param['holder']) === true && $param['holder'] == 'imagelist') {
                     $images_ids = empty($value) ? array() : explode(',', trim($value));
                     $output .= '<ul style="margin-top: 5px;" class="attachment-thumbnails' . (empty($images_ids) ? ' image-exists' : '') . '" data-name="' . $param_name . '">';
                     foreach ($images_ids as $image) {
                         $img = wpb_getImageBySize(array('attach_id' => (int) $image, 'thumb_size' => 'thumbnail'));
                         $output .= $img ? '<li>' . $img['thumbnail'] . '</li>' : '<li><img width="150" height="150" test="' . $image . '" src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/blank.gif') . '" class="attachment-thumbnail" alt="" title="" /></li>';
                     }
                     $output .= '</ul>';
                     $output .= '<a style="max-width: 100%; display: block;" href="#" class="column_edit_trigger' . (!empty($images_ids) ? ' image-exists' : '') . '" style="margin-bottom: 10px;">' . __('Add or Remove Image(s)', "ts_visual_composer_extend") . '</a>';
                 }
             }
         }
     }
     if (isset($param['admin_label']) && $param['admin_label'] === true) {
         $output .= '<span style="max-width: 100%; display: block;" class="vc_admin_label admin_label_' . $param['param_name'] . (empty($value) ? ' hidden-label' : '') . '"><label>' . $param['heading'] . '</label>: ' . $value . '</span>';
     }
     return $output;
 }
开发者ID:baochung26,项目名称:happy-c,代码行数:42,代码来源:ts_vcsc_element_image_grid.php


示例11: getTemplatePath

 public function getTemplatePath($key)
 {
     $template = isset($this->templates[$key]) ? $this->templates[$key] : false;
     if (!$template) {
         return false;
     }
     // Check template path in shortcode's mapping settings
     if (is_array($template) && isset($template['path']) && !empty($template['path'])) {
         return $template['path'];
     }
     // Check template in theme directory
     $user_template = WPBakeryVisualComposer::getUserTemplate($this->getFileName($key));
     if (is_file($user_template)) {
         return $this->setTemplate($key, $user_template);
     }
     // Check default place
     $default_dir = WPBakeryVisualComposer::defaultTemplatesDIR();
     if (is_file($default_dir . $this->getFilename($key))) {
         return $this->setTemplate($key, $default_dir . $this->getFileName($key));
     }
 }
开发者ID:ConceptHaus,项目名称:huasca,代码行数:21,代码来源:teaser_template.php


示例12: singleParamHtmlHolder

 public function singleParamHtmlHolder($param, $value, $settings = array(), $atts = array())
 {
     $output = '';
     $param_name = isset($param['param_name']) ? $param['param_name'] : '';
     $heading = isset($param['heading']) ? $param['heading'] : '';
     $type = isset($param['type']) ? $param['type'] : '';
     $class = isset($param['class']) ? $param['class'] : '';
     if (isset($param['holder']) === true && in_array($param['holder'], array('div', 'span', 'p', 'pre', 'code'))) {
         $output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
     } else {
         if (isset($param['holder']) === true && $param['holder'] == 'input') {
             $output .= '<' . $param['holder'] . ' readonly="true" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '">';
         } else {
             if (isset($param['holder']) === true && $param['holder'] == 'img') {
                 $img = wpb_getImageBySize(array('attach_id' => (int) preg_replace('/[^\\d]/', '', $value), 'thumb_size' => 'thumbnail'));
                 $output .= $img ? $img['thumbnail'] : '<img width="150" height="150" src="' . vc_asset_url('vc/blank.gif') . '" class="attachment-thumbnail ts_vcsc_holder_image"  data-name="' . $param_name . '" alt="" title="" style="display: none;" />';
             } else {
                 if (isset($param['holder']) === true && $param['holder'] == 'imagelist') {
                     $images_ids = empty($value) ? array() : explode(',', trim($value));
                     $output .= '<ul style="margin-top: 5px;" class="attachment-thumbnails' . (empty($images_ids) ? ' image-exists' : '') . '" data-name="' . $param_name . '">';
                     foreach ($images_ids as $image) {
                         $img = wpb_getImageBySize(array('attach_id' => (int) $image, 'thumb_size' => 'thumbnail'));
                         $output .= $img ? '<li>' . $img['thumbnail'] . '</li>' : '<li><img width="150" height="150" test="' . $image . '" src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/blank.gif') . '" class="attachment-thumbnail" alt="" title="" /></li>';
                     }
                     $output .= '</ul>';
                 }
             }
         }
     }
     if (isset($param['admin_label']) && $param['admin_label'] === true) {
         $output .= '<span style="max-width: 100%; display: block;" class="vc_admin_label admin_label_' . $param['param_name'] . (empty($value) ? ' hidden-label' : '') . '"><label>' . $param['heading'] . '</label>: ' . $value . '</span>';
     }
     if ('dropdown' === $param['type'] && 'type' === $param_name) {
         $output .= '<a style="max-width: 100%; display: block;" href="#" class="column_edit_trigger" style="margin-bottom: 10px;">' . __('Add, Change or Remove Image(s)', "ts_visual_composer_extend") . '</a>';
     }
     return $output;
 }
开发者ID:Telemedellin,项目名称:fonvalmed,代码行数:37,代码来源:ts_vcsc_element_image_full.php


示例13: output

    public function output($post = null)
    {
        $output = $this->getNavBar()->getElementsModal();
        $output .= $this->getNavBar()->output();
        $output .= '
        <div class="metabox-composer-content">
					<div id="wpb-convert-message">
					   <div class="messagebox_text"><p>' . __('Your page layout was created with previous Visual Composer version. Before converting your layout to the new version, make sure to <a target="_blank" href="http://kb.wpbakery.com/index.php?title=Update_Visual_Composer_from_3.4_to_3.5">read this page</a>.', LANGUAGE_ZONE) . '</p>
					     <div class="wpb-convert-buttons">
					       <a class="wpb_convert button" id="wpb-convert"><i class="icon"></i>' . __('Convert to new version', LANGUAGE_ZONE) . '</a>
					     </div>
					 </div>
				</div>
				
				<div class="vc_loading_block" style="display: none;">
				  <img src="' . get_site_url() . '/wp-admin/images/wpspin_light.gif" /> ' . __("Loading, please wait...", LANGUAGE_ZONE) . '
				</div>
				
				<div id="visual_composer_content" class="wpb_main_sortable main_wrapper"></div>
					<div id="wpb-empty-blocks">
					 <h2>' . __("No content yet! You should add some...", LANGUAGE_ZONE) . '</h2>
					 <table class="helper-block">
					   <tr>
					     <td><span>1</span></td>
					     <td><p> ' . __("This is a visual preview of your page. Currently, you don't have any content elements. Click or drag the button <a href='#' class='add-element-to-layout'><i class='icon'></i> Add element</a> on the top to add content elements on your page. Alternatively add <a href='#' class='add-text-block-to-content' parent-container='#visual_composer_content'><i class='icon'></i> Text block</a> with single click.", LANGUAGE_ZONE) . '</p></td>
					   </tr>
					 </table>
					 <table class="helper-block">
					   <tr>
					     <td><span>2</span></td><td><p class="one-line"> ' . __("Click the pencil icon on the content elements to change their properties.", LANGUAGE_ZONE) . '</p></td>
					   </tr>
					   <tr>
					     <td colspan="2">
					       <div class="edit-picture"></div>
					     </td>
					   </tr>
					 </table>
				  </div>
				</div>
				<div id="container-helper-block" style="display: none;">' . $this->getContainerHelper() . '</div>';
        ?>
        <script type="text/javascript">
            var vc_user_mapper = <?php 
        echo json_encode(WPBMap::getUserShortCodes());
        ?>
,
                vc_mapper = <?php 
        echo json_encode(WPBMap::getShortCodes());
        ?>
;
        </script>
        <?php 
        $wpb_vc_status = get_post_meta($post->ID, '_wpb_vc_js_status', true);
        $wpb_post_custom_css = get_post_meta($post->ID, '_wpb_post_custom_css', true);
        if ($wpb_vc_status == "" || !isset($wpb_vc_status)) {
            $wpb_vc_status = 'false';
        }
        $output .= '<input type="hidden" id="wpb_custom_post_css_field" name="wpb_vc_post_custom_css" value="' . htmlspecialchars($wpb_post_custom_css) . '" />';
        $output .= '<input type="hidden" id="wpb_vc_js_status" name="wpb_vc_js_status" value="' . $wpb_vc_status . '" />';
        $output .= '<input type="hidden" id="wpb_vc_loading" name="wpb_vc_loading" value="' . __("Loading, please wait...", LANGUAGE_ZONE) . '" />';
        $output .= '<input type="hidden" id="wpb_vc_loading_row" name="wpb_vc_loading_row" value="' . __("Crunching...", LANGUAGE_ZONE) . '" />';
        $output .= '<input type="hidden" id="wpb_vc_js_interface_version" name="wpb_vc_js_interface_version" value="' . vc_get_initerface_version() . '" />';
        echo $output;
        require_once WPBakeryVisualComposer::config('COMPOSER') . 'templates/media_editor.php';
        require_once WPBakeryVisualComposer::config('COMPOSER') . 'lib/params/loop/templates.html';
        require_once WPBakeryVisualComposer::config('COMPOSER') . 'lib/params/options/templates.html';
    }
开发者ID:scottnkerr,项目名称:eeco,代码行数:67,代码来源:layouts.php


示例14: uploadURL

 public static function uploadURL()
 {
     $upload_dir = wp_upload_dir();
     return $upload_dir['baseurl'] . WPBakeryVisualComposer::uploadDir();
 }
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:5,代码来源:settings.php


示例15: visual_composer

/**
 * WPBakery Visual Composer helpers functions
 *
 * @package WPBakeryVisualComposer
 *
 */
function visual_composer()
{
    return WPBakeryVisualComposer::getInstance();
}
开发者ID:roycocup,项目名称:enclothed,代码行数:10,代码来源:helpers.php


示例16: dropShortcode

 public static function dropShortcode($name)
 {
     unset(self::$sc[$name]);
     WPBakeryVisualComposer::getInstance()->removeShortCode($name);
 }
开发者ID:ConceptHaus,项目名称:huasca,代码行数:5,代码来源:mapper.php


示例17: contentAdmin

 public function contentAdmin($atts, $content = null)
 {
     $width = '';
     extract(shortcode_atts(array('width' => 'column_12'), $atts));
     $output = '';
     $column_controls = $this->getColumnControls('size_delete');
     if ($width == 'column_14' || $width == '1/4') {
         $width = array('span3');
     } else {
         if ($width == 'column_14-14-14-14') {
             $width = array('span3', 'span3', 'span3', 'span3');
         } else {
             if ($width == 'column_14-12-14') {
                 $width = array('span3', 'span6', 'span3');
             } else {
                 if ($width == 'column_12-14-14') {
                     $width = array('span6', 'span3', 'span3');
                 } else {
                     if ($width == 'column_14-14-12') {
                         $width = array('span3', 'span3', 'span6');
                     } else {
                         if ($width == 'column_13' || $width == '1/3') {
                             $width = array('span4');
                         } else {
                             if ($width == 'column_13-23') {
                                 $width = array('span4', 'span8');
                             } else {
                                 if ($width == 'column_23-13') {
                                     $width = array('span8', 'span4');
                                 } else {
                                     if ($width == 'column_13-13-13') {
                                         $width = array('span4', 'span4', 'span4');
                                     } else {
                                         if ($width == 'column_12' || $width == '1/2') {
                                             $width = array('span6');
                                         } else {
                                             if ($width == 'column_12-12') {
                                                 $width = array('span6', 'span6');
                                             } else {
                                                 if ($width == 'column_23' || $width == '2/3') {
                                                     $width = array('span8');
                                                 } else {
                                                     if ($width == 'column_34' || $width == '3/4') {
                                                         $width = array('span9');
                                                     } else {
                                                         $width = array('span12');
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     for ($i = 0; $i < count($width); $i++) {
         $output .= '<div class="wpb_vc_column wpb_sortable wpb_droppable ' . $width[$i] . ' not-column-inherit">';
         $output .= '<input type="hidden" class="wpb_vc_sc_base" name="" value="vc_column" />';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls);
         $output .= '<div class="wpb_element_wrapper">';
         $output .= '<div class="row-fluid wpb_column_container wpb_sortable_container not-column-inherit">';
         $output .= do_shortcode(shortcode_unautop($content));
         $output .= WPBakeryVisualComposer::getInstance()->getLayout()->getContainerHelper();
         $output .= '</div>';
         $output .= '</div>';
         $output .= '</div>';
     }
     return $output;
 }
开发者ID:nilmadhab,项目名称:webtutplus,代码行数:73,代码来源:column.php


示例18: 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


示例19: contentAdmin

 public function contentAdmin($atts, $content = null)
 {
     $width = $el_class = $title = '';
     extract(shortcode_atts($this->predefined_atts, $atts));
     $output = '';
     $column_controls = $this->getColumnControls($this->settings('controls'));
     $column_controls_bottom = $this->getColumnControls('add', 'bottom-controls');
     if ($width == 'column_14' || $width == '1/4') {
         $width = array('span3');
     } else {
         if ($width == 'column_14-14-14-14') {
             $width = array('span3', 'span3', 'span3', 'span3');
         } else {
             if ($width == 'column_13' || $width == '1/3') {
                 $width = array('span4');
             } else {
                 if ($width == 'column_13-23') {
                     $width = array('span4', 'span8');
                 } else {
                     if ($width == 'column_13-13-13') {
                         $width = array('span4', 'span4', 'span4');
                     } else {
                         if ($width == 'column_12' || $width == '1/2') {
                             $width = array('span6');
                         } else {
                             if ($width == 'column_12-12') {
                                 $width = array('span6', 'span6');
                             } else {
                                 if ($width == 'column_23' || $width == '2/3') {
                                     $width = array('span8');
                                 } else {
                                     if ($width == 'column_34' || $width == '3/4') {
                                         $width = array('span9');
                                     } else {
                                         if ($width == 'column_16' || $width == '1/6') {
                                             $width = array('span2');
                                         } else {
                                             $width = array('');
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     for ($i = 0; $i < count($width); $i++) {
         $output .= '<div class="group wpb_sortable">';
         $output .= '<h3><span class="tab-label"><%= params.title %></span></h3>';
         $output .= '<div ' . $this->mainHtmlBlockParams($width, 0) . '>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[0]), $column_controls);
         $output .= '<div class="wpb_element_wrapper">';
         $output .= '<div ' . $this->containerHtmlBlockParams($width, 0) . '>';
         $output .= '<%= params.text %>';
         $output .= do_shortcode(shortcode_unautop($content));
         $output .= WPBakeryVisualComposer::getInstance()->getLayout()->getContainerHelper();
         $output .= '</div>';
         if (isset($this->settings['params'])) {
             $inner = '';
             foreach ($this->settings['params'] as $param) {
                 $param_value = isset(${$param}['param_name']) ? ${$param}['param_name'] : '';
                 if (is_array($param_value)) {
                     // Get first element from the array
                     reset($param_value);
                     $first_key = key($param_value);
                     $param_value = $param_value[$first_key];
                 }
                 $inner .= $this->singleParamHtmlHolder($param, $param_value);
             }
             $output .= $inner;
         }
         $output .= '</div>';
         $output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls_bottom);
         $output .= '</div>';
         $output .= '</div>';
     }
     return $output;
 }
开发者ID:venamax,项目名称:trixandtrax-cl,代码行数:80,代码来源:testimonial.php


示例20: __construct

 public function __construct($settings)
 {
     parent::__construct($settings);
     WPBakeryVisualComposer::getInstance()->addShortCode(array('base' => 'vc_accordion_tab'));
 }
开发者ID:earthshakira,项目名称:rachanasansad-portfolio,代码行数:5,代码来源:accordion.php



注:本文中的WPBakeryVisualComposer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP WPBakeryVisualComposerSettings类代码示例发布时间:2022-05-23
下一篇:
PHP WPBakeryShortCode类代码示例发布时间: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