/**
  * 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();
 }
Example #2
0
 /** 
  * Called via AJAX to submit the subscribe form. 
  *
  * @since 1.5.2
  * @return string The JSON encoded response.
  */
 public function submit()
 {
     $name = isset($_POST['name']) ? sanitize_text_field($_POST['name']) : false;
     $email = isset($_POST['email']) ? sanitize_email($_POST['email']) : false;
     $node_id = isset($_POST['node_id']) ? sanitize_text_field($_POST['node_id']) : false;
     $result = array('action' => false, 'error' => false, 'message' => false, 'url' => false);
     if ($email && $node_id) {
         $module = FLBuilderModel::get_module($node_id);
         $settings = $module->settings;
         // Subscribe.
         $instance = FLBuilderServices::get_service_instance($settings->service);
         $response = $instance->subscribe($settings, $email, $name);
         // Check for an error from the service.
         if ($response['error']) {
             $result['error'] = $response['error'];
         } else {
             $result['action'] = $settings->success_action;
             if ('message' == $settings->success_action) {
                 $result['message'] = $settings->success_message;
             } else {
                 $result['url'] = $settings->success_url;
             }
         }
     } else {
         $result['error'] = __('There was an error subscribing. Please try again.', 'fl-builder');
     }
     echo json_encode($result);
     die;
 }
Example #3
0
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__));
    }
}
Example #4
0
 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');
     }
 }
 function get_items($request)
 {
     $templates = array();
     $user_templates = get_posts(array('post_type' => 'fl-builder-template', 'orderby' => 'menu_order title', 'order' => 'ASC', 'posts_per_page' => -1, 'fl-builder-template-type' => 'layout'));
     //$user_templates = FLBuilderModel::get_user_templates();
     if (!empty($user_templates)) {
         foreach ($user_templates as $post) {
             $layout = get_post_meta($post->ID, '_fl_builder_data', true);
             if ($layout) {
                 $categories = get_post_meta($post->ID, 'template_categories', true);
                 if (empty($categories)) {
                     $categories = array('saved');
                 }
                 $templates[] = array('handle' => $post->ID, 'label' => $post->post_title, 'description' => $post->post_excerpt, 'author' => $post->post_author, 'modified' => $post->post_modified, 'edit_link' => FLBuilderModel::get_edit_url($post->ID), 'categories' => $categories, 'type' => 'user', 'is_global' => get_post_meta($post->ID, '_fl_builder_template_global', true), 'is_editable' => true);
             }
         }
     }
     $template_data = FLBuilderModel::get_templates();
     if (!empty($template_data)) {
         foreach ($template_data as $data) {
             $templates[] = array('handle' => $data->index, 'label' => $data->name, 'screenshot' => array('thumbnail' => FL_BUILDER_URL . 'img/templates/' . $data->image), 'author' => array('name' => 'Beaver Builder Team'), 'categories' => array($data->category), 'is_premium' => $data->premium, 'is_builtin' => true, 'type' => 'core');
         }
     }
     $response = rest_ensure_response($templates);
     return $response;
 }
 function print_custom_css()
 {
     $fields = self::get_color_fields();
     $settings = FLBuilderModel::get_global_settings();
     print "<style id='bb-ui-theme-custom'>\n";
     foreach ($fields as $name => $field) {
         $color = '#' . $settings->{$name};
         $properties = $field['properties'];
         $selectors = $field['selectors'];
         foreach ($selectors as $selector) {
             print $selector . "{\n";
             foreach ($properties as $property) {
                 print $property . " : " . $color;
             }
             print "}\n";
         }
     }
     ?>
     body .fl-builder-blocks-section .fl-builder-blocks-section-title:hover,
     body .fl-builder-blocks-section .fl-builder-blocks-section-title:hover i {
         background:transparent;
     }
     <?php 
     print "</style>\n";
 }
Example #7
0
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);
    }
}
/**
 * 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;
    }
}
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');
    }
}
Example #10
0
 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);
     }
 }
 /**
  * Renders the network admin menu for multisite installs.
  *
  * @since 1.0
  * @return void
  */
 public static function menu()
 {
     $title = FLBuilderModel::get_branding();
     $cap = 'manage_network_plugins';
     $slug = 'fl-builder-multisite-settings';
     $func = 'FLBuilderAdminSettings::render';
     add_submenu_page('settings.php', $title, $title, $cap, $slug, $func);
 }
