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


PHP WPBMap::getShortCodes方法代码示例

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


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

示例1: check_vc

 function check_vc($content)
 {
     if (class_exists('Vc_Base')) {
         global $post;
         $course_status = vibe_get_option('start_course');
         $force_include_pages = apply_filters('wplms_vc_force_include_pages', array($course_status));
         $force_include_post_types = apply_filters('wplms_vc_force_include_custom_post_types', array('course', 'unit', 'quiz', 'question'));
         if (in_array($post->ID, $force_include_pages) || in_array($post->post_type, $force_include_post_types)) {
             if (strpos($content, 'vc_row')) {
                 /*
                 wp_register_style( 'js_composer_front', vc_asset_url( 'css/js_composer.min.css' ), array(), WPB_VC_VERSION );
                 			    	wp_register_script( 'wpb_composer_front_js', vc_asset_url( 'js/dist/js_composer_front.min.js' ), array( 'jquery' ), WPB_VC_VERSION, true );
                 			    	wp_enqueue_style( 'js_composer_front');
                 			    	wp_enqueue_script( 'wpb_composer_front_js');
                 */
                 echo "<link rel='stylesheet' id='swiftype-css' href='" . vc_asset_url('css/js_composer.min.css') . "' type='text/css' media='all'/>";
                 echo "<script type='text/javascript' src='" . vc_asset_url('js/dist/js_composer_front.min.js') . "'></script>";
                 global $vc_manager;
                 foreach (WPBMap::getShortCodes() as $sc_base => $el) {
                     $vc_manager->shortcodes[$sc_base] = new WPBakeryShortCodeFishBones($el);
                 }
             }
         }
     }
     return $content;
 }
开发者ID:nikitansk,项目名称:devschool,代码行数:26,代码来源:bp-course-filters.php

示例2: createShortCodes

 public function createShortCodes()
 {
     remove_all_shortcodes();
     foreach (WPBMap::getShortCodes() as $sc_base => $el) {
         $name = 'WPBakeryShortCode_' . $el['base'];
         if (class_exists($name) && is_subclass_of($name, 'WPBakeryShortCode')) {
             $this->shortcodes[$sc_base] = new $name($el);
         }
     }
     $this->createColumnShortCode();
 }
开发者ID:rabisahar,项目名称:Spring,代码行数:11,代码来源:composer.php

示例3: mm_vc_custom_component_atts

/**
 * Add shared Mm parameters/atts to all VC components.
 *
 * @since  1.0.0
 */
function mm_vc_custom_component_atts()
{
    // Get all available VC components.
    $components = WPBMap::getShortCodes();
    // Create custom group title.
    $custom_group = __('Mm Custom Settings', 'mm-components');
    // Text color.
    $atts[] = array('type' => 'dropdown', 'heading' => __('Text Color Scheme', 'mm-components'), 'param_name' => 'mm_class_text_color', 'group' => $custom_group, 'value' => array(__('Default', 'mm-components ') => '', __('Dark', 'mm-components ') => 'dark', __('Light', 'mm-components ') => 'light', __('Medium', 'mm-components ') => 'medium'));
    // Text alignment.
    $atts[] = array('type' => 'dropdown', 'heading' => __('Text Alignment', 'mm-components'), 'param_name' => 'mm_class_text_align', 'group' => $custom_group, 'value' => array(__('Default', 'mm-components ') => '', __('Left', 'mm-components ') => 'left', __('Center', 'mm-components ') => 'center', __('Right', 'mm-components ') => 'right'));
    // Custom Class.
    $atts[] = array('type' => 'textfield', 'heading' => __('Custom Class', 'mm-components'), 'param_name' => 'mm_custom_class', 'group' => $custom_group);
    // Add each param to each VC component.
    foreach ($atts as $att) {
        foreach ($components as $component) {
            vc_add_param($component['base'], $att);
        }
    }
}
开发者ID:roosalles,项目名称:mm-components,代码行数:24,代码来源:vc-functions.php

