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


PHP FLBuilderModel::is_builder_active方法代码示例

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


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

示例1: insert_layout

 /**
  * Renders a layout with the provided post ID and enqueues the 
  * necessary styles and scripts.
  *
  * @since 1.7
  * @param array $attrs The shortcode attributes.
  * @return string
  */
 public static function insert_layout($attrs)
 {
     $builder_active = in_the_loop() && FLBuilderModel::is_builder_active();
     $post_type = isset($attrs['type']) ? $attrs['type'] : get_post_types();
     $args = array('post_type' => $post_type, 'posts_per_page' => -1);
     // Build the args array.
     if (isset($attrs['id'])) {
         $args['orderby'] = 'post__in';
         if (is_numeric($attrs['id'])) {
             $args['post__in'] = array($attrs['id']);
         } else {
             $args['post__in'] = explode(',', $attrs['id']);
         }
     } else {
         if (isset($attrs['slug'])) {
             $args['orderby'] = 'name';
             $args['name'] = $attrs['slug'];
         } else {
             return;
         }
     }
     // Render and return the layout.
     ob_start();
     if ($builder_active) {
         echo '<div class="fl-builder-shortcode-mask-wrap"><div class="fl-builder-shortcode-mask"></div>';
     }
     FLBuilder::render_query($args);
     if ($builder_active) {
         echo '</div>';
     }
     return ob_get_clean();
 }
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:40,代码来源:class-fl-builder-shortcodes.php

示例2: enqueue_scripts

 public function enqueue_scripts()
 {
     if ($this->settings->marker == 'icon' || FLBuilderModel::is_builder_active()) {
         $this->add_js('geocomplete', '//cdnjs.cloudflare.com/ajax/libs/geocomplete/1.6.5/jquery.geocomplete.min.js', array('jquery'), '1.6.5', true);
         $this->add_js('marker-with-label', $this->url . 'js/markerwithlabel.js', array('googlemaps-api'), NULL, true);
     }
 }
开发者ID:ZestSMS,项目名称:BB-Override-Modules,代码行数:7,代码来源:map.php

示例3: tesseract_enqueue_beaver_builder_scripts

function tesseract_enqueue_beaver_builder_scripts()
{
    if (FLBuilderModel::is_builder_active()) {
        wp_enqueue_script('tesseract-bb-extensions', get_template_directory_uri() . '/importer/js/beaver-builder.js', array('jquery'));
        wp_enqueue_style('tesseract-bb-extensions', get_template_directory_uri() . '/importer/css/beaver-builder.css');
    }
}
开发者ID:pakyinsun,项目名称:TESSERACT,代码行数:7,代码来源:beaver-builder-extensions.php

示例4: zestsms_pdf_field_assets

function zestsms_pdf_field_assets()
{
    if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
        wp_enqueue_style('zestsms-pdf', FIELDS_URL . 'pdf/css/zestsms-pdf.css', array(), '');
        wp_enqueue_script('zestsms-pdf', FIELDS_URL . 'pdf/js/zestsms-pdf.js', array(), '', true);
    }
}
开发者ID:ZestSMS,项目名称:BB-PDF-field,代码行数:7,代码来源:zestsms-pdf.php

示例5: brj_enqueue_minimap

function brj_enqueue_minimap()
{
    if (is_user_logged_in() && class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
        wp_enqueue_script('bb-minimap', plugins_url('bb-minimap.js', __FILE__), array('jquery', 'wp-util'));
        wp_enqueue_style('bb-minimap', plugins_url('css/bb-minimap.css', __FILE__));
    }
}
开发者ID:brentjett,项目名称:bb-experiments,代码行数:7,代码来源:bb-minimap.php

示例6: tesseract_add_button_to_page_builder

/**
 * Adds HTML to the bottom of the Beaver Builder Page Builder interface, which is used in a
 * modal to allow content blocks to be added to the page.
 */
