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

PHP vc_is_page_editable函数代码示例

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

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



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

示例1: vc_page_editable_enqueue_pointer_scripts

function vc_page_editable_enqueue_pointer_scripts()
{
    if (vc_is_page_editable()) {
        wp_enqueue_style('wp-pointer');
        wp_enqueue_script('wp-pointer');
    }
}
开发者ID:k2jysy,项目名称:wedev,代码行数:7,代码来源:vc-pointers-frontend-editor.php


示例2: addContentTabPageEditable

 public function addContentTabPageEditable($tabs)
 {
     if (vc_is_page_editable()) {
         // Description tab - shows product content
         $tabs['description'] = array('title' => __('Description', 'woocommerce'), 'priority' => 10, 'callback' => 'woocommerce_product_description_tab');
     }
     return $tabs;
 }
开发者ID:pab44,项目名称:pab44,代码行数:8,代码来源:class-vc-vendor-woocommerce.php


示例3: vc_page_editable_enqueue_pointer_scripts

function vc_page_editable_enqueue_pointer_scripts()
{
    if (vc_is_page_editable()) {
        wp_enqueue_style('wp-pointer');
        wp_enqueue_script('wp-pointer');
        // Add pointers script to queue. Add custom script.
        wp_enqueue_script('vc_pointer-message', vc_asset_url('js/lib/vc-pointers/vc-pointer-message.js'), array('jquery', 'underscore', 'wp-pointer'), WPB_VC_VERSION, true);
    }
}
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:9,代码来源:vc-pointers-frontend-editor.php


示例4: getHash

 /**
  * Get shortcode hash by it content and attributes
  *
  * @param $atts
  * @param $content
  *
  * @return string
  */
 public function getHash($atts, $content)
 {
     if (vc_is_page_editable() || is_preview()) {
         /* We are in Frontend editor
          * We need to send RAW shortcode data, so hash is just json_encode of atts and content
          */
         return urlencode(json_encode(array('tag' => $this->shortcode, 'atts' => $atts, 'content' => $content)));
     }
     /** Else
      * We are in preview mode (viewing page).
      * So hash is shortcode atts and content hash
      */
     return sha1(serialize(array('tag' => $this->shortcode, 'atts' => $atts, 'content' => $content)));
 }
开发者ID:rovak73,项目名称:sinfronterasdoc,代码行数:22,代码来源:vc-basic-grid.php


示例5: getId

 public function getId($atts, $content)
 {
     if (vc_is_page_editable() || is_preview()) {
         /* We are in Frontend editor
          * We need to send RAW shortcode data, so hash is just json_encode of atts and content
          */
         return urlencode(json_encode(array('tag' => $this->shortcode, 'atts' => $atts, 'content' => $content)));
     }
     $id_pattern = '/' . $this->grid_id_unique_name . '\\:([\\w-_]+)/';
     $id_value = isset($atts['grid_id']) ? $atts['grid_id'] : '';
     preg_match($id_pattern, $id_value, $id_matches);
     $id_to_save = '{failed_to_get_id:"' . esc_attr($id_value) . '"}';
     if (!empty($id_matches)) {
         $id_to_save = $id_matches[1];
     }
     return $id_to_save;
 }
开发者ID:AlchemyMomentum,项目名称:public_html,代码行数:17,代码来源:vc-basic-grid.php


示例6: load

 public function load()
 {
     add_filter('vc_object_id', array($this, 'filterMediaId'));
     add_filter('vc_basic_grid_filter_query_suppress_filters', '__return_false');
     add_filter('vc_frontend_editor_iframe_url', array($this, 'appendLangToUrl'));
     add_filter('vc_grid_request_url', array($this, 'appendLangToUrl'));
     add_filter('vc_admin_url', array($this, 'appendLangToUrl'));
     if (!vc_is_frontend_editor()) {
         add_filter('vc_get_inline_url', array($this, 'appendLangToUrl'));
     }
     global $sitepress;
     $action = vc_post_param('action');
     if (vc_is_page_editable() && 'vc_frontend_load_template' === $action) {
         // Fix Issue with loading template #135512264670405
         remove_action('wp_loaded', array($sitepress, 'maybe_set_this_lang'));
     }
 }
