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


PHP vc_enabled_frontend函数代码示例

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


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

示例1: getControlFrontend

 public function getControlFrontend()
 {
     if (!vc_enabled_frontend()) {
         return '';
     }
     return '<li class="vc_pull-right">' . '<a href="' . vc_frontend_editor()->getInlineUrl() . '" class="vc_btn vc_btn-primary vc_btn-sm vc_navbar-btn" id="wpb-edit-inline">' . __('Frontend', "js_composer") . '</a>' . '</li>';
 }
开发者ID:ksan5835,项目名称:rankproperties,代码行数:7,代码来源:class-vc-navbar.php

示例2: getControlPreviewTemplate

 public function getControlPreviewTemplate()
 {
     if (!vc_enabled_frontend()) {
         return '';
     }
     return '<li class="vc_pull-right">' . '<a href="#" class="vc_btn vc_btn-grey vc_btn-sm vc_navbar-btn" data-vc-navbar-control="preview">' . __('Preview', "js_composer") . '</a>' . '</li>';
 }
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:7,代码来源:class-vc-navbar-grid-item.php

示例3: init

 /**
  * Callback function for WP init action hook. Sets Vc mode and loads required objects.
  *
  * @since  4.2
  * @access public
  *
  * @return void
  */
 public function init()
 {
     do_action('vc_before_init');
     $this->setMode();
     do_action('vc_after_set_mode');
     /**
      * Set version of VC if required.
      */
     $this->setVersion();
     // Load required
     !vc_is_updater_disabled() && vc_updater()->init();
     /**
      * Init default hooks and options to load.
      */
     $this->vc()->init();
     /**
      * if is admin and not front end editor.
      */
     is_admin() && !vc_is_frontend_editor() && $this->asAdmin();
     /**
      * if frontend editor is enabled init editor.
      */
     vc_enabled_frontend() && vc_frontend_editor()->init();
     do_action('vc_before_mapping');
     // VC ACTION
     // Include default shortcodes.
     $this->mapper()->init();
     //execute all required
     do_action('vc_after_mapping');
     // VC ACTION
     // Load && Map shortcodes from Automapper.
     vc_automapper()->map();
     if (vc_user_access()->wpAny('manage_options')->part('settings')->can('vc-updater-tab')->get()) {
         vc_license()->setupReminder();
     }
     do_action('vc_after_init');
 }
开发者ID:pivotlearning,项目名称:wpsite,代码行数:45,代码来源:js_composer.php

示例4: json_encode

?>
,
		vc_mapper = <?php 
echo json_encode(WPBMap::getShortCodes());
?>
,
		vc_settings_presets = <?php 
echo json_encode(Vc_Settings_Preset::listDefaultSettingsPresets());
?>
,
		vc_roles = <?php 
echo json_encode(array_merge(array('current_user' => $current_user->roles), (array) vc_settings()->get('groups_access_rules')));
?>
,
		vc_frontend_enabled = <?php 
echo vc_enabled_frontend() ? 'true' : 'false';
?>
,
		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>
开发者ID:ryandong82,项目名称:colorfulladysite,代码行数:31,代码来源:backend_editor_footer.tpl.php

示例5: init

 /**
  * Callback function for WP init action hook. Sets Vc mode and loads required objects.
  *
  * @since  4.2
  * @access public
  * @return void
  */
 public function init()
 {
     do_action('vc_before_init');
     $this->setMode();
     /**
      * Set version of VC if required.
      */
     $this->setVersion();
     // Load required
     !vc_is_updater_disabled() && vc_updater()->init();
     /**
      * Init default hooks and options to load.
      */
     $this->vc()->init();
     /**
      * if is admin and not front end editor.
      */
     is_admin() && !vc_is_frontend_editor() && $this->asAdmin();
     /**
      * if frontend editor is enabled init editor.
      */
     vc_enabled_frontend() && vc_frontend_editor()->init();
     // Load Automapper
     vc_automapper()->addAjaxActions();
     do_action('vc_before_mapping');
     // VC ACTION
     // Include default shortcodes.
     $this->mapper()->init();
     //execute all required
     do_action('vc_after_mapping');
     // VC ACTION
     // Load && Map shortcodes from Automapper.
     vc_automapper()->map();
     do_action('vc_after_init');
 }
开发者ID:nignjatov,项目名称:TaxiDev,代码行数:42,代码来源:js_composer.php

示例6: loadShortcodes

 /**
  *
  */
 function loadShortcodes()
 {
     if (vc_is_page_editable() && vc_enabled_frontend()) {
         $action = vc_post_param('action');
         if ('vc_load_shortcode' === $action) {
             !defined('CONCATENATE_SCRIPTS') && define('CONCATENATE_SCRIPTS', false);
             ob_start();
             $this->setPost();
             $shortcodes = (array) vc_post_param('shortcodes');
             do_action('vc_load_shortcode', $shortcodes);
             $this->renderShortcodes($shortcodes);
             echo '<div data-type="files">';
             _print_styles();
             print_head_scripts();
             print_late_styles();
             print_footer_scripts();
             do_action('wp_print_footer_scripts');
             echo '</div>';
             $output = ob_get_clean();
             die(apply_filters('vc_frontend_editor_load_shortcode_ajax_output', $output));
         } elseif ('vc_frontend_load_template' === $action) {
             $this->setPost();
             visual_composer()->templatesPanelEditor()->renderFrontendTemplate();
         } else {
             if ('' !== $action) {
                 do_action('vc_front_load_page_' . esc_attr(vc_post_param('action')));
             }
         }
     }
 }
开发者ID:k2jysy,项目名称:wedev,代码行数:33,代码来源:class-vc-frontend-editor.php

