/**
  * 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);
 }
Пример #2
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;
 }
 /**
  * White labels the builder on the plugins page.
  *
  * @since 1.0
  * @param array $plugins An array data for each plugin.
  * @return array
  */
 public static function white_label_plugins_page($plugins)
 {
     $default = __('Page Builder', 'fl-builder');
     $branding = FLBuilderModel::get_branding();
     $key = FLBuilderModel::plugin_basename();
     if (isset($plugins[$key]) && $branding != $default) {
         $plugins[$key]['Name'] = $branding;
         $plugins[$key]['Title'] = $branding;
         $plugins[$key]['Author'] = '';
         $plugins[$key]['AuthorName'] = '';
         $plugins[$key]['PluginURI'] = '';
     }
     return $plugins;
 }
 /** 
  * Renders the admin settings page heading.
  *
  * @since 1.0
  * @return void
  */
 public static function render_page_heading()
 {
     $icon = FLBuilderModel::get_branding_icon();
     $name = FLBuilderModel::get_branding();
     if (!empty($icon)) {
         echo '<img src="' . $icon . '" />';
     }
     echo '<span>' . sprintf(_x('%s Settings', '%s stands for custom branded "Page Builder" name.', 'fl-builder'), FLBuilderModel::get_branding()) . '</span>';
 }
Пример #5
0
 /**
  * Renders the markup for the title in the builder's bar.
  *
  * @since 1.6.3
  * @return void
  */
 public static function render_ui_bar_title()
 {
     global $wp_the_query;
     $post_id = $wp_the_query->post->ID;
     // Get the bar title.
     if (FLBuilderModel::is_post_user_template()) {
         $title = sprintf(__('Template: %s', 'fl-builder'), get_the_title($post_id));
     } else {
         $title = FLBuilderModel::get_branding();
     }
     // Render the bar title.
     if ('' == FLBuilderModel::get_branding_icon()) {
         echo '<span class="fl-builder-bar-title fl-builder-bar-title-no-icon">' . $title . '</span>';
     } else {
         echo '<span class="fl-builder-bar-title">';
         echo '<img src="' . FLBuilderModel::get_branding_icon() . '" /> ';
         echo '<span>' . $title . '</span></span>';
     }
 }
 /** 
  * Renders the admin settings forms.
  *
  * @since 1.0
  * @return void
  */
 public static function render_forms()
 {
     // Welcome
     if (FLBuilderModel::get_branding() == __('Page Builder', 'fl-builder') && (is_network_admin() || !self::multisite_support())) {
         self::render_form('welcome');
     }
     // License
     if (is_network_admin() || !self::multisite_support()) {
         self::render_form('license');
     }
     // Upgrade
     if (FL_BUILDER_LITE === true) {
         self::render_form('upgrade');
     }
     // Modules
     self::render_form('modules');
     // Templates
     self::render_form('templates');
     // Post Types
     self::render_form('post-types');
     // Icons
     self::render_form('icons');
     // Editing
     self::render_form('editing');
     // Branding
     self::render_form('branding');
     // Help Button
     self::render_form('help-button');
     // Cache
     self::render_form('cache');
     // Uninstall
     self::render_form('uninstall');
 }
 /**
  * Renders the action link for post listing pages.
  *
  * @since 1.0
  * @param array $actions
  * @return array The array of action data.
  */
 public static function render_row_actions_link($actions = array())
 {
     global $post;
     if (current_user_can('edit_post', $post->ID) && wp_check_post_lock($post->ID) === false) {
         $post_types = FLBuilderModel::get_post_types();
         if (in_array($post->post_type, $post_types)) {
             $actions['fl-builder'] = '<a href="' . FLBuilderModel::get_edit_url() . '">' . FLBuilderModel::get_branding() . '</a>';
         }
     }
     return $actions;
 }
		
		<h3 class="fl-settings-form-header"><?php 
_e('Plugin Branding', 'fl-builder');
?>
</h3>
		<p><?php 
