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


PHP FLBuilderModel::is_builder_enabled方法代码示例

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


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

示例1: render_content

 /**
  * Renders the content for a builder layout while in the loop. 
  * This method should only be called by the_content filter as 
  * defined in fl-builder.php. To output builder content, use 
  * the_content function while in a WordPress loop. 
  *
  * @since 1.0
  * @param string $content The existing content.
  * @return string
  */
 public static function render_content($content)
 {
     $post_id = FLBuilderModel::get_post_id();
     $enabled = FLBuilderModel::is_builder_enabled();
     $rendering = $post_id === self::$post_rendering;
     $ajax = defined('DOING_AJAX');
     $in_loop = in_the_loop();
     $is_global = in_array($post_id, FLBuilderModel::get_global_posts());
     if ($enabled && !$rendering && !$ajax && ($in_loop || $is_global)) {
         // Set the post rendering ID.
         self::$post_rendering = $post_id;
         // Remove the builder's render_content filter so it's not called again.
         remove_filter('the_content', 'FLBuilder::render_content');
         // Render the content.
         ob_start();
         echo '<div class="' . self::render_content_classes() . '" data-post-id="' . $post_id . '">';
         self::render_nodes();
         echo '</div>';
         $content = ob_get_clean();
         // Reapply the builder's render_content filter.
         add_filter('the_content', 'FLBuilder::render_content');
         // Do shortcodes here since letting the WP filter run can cause an infinite loop.
         $pattern = get_shortcode_regex();
         $content = preg_replace_callback("/{$pattern}/s", 'FLBuilder::double_escape_shortcodes', $content);
         $content = do_shortcode($content);
         // Add srcset attrs to images with the class wp-image-<ID>.
         if (function_exists('wp_make_content_images_responsive')) {
             $content = wp_make_content_images_responsive($content);
         }
         // Clear the post rendering ID.
         self::$post_rendering = null;
     }
     return $content;
 }
开发者ID:komcdo,项目名称:iSSNA-WordPress,代码行数:44,代码来源:class-fl-builder.php

示例2: render

 /**
  * Renders the HTML for the post edit screen.
  *
  * @since 1.0
  * @return void
  */
 public static function render()
 {
     global $post;
     $post_type_obj = get_post_type_object($post->post_type);
     $post_type_name = strtolower($post_type_obj->labels->singular_name);
     $enabled = FLBuilderModel::is_builder_enabled();
     include FL_BUILDER_DIR . 'includes/admin-posts.php';
 }
开发者ID:onedaylabs,项目名称:yote2016.com,代码行数:14,代码来源:class-fl-builder-admin-posts.php

示例3: my_theme_show_page_header

function my_theme_show_page_header()
{
    if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled()) {
        $global_settings = FLBuilderModel::get_global_settings();
        if (!$global_settings->show_default_heading) {
            return false;
        }
    }
    return true;
}
开发者ID:TheRankSmith,项目名称:TRS,代码行数:10,代码来源:functions.php

示例4: wma_is_active_page_builder

 function wma_is_active_page_builder()
 {
     //Output
     return apply_filters('wmhook_wmamp_' . 'wma_is_active_page_builder_output', wma_is_active_vc() || class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled());
 }
开发者ID:KJaddoe,项目名称:CSCMRA-Project,代码行数:5,代码来源:functions.php

示例5: tesseract_is_beaver_builder_page

function tesseract_is_beaver_builder_page()
{
    return class_exists('FLBuilderModel') && FLBuilderModel::is_builder_enabled();
}
开发者ID:TheRankSmith,项目名称:TRS,代码行数:4,代码来源:customizer.php

示例6: render_content

 /**
  * Renders the content for a builder layout while in the loop. 
  * This method should only be called by the_content filter as 
  * defined in fl-builder.php. To output builder content, use 
  * the_content function while in a WordPress loop. 
  *
  * @since 1.0
  * @param string $content The existing content.
  * @return string
  */
 public static function render_content($content)
 {
     global $wp_filter;
     $post_id = FLBuilderModel::get_post_id();
     $enabled = FLBuilderModel::is_builder_enabled();
     $rendering = $post_id === self::$post_rendering;
     $ajax = defined('DOING_AJAX');
     $in_loop = in_the_loop();
     $is_global = in_array($post_id, FLBuilderModel::get_global_posts());
     if ($enabled && !$rendering && !$ajax && ($in_loop || $is_global)) {
         // Store this post ID so we know it is currently being rendered
         // in case another method or function calls apply filters on the
         // content after this method has run which creates an infinite loop.
         self::$post_rendering = $post_id;
         // Store a reference to the current the_content filters array since
         // any modules or widgets that call apply_filters on the_content cause
         // the array pointer to move to the end. That makes it so the builder
         // content doesn't receive filters after this method runs as it should.
         $filters = $wp_filter['the_content'];
         // Remove the builder's render_content filter so it's not called again
         // by modules or widgets that call apply_filters on the content.
         remove_filter('the_content', 'FLBuilder::render_content');
         // Render the content.
         ob_start();
         echo '<div class="fl-builder-content fl-builder-content-' . $post_id . '" data-post-id="' . $post_id . '">';
         self::render_rows();
         echo '</div>';
         $content = ob_get_clean();
         // Restore the original the_content filters array.
         $wp_filter['the_content'] = $filters;
     }
     return $content;
 }
开发者ID:karthikakamalanathan,项目名称:wp-cookieLawInfo,代码行数:43,代码来源:class-fl-builder.php


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