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

PHP vc_mode函数代码示例

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

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



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

示例1: us_is_vc_fe

 function us_is_vc_fe()
 {
     if (function_exists('vc_mode') and in_array(vc_mode(), array('page_editable', 'admin_frontend_editor', 'admin_page'))) {
         return TRUE;
     } else {
         return FALSE;
     }
 }
开发者ID:ConceptHaus,项目名称:atra,代码行数:8,代码来源:admin.php


示例2: init

	public function init() {
		$this->addHooks();
		/**
		 * If current mode of VC is frontend editor load it.
		 */
		if(vc_is_frontend_editor()) {
			vc_frontend_editor()->hookLoadEdit();
		} elseif(vc_mode() === 'page_editable') {
			/**
			 * if page loaded inside frontend editor iframe it has page_editable mode.
			 * It required to some some js/css elements and add few helpers for editor to be used.
			 */
			$this->buildEditablePage();
		} else {
			// Is it is simple page just enable buttons and controls
			$this->buildPage();
		}
	}
开发者ID:verbazend,项目名称:AWFA,代码行数:18,代码来源:class-vc-frontend-editor.php


示例3: load

 /**
  * Add filter for yoast.
  * @since 4.4
  */
 public function load()
 {
     if (class_exists('WPSEO_Metabox') && (vc_mode() == 'admin_page' || vc_mode() === 'admin_frontend_editor')) {
         add_filter('wpseo_pre_analysis_post_content', array(&$this, 'filterResults'));
         //add_action( 'vc_frontend_editor_render_template', array( &$this, 'addSubmitBox' ) );
     }
 }
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:11,代码来源:class-vc-vendor-yoast_seo.php


示例4: load

 /**
  * Add filter for yoast.
  * @since 4.4
  */
 public function load()
 {
     if (class_exists('WPSEO_Metabox') && (vc_mode() == 'admin_page' || vc_mode() === 'admin_frontend_editor')) {
         add_filter('wpseo_pre_analysis_post_content', array(&$this, 'filterResults'));
         add_action('vc_frontend_editor_render_template', array(&$this, 'addSubmitBox'));
     }
     // removed due to woocommerce fatal error :do_shortcode in is_admin() mode =  fatal error
 }
开发者ID:walkthenight,项目名称:walkthenight-wordpress,代码行数:12,代码来源:class-vc-vendor-yoast_seo.php


示例5: vc_is_page_editable

 /**
  * @since 4.2
  * @return bool
  */
 function vc_is_page_editable()
 {
     return 'page_editable' === vc_mode();
 }
开发者ID:ksan5835,项目名称:maadithottam,代码行数:8,代码来源:helpers_factory.php


示例6: add_action

 * add action in admin for vc grid item editor manager
 */
add_action('init', 'vc_grid_item_editor_create_post_type');
add_action('admin_init', 'vc_grid_item_editor_init');
add_action('vc_after_init', 'vc_grid_item_editor_shortcodes');
/**
 * Call preview as ajax request is called.
 */
add_action('wp_ajax_vc_gitem_preview', 'vc_grid_item_render_preview', 5);
/**
 * Add vc grid item to the list of the excluded post types for enabling Vc editor.
 *
 * Called with with 'vc_settings_exclude_post_type' action.
 * @deprecated
 */
if (vc_mode() === 'admin_settings_page') {
    add_filter('vc_settings_exclude_post_type', 'vc_grid_item_vc_settings_exclude');
}
/**
 * Add WP ui pointers in grid element editor.
 */
