Beispiel #1
0
function et_fb_backend_helpers()
{
    global $post, $paged;
    $layout_type = '';
    $post_type = isset($post->post_type) ? $post->post_type : false;
    $post_id = isset($post->ID) ? $post->ID : false;
    $post_status = isset($post->post_status) ? $post->post_status : false;
    if ('et_pb_layout' === $post_type) {
        $layout_type = et_fb_get_layout_type($post_id);
    }
    $google_fonts = array_merge(array('Default' => array()), et_builder_get_google_fonts());
    $current_user = wp_get_current_user();
    $current_url = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    $export_url = add_query_arg(array('et_core_portability' => true, 'context' => 'et_builder', 'name' => 'temp_name', 'nonce' => wp_create_nonce('et_core_portability_nonce')), admin_url());
    $fb_modules_array = apply_filters('et_fb_modules_array', ET_Builder_Element::get_modules_array($post_type, true, true));
    $helpers = array('debug' => true, 'postId' => $post_id, 'postStatus' => $post_status, 'postType' => $post_type, 'layoutType' => $layout_type, 'publishCapability' => is_page() && !current_user_can('publish_pages') || !is_page() && !current_user_can('publish_posts') ? 'no_publish' : 'publish', 'shortcodeObject' => array(), 'ajaxUrl' => admin_url('admin-ajax.php'), 'tinymceSkinUrl' => ET_FB_ASSETS_URI . '/vendors/tinymce-skin', 'tinymceCSSFiles' => esc_url(includes_url('js/tinymce') . '/skins/wordpress/wp-content.css'), 'images_uri' => ET_BUILDER_URI . '/images', 'generalFields' => array(), 'advancedFields' => array(), 'customCssFields' => array(), 'moduleParentShortcodes' => ET_Builder_Element::get_parent_shortcodes($post_type), 'moduleChildShortcodes' => ET_Builder_Element::get_child_shortcodes($post_type), 'moduleChildSlugs' => ET_Builder_Element::get_child_slugs($post_type), 'moduleRawContentShortcodes' => ET_Builder_Element::get_raw_content_shortcodes($post_type), 'modules' => $fb_modules_array, 'modulesCount' => count($fb_modules_array), 'modulesWithChildren' => ET_Builder_Element::get_shortcodes_with_children($post_type), 'structureModules' => ET_Builder_Element::get_structure_modules($post_type), 'et_builder_css_media_queries' => ET_Builder_Element::get_media_quries('for_js'), 'commentsModuleMarkup' => et_fb_get_comments_markup(), 'shortcode_tags' => et_fb_shortcode_tags(), 'getFontIconSymbols' => et_pb_get_font_icon_symbols(), 'failureNotification' => et_builder_get_failure_notification_modal(), 'exitNotification' => et_builder_get_exit_notification_modal(), 'getTaxonomies' => apply_filters('et_fb_taxonomies', array('category' => get_categories(), 'project_category' => get_categories(array('taxonomy' => 'project_category')), 'product_category' => class_exists('WooCommerce') ? get_terms('product_cat') : '')), 'googleAPIKey' => et_pb_is_allowed('theme_options') ? get_option('et_google_api_settings') : '', 'googleFontsList' => array_keys($google_fonts), 'googleFonts' => $google_fonts, 'gutterWidth' => et_get_option('gutter_width', 3), 'fontIcons' => et_pb_get_font_icon_symbols(), 'fontIconsDown' => et_pb_get_font_down_icon_symbols(), 'widgetAreas' => et_builder_get_widget_areas_list(), 'site_url' => get_site_url(), 'etBuilderAccentColor' => et_builder_accent_color(), 'gmt_offset_string' => et_pb_get_gmt_offset_string(), 'et_builder_fonts_data' => et_builder_get_fonts(), 'currentUserDisplayName' => $current_user->display_name, 'locale' => get_locale(), 'roleSettings' => et_pb_get_role_settings(), 'currentRole' => et_pb_get_current_user_role(), 'exportUrl' => $export_url, 'urls' => array('loginFormUrl' => esc_url(site_url('wp-login.php', 'login_post')), 'forgotPasswordUrl' => esc_url(wp_lostpassword_url()), 'logoutUrl' => esc_url(wp_logout_url()), 'logoutUrlRedirect' => esc_url(wp_logout_url($current_url)), 'themeOptionsUrl' => esc_url(et_pb_get_options_page_link()), 'builderPreviewStyle' => ET_BUILDER_URI . '/styles/preview.css'), 'nonces' => array('moduleContactFormSubmit' => wp_create_nonce('et-pb-contact-form-submit'), 'et_admin_load' => wp_create_nonce('et_admin_load_nonce'), 'computedProperty' => wp_create_nonce('et_pb_process_computed_property_nonce'), 'renderShortcode' => wp_create_nonce('et_pb_render_shortcode_nonce'), 'backendHelper' => wp_create_nonce('et_fb_backend_helper_nonce'), 'renderSave' => wp_create_nonce('et_fb_save_nonce'), 'prepareShortcode' => wp_create_nonce('et_fb_prepare_shortcode_nonce'), 'processImportedData' => wp_create_nonce('et_fb_process_imported_data_nonce'), 'retrieveLibraryModules' => wp_create_nonce('et_fb_retrieve_library_modules_nonce'), 'saveLibraryModules' => wp_create_nonce('et_fb_save_library_modules_nonce'), 'preview' => wp_create_nonce('et_pb_preview_nonce')), 'conditionalTags' => et_fb_conditional_tag_params(), 'currentPage' => et_fb_current_page_params(), 'appPreferences' => et_fb_app_preferences(), 'classNames' => array('hide_on_mobile_class' => 'et-hide-mobile'), 'columnLayouts' => et_builder_get_columns(), 'pageSettingsFields' => et_pb_get_builder_settings_configurations(), 'pageSettingsValues' => et_pb_get_builder_settings_values(), 'splitTestSubjects' => false !== ($all_subjects_raw = get_post_meta($post_id, '_et_pb_ab_subjects', true)) ? explode(',', $all_subjects_raw) : array(), 'defaults' => array('contactFormInputs' => et_fb_process_shortcode(sprintf('[et_pb_contact_field field_title="%1$s" field_type="input" field_id="Name" required_mark="on" fullwidth_field="off" /][et_pb_contact_field field_title="%2$s" field_type="email" field_id="Email" required_mark="on" fullwidth_field="off" /][et_pb_contact_field field_title="%3$s" field_type="text" field_id="Message" required_mark="on" fullwidth_field="on" /]', esc_attr__('Name', 'et_builder'), esc_attr__('Email Address', 'et_builder'), esc_attr__('Message', 'et_builder')))), 'all_modules_default_attrs' => ET_Builder_Element::get_all_modules_default_fields($post_type), 'saveModuleLibraryCategories' => et_fb_prepare_library_cats(), 'columnSettingFields' => array('advanced' => array('bg_img_%s' => array('label' => esc_html__('Column %s Background Image', 'et_builder'), 'type' => 'upload', 'option_category' => 'basic_option', 'upload_button_text' => esc_attr__('Upload an image', 'et_builder'), 'choose_text' => esc_attr__('Choose a Background Image', 'et_builder'), 'update_text' => esc_attr__('Set As Background', 'et_builder'), 'description' => esc_html__('If defined, this image will be used as the background for this module. To remove a background image, simply delete the URL from the settings field.', 'et_builder'), 'tab_slug' => 'advanced'), 'parallax_%s' => array('label' => esc_html__('Column %s Parallax Effect', 'et_builder'), 'type' => 'yes_no_button', 'option_category' => 'configuration', 'options' => array('on' => esc_html__('Yes', 'et_builder'), 'off' => esc_html__('No', 'et_builder')), 'affects' => array('parallax_method_%s'), 'description' => esc_html__('Here you can choose whether or not use parallax effect for the featured image', 'et_builder'), 'tab_slug' => 'advanced'), 'parallax_method_%s' => array('label' => esc_html__('Column %s Parallax Method', 'et_builder'), 'type' => 'select', 'option_category' => 'configuration', 'options' => array('off' => esc_html__('CSS', 'et_builder'), 'on' => esc_html__('True Parallax', 'et_builder')), 'depends_show_if' => 'on', 'depends_to' => array('parallax_%s'), 'description' => esc_html__('Here you can choose which parallax method to use for the featured image', 'et_builder'), 'tab_slug' => 'advanced'), 'background_color_%s' => array('label' => esc_html__('Column %s Background Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'padding_%s' => array('label' => esc_html__('Column %s Custom Padding', 'et_builder'), 'type' => 'custom_padding', 'mobile_options' => true, 'option_category' => 'layout', 'description' => esc_html__('Adjust padding to specific values, or leave blank to use the default padding.', 'et_builder'), 'tab_slug' => 'advanced')), 'css' => array('module_id_%s' => array('label' => esc_html__('Column %s CSS ID', 'et_builder'), 'type' => 'text', 'option_category' => 'configuration', 'tab_slug' => 'custom_css', 'option_class' => 'et_pb_custom_css_regular'), 'module_class_%s' => array('label' => esc_html__('Column %s CSS Class', 'et_builder'), 'type' => 'text', 'option_category' => 'configuration', 'tab_slug' => 'custom_css', 'option_class' => 'et_pb_custom_css_regular'), 'custom_css_before_%s' => array('label' => esc_html__('Column %s before', 'et_builder'), 'no_space_before_selector' => true, 'selector' => ':before'), 'custom_css_main_%s' => array('label' => esc_html__('Column %s Main Element', 'et_builder')), 'custom_css_after_%s' => array('label' => esc_html__('Column %s After', 'et_builder'), 'no_space_before_selector' => true, 'selector' => ':after'))));
    // Internationalization.
    $helpers['i18n'] = array('modules' => array('audio' => array('meta' => _x('by <strong>%1$s</strong>', 'Audio Module meta information', 'et_builder')), 'contactForm' => array('thankYou' => esc_html__('Thanks for contacting us', 'et_builder'), 'submit' => esc_attr__('Submit', 'et_builder')), 'countdownTimer' => array('dayFull' => esc_html__('Day(s)', 'et_builder'), 'dayShort' => esc_html__('Day', 'et_builder'), 'hourFull' => esc_html__('Hour(s)', 'et_builder'), 'hourShort' => esc_html__('Hrs', 'et_builder'), 'minuteFull' => esc_html__('Minute(s)', 'et_builder'), 'minuteShort' => esc_html__('Min', 'et_builder'), 'secondFull' => esc_html__('Second(s)', 'et_builder'), 'secondShort' => esc_html__('Sec', 'et_builder')), 'signup' => array('emailAddress' => esc_attr__('Email Address', 'et_builder'), 'firstName' => esc_attr__('First Name', 'et_builder'), 'lastName' => esc_attr__('Last Name', 'et_builder'), 'name' => esc_attr__('Name', 'et_builder'), 'email' => esc_attr__('Email', 'et_builder')), 'filterablePortfolio' => array('all' => esc_html__('All', 'et_builder')), 'login' => array('loginAs' => sprintf(esc_html__('Login as %s', 'et_builder'), $current_user->display_name), 'login' => esc_html__('Login', 'et_builder'), 'logout' => esc_html__('Log out', 'et_builder'), 'forgotPassword' => esc_html__('Forgot your password?', 'et_builder'), 'username' => esc_html__('Username', 'et_builder'), 'password' => esc_html__('Password', 'et_builder')), 'search' => array('submitButtonText' => esc_html__('Search', 'et_builder'), 'searchfor' => esc_html__('Search for:', 'et_builder')), 'fullwidthPostSlider' => array('by' => esc_html('by ', 'et_builder'))), 'saveButtonText' => esc_attr__('Save', 'et_builder'), 'saveDraftButtonText' => esc_attr__('Save Draft', 'et_builder'), 'publishButtonText' => is_page() && !current_user_can('publish_pages') || !is_page() && !current_user_can('publish_posts') ? esc_attr__('Submit', 'et_builder') : esc_attr__('Publish', 'et_builder'), 'controls' => array('tinymce' => array('visual' => esc_html__('Visual', 'et_builder'), 'text' => esc_html__('Text', 'et_builder')), 'moduleItem' => array('addNew' => esc_html__('Add New Item', 'et_builder')), 'upload' => array('buttonText' => esc_html__('Upload', 'et_builder')), 'insertMedia' => array('buttonText' => esc_html__('Add Media', 'et_builder'), 'modalTitleText' => esc_html__('Insert Media', 'et_builder')), 'inputMargin' => array('top' => esc_html__('Top', 'et_builder'), 'right' => esc_html__('Right', 'et_builder'), 'bottom' => esc_html__('Bottom', 'et_builder'), 'left' => esc_html__('Left', 'et_builder')), 'colorpicker' => array('clear' => esc_html__('Clear', 'et_builder')), 'uploadGallery' => array('uploadButtonText' => esc_html__('Update Gallery', 'et_builder')), 'centerMap' => array('updateMapButtonText' => esc_html__('Find', 'et_builder'), 'geoCodeError' => esc_html__('Geocode was not successful for the following reason', 'et_builder'), 'geoCodeError_2' => esc_html__('Geocoder failed due to', 'et_builder'), 'noResults' => esc_html__('No results found', 'et_builder'), 'mapPinAddressInvalid' => esc_html__('Invalid Pin and address data. Please try again.', 'et_builder')), 'tabs' => array('general' => esc_html__('General', 'et_builder'), 'design' => esc_html__('Design', 'et_builder'), 'css' => esc_html__('CSS', 'et_builder')), 'additionalButton' => array('changeApiKey' => esc_html__('Change API Key', 'et_builder'), 'generateImageUrlFromVideo' => esc_html__('Generate From Video', 'et_builder'))), 'rightClickMenuItems' => array('undo' => esc_html__('Undo', 'et_builder'), 'redo' => esc_html__('Redo', 'et_builder'), 'lock' => esc_html__('Lock', 'et_builder'), 'unlock' => esc_html__('Unlock', 'et_builder'), 'copy' => esc_html__('Copy', 'et_builder'), 'paste' => esc_html__('Paste', 'et_builder'), 'copyStyle' => esc_html__('Copy Style', 'et_builder'), 'pasteStyle' => esc_html__('Paste Style', 'et_builder'), 'disable' => esc_html__('Disable', 'et_builder'), 'enable' => esc_html__('Enable', 'et_builder'), 'save' => esc_html__('Save to Library', 'et_builder'), 'moduleType' => array('module' => esc_html__('Module', 'et_builder'), 'row' => esc_html__('Row', 'et_builder'), 'section' => esc_html__('Section', 'et_builder')), 'disableGlobal' => esc_html__('Disable Global', 'et_builder')), 'tooltips' => array('insertModule' => esc_html__('Insert Module', 'et_builder'), 'insertColumn' => esc_html__('Insert Columns', 'et_builder'), 'insertSection' => esc_html__('Insert Section', 'et_builder'), 'insertRow' => esc_html__('Insert Row', 'et_builder'), 'newModule' => esc_html__('New Module', 'et_builder'), 'newRow' => esc_html__('New Row', 'et_builder'), 'newSection' => esc_html__('New Section', 'et_builder'), 'addFromLibrary' => esc_html__('Add From Library', 'et_builder'), 'addToLibrary' => esc_html__('Add to Library', 'et_builder'), 'loading' => esc_html__('loading...', 'et_builder'), 'regular' => esc_html__('Regular', 'et_builder'), 'fullwidth' => esc_html__('Fullwidth', 'et_builder'), 'specialty' => esc_html__('Specialty', 'et_builder'), 'changeRow' => esc_html__('Choose Layout', 'et_builder'), 'clearLayout' => esc_html__('Clear Layout', 'et_builder'), 'clearLayoutText' => esc_html__('All of your current page content will be lost. Do you wish to proceed?', 'et_builder'), 'yes' => esc_html__('Yes', 'et_builder'), 'loadLayout' => esc_html__('Load From Library', 'et_builder'), 'predefinedLayout' => esc_html__('Predefined Layouts', 'et_builder'), 'replaceLayout' => esc_html__('Replace existing content.', 'et_builder'), 'search' => esc_html__('Search', 'et_builder') . '...', 'portability' => esc_html__('Portability', 'et_builder'), 'export' => esc_html__('Export', 'et_builder'), 'import' => esc_html__('Import', 'et_builder'), 'exportText' => esc_html__('Exporting your Divi Builder Layout will create a JSON file that can be imported into a different website.', 'et_builder'), 'exportName' => esc_html__('Export File Name', 'et_builder'), 'exportButton' => esc_html__('Export Divi Builder Layout', 'et_builder'), 'importText' => esc_html__('Importing a previously-exported Divi Builder Layout file will overwrite all content currently on this page.', 'et_builder'), 'importField' => esc_html__('Select File To Import', 'et_builder'), 'importBackUp' => esc_html__('Download backup before importing', 'et_builder'), 'importButton' => esc_html__('Import Divi Builder Layout', 'et_builder'), 'noFile' => esc_html__('No File Selected', 'et_builder'), 'chooseFile' => esc_html__('Choose File', 'et_builder')), 'saveModuleLibraryAttrs' => array('general' => esc_html__('Include General Settings', 'et_builder'), 'advanced' => esc_html__('Include Advanced Design Settings', 'et_builder'), 'css' => esc_html__('Include Custom CSS', 'et_builder'), 'selectCategoriesText' => esc_html__('Select category(ies) for new template or type a new name ( optional )', 'et_builder'), 'templateName' => esc_html__('Template Name', 'et_builder'), 'selectiveSync' => esc_html__('Selective Sync', 'et_builder'), 'selectiveError' => esc_html__('Please select at least 1 tab to save', 'et_builder'), 'globalTitle' => esc_html__('Save as Global', 'et_builder'), 'globalText' => esc_html__('Make this a global item', 'et_builder'), 'createCatText' => esc_html__('Create New Category', 'et_builder'), 'addToCatText' => esc_html__('Add To Categories', 'et_builder'), 'descriptionText' => esc_html__('Here you can add the current item to your Divi Library for later use.', 'et_builder'), 'descriptionTextLayout' => esc_html__('Save your current page to the Divi Library for later use.', 'et_builder'), 'saveText' => esc_html__('Save to Library', 'et_builder'), 'allCategoriesText' => esc_html__('All Categories', 'et_builder')), 'modals' => array('tabItemTitles' => array('general' => esc_html__('General', 'et_builder'), 'design' => esc_html__('Design', 'et_builder'), 'css' => esc_html__('CSS', 'et_builder')), 'pageSettings' => array('title' => esc_html__('Page Settings', 'et_builder'))), 'history' => array('modal' => array('title' => esc_html__('Editing History', 'et_builder'), 'tabs' => array('states' => esc_html__('History States', 'et_builder'))), 'meta' => et_pb_history_localization()), 'help' => array('modal' => array('title' => esc_html__('Divi Builder Helper', 'et_builder'), 'tabs' => array('shortcut' => esc_html__('Shortcuts', 'et_builder'))), 'shortcuts' => array('page_title' => esc_html__('Page Shortcuts', 'et_builder'), 'page' => array('undo' => array('kbd' => array('super', 'z'), 'desc' => esc_html__('Undo', 'et_builder')), 'redo' => array('kbd' => array('super', 'y'), 'desc' => esc_html__('Redo', 'et_builder')), 'save' => array('kbd' => array('super', 's'), 'desc' => esc_html__('Save Page', 'et_builder')), 'save_as_draft' => array('kbd' => array('super', 'shift', 's'), 'desc' => esc_html__('Save Page As Draft', 'et_builder')), 'exit' => array('kbd' => array('super', 'e'), 'desc' => esc_html__('Exit Visual Builder', 'et_builder')), 'exit_to_backend_builder' => array('kbd' => array('super', 'shift', 'e'), 'desc' => esc_html__('Exit To Backend Builder', 'et_builder')), 'toggle_settings_bar' => array('kbd' => array('t'), 'desc' => esc_html__('Toggle Settings Bar', 'et_builder')), 'open_page_settings' => array('kbd' => array('o'), 'desc' => esc_html__('Open Page Settings', 'et_builder')), 'open_history' => array('kbd' => array('h'), 'desc' => esc_html__('Open History Window', 'et_builder')), 'open_portability' => array('kbd' => array('p'), 'desc' => esc_html__('Open Portability Window', 'et_builder')), 'zoom_in' => array('kbd' => array('super', '+'), 'desc' => esc_html__('Responsive Zoom In', 'et_builder')), 'zoom_out' => array('kbd' => array('super', '-'), 'desc' => esc_html__('Responsive Zoom Out', 'et_builder')), 'help' => array('kbd' => array('?'), 'desc' => esc_html__('List All Shortcuts', 'et_builder'))), 'inline_title' => esc_html__('Inline Editor Shortcuts', 'et_builder'), 'inline' => array('escape' => array('kbd' => array('esc'), 'desc' => esc_html__('Exit Inline Editor', 'et_builder'))), 'module_title' => esc_html__('Module Shortcuts', 'et_builder'), 'module' => array('module_copy' => array('kbd' => array('super', 'c'), 'desc' => esc_html__('Copy Module', 'et_builder')), 'module_cut' => array('kbd' => array('super', 'x'), 'desc' => esc_html__('Cut Module', 'et_builder')), 'module_paste' => array('kbd' => array('super', 'v'), 'desc' => esc_html__('Paste Module', 'et_builder')), 'module_copy_styles' => array('kbd' => array('super', 'alt', 'c'), 'desc' => esc_html__('Copy Module Styles', 'et_builder')), 'module_paste_styles' => array('kbd' => array('super', 'alt', 'v'), 'desc' => esc_html__('Paste Module Styles', 'et_builder')), 'module_lock' => array('kbd' => array('l'), 'desc' => esc_html__('Lock Module', 'et_builder')), 'module_disable' => array('kbd' => array('d'), 'desc' => esc_html__('Disable Module', 'et_builder')), 'drag_auto_copy' => array('kbd' => array('alt', 'module move'), 'desc' => esc_html__('Move and copy module into dropped location', 'et_builder')), 'column_change_structure' => array('kbd' => array('c', array('1', '2', '3', '4')), 'desc' => esc_html__('Change Column Structure', 'et_builder')), 'row_make_fullwidth' => array('kbd' => array('r', 'f'), 'desc' => esc_html__('Make Row Fullwidth', 'et_builder')), 'row_edit_gutter' => array('kbd' => array('g', array('1', '2', '3', '4')), 'desc' => esc_html__('Change Gutter Width', 'et_builder')), 'add_new_row' => array('kbd' => array('r', array('1', '2', '3', '4')), 'desc' => esc_html__('Add New Row', 'et_builder')), 'add_new_section' => array('kbd' => array('s', array('1', '2', '3')), 'desc' => esc_html__('Add New Section', 'et_builder')), 'resize_padding_auto_opposite' => array('kbd' => array('shift', 'Drag Padding'), 'desc' => esc_html__('Restrict padding to 10px increments', 'et_builder')), 'resize_padding_limited' => array('kbd' => array('alt', 'Drag Padding'), 'desc' => esc_html__('Padding limited to opposing value', 'et_builder')), 'resize_padding_10' => array('kbd' => array('shift', 'alt', 'Drag Padding'), 'desc' => esc_html__('Mirror padding on both sides', 'et_builder')), 'increase_padding_row' => array('kbd' => array('r', array('left', 'right', 'up', 'down')), 'desc' => esc_html__('Increase Row Padding', 'et_builder')), 'decrease_padding_row' => array('kbd' => array('r', 'alt', array('left', 'right', 'up', 'down')), 'desc' => esc_html__('Decrease Row Padding', 'et_builder')), 'increase_padding_section' => array('kbd' => array('s', array('left', 'right', 'up', 'down')), 'desc' => esc_html__('Increase Section Padding', 'et_builder')), 'decrease_padding_section' => array('kbd' => array('s', 'alt', array('left', 'right', 'up', 'down')), 'desc' => esc_html__('Decrease Section Padding', 'et_builder')), 'increase_padding_row_10' => array('kbd' => array('r', 'shift', array('left', 'right', 'up', 'down')), 'desc' => esc_html__('Increase Row Padding By 10px', 'et_builder')), 'decrease_padding_row_10' => array('kbd' => array('r', 'alt', 'shift', array('left', 'right', 'up', 'down')), 'desc' => esc_html__('Decrease Row Padding By 10px', 'et_builder')), 'increase_padding_section_10' => array('kbd' => array('s', 'shift', array('left', 'right', 'up', 'down')), 'desc' => esc_html__('Increase Section Padding By 10px', 'et_builder')), 'decrease_padding_section_10' => array('kbd' => array('s', 'alt', 'shift', array('left', 'right', 'up', 'down')), 'desc' => esc_html__('Decrease Section Padding By 10px', 'et_builder'))), 'modal_title' => esc_html__('Modal Shortcuts', 'et_builder'), 'modal' => array('escape' => array('kbd' => array('esc'), 'desc' => esc_html__('Close Modal', 'et_builder')), 'save_changes' => array('kbd' => array('enter'), 'desc' => esc_html__('Save Changes', 'et_builder')), 'undo' => array('kbd' => array('super', 'z'), 'desc' => esc_html__('Undo', 'et_builder')), 'redo' => array('kbd' => array('super', 'shift', 'z'), 'desc' => esc_html__('Redo', 'et_builder')), 'switch_tabs' => array('kbd' => array('shift', 'tab'), 'desc' => esc_html__('Switch Tabs', 'et_builder')), 'toggle_expand' => array('kbd' => array('super', 'enter'), 'desc' => esc_html__('Expand Modal Fullscreen', 'et_builder')), 'toggle_snap' => array('kbd' => array('super', array('left', 'right')), 'desc' => esc_html__('Snap Modal Left / Right', 'et_builder'))))), 'sortable' => array('has_no_ab_permission' => esc_html__('You do not have permission to edit the module, row or section in this split test.', 'et_builder'), 'cannot_move_goal_into_subject' => esc_html__('A split testing goal cannot be moved inside of a split testing subject. To perform this action you must first end your split test.', 'et_builder'), 'cannot_move_subject_into_goal' => esc_html__('A split testing subject cannot be moved inside of a split testing goal. To perform this action you must first end your split test.', 'et_builder'), 'cannot_move_row_goal_out_from_subject' => esc_html__('Once set, a goal that has been placed inside a split testing subject cannot be moved outside the split testing subject. You can end your split test and start a new one if you would like to make this change.', 'et_builder'), 'section_only_row_dragged_away' => esc_html__('The section should have at least one row.', 'et_builder'), 'global_module_alert' => esc_html__('You cannot add global modules into global sections or rows', 'et_builder'), 'cannot_move_module_goal_out_from_subject' => esc_html__('Once set, a goal that has been placed inside a split testing subject cannot be moved outside the split testing subject. You can end your split test and start a new one if you would like to make this change.', 'et_builder'), 'stop_dropping_3_col_row' => esc_html__('3 column row can\'t be used in this column.', 'et_builder')), 'tooltip' => array('pageSettingsBar' => array('responsive' => array('zoom' => esc_html__('Zoom Out', 'et_builder'), 'desktop' => esc_html__('Desktop View', 'et_builder'), 'tablet' => esc_html__('Tablet View', 'et_builder'), 'phone' => esc_html__('Phone View', 'et_builder')), 'main' => array('loadLibrary' => esc_html__('Load From Library', 'et_builder'), 'saveToLibrary' => esc_html__('Save To Library', 'et_builder'), 'clearLayout' => esc_html__('Clear Layout', 'et_builder'), 'pageSettingsModal' => esc_html__('Page Settings', 'et_builder'), 'history' => esc_html__('Editing History', 'et_builder'), 'portability' => esc_html__('Portability', 'et_builder'), 'open' => esc_html__('Expand Settings', 'et_builder'), 'close' => esc_html__('Collapse Settings', 'et_builder')), 'save' => array('saveDraft' => esc_html__('Save as Draft', 'et_builder'), 'save' => esc_html__('Save', 'et_builder'), 'publish' => esc_html__('Publish', 'et_builder'))), 'modal' => array('expandModal' => esc_html__('Expand Modal', 'et_builder'), 'contractModal' => esc_html__('Contract Modal', 'et_builder'), 'resize' => esc_html__('Resize Modal', 'et_builder'), 'snapModal' => esc_html__('Snap to Left', 'et_builder'), 'separateModal' => esc_html__('Separate Modal', 'et_builder'), 'redo' => esc_html__('Redo', 'et_builder'), 'undo' => esc_html__('Undo', 'et_builder'), 'cancel' => esc_html__('Discard All Changes', 'et_builder'), 'save' => esc_html__('Save Changes', 'et_builder')), 'inlineEditor' => array('back' => esc_html__('Go Back', 'et_builder'), 'increaseFontSize' => esc_html__('Decrease Font Size', 'et_builder'), 'decreaseFontSize' => esc_html__('Increase Font Size', 'et_builder'), 'bold' => esc_html__('Bold Text', 'et_builder'), 'italic' => esc_html__('Italic Text', 'et_builder'), 'underline' => esc_html__('Underline Text', 'et_builder'), 'link' => esc_html__('Insert Link', 'et_builder'), 'quote' => esc_html__('Insert Quote', 'et_builder'), 'alignment' => esc_html__('Text Alignment', 'et_builder'), 'centerText' => esc_html__('Center Text', 'et_builder'), 'rightText' => esc_html__('Right Text', 'et_builder'), 'leftText' => esc_html__('Left Text', 'et_builder'), 'justifyText' => esc_html__('Justify Text', 'et_builder'), 'list' => esc_html__('List Settings', 'et_builder'), 'indent' => esc_html__('Indent List', 'et_builder'), 'undent' => esc_html__('Undent List', 'et_builder'), 'orderedList' => esc_html__('Insert Ordered List', 'et_builder'), 'unOrderedList' => esc_html__('Insert Unordered List', 'et_builder'), 'text' => esc_html__('Text Settings', 'et_builder'), 'textColor' => esc_html__('Text Color', 'et_builder'), 'heading' => array('one' => esc_html__('Insert Heading One', 'et_builder'), 'two' => esc_html__('Insert Heading Two', 'et_builder'), 'three' => esc_html__('Insert Heading Three', 'et_builder'), 'four' => esc_html__('Insert Heading Four', 'et_builder'))), 'section' => array('tab' => array('move' => esc_html__('Move Section', 'et_builder'), 'settings' => esc_html__('Section Settings', 'et_builder'), 'duplicate' => esc_html__('Duplicate Section', 'et_builder'), 'addToLibrary' => esc_html__('Save Section To Library', 'et_builder'), 'delete' => esc_html__('Delete Section', 'et_builder')), 'addButton' => esc_html__('Add New Section', 'et_builder')), 'row' => array('tab' => array('move' => esc_html__('Move Row', 'et_builder'), 'settings' => esc_html__('Row Settings', 'et_builder'), 'duplicate' => esc_html__('Duplicate Row', 'et_builder'), 'addToLibrary' => esc_html__('Save Row To Library', 'et_builder'), 'delete' => esc_html__('Delete Row', 'et_builder'), 'update' => esc_html__('Change Column Structure', 'et_builder')), 'addButton' => esc_html__('Add New Row', 'et_builder')), 'module' => array('tab' => array('move' => esc_html__('Move Module', 'et_builder'), 'settings' => esc_html__('Module Settings', 'et_builder'), 'duplicate' => esc_html__('Duplicate Module', 'et_builder'), 'addToLibrary' => esc_html__('Save Module To Library', 'et_builder'), 'delete' => esc_html__('Delete Module', 'et_builder')), 'addButton' => esc_html__('Add New Module', 'et_builder'))), 'unsavedConfirmation' => esc_html__('Unsaved changes will be lost if you leave the Divi Builder at this time.', 'et_builder'), 'libraryLoadError' => esc_html__('Error loading Library items from server. Please refresh the page and try again.', 'et_builder'));
    // Pass helpers via localization.
    wp_localize_script('et-frontend-builder', 'ETBuilderBackend', $helpers);
}
Beispiel #2
0
 function et_divi_customizer_theme_settings($wp_customize)
 {
     $site_domain = get_locale();
     $google_fonts = et_builder_get_fonts(array('prepend_standard_fonts' => false));
     $et_domain_fonts = array('ru_RU' => 'cyrillic', 'uk' => 'cyrillic', 'bg_BG' => 'cyrillic', 'vi' => 'vietnamese', 'el' => 'greek');
     $et_one_font_languages = et_get_one_font_languages();
     $font_choices = array();
     $font_choices['none'] = array('label' => 'Default Theme Font');
     foreach ($google_fonts as $google_font_name => $google_font_properties) {
         if ('' !== $site_domain && isset($et_domain_fonts[$site_domain]) && false === strpos($google_font_properties['character_set'], $et_domain_fonts[$site_domain])) {
             continue;
         }
         $font_choices[$google_font_name] = array('label' => $google_font_name, 'data' => array('parent_font' => isset($google_font_properties['parent_font']) ? $google_font_properties['parent_font'] : '', 'parent_styles' => isset($google_font_properties['parent_font']) && isset($google_fonts[$google_font_properties['parent_font']]['styles']) ? $google_fonts[$google_font_properties['parent_font']]['styles'] : $google_font_properties['styles'], 'current_styles' => isset($google_font_properties['parent_font']) && isset($google_fonts[$google_font_properties['parent_font']]['styles']) && isset($google_font_properties['styles']) ? $google_font_properties['styles'] : '', 'parent_subset' => isset($google_font_properties['parent_font']) && isset($google_fonts[$google_font_properties['parent_font']]['character_set']) ? $google_fonts[$google_font_properties['parent_font']]['character_set'] : '', 'standard' => isset($google_font_properties['standard']) && $google_font_properties['standard'] ? 'on' : 'off'));
     }
     $wp_customize->add_panel('et_divi_general_settings', array('title' => esc_html__('General Settings', 'Divi'), 'priority' => 1));
     $wp_customize->add_section('title_tagline', array('title' => esc_html__('Site Identity', 'Divi'), 'panel' => 'et_divi_general_settings'));
     $wp_customize->add_section('et_divi_general_layout', array('title' => esc_html__('Layout Settings', 'Divi'), 'panel' => 'et_divi_general_settings'));
     $wp_customize->add_section('et_divi_general_typography', array('title' => esc_html__('Typography', 'Divi'), 'panel' => 'et_divi_general_settings'));
     $wp_customize->add_panel('et_divi_mobile', array('title' => esc_html__('Mobile Styles', 'Divi'), 'priority' => 6));
     $wp_customize->add_section('et_divi_mobile_tablet', array('title' => esc_html__('Tablet', 'Divi'), 'panel' => 'et_divi_mobile'));
     $wp_customize->add_section('et_divi_mobile_phone', array('title' => esc_html__('Phone', 'Divi'), 'panel' => 'et_divi_mobile'));
     $wp_customize->add_section('et_divi_mobile_menu', array('title' => esc_html__('Mobile Menu', 'Divi'), 'panel' => 'et_divi_mobile'));
     $wp_customize->add_section('et_divi_general_background', array('title' => esc_html__('Background', 'Divi'), 'panel' => 'et_divi_general_settings'));
     $wp_customize->add_panel('et_divi_header_panel', array('title' => esc_html__('Header & Navigation', 'Divi'), 'priority' => 2));
     $wp_customize->add_section('et_divi_header_layout', array('title' => esc_html__('Header Format', 'Divi'), 'panel' => 'et_divi_header_panel'));
     $wp_customize->add_section('et_divi_header_primary', array('title' => esc_html__('Primary Menu Bar', 'Divi'), 'panel' => 'et_divi_header_panel'));
     $wp_customize->add_section('et_divi_header_secondary', array('title' => esc_html__('Secondary Menu Bar', 'Divi'), 'panel' => 'et_divi_header_panel'));
     $wp_customize->add_section('et_divi_header_slide', array('title' => esc_html__('Slide In & Fullscreen Header Settings', 'Divi'), 'panel' => 'et_divi_header_panel'));
     $wp_customize->add_section('et_divi_header_fixed', array('title' => esc_html__('Fixed Navigation Settings', 'Divi'), 'panel' => 'et_divi_header_panel'));
     $wp_customize->add_section('et_divi_header_information', array('title' => esc_html__('Header Elements', 'Divi'), 'panel' => 'et_divi_header_panel'));
     $wp_customize->add_panel('et_divi_footer_panel', array('title' => esc_html__('Footer', 'Divi'), 'priority' => 3));
     $wp_customize->add_section('et_divi_footer_layout', array('title' => esc_html__('Layout', 'Divi'), 'panel' => 'et_divi_footer_panel'));
     $wp_customize->add_section('et_divi_footer_widgets', array('title' => esc_html__('Widgets', 'Divi'), 'panel' => 'et_divi_footer_panel'));
     $wp_customize->add_section('et_divi_footer_elements', array('title' => esc_html__('Footer Elements', 'Divi'), 'panel' => 'et_divi_footer_panel'));
     $wp_customize->add_section('et_divi_footer_menu', array('title' => esc_html__('Footer Menu', 'Divi'), 'panel' => 'et_divi_footer_panel'));
     $wp_customize->add_section('et_divi_bottom_bar', array('title' => esc_html__('Bottom Bar', 'Divi'), 'panel' => 'et_divi_footer_panel'));
     $wp_customize->add_section('et_color_schemes', array('title' => esc_html__('Color Schemes', 'Divi'), 'priority' => 7, 'description' => esc_html__('Note: Color settings set above should be applied to the Default color scheme.', 'Divi')));
     $wp_customize->add_panel('et_divi_buttons_settings', array('title' => esc_html__('Buttons', 'Divi'), 'priority' => 4));
     $wp_customize->add_section('et_divi_buttons', array('title' => esc_html__('Buttons Style', 'Divi'), 'panel' => 'et_divi_buttons_settings'));
     $wp_customize->add_section('et_divi_buttons_hover', array('title' => esc_html__('Buttons Hover Style', 'Divi'), 'panel' => 'et_divi_buttons_settings'));
     $wp_customize->add_panel('et_divi_blog_settings', array('title' => esc_html__('Blog', 'Divi'), 'priority' => 5));
     $wp_customize->add_section('et_divi_blog_post', array('title' => esc_html__('Post', 'Divi'), 'panel' => 'et_divi_blog_settings'));
     $wp_customize->add_setting('et_divi[post_meta_font_size]', array('default' => '14', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->get_setting('blogname')->transport = 'postMessage';
     $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[post_meta_font_size]', array('label' => esc_html__('Meta Text Size', 'Divi'), 'section' => 'et_divi_blog_post', 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 32, 'step' => 1))));
     $wp_customize->add_setting('et_divi[post_meta_height]', array('default' => '1', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_float_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[post_meta_height]', array('label' => esc_html__('Meta Line Height', 'Divi'), 'section' => 'et_divi_blog_post', 'type' => 'range', 'input_attrs' => array('min' => 0.8, 'max' => 3, 'step' => 0.1))));
     $wp_customize->add_setting('et_divi[post_meta_spacing]', array('default' => '0', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[post_meta_spacing]', array('label' => esc_html__('Meta Letter Spacing', 'Divi'), 'section' => 'et_divi_blog_post', 'type' => 'range', 'input_attrs' => array('min' => -2, 'max' => 10, 'step' => 1))));
     $wp_customize->add_setting('et_divi[post_meta_style]', array('default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_style'));
     $wp_customize->add_control(new ET_Divi_Font_Style_Option($wp_customize, 'et_divi[post_meta_style]', array('label' => esc_html__('Meta Font Style', 'Divi'), 'section' => 'et_divi_blog_post', 'type' => 'font_style', 'choices' => et_divi_font_style_choices())));
     $wp_customize->add_setting('et_divi[post_header_font_size]', array('default' => '30', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[post_header_font_size]', array('label' => esc_html__('Header Text Size', 'Divi'), 'section' => 'et_divi_blog_post', 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 72, 'step' => 1))));
     $wp_customize->add_setting('et_divi[post_header_height]', array('default' => '1', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_float_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[post_header_height]', array('label' => esc_html__('Header Line Height', 'Divi'), 'section' => 'et_divi_blog_post', 'type' => 'range', 'input_attrs' => array('min' => 0.8, 'max' => 3, 'step' => 0.1))));
     $wp_customize->add_setting('et_divi[post_header_spacing]', array('default' => '0', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_int_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[post_header_spacing]', array('label' => esc_html__('Header Letter Spacing', 'Divi'), 'section' => 'et_divi_blog_post', 'type' => 'range', 'input_attrs' => array('min' => -2, 'max' => 10, 'step' => 1))));
     $wp_customize->add_setting('et_divi[post_header_style]', array('default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_style'));
     $wp_customize->add_control(new ET_Divi_Font_Style_Option($wp_customize, 'et_divi[post_header_style]', array('label' => esc_html__('Header Font Style', 'Divi'), 'section' => 'et_divi_blog_post', 'type' => 'font_style', 'choices' => et_divi_font_style_choices())));
     $wp_customize->add_setting('et_divi[boxed_layout]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[boxed_layout]', array('label' => esc_html__('Enable Boxed Layout', 'Divi'), 'section' => 'et_divi_general_layout', 'type' => 'checkbox'));
     $wp_customize->add_setting('et_divi[content_width]', array('default' => '1080', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[content_width]', array('label' => esc_html__('Website Content Width', 'Divi'), 'section' => 'et_divi_general_layout', 'type' => 'range', 'input_attrs' => array('min' => 960, 'max' => 1920, 'step' => 1))));
     $wp_customize->add_setting('et_divi[gutter_width]', array('default' => '3', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[gutter_width]', array('label' => esc_html__('Website Gutter Width', 'Divi'), 'section' => 'et_divi_general_layout', 'type' => 'range', 'input_attrs' => array('min' => 1, 'max' => 4, 'step' => 1))));
     $wp_customize->add_setting('et_divi[use_sidebar_width]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[use_sidebar_width]', array('label' => esc_html__('Use Custom Sidebar Width', 'Divi'), 'section' => 'et_divi_general_layout', 'type' => 'checkbox'));
     $wp_customize->add_setting('et_divi[sidebar_width]', array('default' => '21', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[sidebar_width]', array('label' => esc_html__('Sidebar Width', 'Divi'), 'section' => 'et_divi_general_layout', 'type' => 'range', 'input_attrs' => array('min' => 19, 'max' => 33, 'step' => 1))));
     $wp_customize->add_setting('et_divi[section_padding]', array('default' => '4', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[section_padding]', array('label' => esc_html__('Section Height', 'Divi'), 'section' => 'et_divi_general_layout', 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 10, 'step' => 1))));
     $wp_customize->add_setting('et_divi[phone_section_height]', array('default' => et_get_option('tablet_section_height', '50'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[phone_section_height]', array('label' => esc_html__('Section Height', 'Divi'), 'section' => 'et_divi_mobile_phone', 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 150, 'step' => 1))));
     $wp_customize->add_setting('et_divi[tablet_section_height]', array('default' => '50', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[tablet_section_height]', array('label' => esc_html__('Section Height', 'Divi'), 'section' => 'et_divi_mobile_tablet', 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 150, 'step' => 1))));
     $wp_customize->add_setting('et_divi[row_padding]', array('default' => '2', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[row_padding]', array('label' => esc_html__('Row Height', 'Divi'), 'section' => 'et_divi_general_layout', 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 10, 'step' => 1))));
     $wp_customize->add_setting('et_divi[phone_row_height]', array('default' => et_get_option('tablet_row_height', '30'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[phone_row_height]', array('label' => esc_html__('Row Height', 'Divi'), 'section' => 'et_divi_mobile_phone', 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 150, 'step' => 1))));
     $wp_customize->add_setting('et_divi[tablet_row_height]', array('default' => '30', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[tablet_row_height]', array('label' => esc_html__('Row Height', 'Divi'), 'section' => 'et_divi_mobile_tablet', 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 150, 'step' => 1))));
     $wp_customize->add_setting('et_divi[cover_background]', array('default' => 'on', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[cover_background]', array('label' => esc_html__('Stretch Background Image', 'Divi'), 'section' => 'et_divi_general_background', 'type' => 'checkbox'));
     if (!is_null($wp_customize->get_setting('background_color'))) {
         $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'background_color', array('label' => esc_html__('Background Color', 'Divi'), 'section' => 'et_divi_general_background')));
     }
     if (!is_null($wp_customize->get_setting('background_image'))) {
         $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'background_image', array('label' => esc_html__('Background Image', 'Divi'), 'section' => 'et_divi_general_background')));
     }
     $wp_customize->add_control('background_repeat', array('label' => esc_html__('Background Repeat', 'Divi'), 'section' => 'et_divi_general_background', 'type' => 'radio', 'choices' => array('no-repeat' => esc_html__('No Repeat', 'Divi'), 'repeat' => esc_html__('Tile', 'Divi'), 'repeat-x' => esc_html__('Tile Horizontally', 'Divi'), 'repeat-y' => esc_html__('Tile Vertically', 'Divi'))));
     $wp_customize->add_control('background_position_x', array('label' => esc_html__('Background Position', 'Divi'), 'section' => 'et_divi_general_background', 'type' => 'radio', 'choices' => array('left' => esc_html__('Left', 'Divi'), 'center' => esc_html__('Center', 'Divi'), 'right' => esc_html__('Right', 'Divi'))));
     $wp_customize->add_control('background_attachment', array('label' => esc_html__('Background Position', 'Divi'), 'section' => 'et_divi_general_background', 'type' => 'radio', 'choices' => array('scroll' => esc_html__('Scroll', 'Divi'), 'fixed' => esc_html__('Fixed', 'Divi'))));
     $wp_customize->add_setting('et_divi[body_font_size]', array('default' => '14', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[body_font_size]', array('label' => esc_html__('Body Text Size', 'Divi'), 'section' => 'et_divi_general_typography', 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 32, 'step' => 1))));
     $wp_customize->add_setting('et_divi[body_font_height]', array('default' => '1.7', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_float_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[body_font_height]', array('label' => esc_html__('Body Line Height', 'Divi'), 'section' => 'et_divi_general_typography', 'type' => 'range', 'input_attrs' => array('min' => 0.8, 'max' => 3, 'step' => 0.1))));
     $wp_customize->add_setting('et_divi[phone_body_font_size]', array('default' => et_get_option('tablet_body_font_size', '14'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[phone_body_font_size]', array('label' => esc_html__('Body Text Size', 'Divi'), 'section' => 'et_divi_mobile_phone', 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 32, 'step' => 1))));
     $wp_customize->add_setting('et_divi[tablet_body_font_size]', array('default' => et_get_option('body_font_size', '14'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[tablet_body_font_size]', array('label' => esc_html__('Body Text Size', 'Divi'), 'section' => 'et_divi_mobile_tablet', 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 32, 'step' => 1))));
     $wp_customize->add_setting('et_divi[body_header_size]', array('default' => '30', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[body_header_size]', array('label' => esc_html__('Header Text Size', 'Divi'), 'section' => 'et_divi_general_typography', 'type' => 'range', 'input_attrs' => array('min' => 22, 'max' => 72, 'step' => 1))));
     $wp_customize->add_setting('et_divi[body_header_spacing]', array('default' => '0', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_int_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[body_header_spacing]', array('label' => esc_html__('Header Letter Spacing', 'Divi'), 'section' => 'et_divi_general_typography', 'type' => 'range', 'input_attrs' => array('min' => -2, 'max' => 10, 'step' => 1))));
     $wp_customize->add_setting('et_divi[body_header_height]', array('default' => '1', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_float_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[body_header_height]', array('label' => esc_html__('Header Line Height', 'Divi'), 'section' => 'et_divi_general_typography', 'type' => 'range', 'input_attrs' => array('min' => 0.8, 'max' => 3, 'step' => 0.1))));
     $wp_customize->add_setting('et_divi[body_header_style]', array('default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_style'));
     $wp_customize->add_control(new ET_Divi_Font_Style_Option($wp_customize, 'et_divi[body_header_style]', array('label' => esc_html__('Header Font Style', 'Divi'), 'section' => 'et_divi_general_typography', 'type' => 'font_style', 'choices' => et_divi_font_style_choices())));
     $wp_customize->add_setting('et_divi[phone_header_font_size]', array('default' => et_get_option('tablet_header_font_size', '30'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[phone_header_font_size]', array('label' => esc_html__('Header Text Size', 'Divi'), 'section' => 'et_divi_mobile_phone', 'type' => 'range', 'input_attrs' => array('min' => 22, 'max' => 72, 'step' => 1))));
     $wp_customize->add_setting('et_divi[tablet_header_font_size]', array('default' => et_get_option('body_header_size', '30'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[tablet_header_font_size]', array('label' => esc_html__('Header Text Size', 'Divi'), 'section' => 'et_divi_mobile_tablet', 'type' => 'range', 'input_attrs' => array('min' => 22, 'max' => 72, 'step' => 1))));
     if (!isset($et_one_font_languages[$site_domain])) {
         $wp_customize->add_setting('et_divi[heading_font]', array('default' => 'none', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_choices'));
         $wp_customize->add_control(new ET_Divi_Select_Option($wp_customize, 'et_divi[heading_font]', array('label' => esc_html__('Header Font', 'Divi'), 'section' => 'et_divi_general_typography', 'settings' => 'et_divi[heading_font]', 'type' => 'select', 'choices' => $font_choices)));
         $wp_customize->add_setting('et_divi[body_font]', array('default' => 'none', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_choices'));
         $wp_customize->add_control(new ET_Divi_Select_Option($wp_customize, 'et_divi[body_font]', array('label' => esc_html__('Body Font', 'Divi'), 'section' => 'et_divi_general_typography', 'settings' => 'et_divi[body_font]', 'type' => 'select', 'choices' => $font_choices)));
     }
     $wp_customize->add_setting('et_divi[link_color]', array('default' => et_get_option('accent_color', '#2ea3f2'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'et_divi[link_color]', array('label' => esc_html__('Body Link Color', 'Divi'), 'section' => 'et_divi_general_typography', 'settings' => 'et_divi[link_color]')));
     $wp_customize->add_setting('et_divi[font_color]', array('default' => '#666666', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'et_divi[font_color]', array('label' => esc_html__('Body Text Color', 'Divi'), 'section' => 'et_divi_general_typography', 'settings' => 'et_divi[font_color]')));
     $wp_customize->add_setting('et_divi[header_color]', array('default' => '#666666', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'et_divi[header_color]', array('label' => esc_html__('Header Text Color', 'Divi'), 'section' => 'et_divi_general_typography', 'settings' => 'et_divi[header_color]')));
     $wp_customize->add_setting('et_divi[accent_color]', array('default' => '#2ea3f2', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'et_divi[accent_color]', array('label' => esc_html__('Theme Accent Color', 'Divi'), 'section' => 'et_divi_general_layout', 'settings' => 'et_divi[accent_color]')));
     $wp_customize->add_setting('et_divi[color_schemes]', array('default' => 'none', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_color_scheme'));
     $wp_customize->add_control('et_divi[color_schemes]', array('label' => esc_html__('Color Schemes', 'Divi'), 'section' => 'et_color_schemes', 'settings' => 'et_divi[color_schemes]', 'type' => 'select', 'choices' => et_divi_color_scheme_choices()));
     $wp_customize->add_setting('et_divi[header_style]', array('default' => 'left', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_header_style'));
     $wp_customize->add_control('et_divi[header_style]', array('label' => esc_html__('Header Style', 'Divi'), 'section' => 'et_divi_header_layout', 'type' => 'select', 'choices' => et_divi_header_style_choices()));
     $wp_customize->add_setting('et_divi[vertical_nav]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[vertical_nav]', array('label' => esc_html__('Enable Vertical Navigation', 'Divi'), 'section' => 'et_divi_header_layout', 'type' => 'checkbox'));
     $wp_customize->add_setting('et_divi[vertical_nav_orientation]', array('default' => 'left', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_left_right'));
     $wp_customize->add_control('et_divi[vertical_nav_orientation]', array('label' => esc_html__('Vertical Menu Orientation', 'Divi'), 'section' => 'et_divi_header_layout', 'type' => 'select', 'choices' => et_divi_left_right_choices()));
     if ('on' === et_get_option('divi_fixed_nav', 'on')) {
         $wp_customize->add_setting('et_divi[hide_nav]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
         $wp_customize->add_control('et_divi[hide_nav]', array('label' => esc_html__('Hide Navigation Until Scroll', 'Divi'), 'section' => 'et_divi_header_layout', 'type' => 'checkbox'));
     }
     // 'on' === et_get_option( 'divi_fixed_nav', 'on' )
     $wp_customize->add_setting('et_divi[show_header_social_icons]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[show_header_social_icons]', array('label' => esc_html__('Show Social Icons', 'Divi'), 'section' => 'et_divi_header_information', 'type' => 'checkbox'));
     $wp_customize->add_setting('et_divi[show_search_icon]', array('default' => 'on', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[show_search_icon]', array('label' => esc_html__('Show Search Icon', 'Divi'), 'section' => 'et_divi_header_information', 'type' => 'checkbox'));
     $wp_customize->add_setting('et_divi[slide_nav_show_top_bar]', array('default' => 'on', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[slide_nav_show_top_bar]', array('label' => esc_html__('Show Top Bar', 'Divi'), 'section' => 'et_divi_header_slide', 'type' => 'checkbox'));
     $wp_customize->add_setting('et_divi[slide_nav_width]', array('default' => '320', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[slide_nav_width]', array('label' => esc_html__('Menu Width', 'Divi'), 'section' => 'et_divi_header_slide', 'type' => 'range', 'input_attrs' => array('min' => 280, 'max' => 600, 'step' => 1))));
     $wp_customize->add_setting('et_divi[slide_nav_font_size]', array('default' => '14', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[slide_nav_font_size]', array('label' => esc_html__('Menu Text Size', 'Divi'), 'section' => 'et_divi_header_slide', 'type' => 'range', 'input_attrs' => array('min' => 12, 'max' => 24, 'step' => 1))));
     $wp_customize->add_setting('et_divi[slide_nav_top_font_size]', array('default' => '14', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[slide_nav_top_font_size]', array('label' => esc_html__('Top Bar Text Size', 'Divi'), 'section' => 'et_divi_header_slide', 'type' => 'range', 'input_attrs' => array('min' => 12, 'max' => 24, 'step' => 1))));
     $wp_customize->add_setting('et_divi[fullscreen_nav_font_size]', array('default' => '30', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[fullscreen_nav_font_size]', array('label' => esc_html__('Menu Text Size', 'Divi'), 'section' => 'et_divi_header_slide', 'type' => 'range', 'input_attrs' => array('min' => 12, 'max' => 50, 'step' => 1))));
     $wp_customize->add_setting('et_divi[fullscreen_nav_top_font_size]', array('default' => '18', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[fullscreen_nav_top_font_size]', array('label' => esc_html__('Top Bar Text Size', 'Divi'), 'section' => 'et_divi_header_slide', 'type' => 'range', 'input_attrs' => array('min' => 12, 'max' => 40, 'step' => 1))));
     $wp_customize->add_setting('et_divi[slide_nav_font_spacing]', array('default' => '0', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_int_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[slide_nav_font_spacing]', array('label' => esc_html__('Letter Spacing', 'Divi'), 'section' => 'et_divi_header_slide', 'type' => 'range', 'input_attrs' => array('min' => -1, 'max' => 8, 'step' => 1))));
     if (!isset($et_one_font_languages[$site_domain])) {
         $wp_customize->add_setting('et_divi[slide_nav_font]', array('default' => 'none', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_choices'));
         $wp_customize->add_control(new ET_Divi_Select_Option($wp_customize, 'et_divi[slide_nav_font]', array('label' => esc_html__('Font', 'Divi'), 'section' => 'et_divi_header_slide', 'settings' => 'et_divi[slide_nav_font]', 'type' => 'select', 'choices' => $font_choices)));
     }
     $wp_customize->add_setting('et_divi[slide_nav_font_style]', array('default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_style'));
     $wp_customize->add_control(new ET_Divi_Font_Style_Option($wp_customize, 'et_divi[slide_nav_font_style]', array('label' => esc_html__('Font Style', 'Divi'), 'section' => 'et_divi_header_slide', 'type' => 'font_style', 'choices' => et_divi_font_style_choices())));
     $wp_customize->add_setting('et_divi[slide_nav_bg]', array('default' => et_get_option('accent_color', '#2ea3f2'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[slide_nav_bg]', array('label' => esc_html__('Background Color', 'Divi'), 'section' => 'et_divi_header_slide', 'settings' => 'et_divi[slide_nav_bg]')));
     $wp_customize->add_setting('et_divi[slide_nav_links_color]', array('default' => '#ffffff', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[slide_nav_links_color]', array('label' => esc_html__('Menu Link Color', 'Divi'), 'section' => 'et_divi_header_slide', 'settings' => 'et_divi[slide_nav_links_color]')));
     $wp_customize->add_setting('et_divi[slide_nav_links_color_active]', array('default' => '#ffffff', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[slide_nav_links_color_active]', array('label' => esc_html__('Active Link Color', 'Divi'), 'section' => 'et_divi_header_slide', 'settings' => 'et_divi[slide_nav_links_color_active]')));
     $wp_customize->add_setting('et_divi[slide_nav_top_color]', array('default' => 'rgba(255,255,255,0.6)', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[slide_nav_top_color]', array('label' => esc_html__('Top Bar Text Color', 'Divi'), 'section' => 'et_divi_header_slide', 'settings' => 'et_divi[slide_nav_top_color]')));
     $wp_customize->add_setting('et_divi[slide_nav_search]', array('default' => 'rgba(255,255,255,0.6)', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[slide_nav_search]', array('label' => esc_html__('Search Bar Text Color', 'Divi'), 'section' => 'et_divi_header_slide', 'settings' => 'et_divi[slide_nav_search]')));
     $wp_customize->add_setting('et_divi[slide_nav_search_bg]', array('default' => 'rgba(0,0,0,0.2)', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[slide_nav_search_bg]', array('label' => esc_html__('Search Bar Background Color', 'Divi'), 'section' => 'et_divi_header_slide', 'settings' => 'et_divi[slide_nav_search_bg]')));
     $wp_customize->add_setting('et_divi[nav_fullwidth]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[nav_fullwidth]', array('label' => esc_html__('Make Full Width', 'Divi'), 'section' => 'et_divi_header_primary', 'type' => 'checkbox'));
     $wp_customize->add_setting('et_divi[hide_primary_logo]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[hide_primary_logo]', array('label' => esc_html__('Hide Logo Image', 'Divi'), 'section' => 'et_divi_header_primary', 'type' => 'checkbox'));
     $wp_customize->add_setting('et_divi[menu_height]', array('default' => '66', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[menu_height]', array('label' => esc_html__('Menu Height', 'Divi'), 'section' => 'et_divi_header_primary', 'type' => 'range', 'input_attrs' => array('min' => 30, 'max' => 300, 'step' => 1))));
     $wp_customize->add_setting('et_divi[logo_height]', array('default' => '54', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[logo_height]', array('label' => esc_html__('Logo Max Height', 'Divi'), 'section' => 'et_divi_header_primary', 'type' => 'range', 'input_attrs' => array('min' => 30, 'max' => 100, 'step' => 1))));
     $wp_customize->add_setting('et_divi[primary_nav_font_size]', array('default' => '14', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[primary_nav_font_size]', array('label' => esc_html__('Text Size', 'Divi'), 'section' => 'et_divi_header_primary', 'type' => 'range', 'input_attrs' => array('min' => 12, 'max' => 24, 'step' => 1))));
     $wp_customize->add_setting('et_divi[primary_nav_font_spacing]', array('default' => '0', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_int_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[primary_nav_font_spacing]', array('label' => esc_html__('Letter Spacing', 'Divi'), 'section' => 'et_divi_header_primary', 'type' => 'range', 'input_attrs' => array('min' => -1, 'max' => 8, 'step' => 1))));
     if (!isset($et_one_font_languages[$site_domain])) {
         $wp_customize->add_setting('et_divi[primary_nav_font]', array('default' => 'none', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_choices'));
         $wp_customize->add_control(new ET_Divi_Select_Option($wp_customize, 'et_divi[primary_nav_font]', array('label' => esc_html__('Font', 'Divi'), 'section' => 'et_divi_header_primary', 'settings' => 'et_divi[primary_nav_font]', 'type' => 'select', 'choices' => $font_choices)));
     }
     $wp_customize->add_setting('et_divi[primary_nav_font_style]', array('default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_style'));
     $wp_customize->add_control(new ET_Divi_Font_Style_Option($wp_customize, 'et_divi[primary_nav_font_style]', array('label' => esc_html__('Font Style', 'Divi'), 'section' => 'et_divi_header_primary', 'type' => 'font_style', 'choices' => et_divi_font_style_choices())));
     $wp_customize->add_setting('et_divi[secondary_nav_font_size]', array('default' => '12', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_setting('et_divi[secondary_nav_fullwidth]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[secondary_nav_fullwidth]', array('label' => esc_html__('Make Full Width', 'Divi'), 'section' => 'et_divi_header_secondary', 'type' => 'checkbox'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[secondary_nav_font_size]', array('label' => esc_html__('Text Size', 'Divi'), 'section' => 'et_divi_header_secondary', 'type' => 'range', 'input_attrs' => array('min' => 12, 'max' => 20, 'step' => 1))));
     $wp_customize->add_setting('et_divi[secondary_nav_font_spacing]', array('default' => '0', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_int_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[secondary_nav_font_spacing]', array('label' => esc_html__('Letter Spacing', 'Divi'), 'section' => 'et_divi_header_secondary', 'type' => 'range', 'input_attrs' => array('min' => -1, 'max' => 8, 'step' => 1))));
     if (!isset($et_one_font_languages[$site_domain])) {
         $wp_customize->add_setting('et_divi[secondary_nav_font]', array('default' => 'none', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_choices'));
         $wp_customize->add_control(new ET_Divi_Select_Option($wp_customize, 'et_divi[secondary_nav_font]', array('label' => esc_html__('Font', 'Divi'), 'section' => 'et_divi_header_secondary', 'settings' => 'et_divi[secondary_nav_font]', 'type' => 'select', 'choices' => $font_choices)));
     }
     $wp_customize->add_setting('et_divi[secondary_nav_font_style]', array('default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_style'));
     $wp_customize->add_control(new ET_Divi_Font_Style_Option($wp_customize, 'et_divi[secondary_nav_font_style]', array('label' => esc_html__('Font Style', 'Divi'), 'section' => 'et_divi_header_secondary', 'type' => 'font_style', 'choices' => et_divi_font_style_choices())));
     $wp_customize->add_setting('et_divi[menu_link]', array('default' => 'rgba(0,0,0,0.6)', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[menu_link]', array('label' => esc_html__('Text Color', 'Divi'), 'section' => 'et_divi_header_primary', 'settings' => 'et_divi[menu_link]')));
     $wp_customize->add_setting('et_divi[hide_mobile_logo]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[hide_mobile_logo]', array('label' => esc_html__('Hide Logo Image', 'Divi'), 'section' => 'et_divi_mobile_menu', 'type' => 'checkbox'));
     $wp_customize->add_setting('et_divi[mobile_menu_link]', array('default' => et_get_option('menu_link', 'rgba(0,0,0,0.6)'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[mobile_menu_link]', array('label' => esc_html__('Text Color', 'Divi'), 'section' => 'et_divi_mobile_menu', 'settings' => 'et_divi[mobile_menu_link]')));
     $wp_customize->add_setting('et_divi[menu_link_active]', array('default' => et_get_option('accent_color', '#2ea3f2'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[menu_link_active]', array('label' => esc_html__('Active Link Color', 'Divi'), 'section' => 'et_divi_header_primary', 'settings' => 'et_divi[menu_link_active]')));
     $wp_customize->add_setting('et_divi[primary_nav_bg]', array('default' => '#ffffff', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[primary_nav_bg]', array('label' => esc_html__('Background Color', 'Divi'), 'section' => 'et_divi_header_primary', 'settings' => 'et_divi[primary_nav_bg]')));
     $wp_customize->add_setting('et_divi[primary_nav_dropdown_bg]', array('default' => et_get_option('primary_nav_bg', '#ffffff'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[primary_nav_dropdown_bg]', array('label' => esc_html__('Dropdown Menu Background Color', 'Divi'), 'section' => 'et_divi_header_primary', 'settings' => 'et_divi[primary_nav_dropdown_bg]')));
     $wp_customize->add_setting('et_divi[primary_nav_dropdown_line_color]', array('default' => et_get_option('accent_color', '#2ea3f2'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[primary_nav_dropdown_line_color]', array('label' => esc_html__('Dropdown Menu Line Color', 'Divi'), 'section' => 'et_divi_header_primary', 'settings' => 'et_divi[primary_nav_dropdown_line_color]')));
     $wp_customize->add_setting('et_divi[primary_nav_dropdown_link_color]', array('default' => et_get_option('menu_link', 'rgba(0,0,0,0.7)'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[primary_nav_dropdown_link_color]', array('label' => esc_html__('Dropdown Menu Text Color', 'Divi'), 'section' => 'et_divi_header_primary', 'settings' => 'et_divi[primary_nav_dropdown_link_color]')));
     $wp_customize->add_setting('et_divi[primary_nav_dropdown_animation]', array('default' => 'fade', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_dropdown_animation'));
     $wp_customize->add_control('et_divi[primary_nav_dropdown_animation]', array('label' => esc_html__('Dropdown Menu Animation', 'Divi'), 'section' => 'et_divi_header_primary', 'type' => 'select', 'choices' => et_divi_dropdown_animation_choices()));
     $wp_customize->add_setting('et_divi[mobile_primary_nav_bg]', array('default' => et_get_option('primary_nav_bg', '#ffffff'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[mobile_primary_nav_bg]', array('label' => esc_html__('Background Color', 'Divi'), 'section' => 'et_divi_mobile_menu', 'settings' => 'et_divi[mobile_primary_nav_bg]')));
     $wp_customize->add_setting('et_divi[secondary_nav_bg]', array('default' => et_get_option('accent_color', '#2ea3f2'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[secondary_nav_bg]', array('label' => esc_html__('Background Color', 'Divi'), 'section' => 'et_divi_header_secondary', 'settings' => 'et_divi[secondary_nav_bg]')));
     $wp_customize->add_setting('et_divi[secondary_nav_text_color_new]', array('default' => '#ffffff', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[secondary_nav_text_color_new]', array('label' => esc_html__('Text Color', 'Divi'), 'section' => 'et_divi_header_secondary', 'settings' => 'et_divi[secondary_nav_text_color_new]')));
     $wp_customize->add_setting('et_divi[secondary_nav_dropdown_bg]', array('default' => et_get_option('secondary_nav_bg', et_get_option('accent_color', '#2ea3f2')), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[secondary_nav_dropdown_bg]', array('label' => esc_html__('Dropdown Menu Background Color', 'Divi'), 'section' => 'et_divi_header_secondary', 'settings' => 'et_divi[secondary_nav_dropdown_bg]')));
     $wp_customize->add_setting('et_divi[secondary_nav_dropdown_link_color]', array('default' => et_get_option('secondary_nav_text_color_new', '#ffffff'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[secondary_nav_dropdown_link_color]', array('label' => esc_html__('Dropdown Menu Text Color', 'Divi'), 'section' => 'et_divi_header_secondary', 'settings' => 'et_divi[secondary_nav_dropdown_link_color]')));
     $wp_customize->add_setting('et_divi[secondary_nav_dropdown_animation]', array('default' => 'fade', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_dropdown_animation'));
     $wp_customize->add_control('et_divi[secondary_nav_dropdown_animation]', array('label' => esc_html__('Dropdown Menu Animation', 'Divi'), 'section' => 'et_divi_header_secondary', 'type' => 'select', 'choices' => et_divi_dropdown_animation_choices()));
     // Setting with no control kept for backwards compatbility
     $wp_customize->add_setting('et_divi[primary_nav_text_color]', array('default' => 'dark', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
     // Setting with no control kept for backwards compatbility
     $wp_customize->add_setting('et_divi[secondary_nav_text_color]', array('default' => 'light', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
     if ('on' === et_get_option('divi_fixed_nav', 'on')) {
         $wp_customize->add_setting('et_divi[hide_fixed_logo]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
         $wp_customize->add_control('et_divi[hide_fixed_logo]', array('label' => esc_html__('Hide Logo Image', 'Divi'), 'section' => 'et_divi_header_fixed', 'type' => 'checkbox'));
         $wp_customize->add_setting('et_divi[minimized_menu_height]', array('default' => '40', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
         $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[minimized_menu_height]', array('label' => esc_html__('Fixed Menu Height', 'Divi'), 'section' => 'et_divi_header_fixed', 'type' => 'range', 'input_attrs' => array('min' => 30, 'max' => 300, 'step' => 1))));
         $wp_customize->add_setting('et_divi[fixed_primary_nav_font_size]', array('default' => et_get_option('primary_nav_font_size', '14'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
         $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[fixed_primary_nav_font_size]', array('label' => esc_html__('Text Size', 'Divi'), 'section' => 'et_divi_header_fixed', 'type' => 'range', 'input_attrs' => array('min' => 12, 'max' => 24, 'step' => 1))));
         $wp_customize->add_setting('et_divi[fixed_primary_nav_bg]', array('default' => et_get_option('primary_nav_bg', '#ffffff'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
         $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[fixed_primary_nav_bg]', array('label' => esc_html__('Primary Menu Background Color', 'Divi'), 'section' => 'et_divi_header_fixed', 'settings' => 'et_divi[fixed_primary_nav_bg]')));
         $wp_customize->add_setting('et_divi[fixed_secondary_nav_bg]', array('default' => et_get_option('secondary_nav_bg', '#2ea3f2'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
         $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[fixed_secondary_nav_bg]', array('label' => esc_html__('Secondary Menu Background Color', 'Divi'), 'section' => 'et_divi_header_fixed', 'settings' => 'et_divi[fixed_secondary_nav_bg]')));
         $wp_customize->add_setting('et_divi[fixed_menu_link]', array('default' => et_get_option('menu_link', 'rgba(0,0,0,0.6)'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
         $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[fixed_menu_link]', array('label' => esc_html__('Primary Menu Link Color', 'Divi'), 'section' => 'et_divi_header_fixed', 'settings' => 'et_divi[fixed_menu_link]')));
         $wp_customize->add_setting('et_divi[fixed_secondary_menu_link]', array('default' => et_get_option('secondary_nav_text_color_new', '#ffffff'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
         $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[fixed_secondary_menu_link]', array('label' => esc_html__('Secondary Menu Link Color', 'Divi'), 'section' => 'et_divi_header_fixed', 'settings' => 'et_divi[fixed_secondary_menu_link]')));
         $wp_customize->add_setting('et_divi[fixed_menu_link_active]', array('default' => et_get_option('menu_link_active', '#2ea3f2'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
         $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[fixed_menu_link_active]', array('label' => esc_html__('Active Primary Menu Link Color', 'Divi'), 'section' => 'et_divi_header_fixed', 'settings' => 'et_divi[fixed_menu_link_active]')));
     }
     $wp_customize->add_setting('et_divi[phone_number]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_html_input_text'));
     $wp_customize->add_control('et_divi[phone_number]', array('label' => esc_html__('Phone Number', 'Divi'), 'section' => 'et_divi_header_information', 'type' => 'text'));
     $wp_customize->add_setting('et_divi[header_email]', array('type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_email'));
     $wp_customize->add_control('et_divi[header_email]', array('label' => esc_html__('Email', 'Divi'), 'section' => 'et_divi_header_information', 'type' => 'text'));
     $wp_customize->add_setting('et_divi[show_footer_social_icons]', array('default' => 'on', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'wp_validate_boolean'));
     $wp_customize->add_control('et_divi[show_footer_social_icons]', array('label' => esc_html__('Show Social Icons', 'Divi'), 'section' => 'et_divi_footer_elements', 'type' => 'checkbox'));
     $wp_customize->add_setting('et_divi[footer_columns]', array('default' => '4', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_footer_column'));
     $wp_customize->add_control('et_divi[footer_columns]', array('label' => esc_html__('Column Layout', 'Divi'), 'section' => 'et_divi_footer_layout', 'settings' => 'et_divi[footer_columns]', 'type' => 'select', 'choices' => et_divi_footer_column_choices()));
     $wp_customize->add_setting('et_divi[footer_bg]', array('default' => '#222222', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'et_divi[footer_bg]', array('label' => esc_html__('Footer Background Color', 'Divi'), 'section' => 'et_divi_footer_layout', 'settings' => 'et_divi[footer_bg]')));
     $wp_customize->add_setting('et_divi[widget_header_font_size]', array('default' => et_get_option('body_header_size' * 0.6, '18'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[widget_header_font_size]', array('label' => esc_html__('Header Text Size', 'Divi'), 'section' => 'et_divi_footer_widgets', 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 72, 'step' => 1))));
     $wp_customize->add_setting('et_divi[widget_header_font_style]', array('default' => et_get_option('widget_header_font_style', ''), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_style'));
     $wp_customize->add_control(new ET_Divi_Font_Style_Option($wp_customize, 'et_divi[widget_header_font_style]', array('label' => esc_html__('Header Font Style', 'Divi'), 'section' => 'et_divi_footer_widgets', 'type' => 'font_style', 'choices' => et_divi_font_style_choices())));
     $wp_customize->add_setting('et_divi[widget_body_font_size]', array('default' => et_get_option('body_font_size', '14'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[widget_body_font_size]', array('label' => esc_html__('Body/Link Text Size', 'Divi'), 'section' => 'et_divi_footer_widgets', 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 32, 'step' => 1))));
     $wp_customize->add_setting('et_divi[widget_body_line_height]', array('default' => '1.7', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_float_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[widget_body_line_height]', array('label' => esc_html__('Body/Link Line Height', 'Divi'), 'section' => 'et_divi_footer_widgets', 'type' => 'range', 'input_attrs' => array('min' => 0.8, 'max' => 3, 'step' => 0.1))));
     $wp_customize->add_setting('et_divi[widget_body_font_style]', array('default' => et_get_option('footer_widget_body_font_style', ''), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_style'));
     $wp_customize->add_control(new ET_Divi_Font_Style_Option($wp_customize, 'et_divi[widget_body_font_style]', array('label' => esc_html__('Body Font Style', 'Divi'), 'section' => 'et_divi_footer_widgets', 'type' => 'font_style', 'choices' => et_divi_font_style_choices())));
     $wp_customize->add_setting('et_divi[footer_widget_text_color]', array('default' => '#fff', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'et_divi[footer_widget_text_color]', array('label' => esc_html__('Widget Text Color', 'Divi'), 'section' => 'et_divi_footer_widgets', 'settings' => 'et_divi[footer_widget_text_color]')));
     $wp_customize->add_setting('et_divi[footer_widget_link_color]', array('default' => '#fff', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'et_divi[footer_widget_link_color]', array('label' => esc_html__('Widget Link Color', 'Divi'), 'section' => 'et_divi_footer_widgets', 'settings' => 'et_divi[footer_widget_link_color]')));
     $wp_customize->add_setting('et_divi[footer_widget_header_color]', array('default' => et_get_option('accent_color', '#2ea3f2'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'et_divi[footer_widget_header_color]', array('label' => esc_html__('Widget Header Color', 'Divi'), 'section' => 'et_divi_footer_widgets', 'settings' => 'et_divi[footer_widget_header_color]')));
     $wp_customize->add_setting('et_divi[footer_widget_bullet_color]', array('default' => et_get_option('accent_color', '#2ea3f2'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'et_divi[footer_widget_bullet_color]', array('label' => esc_html__('Widget Bullet Color', 'Divi'), 'section' => 'et_divi_footer_widgets', 'settings' => 'et_divi[footer_widget_bullet_color]')));
     /* Footer Menu */
     $wp_customize->add_setting('et_divi[footer_menu_background_color]', array('default' => 'rgba(255,255,255,0.05)', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[footer_menu_background_color]', array('label' => esc_html__('Footer Menu Background Color', 'Divi'), 'section' => 'et_divi_footer_menu', 'settings' => 'et_divi[footer_menu_background_color]')));
     $wp_customize->add_setting('et_divi[footer_menu_text_color]', array('default' => '#bbbbbb', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[footer_menu_text_color]', array('label' => esc_html__('Footer Menu Text Color', 'Divi'), 'section' => 'et_divi_footer_menu', 'settings' => 'et_divi[footer_menu_text_color]')));
     $wp_customize->add_setting('et_divi[footer_menu_active_link_color]', array('default' => et_get_option('accent_color', '#2ea3f2'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[footer_menu_active_link_color]', array('label' => esc_html__('Footer Menu Active Link Color', 'Divi'), 'section' => 'et_divi_footer_menu', 'settings' => 'et_divi[footer_menu_active_link_color]')));
     $wp_customize->add_setting('et_divi[footer_menu_letter_spacing]', array('default' => '0', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[footer_menu_letter_spacing]', array('label' => esc_html__('Letter Spacing', 'Divi'), 'section' => 'et_divi_footer_menu', 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 20, 'step' => 1))));
     $wp_customize->add_setting('et_divi[footer_menu_font_style]', array('default' => et_get_option('footer_footer_menu_font_style', ''), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_style'));
     $wp_customize->add_control(new ET_Divi_Font_Style_Option($wp_customize, 'et_divi[footer_menu_font_style]', array('label' => esc_html__('Font Style', 'Divi'), 'section' => 'et_divi_footer_menu', 'type' => 'font_style', 'choices' => et_divi_font_style_choices())));
     $wp_customize->add_setting('et_divi[footer_menu_font_size]', array('default' => '14', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[footer_menu_font_size]', array('label' => esc_html__('Font Size', 'Divi'), 'section' => 'et_divi_footer_menu', 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 32, 'step' => 1))));
     /* Bottom Bar */
     $wp_customize->add_setting('et_divi[bottom_bar_background_color]', array('default' => 'rgba(0,0,0,0.32)', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[bottom_bar_background_color]', array('label' => esc_html__('Background Color', 'Divi'), 'section' => 'et_divi_bottom_bar', 'settings' => 'et_divi[bottom_bar_background_color]')));
     $wp_customize->add_setting('et_divi[bottom_bar_text_color]', array('default' => '#666666', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[bottom_bar_text_color]', array('label' => esc_html__('Text Color', 'Divi'), 'section' => 'et_divi_bottom_bar', 'settings' => 'et_divi[bottom_bar_text_color]')));
     $wp_customize->add_setting('et_divi[bottom_bar_font_style]', array('default' => et_get_option('footer_bottom_bar_font_style', ''), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_style'));
     $wp_customize->add_control(new ET_Divi_Font_Style_Option($wp_customize, 'et_divi[bottom_bar_font_style]', array('label' => esc_html__('Font Style', 'Divi'), 'section' => 'et_divi_bottom_bar', 'type' => 'font_style', 'choices' => et_divi_font_style_choices())));
     $wp_customize->add_setting('et_divi[bottom_bar_font_size]', array('default' => '14', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[bottom_bar_font_size]', array('label' => esc_html__('Font Size', 'Divi'), 'section' => 'et_divi_bottom_bar', 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 32, 'step' => 1))));
     $wp_customize->add_setting('et_divi[bottom_bar_social_icon_size]', array('default' => '24', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[bottom_bar_social_icon_size]', array('label' => esc_html__('Social Icon Size', 'Divi'), 'section' => 'et_divi_bottom_bar', 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 32, 'step' => 1))));
     $wp_customize->add_setting('et_divi[bottom_bar_social_icon_color]', array('default' => '#666666', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[bottom_bar_social_icon_color]', array('label' => esc_html__('Social Icon Color', 'Divi'), 'section' => 'et_divi_bottom_bar', 'settings' => 'et_divi[bottom_bar_social_icon_color]')));
     $wp_customize->add_setting('et_divi[all_buttons_font_size]', array('default' => ET_Global_Settings::get_value('all_buttons_font_size', 'default'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[all_buttons_font_size]', array('label' => esc_html__('Text Size', 'Divi'), 'section' => 'et_divi_buttons', 'type' => 'range', 'input_attrs' => array('min' => 12, 'max' => 30, 'step' => 1))));
     $wp_customize->add_setting('et_divi[all_buttons_text_color]', array('default' => '#ffffff', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[all_buttons_text_color]', array('label' => esc_html__('Text Color', 'Divi'), 'section' => 'et_divi_buttons', 'settings' => 'et_divi[all_buttons_text_color]')));
     $wp_customize->add_setting('et_divi[all_buttons_bg_color]', array('default' => 'rgba(0,0,0,0)', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[all_buttons_bg_color]', array('label' => esc_html__('Background Color', 'Divi'), 'section' => 'et_divi_buttons', 'settings' => 'et_divi[all_buttons_bg_color]')));
     $wp_customize->add_setting('et_divi[all_buttons_border_width]', array('default' => ET_Global_Settings::get_value('all_buttons_border_width', 'default'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[all_buttons_border_width]', array('label' => esc_html__('Border Width', 'Divi'), 'section' => 'et_divi_buttons', 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 10, 'step' => 1))));
     $wp_customize->add_setting('et_divi[all_buttons_border_color]', array('default' => '#ffffff', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[all_buttons_border_color]', array('label' => esc_html__('Border Color', 'Divi'), 'section' => 'et_divi_buttons', 'settings' => 'et_divi[all_buttons_border_color]')));
     $wp_customize->add_setting('et_divi[all_buttons_border_radius]', array('default' => ET_Global_Settings::get_value('all_buttons_border_radius', 'default'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[all_buttons_border_radius]', array('label' => esc_html__('Border Radius', 'Divi'), 'section' => 'et_divi_buttons', 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 50, 'step' => 1))));
     $wp_customize->add_setting('et_divi[all_buttons_spacing]', array('default' => ET_Global_Settings::get_value('all_buttons_spacing', 'default'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_int_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[all_buttons_spacing]', array('label' => esc_html__('Letter Spacing', 'Divi'), 'section' => 'et_divi_buttons', 'type' => 'range', 'input_attrs' => array('min' => -2, 'max' => 10, 'step' => 1))));
     $wp_customize->add_setting('et_divi[all_buttons_font_style]', array('default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_style'));
     $wp_customize->add_control(new ET_Divi_Font_Style_Option($wp_customize, 'et_divi[all_buttons_font_style]', array('label' => esc_html__('Button Font Style', 'Divi'), 'section' => 'et_divi_buttons', 'type' => 'font_style', 'choices' => et_divi_font_style_choices())));
     if (!isset($et_one_font_languages[$site_domain])) {
         $wp_customize->add_setting('et_divi[all_buttons_font]', array('default' => 'none', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_choices'));
         $wp_customize->add_control(new ET_Divi_Select_Option($wp_customize, 'et_divi[all_buttons_font]', array('label' => esc_html__('Buttons Font', 'Divi'), 'section' => 'et_divi_buttons', 'settings' => 'et_divi[all_buttons_font]', 'type' => 'select', 'choices' => $font_choices)));
     }
     $wp_customize->add_setting('et_divi[all_buttons_icon]', array('default' => 'yes', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_yes_no'));
     $wp_customize->add_control('et_divi[all_buttons_icon]', array('label' => esc_html__('Add Button Icon', 'Divi'), 'section' => 'et_divi_buttons', 'type' => 'select', 'choices' => et_divi_yes_no_choices()));
     $wp_customize->add_setting('et_divi[all_buttons_selected_icon]', array('default' => '5', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_font_icon'));
     $wp_customize->add_control(new ET_Divi_Icon_Picker_Option($wp_customize, 'et_divi[all_buttons_selected_icon]', array('label' => esc_html__('Select Icon', 'Divi'), 'section' => 'et_divi_buttons', 'type' => 'icon_picker')));
     $wp_customize->add_setting('et_divi[all_buttons_icon_color]', array('default' => '#ffffff', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[all_buttons_icon_color]', array('label' => esc_html__('Icon Color', 'Divi'), 'section' => 'et_divi_buttons', 'settings' => 'et_divi[all_buttons_icon_color]')));
     $wp_customize->add_setting('et_divi[all_buttons_icon_placement]', array('default' => 'right', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_left_right'));
     $wp_customize->add_control('et_divi[all_buttons_icon_placement]', array('label' => esc_html__('Icon Placement', 'Divi'), 'section' => 'et_divi_buttons', 'type' => 'select', 'choices' => et_divi_left_right_choices()));
     $wp_customize->add_setting('et_divi[all_buttons_icon_hover]', array('default' => 'yes', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_yes_no'));
     $wp_customize->add_control('et_divi[all_buttons_icon_hover]', array('label' => esc_html__('Only Show Icon on Hover', 'Divi'), 'section' => 'et_divi_buttons', 'type' => 'select', 'choices' => et_divi_yes_no_choices()));
     $wp_customize->add_setting('et_divi[all_buttons_text_color_hover]', array('default' => '#ffffff', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[all_buttons_text_color_hover]', array('label' => esc_html__('Text Color', 'Divi'), 'section' => 'et_divi_buttons_hover', 'settings' => 'et_divi[all_buttons_text_color_hover]')));
     $wp_customize->add_setting('et_divi[all_buttons_bg_color_hover]', array('default' => 'rgba(255,255,255,0.2)', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[all_buttons_bg_color_hover]', array('label' => esc_html__('Background Color', 'Divi'), 'section' => 'et_divi_buttons_hover', 'settings' => 'et_divi[all_buttons_bg_color_hover]')));
     $wp_customize->add_setting('et_divi[all_buttons_border_color_hover]', array('default' => 'rgba(0,0,0,0)', 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_alpha_color'));
     $wp_customize->add_control(new ET_Divi_Customize_Color_Alpha_Control($wp_customize, 'et_divi[all_buttons_border_color_hover]', array('label' => esc_html__('Border Color', 'Divi'), 'section' => 'et_divi_buttons_hover', 'settings' => 'et_divi[all_buttons_border_color_hover]')));
     $wp_customize->add_setting('et_divi[all_buttons_border_radius_hover]', array('default' => ET_Global_Settings::get_value('all_buttons_border_radius_hover', 'default'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[all_buttons_border_radius_hover]', array('label' => esc_html__('Border Radius', 'Divi'), 'section' => 'et_divi_buttons_hover', 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 50, 'step' => 1))));
     $wp_customize->add_setting('et_divi[all_buttons_spacing_hover]', array('default' => ET_Global_Settings::get_value('all_buttons_spacing_hover', 'default'), 'type' => 'option', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'et_sanitize_int_number'));
     $wp_customize->add_control(new ET_Divi_Range_Option($wp_customize, 'et_divi[all_buttons_spacing_hover]', array('label' => esc_html__('Letter Spacing', 'Divi'), 'section' => 'et_divi_buttons_hover', 'type' => 'range', 'input_attrs' => array('min' => -2, 'max' => 10, 'step' => 1))));
 }
Beispiel #3
0
 function et_builder_get_font_family($font_name, $use_important = false)
 {
     $fonts = et_builder_get_fonts();
     $font_style = $font_weight = '';
     $font_name_ms = isset($fonts[$font_name]) && isset($fonts[$font_name]['add_ms_version']) ? "'{$font_name} MS', " : "";
     if (isset($fonts[$font_name]['parent_font'])) {
         $font_style = $fonts[$font_name]['styles'];
         $font_name = $fonts[$font_name]['parent_font'];
     }
     if ('' !== $font_style) {
         $font_weight = sprintf(' font-weight: %1$s;', esc_html($font_style));
     }
     $style = sprintf('font-family: \'%1$s\', %5$s%2$s%3$s;%4$s', esc_html($font_name), isset($fonts[$font_name]) ? et_builder_get_websafe_font_stack($fonts[$font_name]['type']) : "", $use_important ? ' !important' : '', $font_weight, $font_name_ms);
     return $style;
 }
Beispiel #4
0
 function et_builder_enqueue_font($font_name)
 {
     $fonts = et_builder_get_fonts();
     $websafe_fonts = et_builder_get_websafe_fonts();
     $protocol = is_ssl() ? 'https' : 'http';
     // Skip enqueueing if font name is not found. Possibly happen if support for particular font need to be dropped
     if (!array_key_exists($font_name, $fonts)) {
         return;
     }
     // Skip enqueueing for websafe fonts
     if (array_key_exists($font_name, $websafe_fonts)) {
         return;
     }
     if (isset($fonts[$font_name]['parent_font'])) {
         $font_name = $fonts[$font_name]['parent_font'];
     }
     $font_character_set = $fonts[$font_name]['character_set'];
     $query_args = array('family' => sprintf('%s:%s', str_replace(' ', '+', $font_name), apply_filters('et_builder_set_styles', $fonts[$font_name]['styles'], $font_name)), 'subset' => apply_filters('et_builder_set_character_set', $font_character_set, $font_name));
     $font_name_slug = sprintf('et-gf-%1$s', strtolower(str_replace(' ', '-', $font_name)));
     wp_enqueue_style($font_name_slug, esc_url(add_query_arg($query_args, "{$protocol}://fonts.googleapis.com/css")), array(), null);
 }
/**
 * Sanitize font choice
 * @param string
 * @return string|bool
 */
function et_sanitize_font_choices($choosen)
{
    return et_sanitize_key_based_option($choosen, et_builder_get_fonts());
}