function tesseract_add_button_to_page_builder()
{
    if (!defined('DOING_AJAX')) {
        if (!FLBuilderModel::is_builder_active()) {
            return;
        }
    }
    $templates_query = new WP_Query(array('post_type' => 'fl-builder-template', 'meta_key' => Tesseract_Importer_Constants::$CONTENT_BLOCK_META_KEY, 'meta_value' => 1, 'posts_per_page' => 999));
    ?>
		<div id="tesseract-content-blocks-wrapper">
			<div class="cancel-wrapper">
				<span class="fl-builder-blocks-update fl-builder-button fl-builder-button-primary fl-builder-button-large pull-left"><i class="fa fa-refresh"></i></span>
				<span class="fl-builder-blocks-update-message pull-left"></span>
				<span class="fl-builder-cancel-button fl-builder-button fl-builder-button-primary fl-builder-button-large">Cancel</span>
			</div>
			<?php 
    while ($templates_query->have_posts()) {
        $templates_query->the_post();
        ?>
				<?php 
        $template_id = get_the_ID();
        ?>
				<?php 
        global $post;
        $slug = $post->post_name;
        ?>
				<div class="content-block slug-<?php 
        echo esc_attr($slug);
        ?>
"
					style="background-image: url('<?php 
        echo esc_attr(get_stylesheet_directory_uri());
        ?>
/images/content-blocks/<?php 
        echo esc_attr($slug);
        ?>
.jpg')">
					<a href="#" class="append-content-button" data-template-id="<?php 
        echo esc_attr($template_id);
        ?>
">
						<?php 
        the_title();
        ?>
					</a>
				</div>
			<?php 
    }
    ?>
			<div class="cancel-wrapper">
				<span class="fl-builder-blocks-update fl-builder-button fl-builder-button-primary fl-builder-button-large pull-left"><i class="fa fa-refresh"></i></span>
				<span class="fl-builder-blocks-update-message pull-left"></span>
				<span class="fl-builder-cancel-button fl-builder-button fl-builder-button-primary fl-builder-button-large">Cancel</span>
			</div>
		</div>
	<?php 
    if (defined('DOING_AJAX') && DOING_AJAX) {
        die;
    }
}
开发者ID:Nirajjcu,项目名称:minime3d,代码行数:64,代码来源:beaver-builder-extensions.php

示例7: receptar_bb_assets

 function receptar_bb_assets()
 {
     //Styles
     if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
         wp_enqueue_style('receptar-bb-addon', receptar_get_stylesheet_directory_uri('css/beaver-builder-editor.css'), false, esc_attr(trim(wp_get_theme()->get('Version'))), 'screen');
     }
 }
开发者ID:kanenas,项目名称:receptar,代码行数:7,代码来源:beaver-builder.php

示例8: zestsms_timepicker_field_assets

function zestsms_timepicker_field_assets()
{
    if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
        wp_enqueue_script('jquery-timepicker', ZESTSMS_FIELDS_URL . 'zestsms-timepicker/js/lib/jquery.timepicker.min.js', array('jquery'), '1.8.0', true);
        wp_enqueue_script('zestsms-timepicker', ZESTSMS_FIELDS_URL . 'zestsms-timepicker/js/zestsms-timepicker.js', array('jquery-timepicker'), '1.0', true);
        wp_enqueue_style('jquery-timepicker', ZESTSMS_FIELDS_URL . 'zestsms-timepicker/css/lib/jquery.timepicker.css', false, null);
    }
}
开发者ID:ZestSMS,项目名称:BB-fields,代码行数:8,代码来源:zestsms-timepicker.php

示例9: zestsms_geocomplete_field_assets

function zestsms_geocomplete_field_assets()
{
    if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
        wp_enqueue_script('googlemaps-api', '//maps.googleapis.com/maps/api/js?v=3&sensor=false&libraries=places', array(), NULL, true);
        wp_enqueue_script('geocomplete', ZESTSMS_FIELDS_URL . 'zestsms-geocomplete/js/lib/jquery.geocomplete.min.js', array('jquery'), '1.6.5', true);
        wp_enqueue_script('zestsms-geocomplete', ZESTSMS_FIELDS_URL . 'zestsms-geocomplete/js/zestsms-geocomplete.js', array('jquery', 'geocomplete'), '1.0', true);
        wp_enqueue_style('zestsms-geocomplete', ZESTSMS_FIELDS_URL . 'zestsms-geocomplete/css/zestsms-geocomplete.css');
    }
}
开发者ID:ZestSMS,项目名称:BB-fields,代码行数:9,代码来源:zestsms-geocomplete.php

示例10: enqueue_scripts

 /**
  * @method enqueue_scripts
  */
 public function enqueue_scripts()
 {
     if (FLBuilderModel::is_builder_active() || $this->settings->layout == 'grid') {
         $this->add_js('jquery-masonry');
     }
     if (FLBuilderModel::is_builder_active() || $this->settings->layout == 'gallery') {
         $this->add_js('fl-gallery-grid');
     }
     if (FLBuilderModel::is_builder_active() || $this->settings->pagination == 'scroll') {
         $this->add_js('jquery-infinitescroll');
     }
 }
开发者ID:spokencode,项目名称:bophillips,代码行数:15,代码来源:post-grid.php

示例11: zestsms_datepicker_field_assets