if (is_admin()) {
    add_filter('vc_ui-pointers-vc_grid_item', 'vc_grid_item_register_pointer');
}
function vc_grid_item_register_pointer($p)
{
    $screen = get_current_screen();
    if ('add' === $screen->action) {
        $p['vc_grid_item'] = array('name' => 'vcPointersController', 'messages' => array(array('target' => '#vc_templates-editor-button', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s </p>', __('Start Here!', 'js_composer'), __('Start easy - use predefined template as a starting point and modify it.', 'js_composer')), 'position' => array('edge' => 'left', 'align' => 'center'))), array('target' => '[data-vc-navbar-control="animation"]', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s </p>', __('Use Animations', 'js_composer'), __('Select animation preset for grid element. "Hover" state will be added next to the "Normal" state tab.', 'js_composer')), 'position' => array('edge' => 'right', 'align' => 'center'))), array('target' => '.vc_gitem_animated_block-shortcode', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s </p>', __('Style Design Options', 'js_composer'), __('Edit "Normal" state to set "Featured image" as a background, control zone sizing proportions and other design options (Height mode: Select "Original" to scale image without cropping).', 'js_composer')), 'position' => array('edge' => 'bottom', 'align' => 'center'))), array('target' => '[data-vc-gitem="add-c"][data-vc-position="top"]', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s </p>', __('Extend Element', 'js_composer'), __('Additional content zone can be added to grid element edges (Note: This zone can not be animated).', 'js_composer')) . '<p><img src="' . vc_asset_url('vc/gb_additional_content.png') . '" alt="" /></p>', 'position' => array('edge' => 'right', 'align' => 'center'))), array('target' => '#wpadminbar', 'options' => array('content' => sprintf('<h3> %s </h3> %s', __('Watch Video Tutorial', 'js_composer'), '<p>' . __('Have a look how easy it is to work with grid element builder.', 'js_composer') . '</p>' . '<iframe width="500" height="281" src="//www.youtube.com/embed/sBvEiIL6Blo" frameborder="0" allowfullscreen></iframe>'), 'position' => array('edge' => 'top', 'align' => 'center'), 'pointerClass' => 'vc_gitem-animated-block-pointer-video', 'pointerWidth' => '530'))));
    }
    return $p;
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:31,代码来源:vc-grid-item-editor.php


示例7: trim

$post_title = trim($post->post_title);
$nonce_action = $nonce_action = 'update-post_' . $editor->post_id;
$user_ID = isset($editor->current_user) && isset($editor->current_user->ID) ? (int) $editor->current_user->ID : 0;
$form_action = 'editpost';
$menu = array();
add_thickbox();
wp_enqueue_media(array('post' => $editor->post_id));
require_once $editor->adminFile('admin-header.php');
// @since 4.8 js logic for user role access manager.
vc_include_template('editors/partials/access-manager-js.tpl.php');
?>
	<div id="vc_preloader"></div>
	<script type="text/javascript">
		document.getElementById( 'vc_preloader' ).style.height = window.screen.availHeight;
		var vc_mode = '<?php 
echo vc_mode();
?>
',
			vc_iframe_src = '<?php 
echo esc_attr($editor->url);
?>
';
	</script>
	<input type="hidden" name="vc_post_title" id="vc_title-saved" value="<?php 
echo esc_attr($post_title);
?>
"/>
	<input type="hidden" name="vc_post_id" id="vc_post-id" value="<?php 
echo esc_attr($editor->post_id);
?>
"/>
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:31,代码来源:frontend_editor.tpl.php


示例8: vc_is_page_editable

 /**
  * @since 4.2
  * @return bool
  */
 function vc_is_page_editable()
 {
     return vc_mode() == 'page_editable';
 }
开发者ID:chicosilva,项目名称:olharambiental,代码行数:8,代码来源:helpers_factory.php


示例9: add_action

 * add action in admin for vc grid item editor manager
 */
add_action('init', 'vc_grid_item_editor_create_post_type');
add_action('admin_init', 'vc_grid_item_editor_init');
add_action('vc_after_init', 'vc_grid_item_editor_shortcodes');
/**
 * Call preview as ajax request is called.
 */
add_action('wp_ajax_vc_gitem_preview', 'vc_grid_item_render_preview', 5);
/**
 * Add vc grid item to the list of the excluded post types for enabling Vc editor.
 *
 * Called with with 'vc_settings_exclude_post_type' action.
 * @deprecated, will be removed in 4.10
 */
if ('admin_settings_page' === vc_mode()) {
    add_filter('vc_settings_exclude_post_type', 'vc_grid_item_vc_settings_exclude');
}
/**
 * Add WP ui pointers in grid element editor.
 */