Example #12
0
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);
    }
}
 /**
  * Get the saved data for a specific account.
  *
  * @since 1.5.4
  * @param string $account The account name.
  * @return array|bool The account data or false if it doesn't exist.
  */
 public function get_account_data($account)
 {
     $saved_services = FLBuilderModel::get_services();
     if (isset($saved_services[$this->id]) && isset($saved_services[$this->id][$account])) {
         return $saved_services[$this->id][$account];
     }
     return false;
 }
Example #14
0
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');
    }
}
 /**
  * Runs the install for a newly created site.
  *
  * @since 1.0
  * @param int $blog_id
  * @param int $user_id
  * @param string $domain
  * @param string $path
  * @param int $site_id
  * @param array $meta
  * @return void
  */
 public static function install_for_new_blog($blog_id, $user_id, $domain, $path, $site_id, $meta)
 {
     global $wpdb;
     if (is_plugin_active_for_network(FLBuilderModel::plugin_basename())) {
         switch_to_blog($blog_id);
         FLBuilderAdmin::install();
         restore_current_blog();
     }
 }
Example #16
0
 public function requiredPluginActive()
 {
     if (!apply_filters('toolset_is_views_available', false)) {
         return false;
     }
     if (defined('FL_BUILDER_VERSION')) {
         $this->name = FLBuilderModel::get_branding();
         return true;
     }
     return false;
 }
Example #17
0
 /**
  * @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');
     }
 }
Example #18
0
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);
    }
}
 function get_templates()
 {
     /*
     $user_templates = get_posts( array(
     			'post_type' 				=> 'fl-builder-template',
     			'orderby' 					=> 'menu_order title',
     			'order' 					=> 'ASC',
     			'posts_per_page' 			=> -1,
     			'fl-builder-template-type'	=> 'layout'
     		));
     */
     // Temp
     $template_data = FLBuilderModel::get_templates();
     return $template_data;
 }
 /**
  * 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';
     }
 }
 public static function save_fl_builder_data($meta_id, $post_id, $meta_key, $meta_value)
 {
     if ('_fl_builder_data' === $meta_key) {
         $modules = FLBuilderModel::get_all_modules();
         $nodes = self::find_fields($modules);
         if (!empty($nodes)) {
             $draft = maybe_unserialize(get_post_meta($post_id, '_fl_builder_draft', true));
             $meta_value = maybe_unserialize($meta_value);
             foreach ($nodes as $node_id => $types) {
                 foreach ($types as $type => $fields) {
                     foreach ($fields as $field => $args) {
                         if ('fl-builder-template' !== get_post_type($post_id)) {
                             if ($type == 'meta') {
                                 update_post_meta($post_id, $args['key'], $args['val']);
                             }
                             if ($type == 'taxonomy') {
                                 wp_set_post_terms($post_id, $args['val'], $args['key']);
                             }
                             if ($type == 'wp_option') {
                                 update_option($args['key'], $args['val']);
                             }
                         }
                         if (isset($meta_value[$node_id]->settings->{$field})) {
                             unset($meta_value[$node_id]->settings->{$field});
                         }
                         if (isset($draft[$node_id]->settings->{$field})) {
                             unset($draft[$node_id]->settings->{$field});
                         }
                     }
                 }
             }
             update_post_meta($post_id, $meta_key, $meta_value);
             update_post_meta($post_id, '_fl_builder_draft', $draft);
         }
     }
 }
 /**
  * Add fonts to the $font array for a module.
  *
  * @since  1.6.3
  * @param  object $module The respective module.
  * @return void
  */
 public static function add_fonts_for_module($module)
 {
     $fields = FLBuilderModel::get_settings_form_fields($module->form);
     $array = array();
     foreach ($fields as $name => $field) {
         if ($field['type'] == 'font' && isset($module->settings->{$name})) {
             $array[] = $module->settings->{$name};
             self::add_font($module->settings->{$name});
         }
     }
 }
Example #23
0
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;
}
Example #24
0
<?php