开发者ID:ksan5835,项目名称:maadithottam,代码行数:17,代码来源:class-vc-vendor-wpml.php


示例7: getParamBasicHeading

    /**
     * Get basic heading
     *
     * These are used in Pageable element inside content and are hidden from view
     *
     * @param $atts
     * @param $content
     *
     * @return string
     */
    public function getParamBasicHeading($atts, $content)
    {
        $isPageEditable = vc_is_page_editable();
        if ($isPageEditable) {
            $attributes = array('href' => 'javascript:;', 'data-vc-container' => '.vc_tta-container', 'data-vc-accordion' => '', 'data-vc-target' => '', 'data-vc-tta-controls-icon-wrapper' => '', 'data-vc-use-cache' => 'false');
        } else {
            $attributes = array('data-vc-container' => '.vc_tta-container', 'data-vc-accordion' => '', 'data-vc-target' => esc_attr('#' . $this->getTemplateVariable('tab_id')));
        }
        $output = '
			<span class="vc_tta-panel-title">
				<a ' . vc_convert_atts_to_string($attributes) . '></a>
			</span>
		';
        return $output;
    }
开发者ID:hikaram,项目名称:wee,代码行数:25,代码来源:vc-tta-section.php


示例8: getParamHeading

 public function getParamHeading($atts, $content)
 {
     $isPageEditable = vc_is_page_editable();
     $h4attributes = array();
     $h4classes = array('vc_tta-panel-title');
     if ($isPageEditable) {
         $h4attributes[] = 'data-vc-tta-controls-icon-position=""';
     } else {
         $controlIconPosition = $this->getTemplateVariable('control-icon-position');
         if ($controlIconPosition) {
             $h4classes[] = $controlIconPosition;
         }
     }
     $h4attributes[] = 'class="' . implode(' ', $h4classes) . '"';
     $output = '<h4 ' . implode(' ', $h4attributes) . '>';
     // close h4
     if ($isPageEditable) {
         $output .= '<a href="javascript:;" data-vc-target=""';
         $output .= ' data-vc-tta-controls-icon-wrapper';
         $output .= ' data-vc-use-cache="false"';
     } else {
         $output .= '<a href="#' . esc_attr($this->getTemplateVariable('tab_id')) . '"';
     }
     $output .= ' data-vc-accordion';
     $output .= ' data-vc-container=".vc_tta-container">';
     $output .= $this->getTemplateVariable('icon-left');
     $output .= '<span class="vc_tta-title-text">' . esc_html($this->getTemplateVariable('title')) . '</span>';
     $output .= $this->getTemplateVariable('icon-right');
     if (!$isPageEditable) {
         $output .= $this->getTemplateVariable('control-icon');
     }
     $output .= '</a>';
     $output .= '</h4>';
     // close h4 fix #2229
     return $output;
 }
开发者ID:lenguyenitc,项目名称:donations,代码行数:36,代码来源:vc-tta-section.php


示例9: __construct

 /**
  * @param $settings
  */
 public function __construct($settings)
 {
     $this->settings = $settings;
     $this->shortcode = $this->settings['base'];
     $this->addAction('admin_init', 'enqueueAssets');
     if (vc_is_page_editable()) {
         // fix for page editable
         $this->addAction('wp_head', 'printIconStyles');
     }
     $this->addAction('admin_head', 'printIconStyles');
     // fe+be
     $this->addAction('admin_print_scripts-post.php', 'enqueueAssets');
     $this->addAction('admin_print_scripts-post-new.php', 'enqueueAssets');
     if (!shortcode_exists($this->shortcode)) {
         add_shortcode($this->shortcode, array(&$this, 'render'));
     }
 }