if (is_admin()) {
    add_filter('vc_ui-pointers-vc_grid_item', 'vc_grid_item_register_pointer');
}
function vc_grid_item_register_pointer($pointers)
{
    $screen = get_current_screen();
    if ('add' === $screen->action) {
        $pointers['vc_grid_item'] = array('name' => 'vcPointersController', 'messages' => array(array('target' => '#vc_templates-editor-button', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s </p>', __('Start Here!', 'js_composer'), __('Start easy - use predefined template as a starting point and modify it.', 'js_composer')), 'position' => array('edge' => 'left', 'align' => 'center'))), array('target' => '[data-vc-navbar-control="animation"]', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s </p>', __('Use Animations', 'js_composer'), __('Select animation preset for grid element. "Hover" state will be added next to the "Normal" state tab.', 'js_composer')), 'position' => array('edge' => 'right', 'align' => 'center'))), array('target' => '.vc_gitem_animated_block-shortcode', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s </p>', __('Style Design Options', 'js_composer'), __('Edit "Normal" state to set "Featured image" as a background, control zone sizing proportions and other design options (Height mode: Select "Original" to scale image without cropping).', 'js_composer')), 'position' => array('edge' => 'bottom', 'align' => 'center'))), array('target' => '[data-vc-gitem="add-c"][data-vc-position="top"]', 'options' => array('content' => sprintf('<h3> %s </h3> <p> %s </p>', __('Extend Element', 'js_composer'), __('Additional content zone can be added to grid element edges (Note: This zone can not be animated).', 'js_composer')) . '<p><img src="' . vc_asset_url('vc/gb_additional_content.png') . '" alt="" /></p>', 'position' => array('edge' => 'right', 'align' => 'center'))), array('target' => '#wpadminbar', 'options' => array('content' => sprintf('<h3> %s </h3> %s', __('Watch Video Tutorial', 'js_composer'), '<p>' . __('Have a look how easy it is to work with grid element builder.', 'js_composer') . '</p>' . '<iframe width="500" height="281" src="//www.youtube.com/embed/sBvEiIL6Blo" frameborder="0" allowfullscreen></iframe>'), 'position' => array('edge' => 'top', 'align' => 'center'), 'pointerClass' => 'vc_gitem-animated-block-pointer-video', 'pointerWidth' => '530'))));
    }
    return $pointers;
开发者ID:k2jysy,项目名称:wedev,代码行数:31,代码来源:vc-grid-item-editor.php


示例10: init

 /**
  *
  */
 public function init()
 {
     $this->addHooks();
     /**
      * If current mode of VC is frontend editor load it.
      */
     if (vc_is_frontend_editor()) {
         vc_frontend_editor()->hookLoadEdit();
     } elseif (vc_mode() === 'page_editable') {
         /**
          * if page loaded inside frontend editor iframe it has page_editable mode.
          * It required to some some js/css elements and add few helpers for editor to be used.
          */
         $this->buildEditablePage();
     } else {
         // Is it is simple page just enable buttons and controls
         $this->buildPage();
     }
     /**
      * Load required vendors classes;
      * @deprecated since 4.4 due to autoload logic
      */
     visual_composer()->vendorsManager()->load();
 }
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:27,代码来源:class-vc-frontend-editor.php


示例11: registerAdminJavascript

 /**
  * Register admin javascript libs.
  *
  * Calls wp_register_script for required css libraries files for Admin dashboard.
  *
  * @since  3.1
  * vc_filter: vc_i18n_locale_composer_js_view, since 4.4 - override localization for js
  * @access public
  */
 public function registerAdminJavascript()
 {
     /**
      * TODO: REFACTOR
      * Save register only core js files and check for backend or front
      */
     // $this->frontJsRegister();
     wp_register_script('wpb_php_js', vc_asset_url('lib/php.default/php.default.min.js'), array('jquery'), WPB_VC_VERSION, true);
     wp_register_script('isotope', vc_asset_url('lib/bower/isotope/dist/isotope.pkgd.min.js'), array('jquery'), WPB_VC_VERSION, true);
     wp_register_script('wpb_scrollTo_js', vc_asset_url('lib/bower/scrollTo/jquery.scrollTo.min.js'), array('jquery'), WPB_VC_VERSION, true);
     wp_register_script('wpb_json-js', vc_asset_url('lib/bower/json-js/json2.js'), false, WPB_VC_VERSION, true);
     wp_register_script('wpb_js_composer_js_listeners', vc_asset_url('js/lib/events.js'), array('jquery', 'backbone', 'wpb_json-js'), WPB_VC_VERSION, true);
     wp_localize_script('wpb_js_composer_js_listeners', 'vcData', apply_filters('vc_global_js_data', array('version' => WPB_VC_VERSION, 'debug' => wpb_debug())));
     wp_register_script('wpb_js_composer_js_tools', vc_asset_url('js/backend/composer-tools.js'), array('jquery', 'backbone', 'wpb_json-js', 'wpb_js_composer_js_listeners'), WPB_VC_VERSION, true);
     wp_register_script('wpb_js_composer_settings', vc_asset_url('js/backend/composer-settings-page.js'), array('jquery', 'wpb_js_composer_js_tools'), WPB_VC_VERSION, true);
     wp_register_script('wpb_jscomposer_media_editor_js', vc_asset_url('js/backend/media-editor.js'), array('media-views', 'media-editor', 'mce-view', 'wpb_js_composer_js_view'), WPB_VC_VERSION, true);
     wp_register_script('wpb_js_composer_js_atts', vc_asset_url('js/params/composer-atts.js'), array('wp-color-picker', 'wpb_js_composer_js_tools'), WPB_VC_VERSION, true);
     wp_register_script('wpb_js_composer_js_storage', vc_asset_url('js/backend/composer-storage.js'), array('wpb_js_composer_js_atts'), WPB_VC_VERSION, true);
     wp_register_script('wpb_js_composer_js_models', vc_asset_url('js/backend/composer-models.js'), array('wpb_js_composer_js_storage'), WPB_VC_VERSION, true);
     wp_register_script('wpb_js_composer_editor_panels', vc_asset_url('js/editors/panels.js'), array('wpb_js_composer_js_models'), WPB_VC_VERSION, true);
     wp_register_script('wpb_js_composer_js_view', vc_asset_url('js/backend/composer-view.js'), array('wpb_js_composer_editor_panels'), WPB_VC_VERSION, true);
     wp_register_script('wpb_js_composer_js_custom_views', vc_asset_url('js/backend/composer-custom-views.js'), array('wpb_js_composer_js_view'), WPB_VC_VERSION, true);
     wp_register_script('wpb_jscomposer_autosuggest_js', vc_asset_url('lib/autosuggest/jquery.autoSuggest.js'), array('wpb_js_composer_js_view'), WPB_VC_VERSION, true);
     wp_register_script('wpb_jscomposer_teaser_js', vc_asset_url('js/backend/composer-teaser.js'), array(), WPB_VC_VERSION, true);
     if (!vc_is_as_theme() || vc_is_as_theme() && 'admin_settings_page' !== vc_mode()) {
         wp_register_script('ace-editor', vc_asset_url('lib/bower/ace-builds/src-min-noconflict/ace.js'), array('jquery'), WPB_VC_VERSION, true);
     }
     /**
      * vc_filter: vc_i18n_locale_composer_js_view - @since 4.4
      */
     wp_localize_script('wpb_js_composer_js_view', 'i18nLocale', apply_filters('vc_i18n_locale_composer_js_view', array('add_remove_picture' => __('Add/remove picture', 'js_composer'), 'finish_adding_text' => __('Finish Adding Images', 'js_composer'), 'add_image' => __('Add Image', 'js_composer'), 'add_images' => __('Add Images', 'js_composer'), 'settings' => __('Settings', 'js_composer'), 'main_button_title' => __('Visual Composer', 'js_composer'), 'main_button_title_backend_editor' => __('BACKEND EDITOR', 'js_composer'), 'main_button_title_frontend_editor' => __('FRONTEND EDITOR', 'js_composer'), 'main_button_title_revert' => __('CLASSIC MODE', 'js_composer'), 'please_enter_templates_name' => __('Please enter template name', 'js_composer'), 'confirm_deleting_template' => __('Confirm deleting "{template_name}" template, press Cancel to leave. This action cannot be undone.', 'js_composer'), 'press_ok_to_delete_section' => __('Press OK to delete section, Cancel to leave', 'js_composer'), 'drag_drop_me_in_column' => __('Drag and drop me in the column', 'js_composer'), 'press_ok_to_delete_tab' => __('Press OK to delete "{tab_name}" tab, Cancel to leave', 'js_composer'), 'slide' => __('Slide', 'js_composer'), 'tab' => __('Tab', 'js_composer'), 'section' => __('Section', 'js_composer'), 'please_enter_new_tab_title' => __('Please enter new tab title', 'js_composer'), 'press_ok_delete_section' => __('Press OK to delete "{tab_name}" section, Cancel to leave', 'js_composer'), 'section_default_title' => __('Section', 'js_composer'), 'please_enter_section_title' => __('Please enter new section title', 'js_composer'), 'error_please_try_again' => __('Error. Please try again.', 'js_composer'), 'if_close_data_lost' => __('If you close this window all shortcode settings will be lost. Close this window?', 'js_composer'), 'header_select_element_type' => __('Select element type', 'js_composer'), 'header_media_gallery' => __('Media gallery', 'js_composer'), 'header_element_settings' => __('Element settings', 'js_composer'), 'add_tab' => __('Add tab', 'js_composer'), 'are_you_sure_convert_to_new_version' => __('Are you sure you want to convert to new version?', 'js_composer'), 'loading' => __('Loading...', 'js_composer'), 'set_image' => __('Set Image', 'js_composer'), 'are_you_sure_reset_css_classes' => __('Are you sure that you want to remove all your data?', 'js_composer'), 'loop_frame_title' => __('Loop settings'), 'enter_custom_layout' => __('Custom row layout', 'js_composer'), 'wrong_cells_layout' => __('Wrong row layout format! Example: 1/2 + 1/2 or span6 + span6.', 'js_composer'), 'row_background_color' => __('Row background color', 'js_composer'), 'row_background_image' => __('Row background image', 'js_composer'), 'column_background_color' => __('Column background color', 'js_composer'), 'column_background_image' => __('Column background image', 'js_composer'), 'guides_on' => __('Guides ON', 'js_composer'), 'guides_off' => __('Guides OFF', 'js_composer'), 'template_save' => __('New template successfully saved!', 'js_composer'), 'template_added' => __('Template added to the page.', 'js_composer'), 'template_added_with_id' => __('Template added to the page. Template has ID attributes, make sure that they are not used more than once on the same page.', 'js_composer'), 'template_removed' => __('Template successfully removed.', 'js_composer'), 'template_is_empty' => __('Nothing to save. Template is empty.', 'js_composer'), 'css_updated' => __('Page settings updated!', 'js_composer'), 'update_all' => __('Update all', 'js_composer'), 'confirm_to_leave' => __('The changes you made will be lost if you navigate away from this page.', 'js_composer'), 'inline_element_saved' => __('%s saved!', 'js_composer'), 'inline_element_deleted' => __('%s deleted!', 'js_composer'), 'inline_element_cloned' => __('%s cloned. <a href="#" class="vc_edit-cloned" data-model-id="%s">Edit now?</a>', 'js_composer'), 'gfonts_loading_google_font_failed' => __('Loading Google Font failed', 'js_composer'), 'gfonts_loading_google_font' => __('Loading Font...', 'js_composer'), 'gfonts_unable_to_load_google_fonts' => __('Unable to load Google Fonts', 'js_composer'), 'no_title_parenthesis' => sprintf('(%s)', __('no title', 'js_composer')), 'error_while_saving_image_filtered' => __('Error while applying filter to the image. Check your server and memory settings.', 'js_composer'))));
     /**
      * @since 4.4
      */
     do_action('vc_base_register_admin_js');
 }
开发者ID:polaris610,项目名称:medicalhound,代码行数:45,代码来源:class-vc-base.php


示例12: load

 /**
  * Add filter for yoast.
  * @since 4.4
  */
 public function load()
 {
     if (class_exists('WPSEO_Metabox') && ('admin_page' === vc_mode() || 'admin_frontend_editor' === vc_mode())) {
         add_filter('wpseo_pre_analysis_post_content', array(&$this, 'filterResults'));
     }
 }
开发者ID:pab44,项目名称:pab44,代码行数:10,代码来源:class-vc-vendor-yoast_seo.php


示例13: load

 /**
  * Add filter for yoast.
  * @since 4.4
  */
 public function load()
 {
     if (class_exists('WPSEO_Metabox') && vc_mode() == 'admin_page') {
         add_filter('wpseo_pre_analysis_post_content', array(&$this, 'filterResults'));
     }
 }
开发者ID:rovak73,项目名称:sinfronterasdoc,代码行数:10,代码来源:class-vc-vendor-yoast_seo.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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