<?php $settings = FLBuilderModel::get_help_button_settings(); ?> <div id="fl-help-button-form" class="fl-settings-form"> <h3 class="fl-settings-form-header"><?php _e('Help Button Settings', 'fl-builder'); ?> </h3> <form id="help-button-form" action="<?php FLBuilderAdminSettings::render_form_action('help-button'); ?> " method="post"> <div class="fl-settings-form-content"> <p> <label> <input type="checkbox" name="fl-help-button-enabled" value="1" <?php checked($settings['enabled'], 1); ?> /> <span><?php _e('Enable Help Button', 'fl-builder'); ?> </span> </label> </p>
/** * Renders the markup for the buttons in the builder's bar. * * @since 1.6.3 * @return void */ public static function render_ui_bar_buttons() { $help_button = FLBuilderModel::get_help_button_settings(); $enabled_templates = FLBuilderModel::get_enabled_templates(); $simple_ui = !current_user_can(FLBuilderModel::get_editing_capability()); $buttons = array('help' => array('label' => '<i class="fa fa-question-circle"></i>', 'show' => $help_button['enabled'] && !$simple_ui), 'upgrade' => array('label' => __('Upgrade!', 'fl-builder'), 'show' => true === FL_BUILDER_LITE), 'buy' => array('label' => __('Buy Now!', 'fl-builder'), 'show' => stristr(home_url(), 'demo.wpbeaverbuilder.com')), 'done' => array('label' => __('Done', 'fl-builder'), 'class' => 'fl-builder-button-primary'), 'tools' => array('label' => __('Tools', 'fl-builder'), 'show' => !FLBuilderModel::is_post_user_template('module') && !$simple_ui), 'templates' => array('label' => __('Templates', 'fl-builder'), 'show' => !FLBuilderModel::is_post_user_template() && true !== FL_BUILDER_LITE && $enabled_templates != 'disabled' && !$simple_ui), 'add-content' => array('label' => __('Add Content', 'fl-builder'), 'show' => !FLBuilderModel::is_post_user_template('module') && !$simple_ui)); echo '<div class="fl-builder-bar-actions">'; foreach ($buttons as $slug => $button) { if (isset($button['show']) && !$button['show']) { continue; } echo '<span class="fl-builder-' . $slug . '-button fl-builder-button'; if (isset($button['class'])) { echo ' ' . $button['class']; } echo '">' . $button['label'] . '</span>'; } echo '<div class="fl-clear"></div></div>'; }
/** * Renders the markup for the builder interface. * * @since 1.0 * @return void */ public static function render_ui() { global $wp_the_query; if (FLBuilderModel::is_builder_active()) { $post_id = $wp_the_query->post->ID; $categories = FLBuilderModel::get_categorized_modules(); $enabled_templates = FLBuilderModel::get_enabled_templates(); $help_button = FLBuilderModel::get_help_button_settings(); include FL_BUILDER_DIR . 'includes/ui.php'; include FL_BUILDER_DIR . 'includes/js-config.php'; } }