当前位置: 首页>>代码示例>>PHP>>正文


PHP WPBMap::getShortCode方法代码示例

本文整理汇总了PHP中WPBMap::getShortCode方法的典型用法代码示例。如果您正苦于以下问题:PHP WPBMap::getShortCode方法的具体用法?PHP WPBMap::getShortCode怎么用?PHP WPBMap::getShortCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WPBMap的用法示例。


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

示例1: build

 public function build()
 {
     $element = vc_post_param('element');
     $shortCode = stripslashes(vc_post_param('shortcode'));
     visual_composer()->removeShortCode($element);
     $settings = WPBMap::getShortCode($element);
     new WPBakeryShortCode_Settings($settings);
     echo do_shortcode($shortCode);
     die;
 }
开发者ID:scottnkerr,项目名称:eeco,代码行数:10,代码来源:class-vc-shortcode-edit-form.php

示例2: OMWPBScParams

 function OMWPBScParams($tag)
 {
     $this->sc = $tag;
     $settings = WPBMap::getShortCode($tag);
     if (!empty($settings) && isset($settings['params'])) {
         $this->params = $settings['params'];
     }
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:8,代码来源:misc.php

示例3: getGridDataForAjax

 /**
  * @since 4.4
  *
  * @output/@return string - grid data for ajax request.
  */
 public function getGridDataForAjax()
 {
     // if ( vc_request_param( 'action' ) === 'vc_get_vc_grid_data' ) {
     if (vc_request_param('tag') === 'vc_masonry_grid') {
         $settings = WPBMap::getShortCode('vc_masonry_grid');
         require_once vc_path_dir('SHORTCODES_DIR', 'vc-masonry-grid.php');
         $vc_grid = new WPBakeryShortcode_VC_Masonry_Grid($settings);
     } else {
         if (vc_request_param('tag') === 'vc_media_grid') {
             $settings = WPBMap::getShortCode('vc_media_grid');
             require_once vc_path_dir('SHORTCODES_DIR', 'vc-media-grid.php');
             $vc_grid = new WPBakeryShortcode_VC_Media_Grid($settings);
         } else {
             if (vc_request_param('tag') === 'vc_masonry_media_grid') {
                 $settings = WPBMap::getShortCode('vc_masonry_media_grid');
                 require_once vc_path_dir('SHORTCODES_DIR', 'vc-masonry-media-grid.php');
                 $vc_grid = new WPBakeryShortcode_VC_Masonry_Media_Grid($settings);
             } else {
                 $settings = WPBMap::getShortCode('vc_basic_grid');
                 require_once vc_path_dir('SHORTCODES_DIR', 'vc-basic-grid.php');
                 $vc_grid = new WPBakeryShortcode_VC_Basic_Grid($settings);
             }
         }
     }
     die($vc_grid->renderAjax(vc_request_param('data')));
     // }
 }
开发者ID:GaryJones,项目名称:TPWP,代码行数:32,代码来源:hook-vc-grid.php

示例4: toString

	function toString( $shortcode, $content ) {
		$shortcode_settings = WPBMap::getShortCode( $shortcode['tag'] );
		$is_container = ( isset( $shortcode_settings['is_container'] ) && $shortcode_settings['is_container'] === true ) || ( isset( $shortcode_settings['as_parent'] ) && $shortcode_settings['as_parent'] !== false );
		return do_shortcode( '<div class="vc-element" data-tag="' . $shortcode['tag'] . '" data-model-id="' . $shortcode['id'] . '"' . self::cleanStyle() . '>' . $this->wrapperStart()
		  . '[' . $shortcode['tag'] . ' ' . $shortcode['attrs_query'] . ']' . ( $is_container ? '[vc_container_anchor]' : '' ) . $this->parseShortcodesString( $content, $is_container, $shortcode['id'] ) . '[/' . $shortcode['tag'] . ']' . $this->wrapperEnd() . '</div>' );
	}
开发者ID:verbazend,项目名称:AWFA,代码行数:6,代码来源:class-vc-frontend-editor.php

示例5: showEditFormJavascript_callback

 public function showEditFormJavascript_callback()
 {
     $element = $this->post('element');
     $shortCode = stripslashes($this->post('shortcode'));
     $this->removeShortCode($element);
     $settings = WPBMap::getShortCode($element);
     new WPBakeryShortCode_Settings($settings);
     echo do_shortcode($shortCode);
     die;
 }
开发者ID:venamax,项目名称:trixandtrax-cl,代码行数:10,代码来源:composer.php

示例6: __construct

 /**
  * Construct Form fields.
  *
  * @since 4.4
  *
  * @param $tag - shortcode tag
  * @param $atts - list of attribute assign to the shortcode.
  */
 public function __construct($tag, $atts)
 {
     $this->tag = $tag;
     $this->atts = apply_filters('vc_edit_form_fields_attributes_' . $this->tag, $atts);
     $this->setSettings(WPBMap::getShortCode($this->tag));
 }
开发者ID:ksan5835,项目名称:maadithottam,代码行数:14,代码来源:class-vc-edit-form-fields.php

示例7: parseShortcodesCustomCss

 /**
  * Parse shortcodes custom css string.
  *
  * This function is used by self::buildShortcodesCustomCss and creates css string from shortcodes attributes
  * like 'css_editor'.
  *
  * @see    WPBakeryVisualComposerCssEditor
  * @since  4.2
  * @access public
  *
  * @param $content
  *
  * @return string
  */
 public function parseShortcodesCustomCss($content)
 {
     $css = '';
     if (!preg_match('/\\s*(\\.[^\\{]+)\\s*\\{\\s*([^\\}]+)\\s*\\}\\s*/', $content)) {
         return $css;
     }
     preg_match_all('/' . get_shortcode_regex() . '/', $content, $shortcodes);
     foreach ($shortcodes[2] as $index => $tag) {
         $shortcode = WPBMap::getShortCode($tag);
         $attr_array = shortcode_parse_atts(trim($shortcodes[3][$index]));
         if (isset($shortcode['params']) && !empty($shortcode['params'])) {
             foreach ($shortcode['params'] as $param) {
                 if ($param['type'] == 'css_editor' && isset($attr_array[$param['param_name']])) {
                     $css .= $attr_array[$param['param_name']];
                 }
             }
         }
     }
     foreach ($shortcodes[5] as $shortcode_content) {
         $css .= $this->parseShortcodesCustomCss($shortcode_content);
     }
     return $css;
 }
开发者ID:polaris610,项目名称:medicalhound,代码行数:37,代码来源:class-vc-base.php

示例8: unset

    $list['vc_button2'] = $shortcode_vc_button2;
    $list['vc_button2']['post_type'] = Vc_Grid_Item_Editor::postType();
}
$shortcode_vc_btn = WPBMap::getShortCode('vc_btn');
if (is_array($shortcode_vc_btn) && isset($shortcode_vc_btn['base'])) {
    $list['vc_btn'] = $shortcode_vc_btn;
    $list['vc_btn']['post_type'] = Vc_Grid_Item_Editor::postType();
    unset($list['vc_btn']['params'][1]);
}
$shortcode_vc_custom_heading = WPBMap::getShortCode('vc_custom_heading');
if (is_array($shortcode_vc_custom_heading) && isset($shortcode_vc_custom_heading['base'])) {
    $list['vc_custom_heading'] = $shortcode_vc_custom_heading;
    $list['vc_custom_heading']['post_type'] = Vc_Grid_Item_Editor::postType();
    unset($list['vc_custom_heading']['params'][1]);
}
$shortcode_vc_empty_space = WPBMap::getShortCode('vc_empty_space');
if (is_array($shortcode_vc_empty_space) && isset($shortcode_vc_empty_space['base'])) {
    $list['vc_empty_space'] = $shortcode_vc_empty_space;
    $list['vc_empty_space']['post_type'] = Vc_Grid_Item_Editor::postType();
}
foreach (array('vc_icon', 'vc_button2', 'vc_btn', 'vc_custom_heading', 'vc_single_image') as $key) {
    if (isset($list[$key])) {
        if (!isset($list[$key]['params'])) {
            $list[$key]['params'] = array();
        }
        if ('vc_button2' === $key) {
            // change settings for vc_link in dropdown. Add dependency.
            $list[$key]['params'][0] = array('type' => 'vc_link', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'url', 'dependency' => array('element' => 'link', 'value' => array('custom')), 'description' => __('Add custom link.', 'js_composer'));
        } else {
            array_unshift($list[$key]['params'], array('type' => 'vc_link', 'heading' => __('URL (Link)', 'js_composer'), 'param_name' => 'url', 'dependency' => array('element' => 'link', 'value' => array('custom')), 'description' => __('Add custom link.', 'js_composer')));
        }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:31,代码来源:shortcodes.php

示例9: settings

 /**
  * @param $name
  *
  * @return null
  */
 public function settings($name)
 {
     $settings = WPBMap::getShortCode($this->tag);
     return isset($settings[$name]) ? $settings[$name] : null;
 }
开发者ID:websideas,项目名称:aquila,代码行数:10,代码来源:shortcodes.php

示例10: vc_get_shortcode

/**
 * Get settings of the mapped shortcode.
 *
 * @param $tag
 *
 * @since 4.4.3
 * @return array|null - settings or null if shortcode not mapped
 */
function vc_get_shortcode($tag)
{
    return WPBMap::getShortCode($tag);
}
开发者ID:syncopetwice,项目名称:STG,代码行数:12,代码来源:helpers_api.php


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