_e('White label the page builder plugin using the settings below.', 'fl-builder');
?>
</p>
		
		<h4><?php 
_e('Plugin Name', 'fl-builder');
?>
</h4>
		<input type="text" name="fl-branding" value="<?php 
echo esc_html(FLBuilderModel::get_branding());
?>
" class="regular-text" />

		<h4><?php 
_e('Plugin Icon URL', 'fl-builder');
?>
</h4>
		<input type="text" name="fl-branding-icon" value="<?php 
echo esc_html(FLBuilderModel::get_branding_icon());
?>
" class="regular-text" />
		
		<br /><br />
		
		<h3 class="fl-settings-form-header"><?php 
Пример #9
0
?>
"><?php 
echo FLBuilderModel::get_branding();
?>
</a>
	</div>
	<div class="fl-builder-admin-ui">
		<h3><?php 
printf(_x('%s is currently active for this %s.', 'The first %s stands for custom branded "Page Builder" name. The second %s stands for the post type name.', 'fl-builder'), FLBuilderModel::get_branding(), $post_type_name);
?>
</h3>
		<a href="<?php 
echo FLBuilderModel::get_edit_url();
?>
" class="fl-launch-builder button button-primary button-large"><?php 
printf(_x('Launch %s', '%s stands for custom branded "Page Builder" name.', 'fl-builder'), FLBuilderModel::get_branding());
?>
</a>
	</div>
	<div class="fl-builder-loading"></div>
</div>
<script type="text/javascript">

FLBuilderAdminPostsStrings = {
	switchToEditor: '<?php 
printf(esc_attr_x('Switching to Text Editor mode will disable your %s layout until it is enabled again. Any edits made while in Text Editor mode will not be made on your %s layout. Do you want to continue?', '%s stands for custom branded "Page Builder" name.', 'fl-builder'), FLBuilderModel::get_branding(), FLBuilderModel::get_branding());
?>
'
};

</script>
 /**
  * Adds the page builder button to the WordPress admin bar.
  *
  * @since 1.0
  * @param object $wp_admin_bar An instance of the WordPress admin bar.
  * @return void
  */
 public static function admin_bar_menu($wp_admin_bar)
 {
     global $wp_the_query;
     if (FLBuilderModel::is_post_editable()) {
         $wp_admin_bar->add_node(array('id' => 'fl-builder-frontend-edit-link', 'title' => '<style> #wp-admin-bar-fl-builder-frontend-edit-link .ab-icon:before { content: "\\f116" !important; top: 2px; margin-right: 3px; } </style><span class="ab-icon"></span>' . FLBuilderModel::get_branding(), 'href' => FLBuilderModel::get_edit_url($wp_the_query->post->ID)));
     }
 }
Пример #11
0
<?php

