/**
  * 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();
 }
Пример #2
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);
     }
 }
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');
    }
}
Пример #4
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);
    }
}
Пример #5
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__));
    }
}
/**
 * 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;
    }
}
Пример #7
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');
     }
 }
Пример #8
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);
    }
}
Пример #9
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');
    }
}
Пример #10
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');
     }
 }
Пример #11
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);
    }
}
 /**
  * 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';
     }
 }
 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);
     }
 }
Пример #14
0
 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;
 }
Пример #15
0
 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'));
     }
 }
Пример #16
0
/**
 * Module specific frontend JS
 *
 * @since    1.3.15
 * @version  1.3.18
 *
 * @param  obj    $module   Page builder's current module object
 * @param  array  $settings Settings passed from page builder form
 */
function wma_bb_custom_module_frontent_js($module, $settings = array())
{
    // Requirements check
    if (!class_exists('FLBuilderModel') || !FLBuilderModel::is_builder_active() || !is_object($module) || !isset($module->slug) || !isset($module->node)) {
        return;
    }
    // Helper variables
    $output = '';
    $id = $module->node;
    $settings = (array) $settings;
    /**
     * Removing 'wm_' (string length = 3) from the beginning
     * of the custom module file name slug.
     */
    $module = substr($module->slug, 3);
    // Processing
    switch ($module) {
        case 'accordion':
            $output = "WmampAccordion( '.fl-node-{{id}} .wm-accordion' );";
            break;
        case 'content_module':
        case 'posts':
        case 'testimonials':
            // Isotope
            if (isset($settings['filter']) && $settings['filter']) {
                $output = "if ( typeof WmampIsotope == 'function' ) { WmampIsotope( '.fl-node-{{id}} .filter-this' ); }";
            }
            // Masonry
            if (isset($settings['class']) && false !== strpos($settings['class'], 'masonry')) {
                $output = "if ( typeof WmampMasonry == 'function' ) { WmampMasonry( '.fl-node-{{id}} .masonry-this' ); }";
            }
            // Slick
            if (isset($settings['scroll']) && $settings['scroll']) {
                if (version_compare(apply_filters('wmhook_shortcode_supported_version', WMAMP_VERSION), '1.3', '<')) {
                    $output = "if ( typeof WmampOwl == 'function' ) { WmampOwl( '.fl-node-{{id}} [class*=\"scrollable-\"]' ); }";
                } else {
                    $output = "if ( typeof WmampSlick == 'function' ) { WmampSlick( '.fl-node-{{id}} [class*=\"scrollable-\"]' ); }";
                }
            }
            break;
        case 'tabs':
            $output = "if ( typeof WmampTabs == 'function' ) { WmampTabs( '.fl-node-{{id}} .wm-tabs' ); }";
            break;
        default:
            break;
    }
    // /switch
    // Output
    if (trim($output)) {
        echo 'jQuery( function() { ' . str_replace('{{id}}', $id, $output) . ' } );';
    }
}
Пример #17
0
 /**
  * Renders the HTML attributes for a single module.
  *
  * @since 1.0
  * @param object $module A module node object.
  * @return void
  */
 public static function render_module_attributes($module)
 {
     $custom_class = apply_filters('fl_builder_module_custom_class', $module->settings->class, $module);
     $active = FLBuilderModel::is_builder_active();
     $global = FLBuilderModel::is_node_global($module);
     // ID
     if (!empty($module->settings->id)) {
         echo ' id="' . esc_attr($module->settings->id) . '"';
     }
     // Class
     echo ' class="fl-module';
     echo ' fl-module-' . $module->settings->type;
     if (!empty($module->settings->responsive_display)) {
         echo ' fl-visible-' . $module->settings->responsive_display;
     }
     if (!empty($module->settings->animation)) {
         echo ' fl-animation fl-' . $module->settings->animation;
     }
     if (!empty($custom_class)) {
         echo ' ' . trim(esc_attr($custom_class));
     }
     if ($global && $active) {
         echo ' fl-node-global';
     }
     echo ' fl-node-' . $module->node;
     echo '"';
     // Data
     echo ' data-node="' . $module->node . '" ';
     echo ' data-animation-delay="' . $module->settings->animation_delay . '" ';
     if ($active) {
         echo ' data-parent="' . $module->parent . '" ';
         echo ' data-type="' . $module->settings->type . '" ';
         echo ' data-name="' . $module->name . '" ';
     }
     if ($global && $active) {
         echo ' data-template="' . $module->template_id . '"';
         echo ' data-template-node="' . $module->template_node_id . '"';
     }
 }
