← Back
Editing: class-bb-theme.php
<?php namespace GD_cORe\handlers\default_configs; if ( ! defined( 'ABSPATH' ) ) { exit; } /** * The admin-specific functionality of the plugin. * * * @package GD_cORe * @subpackage GD_cORe/admin */ class bb_theme extends Main { /** * Customizer settings * * @var array */ public $customizer_settings; /** * Beaver Builder settings * * @var array */ public $builder_settings; public function __construct(){ $this->customizer_settings = array( 0 => false, 'fl-topbar-bg-color' => '#ffffff', 'fl-topbar-text-color' => '#000000', 'fl-topbar-link-color' => '#428bca', 'fl-topbar-hover-color' => '#428bca', 'fl-header-bg-color' => '#ffffff', 'fl-header-text-color' => '#000000', 'fl-header-link-color' => '#428bca', 'fl-header-hover-color' => '#428bca', 'fl-nav-bg-color' => '#ffffff', 'fl-nav-text-color' => '#000000', 'fl-nav-link-color' => '#428bca', 'fl-nav-hover-color' => '#428bca', 'fl-footer-widgets-bg-color' => '#ffffff', 'fl-footer-widgets-text-color' => '#000000', 'fl-footer-widgets-link-color' => '#428bca', 'fl-footer-widgets-hover-color' => '#428bca', 'fl-footer-bg-color' => '#ffffff', 'fl-footer-text-color' => '#000000', 'fl-footer-link-color' => '#428bca', 'fl-footer-hover-color' => '#428bca', 'fl-nav-font-family' => 'Helvetica', 'fl-nav-font-weight' => '400', 'fl-nav-font-format' => 'none', 'fl-nav-font-size' => '14', 'nav_menu_locations' => array( 'bar' => 0, 'header' => 0, 'footer' => 0, ), 'custom_css_post_id' => 88, 'sidebars_widgets' => array( 'time' => 1584129554, 'data' => array( 'wp_inactive_widgets' => array(), 'blog-sidebar' => array( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'footer-col' => array(), 'footer-col-2' => array(), 'footer-col-3' => array(), 'footer-col-4' => array(), 'after-post-widget' => array(), ), ), 'fl-body-font-size_medium' => '14', 'fl-body-font-size_mobile' => '14', 'fl-body-line-height_medium' => '1.45', 'fl-body-line-height_mobile' => '1.45', 'fl-h1-font-size_medium' => '36', 'fl-h1-font-size_mobile' => '36', 'fl-h1-line-height_medium' => '1.4', 'fl-h1-line-height_mobile' => '1.4', 'fl-h1-letter-spacing_medium' => '0', 'fl-h1-letter-spacing_mobile' => '0', 'fl-h2-font-size_medium' => '30', 'fl-h2-font-size_mobile' => '30', 'fl-h2-line-height_medium' => '1.4', 'fl-h2-line-height_mobile' => '1.4', 'fl-h2-letter-spacing_medium' => '0', 'fl-h2-letter-spacing_mobile' => '0', 'fl-h3-font-size_medium' => '24', 'fl-h3-font-size_mobile' => '24', 'fl-h3-line-height_medium' => '1.4', 'fl-h3-line-height_mobile' => '1.4', 'fl-h3-letter-spacing_medium' => '0', 'fl-h3-letter-spacing_mobile' => '0', 'fl-h4-font-size_medium' => '18', 'fl-h4-font-size_mobile' => '18', 'fl-h4-line-height_medium' => '1.4', 'fl-h4-line-height_mobile' => '1.4', 'fl-h4-letter-spacing_medium' => '0', 'fl-h4-letter-spacing_mobile' => '0', 'fl-h5-font-size_medium' => '14', 'fl-h5-font-size_mobile' => '14', 'fl-h5-line-height_medium' => '1.4', 'fl-h5-line-height_mobile' => '1.4', 'fl-h5-letter-spacing_medium' => '0', 'fl-h5-letter-spacing_mobile' => '0', 'fl-h6-font-size_medium' => '12', 'fl-h6-font-size_mobile' => '12', 'fl-h6-line-height_medium' => '1.4', 'fl-h6-line-height_mobile' => '1.4', 'fl-h6-letter-spacing_medium' => '0', 'fl-h6-letter-spacing_mobile' => '0', 'fl-framework' => 'base', // Minimal Bootstrap 3 'fl-scroll-to-top' => 'enable', 'fl-awesome' => 'fa5', 'fl-accent' => '#444444', 'fl-accent-hover' => '#000000', 'fl-h1-font-size' => '36', 'fl-h1-line-height' => '1.4', 'fl-body-font-size' => '18', 'fl-body-line-height' => '1.6', ); $this->builder_settings = array( 'show_default_heading' => '0', 'default_heading_selector' => '.fl-post-header', 'row_margins' => 0, 'row_margins_unit' => 'px', 'row_margins_medium' => '', 'row_margins_medium_unit' => 'px', 'row_margins_responsive' => '', 'row_margins_responsive_unit' => 'px', 'row_padding' => 20, 'row_padding_unit' => 'px', 'row_padding_medium' => '', 'row_padding_medium_unit' => 'px', 'row_padding_responsive' => '', 'row_padding_responsive_unit' => 'px', 'row_width' => 1200, 'row_width_unit' => 'px', 'row_width_default' => 'full', 'row_content_width_default' => 'fixed', 'column_margins' => 0, 'column_margins_unit' => 'px', 'column_margins_medium' => '', 'column_margins_medium_unit' => 'px', 'column_margins_responsive' => '', 'column_margins_responsive_unit' => 'px', 'column_padding' => 0, 'column_padding_unit' => 'px', 'column_padding_medium' => '', 'column_padding_medium_unit' => 'px', 'column_padding_responsive' => '', 'column_padding_responsive_unit' => 'px', 'module_margins' => 20, 'module_margins_unit' => 'px', 'module_margins_medium' => '', 'module_margins_medium_unit' => 'px', 'module_margins_responsive' => '', 'module_margins_responsive_unit' => 'px', 'responsive_enabled' => '1', 'auto_spacing' => '1', 'medium_breakpoint' => 992, 'responsive_breakpoint' => 768, 'responsive_col_max_width' => '0', 'responsive_base_fontsize' => 16, 'css' => file_get_contents( dirname( __FILE__ ) . '/../../css/beaver-builder-global.css' ), 'js' => '', ); } public function runConfig() { // Merge customizer settings $existing_mods = get_option('theme_mods_bb-theme', []); // Ensure we have an array for array_merge if (!is_array($existing_mods)) { $existing_mods = (array) $existing_mods; } $merged_mods = array_merge($this->customizer_settings, $existing_mods); update_option('theme_mods_bb-theme', $merged_mods, false); // Merge builder settings $existing_builder = get_option('_fl_builder_settings', []); // Ensure we have an array for array_merge if (!is_array($existing_builder)) { $existing_builder = (array) $existing_builder; } $merged_builder = array_merge($this->builder_settings, $existing_builder); update_option('_fl_builder_settings', $merged_builder, false); } }
Save File
Cancel