FLBuilder::register_settings_form('global', array('title' => sprintf(_x('%s Settings', '%s stands for custom branded "Page Builder" name.', 'fl-builder'), FLBuilderModel::get_branding()), 'tabs' => array('general' => array('title' => __('General', 'fl-builder'), 'description' => __('Note: These settings apply to all posts and pages.', 'fl-builder'), 'sections' => array('page_heading' => array('title' => __('Default Page Heading', 'fl-builder'), 'fields' => array('show_default_heading' => array('type' => 'select', 'label' => _x('Show', 'General settings form field label. Intended meaning: "Show page heading?"', 'fl-builder'), 'default' => '0', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'toggle' => array('0' => array('fields' => array('default_heading_selector'))), 'help' => __('Choosing no will hide the default theme heading for the "Page" post type. You will also be required to enter some basic CSS for this to work if you choose no.', 'fl-builder')), 'default_heading_selector' => array('type' => 'text', 'label' => __('CSS Selector', 'fl-builder'), 'default' => '.fl-post-header', 'help' => __('Enter a CSS selector for the default page heading to hide it.', 'fl-builder')))), 'rows' => array('title' => __('Rows', 'fl-builder'), 'fields' => array('row_margins' => array('type' => 'text', 'label' => __('Margins', 'fl-builder'), 'default' => '0', 'maxlength' => '3', 'size' => '5', 'description' => 'px'), 'row_padding' => array('type' => 'text', 'label' => __('Padding', 'fl-builder'), 'default' => '20', 'maxlength' => '3', 'size' => '5', 'description' => 'px'), 'row_width' => array('type' => 'text', 'label' => __('Max Width', 'fl-builder'), 'default' => '1100', 'maxlength' => '4', 'size' => '5', 'description' => 'px', 'help' => __('All rows will default to this width. You can override this and make a row full width in the settings for each row.', 'fl-builder')), 'row_width_default' => array('type' => 'select', 'label' => __('Default Row Width', 'fl-builder'), 'default' => 'fixed', 'options' => array('fixed' => __('Fixed', 'fl-builder'), 'full' => __('Full Width', 'fl-builder')), 'toggle' => array('full' => array('fields' => array('row_content_width_default')))), 'row_content_width_default' => array('type' => 'select', 'label' => __('Default Row Content Width', 'fl-builder'), 'default' => 'fixed', 'options' => array('fixed' => __('Fixed', 'fl-builder'), 'full' => __('Full Width', 'fl-builder'))))), 'modules' => array('title' => __('Modules', 'fl-builder'), 'fields' => array('module_margins' => array('type' => 'text', 'label' => __('Margins', 'fl-builder'), 'default' => '20', 'maxlength' => '3', 'size' => '5', 'description' => 'px'))), 'responsive' => array('title' => __('Responsive Layout', 'fl-builder'), 'fields' => array('responsive_enabled' => array('type' => 'select', 'label' => _x('Enabled', 'General settings form field label. Intended meaning: "Responsive layout enabled?"', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'toggle' => array('1' => array('fields' => array('auto_spacing', 'responsive_breakpoint', 'medium_breakpoint')))), 'auto_spacing' => array('type' => 'select', 'label' => _x('Enable Auto Spacing', 'General settings form field label. Intended meaning: "Enable auto spacing for responsive layouts?"', 'fl-builder'), 'default' => '1', 'options' => array('0' => __('No', 'fl-builder'), '1' => __('Yes', 'fl-builder')), 'help' => __('When auto spacing is enabled, the builder will automatically adjust the margins and padding in your layout once the small device breakpoint is reached. Most users will want to leave this enabled.', 'fl-builder')), 'medium_breakpoint' => array('type' => 'text', 'label' => __('Medium Device Breakpoint', 'fl-builder'), 'default' => '992', 'maxlength' => '4', 'size' => '5', 'description' => 'px', 'help' => __('The browser width at which the layout will adjust for medium devices such as tablets.', 'fl-builder')), 'responsive_breakpoint' => array('type' => 'text', 'label' => __('Small Device Breakpoint', 'fl-builder'), 'default' => '768', 'maxlength' => '4', 'size' => '5', 'description' => 'px', 'help' => __('The browser width at which the layout will adjust for small devices such as phones.', 'fl-builder')))))))));
Пример #12
0
        ?>
		<span class="fl-builder-bar-title fl-builder-bar-title-no-icon">
			<?php 
        echo FLBuilderModel::get_branding();
        ?>
		</span>
		<?php 
    } else {
        ?>
		<span class="fl-builder-bar-title">
			<img src="<?php 
        echo FLBuilderModel::get_branding_icon();
        ?>
" />
			<span><?php 
        echo FLBuilderModel::get_branding();
        ?>
</span>
		</span>
		<?php 
    }
    ?>
		<div class="fl-builder-bar-actions">
			<?php 
    if ($help_button['enabled']) {
        ?>
			<span class="fl-builder-help-button fl-builder-button"><i class="fa fa-question-circle"></i></span>
			<?php 
    }
    ?>
			<?php