Пример #18
0
/**
 * Visual Editor custom plugin
 *
 * @since    1.0
 * @version  1.2.2
 *
 * @param  array $plugins_array
 */
function wma_ve_custom_mce_plugin($plugins_array = array())
{
    // Helper variables
    global $pagenow;
    $codes = is_callable('wma_shortcodes') ? wma_shortcodes()->get_definitions() : array('generator' => null);
    $admin_pages = apply_filters('wmhook_wmamp_' . 'generator_admin_pages', array('post.php', 'post-new.php'));
    // Requirements check
    if (empty($codes['generator']) || is_admin() && !in_array($pagenow, $admin_pages) || !is_admin() && (!class_exists('FLBuilderModel') || !FLBuilderModel::is_builder_active())) {
        return $plugins_array;
    }
    // Processing
    $plugins_array['wmShortcodes'] = WMAMP_ASSETS_URL . 'js/shortcodes-button.js';
    // Output
    return $plugins_array;
}
Пример #19
0
 /**
  * Renders custom CSS in a style tag so it can be edited 
  * using the builder interface.
  *
  * @since 1.7
  * @return void
  */
 public static function render_custom_css_for_editing()
 {
     if (!FLBuilderModel::is_builder_active()) {
         return;
     }
     $global_settings = FLBuilderModel::get_global_settings();
     $layout_settings = FLBuilderModel::get_layout_settings();
     echo '<style id="fl-builder-global-css">' . $global_settings->css . '</style>';
     echo '<style id="fl-builder-layout-css">' . $layout_settings->css . '</style>';
 }
Пример #20
0
<div class="fl-widget">
<?php 
global $wp_widget_factory;
// Get builder post data.
$post_data = FLBuilderModel::get_post_data();
// Widget class
if (isset($settings->widget)) {
    $widget_slug = $settings->widget;
} else {
    if (isset($post_data['widget']) && FLBuilderModel::is_builder_active()) {
        $widget_slug = $post_data['widget'];
    }
}
if (isset($widget_slug) && isset($wp_widget_factory->widgets[$widget_slug])) {
    // Widget instance
    $factory_instance = $wp_widget_factory->widgets[$widget_slug];
    $widget_class = get_class($factory_instance);
    $widget_instance = new $widget_class($factory_instance->id_base, $factory_instance->name, $factory_instance->widget_options);
    // Widget settings
    $settings_key = 'widget-' . $widget_instance->id_base;
    $widget_settings = isset($settings->{$settings_key}) ? (array) $settings->{$settings_key} : array();
    // Render the widget
    the_widget($widget_slug, $widget_settings, array('widget_id' => 'fl_builder_widget_' . $module->node));
} else {
    if (isset($widget_slug) && FLBuilderModel::is_builder_active()) {
        // Widget doesn't exist!
        printf(_x('%s no longer exists.', '%s stands for widget slug.', 'fl-builder'), $widget_slug);
    }
}
?>
</div>
Пример #21
0
<?php

$vid_data = $module->get_data();
$preload = FLBuilderModel::is_builder_active() ? ' preload="none"' : '';
?>

<div class="fl-video fl-<?php 
echo $settings->video_type == 'media_library' ? 'wp' : 'embed';
?>
-video" itemscope itemtype="http://schema.org/VideoObject">
	<?php 
global $wp_embed;
if ($vid_data && $settings->video_type == 'media_library') {
    echo '<meta itemprop="url" content="' . $vid_data->url . '" />';
    echo '<meta itemprop="thumbnail" content="' . $vid_data->poster . '" />';
    echo do_shortcode('[video width="100%" height="100%" ' . $vid_data->extension . '="' . $vid_data->url . '" poster="' . $vid_data->poster . '"' . $vid_data->autoplay . $vid_data->loop . $preload . '][/video]');
} else {
    if ($settings->video_type == 'embed') {
        echo $wp_embed->autoembed($settings->embed_code);
    }
}
?>
</div>
Пример #22
0
 function wm_bb_assets()
 {
     // Processing
     if (wm_bb_is_active()) {
         // Styles
         wp_enqueue_style('mustang-bb', wm_get_stylesheet_directory_uri('assets/css/beaver-builder.css'), false, esc_attr(trim(WM_SCRIPTS_VERSION)), 'screen');
     }
     if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
         // Styles
         wp_enqueue_style('mustang-bb-editor', wm_get_stylesheet_directory_uri('assets/css/beaver-builder-editor.css'), false, esc_attr(trim(WM_SCRIPTS_VERSION)), 'screen');
     }
 }