开发者ID:AlchemyMomentum,项目名称:public_html,代码行数:20,代码来源:shortcodes.php


示例10: getParamTabsList

 /**
  * @param $atts
  * @param $content
  *
  * @return string
  */
 public function getParamTabsList($atts, $content)
 {
     $isPageEditabe = vc_is_page_editable();
     $sectionClass = $this->sectionClass;
     $html = array();
     $html[] = '<div class="vc_tta-tabs-container">';
     $html[] = '<ul class="vc_tta-tabs-list">';
     if (!$isPageEditabe) {
         $strict_bounds = 'vc_tta_tabs' === $this->shortcode;
         $active_section = $this->getActiveSection($atts, $strict_bounds);
         foreach (WPBakeryShortCode_VC_Tta_Section::$section_info as $nth => $section) {
             $classes = array('vc_tta-tab');
             if ($nth + 1 === $active_section) {
                 $classes[] = $this->activeClass;
             }
             $title = '<span class="vc_tta-title-text">' . $section['title'] . '</span>';
             if ('true' === $section['add_icon']) {
                 $icon_html = $this->constructIcon($section);
                 if ('left' === $section['i_position']) {
                     $title = $icon_html . $title;
                 } else {
                     $title = $title . $icon_html;
                 }
             }
             $a_html = '<a href="#' . $section['tab_id'] . '" data-vc-tabs data-vc-container=".vc_tta">' . $title . '</a>';
             $html[] = '<li class="' . implode(' ', $classes) . '" data-vc-tab>' . $a_html . '</li>';
         }
     }
     $html[] = '</ul>';
     $html[] = '</div>';
     return implode('', $html);
 }
开发者ID:hikaram,项目名称:wee,代码行数:38,代码来源:vc-tta-tabs.php


示例11: output

 public function output($atts, $content = null, $base = '')
 {
     $this->atts = $this->prepareAtts($atts);
     $output = '';
     $content = empty($content) && !empty($atts['content']) ? $atts['content'] : $content;
     if (($this->isInline() || vc_is_page_editable()) && method_exists($this, 'contentInline')) {
         $output .= $this->contentInline($this->atts, $content);
     } elseif ($this->isAdmin()) {
         $output .= $this->contentAdmin($this->atts, $content);
     }
     if (empty($output)) {
         $custom_output = VC_SHORTCODE_CUSTOMIZE_PREFIX . $this->shortcode;
         $custom_output_before = VC_SHORTCODE_BEFORE_CUSTOMIZE_PREFIX . $this->shortcode;
         // before shortcode function hook
         $custom_output_after = VC_SHORTCODE_AFTER_CUSTOMIZE_PREFIX . $this->shortcode;
         // after shortcode function hook
         // Before shortcode
         if (function_exists($custom_output_before)) {
             $output .= $custom_output_before($this->atts, $content);
         } else {
             $output .= $this->beforeShortcode($this->atts, $content);
         }
         // Shortcode content
         if (function_exists($custom_output)) {
             $output .= $custom_output($this->atts, $content);
         } else {
             $output .= $this->content($this->atts, $content);
         }
         // After shortcode
         if (function_exists($custom_output_after)) {
             $output .= $custom_output_after($this->atts, $content);
         } else {
             $output .= $this->afterShortcode($this->atts, $content);
         }
         // Filter for overriding outputs
         $output = apply_filters('vc_shortcode_output', $output, $this);
     }
     return $output;
 }
开发者ID:epiii,项目名称:aros,代码行数:39,代码来源:shortcodes.php


示例12: hookAdmin

 public function hookAdmin()
 {
     $this->enqueueAssets();
     $this->addAction('admin_init', 'enqueueAssets');
     if (vc_is_page_editable()) {
         // fix for page editable
         $this->addAction('wp_head', 'printIconStyles');
     }
     $this->addAction('admin_head', 'printIconStyles');
     // fe+be
     $this->addAction('admin_print_scripts-post.php', 'enqueueAssets');
     $this->addAction('admin_print_scripts-post-new.php', 'enqueueAssets');
 }