示例4: groups_access_rules_callback

    /**
     * Access groups
     * @deprecated 4.8
     */
    public function groups_access_rules_callback()
    {
        // _deprecated_function( '\Vc_Settings::groups_access_rules_callback', '4.8 (will be removed in 4.11)' );
        global $wp_roles;
        $groups = is_object($wp_roles) ? $wp_roles->roles : array();
        $settings = ($settings = get_option(self::$field_prefix . 'groups_access_rules')) ? $settings : array();
        $show_types = array('all' => __('Show Visual Composer & default editor', 'js_composer'), 'only' => __('Show only Visual Composer', 'js_composer'), 'no' => __("Don't allow to use Visual Composer", 'js_composer'));
        $shortcodes = WPBMap::getShortCodes();
        $size_line = ceil(count(array_keys($shortcodes)) / 3);
        ?>
		<div class="wpb_settings_accordion" id="wpb_js_settings_access_groups" xmlns="http://www.w3.org/1999/html">
		<?php 
        if (is_array($groups)) {
            foreach ($groups as $key => $params) {
                if (isset($params['capabilities']['edit_posts']) && true === $params['capabilities']['edit_posts'] || isset($params['capabilities']['edit_pages']) && true === $params['capabilities']['edit_pages']) {
                    $allowed_setting = isset($settings[$key]['show']) ? $settings[$key]['show'] : 'all';
                    $shortcode_settings = isset($settings[$key]['shortcodes']) ? $settings[$key]['shortcodes'] : array();
                    ?>
					<h3 id="wpb-settings-group-<?php 
                    echo $key;
                    ?>
-header">
						<a href="#wpb-settings-group-<?php 
                    echo $key;
                    ?>
">
							<?php 
                    echo $params['name'];
                    ?>
						</a>
					</h3>
					<div id="wpb-settings-group-<?php 
                    echo $key;
                    ?>
" class="accordion-body">
						<div class="visibility settings-block">
							<label
								for="wpb_composer_access_<?php 
                    echo $key;
                    ?>
"><b><?php 
                    _e('Visual Composer access', 'js_composer');
                    ?>
</b></label>
							<select id="wpb_composer_access_<?php 
                    echo $key;
                    ?>
"
							        name="<?php 
                    echo self::$field_prefix . 'groups_access_rules[' . $key . '][show]';
                    ?>
">
								<?php 
                    foreach ($show_types as $i_key => $name) {
                        ?>
									<option
										value="<?php 
                        echo $i_key;
                        ?>
"<?php 
                        echo $allowed_setting == $i_key ? ' selected="true"' : '';
                        ?>
><?php 
                        echo $name;
                        ?>
</option>
								<?php 
                    }
                    ?>
							</select>
						</div>
						<div class="shortcodes settings-block">
							<div class="title"><b><?php 
                    _e('Enabled shortcodes', 'js_composer');
                    ?>
</b></div>
							<?php 
                    $z = 1;
                    foreach ($shortcodes as $sc_base => $el) {
                        ?>
								<?php 
                        if (!in_array($el['base'], array('vc_column', 'vc_row', 'vc_row_inner', 'vc_column_inner'))) {
                            ?>
									<?php 
                            if (1 === $z) {
                                ?>
<div class="pull-left"><?php 
                            }
                            ?>
									<label>
										<input
											type="checkbox"
											<?php 
                            if (isset($shortcode_settings[$sc_base]) && 1 === (int) $shortcode_settings[$sc_base]) {
                                ?>
checked="true"
//.........这里部分代码省略.........
开发者ID:iq007,项目名称:MadScape,代码行数:101,代码来源:class-vc-settings.php

示例5: shortcodesRegexp

	public static function shortcodesRegexp() {
		$tagnames = array_keys( WPBMap::getShortCodes() );
		$tagregexp = join( '|', array_map( 'preg_quote', $tagnames ) );
		// WARNING from shortcodes.php! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
		// Also, see shortcode_unautop() and shortcode.js.
		return
		  '\\[' // Opening bracket
		  . '(\\[?)' // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
		  . "($tagregexp)" // 2: Shortcode name
		  . '(?![\\w-])' // Not followed by word character or hyphen
		  . '(' // 3: Unroll the loop: Inside the opening shortcode tag
		  . '[^\\]\\/]*' // Not a closing bracket or forward slash
		  . '(?:'
		  . '\\/(?!\\])' // A forward slash not followed by a closing bracket
		  . '[^\\]\\/]*' // Not a closing bracket or forward slash
		  . ')*?'
		  . ')'
		  . '(?:'
		  . '(\\/)' // 4: Self closing tag ...
		  . '\\]' // ... and closing bracket
		  . '|'
		  . '\\]' // Closing bracket
		  . '(?:'
		  . '(' // 5: Unroll the loop: Optionally, anything between the opening and closing shortcode tags
		  . '[^\\[]*+' // Not an opening bracket
		  . '(?:'
		  . '\\[(?!\\/\\2\\])' // An opening bracket not followed by the closing shortcode tag
		  . '[^\\[]*+' // Not an opening bracket
		  . ')*+'
		  . ')'
		  . '\\[\\/\\2\\]' // Closing shortcode tag
		  . ')?'
		  . ')'
		  . '(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]]

	}
开发者ID:verbazend,项目名称:AWFA,代码行数:36,代码来源:class-vc-frontend-editor.php

示例6: get_post_meta

//read the custom single post settings - this setting overids all of them
$td_page = get_post_meta($post->ID, 'td_page', true);
if (!empty($td_page['td_sidebar_position'])) {
    $loop_sidebar_position = $td_page['td_sidebar_position'];
}
// sidebar position used to align the breadcrumb on sidebar left + sidebar first on mobile issue
$td_sidebar_position = '';
if ($loop_sidebar_position == 'sidebar_left') {
    $td_sidebar_position = 'td-sidebar-left';
}
/**
 * detect the page builder
 */
$td_use_page_builder = false;
if (method_exists('WPBMap', 'getShortCodes')) {
    $td_page_builder_short_codes = array_keys(WPBMap::getShortCodes());
    if (td_util::strpos_array($post->post_content, $td_page_builder_short_codes) === true) {
        $td_use_page_builder = true;
    }
}
//no page builder detected, we load a default page template with sidebar / no sidebar
?>
<div class="td-main-content-wrap">
    <div class="td-container <?php 
echo $td_sidebar_position;
?>
">
        <div class="td-crumb-container">
            <?php 
echo td_page_generator::get_page_breadcrumbs(get_the_title());
?>
开发者ID:rinodung,项目名称:newspaper-wordpress,代码行数:31,代码来源:page-pagebuilder-title.php

示例7: array

    $vc_vendor_settings_presets = array();
}
// [/shortcodes presets data]
?>
	<input type="hidden" name="vc_post_custom_css" id="vc_post-custom-css"
	       value="<?php 
echo esc_attr($editor->post_custom_css);
?>
" autocomplete="off"/>
	<script type="text/javascript">
		var vc_user_mapper = <?php 
echo json_encode(WPBMap::getUserShortCodes());
?>
,
			vc_mapper = <?php 
echo json_encode(WPBMap::getShortCodes());
?>
,
			vc_vendor_settings_presets = <?php 
echo json_encode($vc_vendor_settings_presets);
?>
,
			vc_settings_presets = <?php 
echo json_encode($vc_settings_presets);
?>
,
			vc_roles = [], // @todo fix_roles BC for roles
			vcAdminNonce = '<?php 
echo vc_generate_nonce('vc-admin-nonce');
?>
';
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:31,代码来源:frontend_editor.tpl.php

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

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

示例10: groups_access_rules_callback

    /**
     * Access groups
     *
     */
    public function groups_access_rules_callback()
    {
        global $wp_roles;
        $groups = is_object($wp_roles) ? $wp_roles->roles : array();
        // get_editable_roles();
        $settings = ($settings = get_option(self::$field_prefix . 'groups_access_rules')) ? $settings : array();
        $show_types = array('all' => __('Show Visual Composer & default editor', LANGUAGE_ZONE), 'only' => __('Show only Visual Composer', LANGUAGE_ZONE), 'no' => __("Don't allow to use Visual Composer", LANGUAGE_ZONE));
        $shortcodes = WPBMap::getShortCodes();
        $size_line = ceil(count(array_keys($shortcodes)) / 3);
        ?>
	<div class="wpb_settings_accordion" id="wpb_js_settings_access_groups" xmlns="http://www.w3.org/1999/html">
	<?php 
        if (is_array($groups)) {
            foreach ($groups as $key => $params) {
                if (isset($params['capabilities']['edit_posts']) && $params['capabilities']['edit_posts'] === true) {
                    $allowed_setting = isset($settings[$key]['show']) ? $settings[$key]['show'] : 'all';
                    $shortcode_settings = isset($settings[$key]['shortcodes']) ? $settings[$key]['shortcodes'] : array();
                    ?>
					<h3 id="wpb-settings-group-<?php 
                    echo $key;
                    ?>
-header">
						<a href="#wpb-settings-group-<?php 
                    echo $key;
                    ?>
">
							<?php 
                    echo $params['name'];
                    ?>
						</a>
					</h3>
					<div id="wpb-settings-group-<?php 
                    echo $key;
                    ?>
" class="accordion-body">
						<div class="visibility settings-block">
							<label
							  for="wpb_composer_access_<?php 
                    echo $key;
                    ?>
"><b><?php 
                    _e('Visual Composer access', LANGUAGE_ZONE);
                    ?>
</b></label>
							<select id="wpb_composer_access_<?php 
                    echo $key;
                    ?>
"
									name="<?php 
                    echo self::$field_prefix . 'groups_access_rules[' . $key . '][show]';
                    ?>
">
								<?php 
                    foreach ($show_types as $i_key => $name) {
                        ?>
								<option
								  value="<?php 
                        echo $i_key;
                        ?>
"<?php 
                        echo $allowed_setting == $i_key ? ' selected="true"' : '';
                        ?>
><?php 
                        echo $name;
                        ?>
</option>
								<?php 
                    }
                    ?>
							</select>
						</div>
					<div class="shortcodes settings-block">
						<div class="title"><b><?php 
                    echo _e('Enabled shortcodes', LANGUAGE_ZONE);
                    ?>
</b></div>
						<?php 
                    $z = 1;
                    foreach ($shortcodes as $sc_base => $el) {
                        ?>
						<?php 
                        if (!isset($el['content_element']) || $el['content_element'] == true) {
                            ?>
							<?php 
                            if ($z == 1) {
                                ?>
<div class="pull-left"><?php 
                            }
                            ?>
							<label>
								<input
								  type="checkbox" <?php 
                            if (isset($shortcode_settings[$sc_base]) && (int) $shortcode_settings[$sc_base] == 1) {
                                ?>
checked="true" <?php 
                            }
//.........这里部分代码省略.........
开发者ID:scottnkerr,项目名称:eeco,代码行数:101,代码来源:class-vc-settings.php

示例11: vc_mode

		vc_mode = '<?php 
echo vc_mode();
?>
';
</script>

<script type="text/html" id="vc_settings-image-block">
	<li class="added">
		<div class="inner" style="width: 80px; height: 80px; overflow: hidden;text-align: center;">
			<img rel="<%= id %>" src="<%= url %>"/>
		</div>
		<a href="#" class="icon-remove"></a>
	</li>
</script>
<?php 
foreach (WPBMap::getShortCodes() as $sc_base => $el) {
    ?>
	<script type="text/html" id="vc_shortcode-template-<?php 
    echo $sc_base;
    ?>
">
		<?php 
    echo visual_composer()->getShortCode($sc_base)->template();
    ?>
	</script>
<?php 
}
?>
<script type="text/html" id="vc_row-inner-element-template">
	<?php 
echo visual_composer()->getShortCode('vc_row_inner')->template();
开发者ID:ryandong82,项目名称:colorfulladysite,代码行数:31,代码来源:backend_editor_footer.tpl.php

示例12: shortcodesRegexp

 /**
  * @return string
  */
 public static function shortcodesRegexp()
 {
     $tagnames = array_keys(WPBMap::getShortCodes());
     $tagregexp = join('|', array_map('preg_quote', $tagnames));
     // WARNING from shortcodes.php! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
     // Also, see shortcode_unautop() and shortcode.js.
     return '\\[' . '(\\[?)' . "({$tagregexp})" . '(?![\\w-])' . '(' . '[^\\]\\/]*' . '(?:' . '\\/(?!\\])' . '[^\\]\\/]*' . ')*?' . ')' . '(?:' . '(\\/)' . '\\]' . '|' . '\\]' . '(?:' . '(' . '[^\\[]*+' . '(?:' . '\\[(?!\\/\\2\\])' . '[^\\[]*+' . ')*+' . ')' . '\\[\\/\\2\\]' . ')?' . ')' . '(\\]?)';
     // 6: Optional second closing brocket for escaping shortcodes: [[tag]]
 }
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:12,代码来源:class-vc-frontend-editor.php

示例13: createShortCodes

 /**
  * Rewrite code or name
  * @since 4.2
  */
 public function createShortCodes()
 {
     remove_all_shortcodes();
     foreach (WPBMap::getShortCodes() as $sc_base => $el) {
         $this->shortcodes[$sc_base] = new WPBakeryShortCodeFishBones($el);
     }
 }
开发者ID:polaris610,项目名称:medicalhound,代码行数:11,代码来源:class-vc-base.php

示例14: getContentLayouts

 public function getContentLayouts()
 {
     $output = '';
     foreach (WPBMap::getShortCodes() as $sc_base => $el) {
         $element_button = new WPBakeryVisualComposerElementButton();
         $output .= $element_button->setBase($sc_base)->setup($el)->output();
     }
     return $output;
 }
开发者ID:adams0917,项目名称:woocommerce_eht,代码行数:9,代码来源:layouts.php

示例15: output

    public function output($post = null)
    {
        $output = $this->getNavBar()->getElementsModal();
        $output .= $this->getNavBar()->output();
        $output .= '
        <div class="metabox-composer-content">
				<div class="vc_loading_block" style="display: none;">
				  <img src="' . get_site_url() . '/wp-admin/images/wpspin_light.gif" /> ' . __("Loading, please wait...", "js_composer") . '
				</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...", "js_composer") . '</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.", "js_composer") . '</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.", "js_composer") . '</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());
        ?>
,
                vc_frontend_enabled = <?php 
        echo vc_enabled_frontend() ? 'true' : 'false';
        ?>
;
        </script>
        <?php 
        $wpb_vc_status = apply_filters('wpb_vc_js_status_filter', vc_get_param('wpb_vc_js_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...", "js_composer") . '" />';
        $output .= '<input type="hidden" id="wpb_vc_loading_row" name="wpb_vc_loading_row" value="' . __("Crunching...", "js_composer") . '" />';
        $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 vc_path_dir('TEMPLATES_DIR', 'backend_editor/templates.php');
        do_action('vc_backend_editor_render');
    }
开发者ID:Vatia13,项目名称:tofido,代码行数:62,代码来源:layouts.php


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