Пример #23
0
<?php

if (FLBuilderModel::is_builder_active()) {
    ?>

if(typeof FB != 'undefined') {
		FB.XFBML.parse();
}

jQuery('#twitter-wjs').remove();
jQuery('#fl-gplus-button').remove();

<?php 
}
?>

<?php 
if ($settings->show_facebook) {
    ?>

(function(d, s, id) {
	var js, fjs = d.getElementsByTagName(s)[0];
	if (d.getElementById(id)) return;
	js = d.createElement(s); js.id = id;
	js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=525994720806655";
	fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

<?php 
}
if ($settings->show_twitter) {
Пример #24
0
function zestsms_select2_field_assets()
{
    if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
        wp_enqueue_script('select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.1-rc.1/js/select2.min.js', array('jquery'), '4.0.1', true);
        wp_enqueue_script('select2-settings', ZESTSMS_FIELDS_URL . 'zestsms-select2/js/select2-settings.js', array(), '1.0', true);
        wp_enqueue_style('select2', ZESTSMS_FIELDS_URL . 'zestsms-select2/css/select2.min.css', false, null);
    }
}
Пример #25
0
 function wma_bb_assets()
 {
     //Styles
     if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
         wp_enqueue_style('wm-radio');
         wp_enqueue_style('wm-shortcodes-bb-addon');
     }
 }
 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;
 }
    function print_footer()
    {
        global $post;
        require_once ABSPATH . 'wp-admin/includes/template.php';
        require_once ABSPATH . 'wp-admin/includes/theme.php';
        if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
            $detect_seo = false;
            if ($this->detect_plugin($this->detect_seo_plugins())) {
                $detect_seo = true;
                if ($this->detect_plugin(array('classes' => array('All_in_One_SEO_Pack', 'All_in_One_SEO_Pack_p')))) {
                    // All in one SEO : aiosp_title + aiosp_description
                    $meta_title_field = '_aioseop_title';
                    $meta_description_field = '_aioseop_description';
                } else {
                    if ($this->detect_plugin(array('classes' => array('wpSEO'), 'constants' => array('WPSEO_VERSION')))) {
                        //  WordPress SEO
                        $meta_title_field = '_yoast_wpseo_title';
                        $meta_description_field = '_yoast_wpseo_metadesc';
                    } else {
                        if ($this->detect_plugin(array('classes' => array('HeadSpace_Plugin')))) {
                            //  HeadSpace2 SEO
                            $meta_title_field = '_headspace_page_title';
                            $meta_description_field = '_headspace_description';
                        } else {
                            if ($this->detect_plugin(array('classes' => array('Platinum_SEO_Pack')))) {
                                //  Platinum SEO Pack
                                $meta_title_field = 'title';
                                $meta_description_field = 'description';
                            } else {
                                if ($this->detect_plugin(array('functions' => array('genesis_constants'))) || $this->detect_plugin(array('classes' => array('The_SEO_Framework_Load')))) {
                                    //  Genesis + SEO Framework
                                    $meta_title_field = '_genesis_title';
                                    $meta_description_field = '_genesis_description';
                                }
                            }
                        }
                    }
                }
                $meta_title = get_post_meta($post->ID, $meta_title_field, true);
                $meta_description = get_post_meta($post->ID, $meta_description_field, true);
            }
            ?>
            <div class="fl-pageSettings-panel">
                <div class="fl-pageSettings-tabs">
                    <i class="fl-builder-pageSettings-close fa fa-times"></i>
                    <a data-tab="current-page" class="fl-active"><?php 
            _e('Page Details', 'bb-toolbox');
            ?>
</a>
                    <a data-tab="seo"><?php 
            _e('SEO', 'bb-toolbox');
            ?>
</a>
                </div>
                <div class="fl-pageSettings-panel-content">
                    <form action="">
                        <div data-tab="current-page" class="active" action="">
                            <div class="cell">
                                <div class="field">
                                    <div class="input-wrap">
                                        <input name="post_title" value="<?php 
            echo esc_attr($post->post_title);
            ?>
">
                                    </div>
                                    <label><?php 
            _e('Title', 'bb-toolbox');
            ?>
</label>
                                    <span class="indicator"></span>
                                </div>
                                <div class="field">
                                    <div class="input-wrap">
                                        <input type="hidden" name="backup-permalink" value="<?php 
            echo esc_attr($post->post_name);
            ?>
">
                                        <span class="input-prefix"><?php 
            echo home_url();
            ?>
/</span><input name="post_name" class="inline-input" value="<?php 
            echo esc_attr($post->post_name);
            ?>
">
                                    </div>
                                    <label><?php 
            _e('Permalink', 'bb-toolbox');
            ?>
</label>
                                    <span class="indicator"><?php 
            _e('Saving...', 'bb-toolbox');
            ?>
</span>
                                </div>

                                <?php 
            $post_type_object = get_post_type_object($post->post_type);
            if ($post_type_object->hierarchical) {
                $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'post_parent', 'show_option_none' => __('(no parent)', 'bb-toolbox'), 'sort_column' => 'menu_order, post_title', 'echo' => 0, 'class' => 'parent_id');
                $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
                $pages = wp_dropdown_pages($dropdown_args);
                if (!empty($pages)) {
                    ?>
                                        <div class="field">
                                            <div class="input-wrap">
                                                <?php 
                    echo $pages;
                    ?>
                                            </div>
                                            <label><?php 
                    _e('Parent', 'bb-toolbox');
                    ?>
</label>
                                            <span class="indicator"></span>
                                        </div>
                                    <?php 
                }
                // end empty pages check
                ?>
                                <?php 
            }
            // end hierarchical check.
            ?>

                                <?php 
            if ('page' == $post->post_type && 0 != count(get_page_templates($post)) && get_option('page_for_posts') != $post->ID) {
                $template = !empty($post->page_template) ? $post->page_template : false;
                ?>
                                    <div class="field">
                                        <div class="input-wrap">
                                            <select name="page_template" data-field="_wp_page_template">
                                                <?php 
                /** This filter is documented in wp-admin/includes/meta-boxes.php */
                $default_title = apply_filters('default_page_template_title', __('Default Template'), 'quick-edit');
                ?>
                                                <option value="default"><?php 
                echo esc_html($default_title);
                ?>
</option>
                                                <?php 
                page_template_dropdown($template);
                ?>
                                            </select>
                                        </div>
                                        <label><?php 
                _e('Template', 'bb-toolbox');
                ?>
</label>
                                        <span class="indicator"><?php 
                _e('Saving...', 'bb-toolbox');
                ?>
</span>
                                    </div>
                                <?php 
            }
            ?>

                                <?php 
            /* ?>
               <div class="field">
                   <div class="input-wrap">
                       <?php
                       $post_type_object = get_post_type_object($post->post_type);
                       $thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true );
                       echo _wp_post_thumbnail_html( $thumbnail_id, $post->ID );
                       ?>
                   </div>
                   <label><?php echo esc_html( $post_type_object->labels->featured_image ) ?></label>
                   <span class="indicator"><?php _e('Saving...', 'bb-toolbox'); ?></span>
               </div>
               <?php */
            ?>

                            </div>
                        </div>

                        <div data-tab="seo" action="">
                            <div class="cell">
                                <?php 
            if (true === $detect_seo) {
                ?>
                                    <div class="field">
                                        <div class="input-wrap">
                                            <input name="meta_title" value="<?php 
                echo esc_attr($meta_title);
                ?>
" class="count" data-field="<?php 
                echo esc_attr($meta_title_field);
                ?>
">
                                        </div>
                                        <label><?php 
                _e('Meta title', 'bb-toolbox');
                ?>
 (<span><?php 
                echo esc_html(strlen($meta_title));
                ?>
</span>/60)</label>
                                        <span class="indicator"><?php 
                _e('Saving...', 'bb-toolbox');
                ?>
</span>
                                    </div>
                                    <div class="field">
                                        <div class="input-wrap">
                                            <input name="meta_description" value="<?php 
                echo esc_html($meta_description);
                ?>
" class="count" data-field="<?php 
                echo esc_attr($meta_description_field);
                ?>
">
                                        </div>
                                        <label><?php 
                _e('Meta description', 'bb-toolbox');
                ?>
 (<span><?php 
                echo esc_html(strlen($meta_description));
                ?>
</span>/160)</label>
                                        <span class="indicator"><?php 
                _e('Saving...', 'bb-toolbox');
                ?>
</span>
                                    </div>
                                <?php 
            } else {
                ?>
                                    <p><?php 
                _e('No SEO plugin detected :(', 'bb-toolbox');
                ?>
</p>
                                <?php 
            }
            ?>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
            <?php 
        }
    }