开发者ID:websideas,项目名称:aquila,代码行数:13,代码来源:shortcodes.php


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


示例14: enqueueTtaScript

 public function enqueueTtaScript()
 {
     wp_register_script('vc_accordion_script', vc_asset_url('lib/vc_accordion/vc-accordion.min.js'), array('jquery'), WPB_VC_VERSION, true);
     wp_register_script('vc_tta_autoplay_script', vc_asset_url('lib/vc-tta-autoplay/vc-tta-autoplay.min.js'), array('vc_accordion_script'), WPB_VC_VERSION, true);
     wp_enqueue_script('vc_accordion_script');
     if (!vc_is_page_editable()) {
         wp_enqueue_script('vc_tta_autoplay_script');
     }
 }
开发者ID:k2jysy,项目名称:wedev,代码行数:9,代码来源:vc-tta-accordion.php


示例15: vc_lean_map

vc_lean_map('vc_masonry_media_grid', null, $vc_config_path . '/grids/shortcode-vc-masonry-media-grid.php');
vc_lean_map('vc_tabs', null, $vc_config_path . '/deprecated/shortcode-vc-tabs.php');
vc_lean_map('vc_tour', null, $vc_config_path . '/deprecated/shortcode-vc-tour.php');
vc_lean_map('vc_tab', null, $vc_config_path . '/deprecated/shortcode-vc-tab.php');
vc_lean_map('vc_accordion', null, $vc_config_path . '/deprecated/shortcode-vc-accordion.php');
vc_lean_map('vc_accordion_tab', null, $vc_config_path . '/deprecated/shortcode-vc-accordion-tab.php');
vc_lean_map('vc_posts_grid', null, $vc_config_path . '/deprecated/shortcode-vc-posts-grid.php');
vc_lean_map('vc_carousel', null, $vc_config_path . '/deprecated/shortcode-vc-carousel.php');
vc_lean_map('vc_button', null, $vc_config_path . '/deprecated/shortcode-vc-button.php');
vc_lean_map('vc_button2', null, $vc_config_path . '/deprecated/shortcode-vc-button2.php');
vc_lean_map('vc_cta_button', null, $vc_config_path . '/deprecated/shortcode-vc-cta-button.php');
vc_lean_map('vc_cta_button2', null, $vc_config_path . '/deprecated/shortcode-vc-cta-button2.php');
if (is_admin()) {
    add_action('admin_print_scripts-post.php', array(Vc_Shortcodes_Manager::getInstance(), 'buildShortcodesAssets'), 1);
    add_action('admin_print_scripts-post-new.php', array(Vc_Shortcodes_Manager::getInstance(), 'buildShortcodesAssets'), 1);
} elseif (vc_is_page_editable()) {
    add_action('wp_head', array(Vc_Shortcodes_Manager::getInstance(), 'buildShortcodesAssetsForEditable'));
    // @todo where these icons are used in iframe?
}
// @todo define custom
function vc_add_css_animation()
{
    return array('type' => 'dropdown', 'heading' => __('CSS Animation', 'js_composer'), 'param_name' => 'css_animation', 'admin_label' => true, 'value' => array(__('No', 'js_composer') => '', __('Top to bottom', 'js_composer') => 'top-to-bottom', __('Bottom to top', 'js_composer') => 'bottom-to-top', __('Left to right', 'js_composer') => 'left-to-right', __('Right to left', 'js_composer') => 'right-to-left', __('Appear from center', 'js_composer') => 'appear'), 'description' => __('Select type of animation for element to be animated when it "enters" the browsers viewport (Note: works only in modern browsers).', 'js_composer'));
}
function vc_target_param_list()
{
    return array(__('Same window', 'js_composer') => '_self', __('New window', 'js_composer') => '_blank');
}
function vc_layout_sub_controls()
{
    return array(array('link_post', __('Link to post', 'js_composer')), array('no_link', __('No link', 'js_composer')), array('link_image', __('Link to bigger image', 'js_composer')));
开发者ID:k2jysy,项目名称:wedev,代码行数:31,代码来源:lean-map.php


示例16: __construct

 /**
  * @param $settings
  */
 public function __construct($settings)
 {
     $this->settings = $settings;
     $this->shortcode = $this->settings['base'];
     $this->addAction('admin_init', 'enqueueAssets');
     //die(print_r(array($this->isAdmin(),vc_mode()),true));
     if (vc_is_page_editable()) {
         // fix for page editable
         $this->addAction('wp_head', 'printIconStyles');
     }
     $this->addAction('admin_head', 'printIconStyles');
     // fe+be
     $this->addAction('admin_print_scripts-post.php', 'enqueueAssets');
     $this->addAction('admin_print_scripts-post-new.php', 'enqueueAssets');
     if ($this->isAdmin()) {
         $this->removeShortCode($this->shortcode);
     }
     // if($this->isAdmin() || !shortcode_exists($this->shortcode)) $this->addShortCode($this->shortcode, Array($this, 'output'));
     if ($this->isAdmin() || !shortcode_exists($this->shortcode)) {
         $this->addShortCode($this->shortcode, array(&$this, 'render'));
     }
 }
开发者ID:syncopetwice,项目名称:STG,代码行数:25,代码来源:shortcodes.php


示例17: die

<?php

if (!defined('ABSPATH')) {
    die('-1');
}
/**
 * Shortcode attributes
 * @var $atts
 * @var $content - shortcode content
 * @var $this WPBakeryShortCode_VC_Tta_Section
 */
$atts = vc_map_get_attributes($this->getShortcode(), $atts);
$this->resetVariables($atts, $content);
WPBakeryShortCode_VC_Tta_Section::$self_count++;
WPBakeryShortCode_VC_Tta_Section::$section_info[] = $atts;
$isPageEditable = vc_is_page_editable();
$output = '';
$output .= '<div class="' . esc_attr($this->getElementClasses()) . '"';
$output .= ' id="' . esc_attr($this->getTemplateVariable('tab_id')) . '"';
$output .= ' data-vc-content=".vc_tta-panel-body">';
$output .= '<div class="vc_tta-panel-heading">';
$output .= $this->getTemplateVariable('heading');
$output .= '</div>';
$output .= '<div class="vc_tta-panel-body">';
if ($isPageEditable) {
    $output .= '<div data-js-panel-body>';
    // fix for fe - shortcodes container, not required in b.e.
}
$output .= $this->getTemplateVariable('content');
if ($isPageEditable) {
    $output .= '</div>';
开发者ID:arkev,项目名称:IntelligentMode,代码行数:31,代码来源:vc_tta_section.php


示例18: enqueueTtaScript

 public function enqueueTtaScript()
 {
     wp_enqueue_script('vc_accordion_script');
     if (!vc_is_page_editable()) {
         wp_enqueue_script('vc_tta_autoplay_script');
     }
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:7,代码来源:vc-tta-accordion.php


示例19: vc_shortcode_custom_css_class

function vc_shortcode_custom_css_class($param_value, $prefix = '')
{
    $css_class = preg_match('/\\s*\\.([^\\{]+)\\s*\\{\\s*([^\\}]+)\\s*\\}\\s*/', $param_value) ? $prefix . preg_replace('/\\s*\\.([^\\{]+)\\s*\\{\\s*([^\\}]+)\\s*\\}\\s*/', '$1', $param_value) : '';
    if (vc_is_page_editable()) {
        $css_class .= ' vc-cc-placeholder';
    }
    return $css_class;
}
开发者ID:scottnkerr,项目名称:eeco,代码行数:8,代码来源:helpers_factory.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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