$global_settings = FLBuilderModel::get_global_settings();
FLBuilder::register_settings_form('module_advanced', array('title' => __('Advanced', 'fl-builder'), 'sections' => array('margins' => array('title' => __('Margins', 'fl-builder'), 'fields' => array('margin_top' => array('type' => 'text', 'label' => __('Top', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')), 'margin_bottom' => array('type' => 'text', 'label' => __('Bottom', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')), 'margin_left' => array('type' => 'text', 'label' => __('Left', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')), 'margin_right' => array('type' => 'text', 'label' => __('Right', 'fl-builder'), 'default' => '', 'description' => 'px', 'maxlength' => '4', 'size' => '5', 'placeholder' => $global_settings->module_margins, 'preview' => array('type' => 'none')))), 'responsive' => array('title' => __('Responsive Layout', 'fl-builder'), 'fields' => array('responsive_display' => array('type' => 'select', 'label' => __('Display', 'fl-builder'), 'options' => array('' => __('Always', 'fl-builder'), 'desktop' => __('Large Devices Only', 'fl-builder'), 'desktop-medium' => __('Large &amp; Medium Devices Only', 'fl-builder'), 'medium' => __('Medium Devices Only', 'fl-builder'), 'medium-mobile' => __('Medium &amp; Small Devices Only', 'fl-builder'), 'mobile' => __('Small Devices Only', 'fl-builder')), 'help' => __('Choose whether to show or hide this module at different device sizes.', 'fl-builder'), 'preview' => array('type' => 'none')))), 'animation' => array('title' => __('Animation', 'fl-builder'), 'fields' => array('animation' => array('type' => 'select', 'label' => __('Style', 'fl-builder'), 'options' => array('' => _x('None', 'Animation style.', 'fl-builder'), 'fade-in' => _x('Fade In', 'Animation style.', 'fl-builder'), 'slide-left' => _x('Slide Left', 'Animation style.', 'fl-builder'), 'slide-right' => _x('Slide Right', 'Animation style.', 'fl-builder'), 'slide-up' => _x('Slide Up', 'Animation style.', 'fl-builder'), 'slide-down' => _x('Slide Down', 'Animation style.', 'fl-builder')), 'preview' => array('type' => 'none')), 'animation_delay' => array('type' => 'text', 'label' => __('Delay', 'fl-builder'), 'default' => '0.0', 'maxlength' => '4', 'size' => '5', 'description' => _x('seconds', 'Value unit for form field of time in seconds. Such as: "5 seconds"', 'fl-builder'), 'help' => __('The amount of time in seconds before this animation starts.', 'fl-builder'), 'preview' => array('type' => 'none')))), 'css_selectors' => array('title' => __('CSS Selectors', 'fl-builder'), 'fields' => array('id' => array('type' => 'text', 'label' => __('ID', 'fl-builder'), 'help' => __("A unique ID that will be applied to this module's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. No spaces.", 'fl-builder'), 'preview' => array('type' => 'none')), 'class' => array('type' => 'text', 'label' => __('Class', 'fl-builder'), 'help' => __("A class that will be applied to this module's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. Separate multiple classes with spaces.", 'fl-builder'), 'preview' => array('type' => 'none')))))));
 /**
  * White labels the builder theme using the gettext filter
  * to cover areas that we can't access like the Customizer.
  *
  * @since 1.6.4.4
  * @return string
  */
 public static function white_label_theme_gettext($text)
 {
     if (is_admin() && 'Beaver Builder Theme' == $text) {
         $theme_data = FLBuilderModel::get_theme_branding();
         if (!empty($theme_data['name'])) {
             $text = $theme_data['name'];
         }
     }
     return $text;
 }
 /** 
  * Clears the builder cache for all sites on a network.
  *
  * @since 1.5.3
  * @access private
  * @return void
  */
 private static function clear_cache_for_all_sites()
 {
     global $blog_id;
     global $wpdb;
     // Save the original blog id.
     $original_blog_id = $blog_id;
     // Get all blog ids.
     $blog_ids = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
     // Loop through the blog ids and clear the cache.
     foreach ($blog_ids as $id) {
         switch_to_blog($id);
         FLBuilderModel::delete_asset_cache_for_all_posts();
     }
     // Revert to the original blog.
     switch_to_blog($original_blog_id);
 }
Example #27
0
<?php

FLBuilderModel::default_settings($settings, array('post_type' => 'post', 'order_by' => 'date', 'order' => 'DESC', 'offset' => 0, 'users' => ''));
?>
<div id="fl-builder-settings-section-general" class="fl-loop-builder fl-builder-settings-section">

	<table class="fl-form-table">
	<?php 
// Post type
FLBuilder::render_settings_field('post_type', array('type' => 'post-type', 'label' => __('Post Type', 'fl-builder')), $settings);
// Order by
FLBuilder::render_settings_field('order_by', array('type' => 'select', 'label' => __('Order By', 'fl-builder'), 'options' => array('ID' => __('ID', 'fl-builder'), 'date' => __('Date', 'fl-builder'), 'modified' => __('Date Last Modified', 'fl-builder'), 'title' => __('Title', 'fl-builder'), 'author' => __('Author', 'fl-builder'), 'comment_count' => __('Comment Count', 'fl-builder'), 'menu_order' => __('Menu Order', 'fl-builder'), 'rand' => __('Random', 'fl-builder'))), $settings);
// Order
FLBuilder::render_settings_field('order', array('type' => 'select', 'label' => __('Order', 'fl-builder'), 'options' => array('DESC' => __('Descending', 'fl-builder'), 'ASC' => __('Ascending', 'fl-builder'))), $settings);
// Offset
FLBuilder::render_settings_field('offset', array('type' => 'text', 'label' => _x('Offset', 'How many posts to skip.', 'fl-builder'), 'default' => '0', 'size' => '4', 'help' => __('Skip this many posts that match the specified criteria.', 'fl-builder')), $settings);
?>
	</table>
</div>
<div id="fl-builder-settings-section-filter" class="fl-builder-settings-section">
	<h3 class="fl-builder-settings-title"><?php 
_e('Filter', 'fl-builder');
?>
</h3>
	<?php 
foreach (FLBuilderLoop::post_types() as $slug => $type) {
    ?>
		<table class="fl-form-table fl-loop-builder-filter fl-loop-builder-<?php 
    echo $slug;
    ?>
-filter" <?php 
Example #28
0
<div class="wrap">

	<?php 
if (isset($subscription->error) || !$subscription->active) {
    ?>
	<p class="fl-license-error" style="padding:10px 20px; background: #d54e21; color: #fff;">
		<?php 
    _e('UPDATES UNAVAILABLE! Please subscribe or enter your license key below to enable automatic updates.', 'fl-builder');
    ?>
		&nbsp;<a style="color: #fff;" href="<?php 
    echo FLBuilderModel::get_upgrade_url(array('utm_source' => 'external', 'utm_medium' => 'builder', 'utm_campaign' => 'settings-page'));
    ?>
" target="_blank"><?php 
    _e('Subscribe Now', 'fl-builder');
    ?>
 &raquo;</a>
	</p>
	<?php 
} elseif (!$subscription->domain->active) {
    ?>
	<p class="fl-license-error" style="padding:10px 20px; background: #d54e21; color: #fff;">
		<?php 
    _e('UPDATES UNAVAILABLE! Your subscription is active but this domain has been deactivated. Please reactivate this domain in your account to enable automatic updates.', 'fl-builder');
    ?>
		&nbsp;<a style="color: #fff;" href="https://www.wpbeaverbuilder.com/my-account/?utm_source=external&utm_medium=builder&utm_campaign=settings-page" target="_blank"><?php 
    _e('Visit Account', 'fl-builder');
    ?>
 &raquo;</a>
	</p>
	<?php 
}
 public static function is_builder_active()
 {
     /**
      * Detect if conflicting page builder plugins are active
      */
     global $wpss_builder_active;
     if (!empty($wpss_builder_active)) {
         return TRUE;
     }
     $builder_plugs = array('beaver-builder-lite-version/fl-builder.php', 'bb-plugin/fl-builder.php');
     foreach ($builder_plugs as $k => $p) {
         if (self::is_plugin_active($p)) {
             if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
                 $wpss_builder_active = TRUE;
                 return TRUE;
             }
         }
     }
     return FALSE;
 }
 /**
  * Renders the assets for the layout or a node.
  *
  * @since 1.7
  * @access private
  * @return array
  */
 private static function render_assets()
 {
     $partial_refresh_data = self::get_partial_refresh_data();
     $asset_info = FLBuilderModel::get_asset_info();
     $asset_ver = FLBuilderModel::get_asset_version();
     $assets = array('js' => '', 'css' => '');
     // Render the JS.
     if ($partial_refresh_data['is_partial_refresh']) {
         if (!class_exists('FLJSMin')) {
             include FL_BUILDER_DIR . 'classes/class-fl-jsmin.php';
         }
         switch ($partial_refresh_data['node']->type) {
             case 'row':
                 $assets['js'] = FLBuilder::render_row_js($partial_refresh_data['node']);
                 $assets['js'] .= FLBuilder::render_row_modules_js($partial_refresh_data['node']);
                 break;
             case 'column':
                 $assets['js'] = FLBuilder::render_column_modules_js($partial_refresh_data['node']);
                 break;
             case 'module':
                 $assets['js'] = FLBuilder::render_module_js($partial_refresh_data['node']);
                 break;
         }
         $assets['js'] .= 'FLBuilder._renderLayoutComplete();';
         $assets['js'] = FLJSMin::minify($assets['js']);
     } else {
         $assets['js'] = $asset_info['js_url'] . '?ver=' . $asset_ver;
     }
     // Render the CSS.
     $assets['css'] = $asset_info['css_url'] . '?ver=' . $asset_ver;
     // Return the assets.
     return $assets;
 }