function zestsms_datepicker_field_assets()
{
    global $wp_scripts;
    if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
        wp_enqueue_script('jquery-ui-core');
        wp_enqueue_script('jquery-ui-datepicker');
        wp_enqueue_script('zestsms-datepicker', ZESTSMS_FIELDS_URL . 'zestsms-datepicker/js/zestsms-datepicker.js', array('jquery-ui-core'), '', true);
        $ui = $wp_scripts->query('jquery-ui-core');
        // tell WordPress to load the Smoothness theme from Google CDN
        $protocol = is_ssl() ? 'https' : 'http';
        $url = "{$protocol}://ajax.googleapis.com/ajax/libs/jqueryui/{$ui->ver}/themes/smoothness/jquery-ui.min.css";
        wp_enqueue_style('jquery-ui-smoothness', $url, false, null);
        wp_enqueue_style('zestsms-datepicker', ZESTSMS_FIELDS_URL . 'zestsms-datepicker/css/zestsms-datepicker.css', false, null);
    }
}
开发者ID:ZestSMS,项目名称:BB-fields,代码行数:15,代码来源:zestsms-datepicker.php

示例12: print_template_html

 /**
  * Print the base html and all template scripts.
  * @return void
  */
 function print_template_html()
 {
     if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
         ?>
         <div id="brj-store-modal-root" class="fl-template-browser-modal brj-store-modal fl-lightbox-wrap"></div>
         <?php 
         require_once FLBUILDER_BROWSER_DIR . 'templates/root-view.php';
         require_once FLBUILDER_BROWSER_DIR . 'templates/sidebar-view.php';
         require_once FLBUILDER_BROWSER_DIR . 'templates/screen-templates.php';
         require_once FLBUILDER_BROWSER_DIR . 'templates/screen-template-single.php';
         require_once FLBUILDER_BROWSER_DIR . 'templates/screen-template-setup-library.php';
         require_once FLBUILDER_BROWSER_DIR . 'templates/screen-template-library.php';
         require_once FLBUILDER_BROWSER_DIR . 'templates/item-template.php';
         require_once FLBUILDER_BROWSER_DIR . 'templates/item-collection-sidebar.php';
         require_once FLBUILDER_BROWSER_DIR . 'templates/empty-no-templates.php';
         require_once FLBUILDER_BROWSER_DIR . 'templates/screen-template-import-template.php';
     }
 }
开发者ID:brentjett,项目名称:brj-template-browser,代码行数:22,代码来源:class-fl-builder-template-browser.php

示例13: enqueue

 function enqueue()
 {
     if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
         $themes = self::get_themes();
         $settings = FLBuilderModel::get_global_settings();
         $ui_theme = $settings->bb_ui_theme;
         if ($ui_theme == 'custom') {
             // setup custom style block
             add_action('wp_head', array($this, 'print_custom_css'));
         } elseif ($ui_theme != '') {
             $theme = $themes[$ui_theme];
             wp_enqueue_style('bb-ui-theme', $theme['url']);
         }
         wp_enqueue_script('bb-ui-theme', plugins_url('/js/settings.js', dirname(__FILE__)), false, false, true);
         $bb_ui = array();
         $bb_ui['themes'] = $themes;
         $bb_ui['fields'] = self::get_color_fields();
         wp_localize_script('bb-ui-theme', 'BB_UI', $bb_ui);
     }
 }
开发者ID:brentjett,项目名称:bb-experiments,代码行数:20,代码来源:class-bb-ui-themes.php

示例14: wma_is_active_bb

 function wma_is_active_bb()
 {
     //Helper variables
     $supported_post_types = get_option('_fl_builder_post_types');
     //Output
     if (class_exists('FLBuilder') && !is_admin() && !empty($supported_post_types) && is_singular((array) $supported_post_types) && class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
         return true;
     }
     return false;
 }
开发者ID:KJaddoe,项目名称:CSCMRA-Project,代码行数:10,代码来源:functions.php

示例15: maybe_enqueue_tooltip_styles

 static function maybe_enqueue_tooltip_styles()
 {
     /* Add Genesis Club Widgets Tooltip CSS for Beaver Builder Editor */
     if (class_exists('FLBuilderModel') && is_callable(array('FLBuilderModel', 'is_builder_active')) && FLBuilderModel::is_builder_active()) {
         add_action('wp_enqueue_scripts', array('Genesis_Club_Utils', 'register_tooltip_styles'));
         add_action('wp_enqueue_scripts', array('Genesis_Club_Utils', 'enqueue_tooltip_styles'));
     }
 }
开发者ID:jonpetersen,项目名称:PHTC,代码行数:8,代码来源:class-plugin.php


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