示例7: 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());
        ?>
,
                vc_frontend_enabled = <?php 
        echo vc_enabled_frontend() ? 'true' : 'false';
        ?>
;
        </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:Alderx,项目名称:publioriente,代码行数:71,代码来源:layouts.php

示例8: warrior_add_styles_theme_options

    function warrior_add_styles_theme_options()
    {
        global $newmagz_option;
        ?>
		<style type="text/css">
			<?php 
        if (function_exists('vc_enabled_frontend')) {
            if (vc_enabled_frontend()) {
                // Front end editor mode is enabled. Do something.
                ?>
    
			    .warrior_featured_video .video-holder iframe {
					height: 172px;
				}
			<?php 
            }
        }
        ?>
			/*	
			.site-navigation > ul > li.menu-item-has-children:hover:before {
    			border-color: transparent transparent <?php 
        echo $newmagz_option['sub_menu_bg']['background-color'];
        ?>
 transparent;
			}

			nav#top-navigation.site-navigation > ul > li.current-menu-item > a,
			nav#top-navigation.site-navigation > ul > li.current-menu-ancestor > a,
			nav#top-navigation.site-navigation > ul > li.current-menu-parent > a,
			nav#top-navigation.site-navigation > ul > li.current_page_item > a,
			nav#top-navigation.site-navigation > ul > li.current_page_ancestor > a,
			nav#top-navigation.site-navigation > ul > li.current_page_parent > a {
				color: <?php 
        echo $newmagz_option['top_header_link_color']['active'];
        ?>
 !important;
			}
			
			nav#main-menu.site-navigation > ul > li.current-menu-item > a,
			nav#main-menu.site-navigation > ul > li.current-menu-ancestor > a,
			nav#main-menu.site-navigation > ul > li.current-menu-parent > a,
			nav#main-menu.site-navigation > ul > li.current_page_item > a,
			nav#main-menu.site-navigation > ul > li.current_page_ancestor > a,
			nav#main-menu.site-navigation > ul > li.current_page_parent > a {
				color: <?php 
        echo $newmagz_option['main_menu_link_color']['active'];
        ?>
 !important;
			}

			.tags span:hover a {
				color: <?php 
        echo $newmagz_option['tags_button_color']['hover'];
        ?>
 !important;
			}

			.breadcrumbs ul li span:hover a {
				color: <?php 
        echo $newmagz_option['breadcrumb_link_color']['hover'];
        ?>
 !important;
			}

			.sidebar-widget .widget-title:after { 
				background:<?php 
        echo $newmagz_option['sidebar_widget_title_typography']['color'];
        ?>
 !important; 
			}

			.article-widget .widget-title:after, .comment-respond .widget-title:after { 
				background:<?php 
        echo $newmagz_option['single_widget_title_typography']['color'];
        ?>
 !important; 
			}
			
			#archive-page .section-title:after { 
				background:<?php 
        echo $newmagz_option['recent_post_slider_title_typography']['color'];
        ?>
 !important; 
			}

			#footer-widgets .widget-title:after { 
				background:<?php 
        echo $newmagz_option['footer_top_widget_title_typography']['color'];
        ?>
 !important; 
			}

			#footer-bottom .widget-title:after { 
				background:<?php 
        echo $newmagz_option['footer_bottom_widget_title_typography']['color'];
        ?>
 !important; 
			}

			article.post-overlay .post-list-style ul li a i.icon { 
//.........这里部分代码省略.........
开发者ID:yeminhtut,项目名称:new_mag,代码行数:101,代码来源:theme-styles.php

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

示例10: buildButtons

 function buildButtons()
 {
     $html = '';
     $buttons = array(array('add_element', '<ul class="vc_nav">
                             <li>
                                 <a class="wpb_add_new_element dropable_el button" id="wpb-add-new-element"><i class="icon"></i>' . __('Add element', "js_composer") . '</a>
                             </li>
                         </ul>'), array('add_row', '<ul class="vc_nav">
                           <li>
                             <a class="wpb_add_new_row dropable_row button" id="wpb-add-new-row" data-element="vc_row"><i class="icon"></i>' . __('Add row', "js_composer") . '</a>
                             </li>
                         </ul>'), array('templates', '<ul class="vc_nav">
                             <li class="vc_dropdown">
                                 <a class="wpb_templates button"><i class="icon"></i>' . __('Templates', "js_composer") . ' <b class="caret"></b></a>
                                 <ul class="vc_dropdown-menu wpb_templates_ul">
                                     ' . $this->getTemplateMenu() . '
                                 </ul>
                             </li>
                         </ul>'), array('edit_inline', vc_enabled_frontend() ? '<ul class="vc_nav">
                           <li>
                             <a href="' . NewVisualComposer::getInlineUrl() . '" class="wpb_edit_inline dropable_row button" id="wpb-edit-inline"><i class="icon"></i>' . __('Frontend Edit', "js_composer") . '</a>
                             </li>
                         </ul>' : ''), array('update_button', '<ul class="vc_nav pull-right wpb-update-button">
                             <li><a class="button" id="wpb-save-post">' . __('Update', "js_composer") . '</a></li>
                         </ul>'), array('custom_css', '<ul class="vc_nav pull-right">
                     <li><a class="wpb_custom_post_css button" id="wpb-custom-post-css"><i class="icon"></i>' . __('CSS', "js_composer") . '</a></li>
             </ul> '));
     $buttons = apply_filters('vc_nav_controls', $buttons);
     foreach ($buttons as $button) {
         $html .= $button[1];
     }
     return $html;
 }
开发者ID:roycocup,项目名称:enclothed,代码行数:33,代码来源:layouts.php


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