Exemple #1
0
/**
 * Contact
 *
 * @var  array  	any existing settings
 * @return array 	existing sections + contact
 *
 */
function avada_options_section_contact($sections)
{
    $settings = get_option(Avada::get_option_name(), array());
    if (!isset($settings['map_overlay_color'])) {
        $settings['map_overlay_color'] = '#a0ce4e';
    }
    $sections['contact'] = array('label' => esc_html__('Contact Form', 'Avada'), 'id' => 'heading_contact', 'priority' => 22, 'is_panel' => true, 'icon' => 'el-icon-envelope', 'fields' => array('contact_form_options_subsection' => array('label' => esc_html__('Contact Form', 'Avada'), 'description' => '', 'id' => 'contact_form_options_subsection', 'icon' => true, 'type' => 'sub-section', 'fields' => array('contact_form_important_note_info' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> The options on this tab are only for the contact form that displays on the "Contact" page template.', 'Avada') . '</div>', 'id' => 'contact_form_important_note_info', 'type' => 'custom'), 'email_address' => array('label' => esc_html__('Email Address', 'Avada'), 'description' => esc_html__('Enter the email address the form should be sent to. This only works for the form on the contact page template.', 'Avada'), 'id' => 'email_address', 'default' => '', 'type' => 'text', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact')), 'contact_comment_position' => array('label' => esc_html__('Contact Form Comment Area Position', 'Avada'), 'description' => esc_html__('Controls the position of the comment field with respect to the other fields.', 'Avada'), 'id' => 'contact_comment_position', 'default' => 'below', 'type' => 'radio-buttonset', 'choices' => array('above' => esc_html__('Above', 'Avada'), 'below' => esc_html__('Below', 'Avada')), 'active_callback' => array('Avada_Options_Conditionals', 'is_contact')), 'contact_form_options_info_2' => array('label' => esc_html__('ReCaptcha', 'Avada'), 'description' => '', 'id' => 'contact_form_options_info_2', 'type' => 'info'), 'recaptcha_php_version_warning' => version_compare(PHP_VERSION, '5.3') >= 0 ? array() : array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . esc_html__('ReCaptcha is not compatible with the PHP version you\'re using. Please update your server to at least PHP 5.3', 'Avada') . '</div>', 'id' => 'recaptcha_php_version_warning', 'type' => 'custom'), 'recaptcha_public' => Avada::$is_updating || version_compare(PHP_VERSION, '5.3') >= 0 ? array('label' => esc_html__('ReCaptcha Site Key', 'Avada'), 'description' => sprintf(esc_html__('Follow the steps in %s to get the site key.', 'Avada'), '<a href="http://theme-fusion.com/avada-doc/pages/setting-up-contact-page/" target="_blank">' . esc_html__('our docs', 'Avada') . '</a>'), 'id' => 'recaptcha_public', 'default' => '', 'type' => 'text', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact')) : array(), 'recaptcha_private' => Avada::$is_updating || version_compare(PHP_VERSION, '5.3') >= 0 ? array('label' => esc_html__('ReCaptcha Secret Key', 'Avada'), 'description' => sprintf(esc_html__('Follow the steps in %s to get the secret key.', 'Avada'), '<a href="http://theme-fusion.com/avada-doc/pages/setting-up-contact-page/" target="_blank">' . esc_html__('our docs', 'Avada') . '</a>'), 'id' => 'recaptcha_private', 'default' => '', 'type' => 'text', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact')) : array(), 'recaptcha_color_scheme' => Avada::$is_updating || version_compare(PHP_VERSION, '5.3') >= 0 ? array('label' => esc_html__('ReCaptcha Color Scheme', 'Avada'), 'description' => esc_html__('Controls the recaptcha color scheme.', 'Avada'), 'id' => 'recaptcha_color_scheme', 'default' => 'Clean', 'type' => 'select', 'choices' => array('light' => esc_html__('Light', 'Avada'), 'dark' => esc_html__('Dark', 'Avada')), 'active_callback' => array('Avada_Options_Conditionals', 'is_contact')) : array())), 'google_map_section' => array('label' => esc_html__('Google Map', 'Avada'), 'description' => '', 'id' => 'google_map_section', 'default' => esc_html__('Google Map', 'Avada'), 'icon' => true, 'type' => 'sub-section', 'fields' => array('google_map_disabled_note' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> Google Maps Script is disabled in Advanced > Theme Features section. Please enable it to see the options.', 'Avada') . '</div>', 'id' => 'google_map_disabled_note', 'type' => 'custom', 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '0'))), 'google_map_important_note_info' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> The options on this tab are only for the google map that displays on the "Contact" page template, they do not control the google map shortcode.', 'Avada') . '</div>', 'id' => 'google_map_important_note_info', 'type' => 'custom', 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'gmap_type' => array('label' => esc_html__('Google Map Type', 'Avada'), 'description' => esc_html__('Controls the type of google map that displays.', 'Avada'), 'id' => 'gmap_type', 'default' => 'roadmap', 'type' => 'select', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'choices' => array('roadmap' => esc_html__('Roadmap', 'Avada'), 'satellite' => esc_html__('Satellite', 'Avada'), 'hybrid' => esc_html__('Hybrid', 'Avada'), 'terrain' => esc_html__('Terrain', 'Avada')), 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'gmap_dimensions' => array('label' => esc_html__('Google Map Dimensions', 'Avada'), 'description' => esc_html__('Controls the width and height of the google map.', 'Avada'), 'id' => 'gmap_dimensions', 'units' => false, 'default' => array('width' => '100%', 'height' => '415px'), 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'type' => 'dimensions', 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'gmap_topmargin' => array('label' => esc_html__('Google Map Top Margin', 'Avada'), 'description' => esc_html__('This is only applied to google maps that are not 100% width. It controls the distance to menu/page title.', 'Avada'), 'id' => 'gmap_topmargin', 'default' => '55px', 'type' => 'dimension', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'gmap_address' => array('label' => esc_html__('Google Map Address', 'Avada'), 'description' => esc_html__('Add the address to the location you wish to display. Single address example: 775 New York Ave, Brooklyn, Kings, New York 11203. If the location is off, please try to use long/lat coordinates with latlng=. ex: latlng=12.381068,-1.492711. For multiple addresses, separate addresses by using the | symbol. ex: Address 1|Address 2|Address 3.', 'Avada'), 'id' => 'gmap_address', 'default' => '775 New York Ave, Brooklyn, Kings, New York 11203', 'type' => 'textarea', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_zoom_level' => array('label' => esc_html__('Map Zoom Level', 'Avada'), 'description' => esc_html__('Controls the zoom level of the google map. Higher number is more zoomed in.', 'Avada'), 'id' => 'map_zoom_level', 'default' => 8, 'type' => 'slider', 'choices' => array('min' => 0, 'max' => 22, 'step' => 1), 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_pin' => array('label' => esc_html__('Address Pin', 'Avada'), 'description' => esc_html__('Turn on to display the google map address pin.', 'Avada'), 'id' => 'map_pin', 'default' => '1', 'type' => 'switch', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'gmap_pin_animation' => array('label' => esc_html__('Address Pin Animation', 'Avada'), 'description' => esc_html__('Turn on to enable address pin animation.', 'Avada'), 'id' => 'gmap_pin_animation', 'default' => '1', 'type' => 'switch', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_popup' => array('label' => esc_html__('Map Popup On Click', 'Avada'), 'description' => esc_html__('Turn on to require a click to display the popup graphic with address info for the pin on the map.', 'Avada'), 'id' => 'map_popup', 'default' => '0', 'type' => 'switch', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_scrollwheel' => array('label' => esc_html__('Map Zoom With Scrollwheel', 'Avada'), 'description' => esc_html__('Turn on to use the mouse scrollwheel to zoom the google map.', 'Avada'), 'id' => 'map_scrollwheel', 'default' => '1', 'type' => 'switch', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_scale' => array('label' => esc_html__('Map Scale', 'Avada'), 'description' => esc_html__('Turn on to display the google map scale.', 'Avada'), 'id' => 'map_scale', 'default' => '1', 'type' => 'switch', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_zoomcontrol' => array('label' => esc_html__('Map Zoom & Pan Control Icons', 'Avada'), 'description' => esc_html__('Turn on to display the google map zoom control icon and pan control icon.', 'Avada'), 'id' => 'map_zoomcontrol', 'default' => '1', 'type' => 'switch', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))))), 'google_map_design_styling_section' => array('label' => esc_html__('Google Map Styling', 'Avada'), 'description' => '', 'id' => 'google_map_design_styling_section', 'icon' => true, 'type' => 'sub-section', 'fields' => array('google_map_disabled_note_1' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> Google Maps Script is disabled in Advanced > Theme Features section. Please enable it to see the options.', 'Avada') . '</div>', 'id' => 'google_map_disabled_note_1', 'type' => 'custom', 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '0'))), 'google_map_styling_important_note_info' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> The options on this tab are only for the google map that displays on the "Contact" page template, they do not control the google map shortcode.', 'Avada') . '</div>', 'id' => 'google_map_styling_important_note_info', 'type' => 'custom', 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_styling' => array('label' => esc_html__('Select the Map Styling', 'Avada'), 'description' => esc_html__('Controls the google map styles. Default is google style, Theme is our style, or choose Custom to select your own style options below.', 'Avada'), 'id' => 'map_styling', 'default' => 'default', 'type' => 'select', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'choices' => array('default' => esc_html__('Default Styling', 'Avada'), 'theme' => esc_html__('Theme Styling', 'Avada'), 'custom' => esc_html__('Custom Styling', 'Avada')), 'required' => array(array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_overlay_color' => array('label' => esc_html__('Map Overlay Color', 'Avada'), 'description' => esc_html__('Custom styling setting only. Controls the overlay color for the map.', 'Avada'), 'id' => 'map_overlay_color', 'default' => isset($settings['primary_color']) ? $settings['primary_color'] : '#a0ce4e', 'type' => 'color-alpha', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'map_styling', 'operator' => '==', 'value' => 'custom'), array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_infobox_styling' => array('label' => esc_html__('Info Box Styling', 'Avada'), 'description' => esc_html__('Custom styling setting only. Controls the styling of the info box.', 'Avada'), 'id' => 'map_infobox_styling', 'default' => 'default', 'type' => 'select', 'choices' => array('default' => esc_html__('Default Infobox', 'Avada'), 'custom' => esc_html__('Custom Infobox', 'Avada')), 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'map_styling', 'operator' => '==', 'value' => 'custom'), array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_infobox_content' => array('label' => esc_html__('Info Box Content', 'Avada'), 'description' => esc_html__('Custom styling setting only. Type in custom info box content to replace the default address string. For multiple addresses, separate info box contents by using the | symbol. ex: InfoBox 1|InfoBox 2|InfoBox 3', 'Avada'), 'id' => 'map_infobox_content', 'default' => '', 'type' => 'textarea', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'map_infobox_styling', 'operator' => '==', 'value' => 'custom'), array('setting' => 'map_styling', 'operator' => '==', 'value' => 'custom'), array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_infobox_bg_color' => array('label' => esc_html__('Info Box Background Color', 'Avada'), 'description' => esc_html__('Custom styling setting only. Controls the info box background color.', 'Avada'), 'id' => 'map_infobox_bg_color', 'default' => 'rgba(255,255,255,0)', 'type' => 'color-alpha', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'map_infobox_styling', 'operator' => '==', 'value' => 'custom'), array('setting' => 'map_styling', 'operator' => '==', 'value' => 'custom'), array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_infobox_text_color' => array('label' => esc_html__('Info Box Text Color', 'Avada'), 'description' => esc_html__('Custom styling setting only. Controls the info box text color.', 'Avada'), 'id' => 'map_infobox_text_color', 'default' => 140 < Avada_Color::get_brightness($settings['map_overlay_color']) ? '#ffffff' : '#747474', 'type' => 'color', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'map_infobox_styling', 'operator' => '==', 'value' => 'custom'), array('setting' => 'map_styling', 'operator' => '==', 'value' => 'custom'), array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1'))), 'map_custom_marker_icon' => array('label' => esc_html__('Custom Marker Icon', 'Avada'), 'description' => esc_html__('Custom styling setting only. Use full image urls for custom marker icons or input "theme" for our custom marker. For multiple addresses, separate icons by using the | symbol or use one for all. ex: Icon 1|Icon 2|Icon 3', 'Avada'), 'id' => 'map_custom_marker_icon', 'default' => '', 'type' => 'textarea', 'active_callback' => array('Avada_Options_Conditionals', 'is_contact'), 'required' => array(array('setting' => 'map_infobox_styling', 'operator' => '==', 'value' => 'custom'), array('setting' => 'map_styling', 'operator' => '==', 'value' => 'custom'), array('setting' => 'status_gmap', 'operator' => '=', 'value' => '1')))))));
    return $sections;
}
Exemple #2
0
/**
 * Header
 *
 * @var  array  	any existing settings
 * @return array 	existing sections + header
 *
 */
function avada_options_section_header($sections)
{
    $settings = get_option(Avada::get_option_name(), array());
    if (!isset($settings['side_header_break_point'])) {
        $settings['side_header_break_point'] = 800;
    }
    $sections['header'] = array('label' => esc_html__('Header', 'Avada'), 'id' => 'heading_header', 'is_panel' => true, 'priority' => 3, 'icon' => 'el-icon-arrow-up', 'fields' => array('header_info_1' => array('label' => esc_html__('Header Content', 'Avada'), 'description' => '', 'id' => 'header_info_1', 'default' => '', 'icon' => true, 'type' => 'sub-section', 'fields' => array('header_position' => array('label' => esc_html__('Header Position', 'Avada'), 'description' => esc_html__('Controls the position of the header to be in the top, left or right of the site. The main menu height, header padding and logo margin options will auto adjust based off your selection for ideal aesthetics.', 'Avada'), 'id' => 'header_position', 'default' => 'Top', 'type' => 'radio-buttonset', 'choices' => array('Top' => esc_html__('Top', 'Avada'), 'Left' => esc_html__('Left', 'Avada'), 'Right' => esc_html__('Right', 'Avada'))), 'header_layout' => array('label' => esc_html__('Select a Header Layout', 'Avada'), 'description' => esc_html__('Controls the general layout of the header. Headers 2-5 allow additional content areas via the header content options 1-3. Header 6 only allows parent level menu items, no child levels will display. The main menu height, header padding and logo margin options will auto adjust based off your selection for ideal aesthetics.', 'Avada'), 'id' => 'header_layout', 'default' => 'v1', 'type' => 'radio-image', 'choices' => array('v1' => get_template_directory_uri() . '/assets/images/patterns/header1.png', 'v2' => get_template_directory_uri() . '/assets/images/patterns/header2.png', 'v3' => get_template_directory_uri() . '/assets/images/patterns/header3.png', 'v4' => get_template_directory_uri() . '/assets/images/patterns/header4.png', 'v5' => get_template_directory_uri() . '/assets/images/patterns/header5.png', 'v6' => get_template_directory_uri() . '/assets/images/patterns/header6.png'), 'required' => array(array('setting' => 'header_position', 'operator' => '==', 'value' => 'Top'))), 'slider_position' => array('label' => esc_html__('Slider Position', 'Avada'), 'description' => esc_html__('Controls if the slider displays below or above the header.', 'Avada'), 'id' => 'slider_position', 'default' => 'Below', 'type' => 'radio-buttonset', 'choices' => array('Below' => esc_html__('Below', 'Avada'), 'Above' => esc_html__('Above', 'Avada')), 'required' => array(array('setting' => 'header_position', 'operator' => '==', 'value' => 'Top'))), 'header_left_content' => array('label' => esc_html__('Header Content 1', 'Avada'), 'description' => esc_html__('Controls the content that displays in the top left section.', 'Avada'), 'id' => 'header_left_content', 'default' => 'Contact Info', 'type' => 'select', 'choices' => array('Contact Info' => esc_html__('Contact Info', 'Avada'), 'Social Links' => esc_html__('Social Links', 'Avada'), 'Navigation' => esc_html__('Navigation', 'Avada'), 'Leave Empty' => esc_html__('Leave Empty', 'Avada')), 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'header_right_content' => array('label' => esc_html__('Header Content 2', 'Avada'), 'description' => esc_html__('Controls the content that displays in the top right section.', 'Avada'), 'id' => 'header_right_content', 'default' => 'Navigation', 'type' => 'select', 'choices' => array('Contact Info' => esc_html__('Contact Info', 'Avada'), 'Social Links' => esc_html__('Social Links', 'Avada'), 'Navigation' => esc_html__('Navigation', 'Avada'), 'Leave Empty' => esc_html__('Leave Empty', 'Avada')), 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'header_v4_content' => array('label' => esc_html__('Header Content 3', 'Avada'), 'description' => esc_html__('Controls the content that displays in the middle right section.', 'Avada'), 'id' => 'header_v4_content', 'default' => 'Tagline And Search', 'type' => 'select', 'choices' => array('Tagline' => esc_html__('Tagline', 'Avada'), 'Search' => esc_html__('Search', 'Avada'), 'Tagline And Search' => esc_html__('Tagline And Search', 'Avada'), 'Banner' => esc_html__('Banner', 'Avada'), 'None' => esc_html__('Leave Empty', 'Avada')), 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '==', 'value' => 'v4'))), 'header_number' => array('label' => esc_html__('Phone Number For Contact Info', 'Avada'), 'description' => esc_html__('This content will display if you have "Contact Info" selected for the Header Content 1 or 2 option above.', 'Avada'), 'id' => 'header_number', 'default' => 'Call Us Today! 1.555.555.555', 'type' => 'text', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'header_email' => array('label' => esc_html__('Email Address For Contact Info', 'Avada'), 'description' => esc_html__('This content will display if you have "Contact Info" selected for the Header Content 1 or 2 option above.', 'Avada'), 'id' => 'header_email', 'default' => '*****@*****.**', 'type' => 'text', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'header_tagline' => array('label' => esc_html__('Tagline For Content 3', 'Avada'), 'description' => esc_html__('This content will display if you have "Tagline" selected for the Header Content 3 option above.', 'Avada'), 'id' => 'header_tagline', 'default' => 'Insert Tagline Here', 'type' => 'textarea', 'required' => array(array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_v4_content', 'operator' => 'contains', 'value' => 'Tagline'))), 'header_banner_code' => array('label' => esc_html__('Banner Code For Content 3', 'Avada'), 'description' => esc_html__('This content will display if you have "Banner" selected for the Header Content 3 option above. Add HTML banner code for Header Content 3. Shortcodes, like buttons, can be used here also.', 'Avada'), 'id' => 'header_banner_code', 'default' => '', 'type' => 'code', 'choices' => array('language' => 'html', 'theme' => 'chrome'), 'required' => array(array('setting' => 'header_v4_content', 'operator' => '==', 'value' => 'Banner'))))), 'header_info_2' => array('label' => esc_html__('Header Background Image', 'Avada'), 'description' => '', 'id' => 'header_info_2', 'default' => '', 'icon' => true, 'type' => 'sub-section', 'fields' => array('header_bg_image' => array('label' => esc_html__('Background Image For Header Area', 'Avada'), 'description' => esc_html__('Select an image for the header background. If left empty, the header background color will be used. For top headers the image displays on top of the header background color and will only display if header opacity is set to 1. For side headers the image displays behind the header background color so the header opacity must be set below 1 to see the image.', 'Avada'), 'id' => 'header_bg_image', 'default' => '', 'mod' => '', 'type' => 'media'), 'header_bg_full' => array('label' => esc_html__('100% Background Image', 'Avada'), 'description' => esc_html__('Turn on to have the header background image display at 100% in width and height according to the window size.', 'Avada'), 'id' => 'header_bg_full', 'default' => '0', 'type' => 'switch', 'required' => array(array('setting' => 'header_bg_image', 'operator' => '!=', 'value' => ''), array('setting' => 'header_bg_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'header_bg_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')))), 'header_bg_parallax' => array('label' => esc_html__('Parallax Background Image', 'Avada'), 'description' => esc_html__('Turn on to use a parallax scrolling effect on the background image. Only works for top header position.', 'Avada'), 'id' => 'header_bg_parallax', 'default' => '1', 'type' => 'switch', 'required' => array(array('setting' => 'header_position', 'operator' => '==', 'value' => 'Top'), array('setting' => 'header_bg_image', 'operator' => '!=', 'value' => ''), array('setting' => 'header_bg_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'header_bg_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')))), 'header_bg_repeat' => array('label' => esc_html__('Background Repeat', 'Avada'), 'description' => esc_html__('Controls how the background image repeats.', 'Avada'), 'id' => 'header_bg_repeat', 'default' => 'no-repeat', 'type' => 'select', 'choices' => array('repeat' => esc_html__('Repeat All', 'Avada'), 'repeat-x' => esc_html__('Repeat Horizontally', 'Avada'), 'repeat-y' => esc_html__('Repeat Vertically', 'Avada'), 'no-repeat' => esc_html__('No Repeat', 'Avada')), 'required' => array(array('setting' => 'header_bg_image', 'operator' => '!=', 'value' => ''), array('setting' => 'header_bg_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'header_bg_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')))))), 'header_styling' => array('label' => esc_html__('Header Styling', 'Avada'), 'description' => '', 'id' => 'header_styling', 'default' => '', 'icon' => true, 'type' => 'sub-section', 'fields' => array('side_header_width' => array('label' => esc_html__('Header Width For Left/Right Position', 'Avada'), 'description' => esc_html__('Controls the width of the left or right side header. In pixels.', 'Avada'), 'id' => 'side_header_width', 'default' => '280', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '800', 'step' => '1'), 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'))), 'header_padding' => array('label' => esc_html__('Header Padding', 'Avada'), 'description' => esc_html__('Controls the top/right/bottom/left padding for the header.', 'Avada'), 'id' => 'header_padding', 'choices' => array('top' => true, 'bottom' => true, 'left' => true, 'right' => true), 'default' => array('top' => '0px', 'bottom' => '0px', 'left' => '0px', 'right' => '0px'), 'type' => 'spacing'), 'header_shadow' => array('label' => esc_html__('Header Shadow', 'Avada'), 'description' => esc_html__('Turn on to display a header drop shadow. This option is incompatible with Internet Explorer versions older than IE11.', 'Avada'), 'id' => 'header_shadow', 'default' => '0', 'type' => 'switch'), 'header_100_width' => array('label' => esc_html__('100% Header Width', 'Avada'), 'description' => esc_html__('Turn on to have the header area display at 100% width according to the window size. Turn off to follow site width.', 'Avada'), 'id' => 'header_100_width', 'default' => '0', 'type' => 'switch', 'required' => array(array('setting' => 'layout', 'operator' => '==', 'value' => 'Wide'), array('setting' => 'header_position', 'operator' => '==', 'value' => 'Top'))), 'header_bg_color' => array('label' => esc_html__('Header Background Color', 'Avada'), 'description' => esc_html__('Controls the background color and opacity for the header. For top headers, opacity set below 1 will remove the header height completely. For side headers, opacity set below 1 will display a color overlay.', 'Avada'), 'id' => 'header_bg_color', 'type' => 'color-alpha', 'default' => '#ffffff'), 'header_border_color' => array('label' => esc_html__('Header Border Color', 'Avada'), 'description' => esc_html__('Controls the border colors for the header. If using left or right header position it controls the menu divider lines.', 'Avada'), 'id' => 'header_border_color', 'default' => '#e5e5e5', 'type' => 'color-alpha', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'header_top_bg_color' => array('label' => esc_html__('Header Top Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the top header section used in Headers 2-5.', 'Avada'), 'id' => 'header_top_bg_color', 'default' => '#a0ce4e', 'type' => 'color-alpha', 'required' => array(array('setting' => 'header_position', 'operator' => '=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'tagline_font_size' => array('label' => esc_html__('Header Tagline Font Size', 'Avada'), 'description' => esc_html__('Controls the font size for the tagline text when using header 4.', 'Avada'), 'id' => 'tagline_font_size', 'default' => '16px', 'type' => 'dimension', 'choices' => array('units' => array('px', 'em')), 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '==', 'value' => 'v4'))), 'tagline_font_color' => array('label' => esc_html__('Header Tagline Font Color', 'Avada'), 'description' => esc_html__('Controls the font color for the tagline text when using header 4.', 'Avada'), 'id' => 'tagline_font_color', 'default' => '#747474', 'type' => 'color', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '==', 'value' => 'v4'))))), 'sticky_header' => array('label' => esc_html__('Sticky Header', 'Avada'), 'description' => '', 'id' => 'sticky_header', 'default' => '', 'icon' => true, 'type' => 'sub-section', 'fields' => array('header_sticky' => array('label' => esc_html__('Sticky Header', 'Avada'), 'description' => esc_html__('Turn on to enable a sticky header.', 'Avada'), 'id' => 'header_sticky', 'default' => 1, 'type' => 'switch'), 'header_sticky_tablet' => array('label' => esc_html__('Sticky Header on Tablets', 'Avada'), 'description' => esc_html__('Turn on to enable a sticky header when scrolling on tablets.', 'Avada'), 'id' => 'header_sticky_tablet', 'default' => '0', 'type' => 'switch', 'required' => array(array('setting' => 'header_sticky', 'operator' => '!=', 'value' => 0), array('setting' => 'responsive', 'operator' => '==', 'value' => '1'))), 'header_sticky_mobile' => array('label' => esc_html__('Sticky Header on Mobiles', 'Avada'), 'description' => esc_html__('Turn on to enable a sticky header when scrolling on mobiles.', 'Avada'), 'id' => 'header_sticky_mobile', 'default' => '0', 'type' => 'switch', 'required' => array(array('setting' => 'header_sticky', 'operator' => '!=', 'value' => 0), array('setting' => 'responsive', 'operator' => '==', 'value' => '1'))), 'header_sticky_shrinkage' => array('label' => esc_html__('Sticky Header Animation', 'Avada'), 'description' => esc_html__('Turn on to allow the sticky header to animate to a smaller height when activated. Only works with header v1 - v3 and v6.', 'Avada'), 'id' => 'header_sticky_shrinkage', 'default' => '1', 'type' => 'switch', 'required' => array(array('setting' => 'header_sticky', 'operator' => '!=', 'value' => 0), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v5'))), 'header_sticky_type2_layout' => array('label' => esc_html__('Sticky Header Display For Headers 4 - 5 ', 'Avada'), 'description' => esc_html__('Controls what displays in the sticky header when using header v4 - v5.', 'Avada'), 'id' => 'header_sticky_type2_layout', 'default' => 'menu_only', 'type' => 'radio-buttonset', 'choices' => array('menu_only' => esc_html__('Menu Only', 'Avada'), 'menu_and_logo' => esc_html__('Menu + Logo Area', 'Avada')), 'required' => array(array('setting' => 'header_sticky', 'operator' => '!=', 'value' => 0), array('setting' => 'header_position', 'operator' => '=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'header_sticky_bg_color' => array('label' => esc_html__('Sticky Header Background Color', 'Avada'), 'description' => esc_html__('Controls the background color for the sticky header.', 'Avada'), 'id' => 'header_sticky_bg_color', 'type' => 'color-alpha', 'default' => '#ffffff', 'required' => array(array('setting' => 'header_sticky', 'operator' => '!=', 'value' => 0))), 'header_sticky_nav_padding' => array('label' => esc_html__('Sticky Header Menu Item Padding', 'Avada'), 'description' => esc_html__('Controls the space between each menu item in the sticky header.', 'Avada'), 'id' => 'header_sticky_nav_padding', 'default' => isset($settings['nav_padding']) && !empty($settings['nav_padding']) ? $settings['nav_padding'] : '35', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '200', 'step' => '1'), 'required' => array(array('setting' => 'header_sticky', 'operator' => '!=', 'value' => '0'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'header_sticky_nav_font_size' => array('label' => esc_html__('Sticky Header Navigation Font Size', 'Avada'), 'description' => esc_html__('Controls the font size of the menu items in the sticky header.', 'Avada'), 'id' => 'header_sticky_nav_font_size', 'default' => isset($settings['nav_font_size']) && !empty($settings['nav_font_size']) ? $settings['nav_font_size'] : '14px', 'type' => 'dimension', 'choices' => array('units' => array('px', 'em')), 'required' => array(array('setting' => 'header_sticky', 'operator' => '!=', 'value' => 0), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6')))))));
    return $sections;
}
 public function __construct()
 {
     Avada::$is_updating = true;
     /* Raise the memory limit and max_execution_time time */
     @ini_set('memory_limit', '256M');
     @set_time_limit(0);
     $this->available_languages = Avada_Multilingual::get_available_languages();
     $this->active_language = Avada_Multilingual::get_active_language();
     $this->default_language = Avada_Multilingual::get_default_language();
     // If English is used then make this first in array order.  Also set starting language so that it is migrated first
     if (in_array('en', $this->available_languages)) {
         $en_array = array('en');
         $en_key = array_search('en', $this->available_languages);
         $available_languages_no_en = $this->available_languages;
         unset($available_languages_no_en[$en_key]);
         $this->available_languages = array_merge($en_array, $available_languages_no_en);
         $this->starting_language = 'en';
     } else {
         // If not English then make default language first in array order.  Also set it to be starting language for migration.
         $default_array = array($this->default_language);
         $default_key = array_search($this->default_language, $this->available_languages);
         $available_languages_no_default = $this->available_languages;
         unset($available_languages_no_default[$default_key]);
         $this->available_languages = array_merge($default_array, $available_languages_no_default);
         $this->starting_language = $this->default_language;
     }
     if ($_GET && isset($_GET['avada_update'])) {
         // Only continue if the URL is ?avada_update=1
         if ('1' != $_GET['avada_update']) {
             return;
         }
         // Only continue if we're updating to version 4.0.0
         if (!isset($_GET['ver']) || $this->version != $_GET['ver']) {
             return;
         }
         // Get the current step
         if (!isset($_GET['step'])) {
             $this->step = 0;
         } else {
             $this->step = intval($_GET['step']);
         }
         if (isset($_GET['proceed']) && '0' == $_GET['proceed']) {
             $this->proceed = false;
         }
         if (isset($_GET['lang']) && !in_array($_GET['lang'], array('', 'en', 'all', null))) {
             Avada_Multilingual::set_active_language($_GET['lang']);
         }
         $this->options = get_option(Avada::get_option_name(), array());
         $this->fields = Avada_Options::get_option_fields();
         add_action('admin_init', array($this, 'migrate_page'));
     }
 }
/**
 * Shortcode-Styling settings
 *
 * @var array any existing settings
 * @return array existing sections + shortcode_styling
 *
 */
function avada_options_section_shortcode_styling($sections)
{
    $settings = get_option(Avada::get_option_name(), array());
    if (isset($settings['h2_typography']['color'])) {
        $h2_or_primary_default = $settings['h2_typography']['color'];
    } elseif (isset($settings['h2_color'])) {
        $h2_or_primary_default = $settings['h2_color'];
    } else {
        $h2_or_primary_default = '#a0ce4e';
    }
    $sections['shortcode_styling'] = array('label' => esc_html__('Shortcodes Styling', 'Avada'), 'id' => 'heading_shortcode_styling', 'is_panel' => true, 'priority' => 14, 'icon' => 'el-icon-check', 'fields' => array('shortcode_animations_accordion' => array('label' => esc_html__('Animations', 'Avada'), 'description' => '', 'id' => 'shortcode_animations_accordion', 'default' => '', 'type' => 'accordion', 'fields' => array('animation_offset' => array('label' => esc_html__('Animation Offset', 'Avada'), 'description' => esc_html__('Controls when the animation should start.', 'Avada'), 'id' => 'animation_offset', 'default' => 'top-into-view', 'type' => 'select', 'choices' => array('top-into-view' => esc_html__('Top of element hits bottom of viewport', 'Avada'), 'top-mid-of-view' => esc_html__('Top of element hits middle of viewport', 'Avada'), 'bottom-in-view' => esc_html__('Bottom of element enters viewport', 'Avada'))))), 'blog_shortcode_section' => array('label' => esc_html__('Blog Shortcode', 'Avada'), 'description' => '', 'id' => 'blog_shortcode_section', 'default' => '', 'type' => 'accordion', 'fields' => array('dates_box_color' => array('label' => esc_html__('Blog Date Box Color', 'Avada'), 'description' => esc_html__('Controls the color of the date box in blog alternate and recent posts layouts.', 'Avada'), 'id' => 'dates_box_color', 'default' => '#eef0f2', 'type' => 'color-alpha'))), 'button_shortcode_section' => array('label' => esc_html__('Button Shortcode', 'Avada'), 'id' => 'button_shortcode_section', 'type' => 'accordion', 'fields' => array('button_size' => array('label' => esc_html__('Button Size', 'Avada'), 'description' => esc_html__('Controls the default button size.', 'Avada'), 'id' => 'button_size', 'default' => 'Large', 'type' => 'radio-buttonset', 'choices' => array('Small' => esc_html__('Small', 'Avada'), 'Medium' => esc_html__('Medium', 'Avada'), 'Large' => esc_html__('Large', 'Avada'), 'XLarge' => esc_html__('X-Large', 'Avada'))), 'button_span' => array('label' => esc_html__('Button Span', 'Avada'), 'description' => esc_html__('Controls if the button spans the full width of its container.', 'Avada'), 'id' => 'button_span', 'default' => 'no', 'type' => 'radio-buttonset', 'choices' => array('yes' => esc_html__('Yes', 'Avada'), 'no' => esc_html__('No', 'Avada'))), 'button_shape' => array('label' => esc_html__('Button Shape', 'Avada'), 'description' => esc_html__('Controls the default button shape.', 'Avada'), 'id' => 'button_shape', 'default' => 'Round', 'type' => 'radio-buttonset', 'choices' => array('Square' => esc_html__('Square', 'Avada'), 'Round' => esc_html__('Round', 'Avada'), 'Pill' => esc_html__('Pill', 'Avada'))), 'button_type' => array('label' => esc_html__('Button Type', 'Avada'), 'description' => esc_html__('Controls the default button type.', 'Avada'), 'id' => 'button_type', 'default' => 'Flat', 'type' => 'radio-buttonset', 'choices' => array('Flat' => esc_html__('Flat', 'Avada'), '3d' => esc_html__('3D', 'Avada'))), 'button_typography' => array('id' => 'button_typography', 'label' => esc_html__('Button Typography', 'Avada'), 'description' => esc_html__('These settings control the typography for all button text.', 'Avada'), 'type' => 'typography', 'choices' => array('font-family' => true, 'font-weight' => true, 'letter-spacing' => true), 'default' => array('font-family' => 'PT Sans', 'font-weight' => '400', 'letter-spacing' => '0')), 'button_gradient_top_color' => array('label' => esc_html__('Button Gradient Top Color', 'Avada'), 'description' => esc_html__('Controls the top color of the button background.', 'Avada'), 'id' => 'button_gradient_top_color', 'default' => '#a0ce4e', 'type' => 'color-alpha'), 'button_gradient_bottom_color' => array('label' => esc_html__('Button Gradient Bottom Color', 'Avada'), 'description' => esc_html__('Controls the bottom color of the button background.', 'Avada'), 'id' => 'button_gradient_bottom_color', 'default' => '#a0ce4e', 'type' => 'color-alpha'), 'button_gradient_top_color_hover' => array('label' => esc_html__('Button Gradient Top Hover Color', 'Avada'), 'description' => esc_html__('Controls the top hover color of the button background.', 'Avada'), 'id' => 'button_gradient_top_color_hover', 'default' => '#96c346', 'type' => 'color-alpha'), 'button_gradient_bottom_color_hover' => array('label' => esc_html__('Button Gradient Bottom Hover Color', 'Avada'), 'description' => esc_html__('Controls the bottom hover color of the button background.', 'Avada'), 'id' => 'button_gradient_bottom_color_hover', 'default' => '#96c346', 'type' => 'color-alpha'), 'button_accent_color' => array('label' => esc_html__('Button Accent Color', 'Avada'), 'description' => esc_html__('Controls the color of the button border, divider, text and icon.', 'Avada'), 'id' => 'button_accent_color', 'default' => '#ffffff', 'type' => 'color-alpha'), 'button_accent_hover_color' => array('label' => esc_html__('Button Accent Hover Color', 'Avada'), 'description' => esc_html__('Controls the hover color of the button border, divider, text and icon.', 'Avada'), 'id' => 'button_accent_hover_color', 'default' => '#ffffff', 'type' => 'color-alpha'), 'button_bevel_color' => array('label' => esc_html__('Button Bevel Color For 3D Mode', 'Avada'), 'description' => esc_html__('Controls the bevel color of the buttons when using 3D button type.', 'Avada'), 'id' => 'button_bevel_color', 'default' => '#54770F', 'type' => 'color-alpha'), 'button_border_width' => array('label' => esc_html__('Button Border Width', 'Avada'), 'description' => esc_html__('Controls the border width for buttons.', 'Avada'), 'id' => 'button_border_width', 'default' => '0', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '20', 'step' => '1')))), 'carousel_shortcode_section' => array('label' => esc_html__('Carousel Shortcode', 'Avada'), 'description' => '', 'id' => 'carousel_shortcode_section', 'type' => 'accordion', 'fields' => array('carousel_nav_color' => array('label' => esc_html__('Carousel Navigation Box Color', 'Avada'), 'description' => esc_html__('Controls the color of the navigation box for carousel sliders.', 'Avada'), 'id' => 'carousel_nav_color', 'default' => 'rgba(0,0,0,0.6)', 'type' => 'color-alpha'), 'carousel_hover_color' => array('label' => esc_html__('Carousel Hover Navigation Box Color', 'Avada'), 'description' => esc_html__('Controls the color of the hover navigation box for carousel sliders.', 'Avada'), 'id' => 'carousel_hover_color', 'default' => 'rgba(0,0,0,0.7)', 'type' => 'color-alpha'), 'carousel_speed' => array('label' => esc_html__('Carousel Speed', 'Avada'), 'description' => esc_html__('Controls the speed of all carousel elements. ex: 1000 = 1 second.', 'Avada'), 'id' => 'carousel_speed', 'default' => '2500', 'type' => 'slider', 'choices' => array('min' => '1000', 'max' => '20000', 'step' => '250')))), 'checklist_shortcode_section' => array('label' => esc_html__('Checklist Shortcode', 'Avada'), 'description' => '', 'id' => 'checklist_shortcode_section', 'type' => 'accordion', 'fields' => array('checklist_icons_color' => array('label' => esc_html__('Checklist Icon Color', 'Avada'), 'description' => esc_html__('Controls the color of the checklist icon.', 'Avada'), 'id' => 'checklist_icons_color', 'default' => '#ffffff', 'type' => 'color'), 'checklist_circle' => array('label' => esc_html__('Checklist Circle', 'Avada'), 'description' => esc_html__('Turn on if you want to display a circle background for checklists.', 'Avada'), 'id' => 'checklist_circle', 'default' => '1', 'type' => 'switch'), 'checklist_circle_color' => array('label' => esc_html__('Checklist Circle Color', 'Avada'), 'description' => esc_html__('Controls the color of the checklist circle background.', 'Avada'), 'id' => 'checklist_circle_color', 'default' => '#a0ce4e', 'type' => 'color-alpha'))), 'content_box_shortcode_section' => array('label' => esc_html__('Content Box Shortcode', 'Avada'), 'id' => 'content_box_shortcode_section', 'type' => 'accordion', 'fields' => array('content_box_bg_color' => array('label' => esc_html__('Content Box Background Color', 'Avada'), 'description' => esc_html__('Controls the background color for content boxes.', 'Avada'), 'id' => 'content_box_bg_color', 'default' => 'rgba(255,255,255,0)', 'type' => 'color-alpha'), 'content_box_title_size' => array('label' => esc_html__('Content Box Title Font Size', 'Avada'), 'description' => esc_html__('Controls the size of the title text.', 'Avada'), 'id' => 'content_box_title_size', 'default' => '18px', 'type' => 'dimension'), 'content_box_title_color' => array('label' => esc_html__('Content Box Title Font Color', 'Avada'), 'description' => esc_html__('Controls the color of the title font.', 'Avada'), 'id' => 'content_box_title_color', 'default' => $h2_or_primary_default, 'type' => 'color'), 'content_box_body_color' => array('label' => esc_html__('Content Box Body Font Color', 'Avada'), 'description' => esc_html__('Controls the color of the body font.', 'Avada'), 'id' => 'content_box_body_color', 'default' => '#747474', 'type' => 'color'), 'content_box_icon_size' => array('label' => esc_html__('Content Box Icon Font Size', 'Avada'), 'description' => esc_html__('Controls the size of the icon.', 'Avada'), 'id' => 'content_box_icon_size', 'default' => '21px', 'type' => 'dimension'), 'content_box_icon_color' => array('label' => esc_html__('Content Box Icon Color', 'Avada'), 'description' => esc_html__('Controls the color of the content box icon.', 'Avada'), 'id' => 'content_box_icon_color', 'default' => '#ffffff', 'type' => 'color'), 'content_box_icon_circle' => array('label' => esc_html__('Content Box Icon Background', 'Avada'), 'description' => esc_html__('Turn on to display a background behind the icon.', 'Avada'), 'id' => 'content_box_icon_circle', 'default' => 'yes', 'type' => 'radio-buttonset', 'choices' => array('yes' => esc_html__('On', 'Avada'), 'no' => esc_html__('Off', 'Avada'))), 'content_box_icon_circle_radius' => array('label' => esc_html__('Content Box Icon Background Radius', 'Avada'), 'description' => esc_html__('Controls the border radius of the icon background.', 'Avada'), 'id' => 'content_box_icon_circle_radius', 'default' => '50%', 'type' => 'dimension'), 'content_box_icon_bg_color' => array('label' => esc_html__('Content Box Icon Background Color', 'Avada'), 'description' => esc_html__('Controls the color of the icon background.', 'Avada'), 'id' => 'content_box_icon_bg_color', 'default' => '#333333', 'type' => 'color-alpha'), 'content_box_icon_bg_inner_border_color' => array('label' => esc_html__('Content Box Icon Background Inner Border Color', 'Avada'), 'description' => esc_html__('Controls the inner border color of the icon background.', 'Avada'), 'id' => 'content_box_icon_bg_inner_border_color', 'default' => '#333333', 'type' => 'color-alpha'), 'content_box_icon_bg_inner_border_size' => array('label' => esc_html__('Content Box Icon Background Inner Border Size', 'Avada'), 'description' => esc_html__('Controls the inner border size of the icon background.', 'Avada'), 'id' => 'content_box_icon_bg_inner_border_size', 'default' => '1', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '20', 'step' => '1')), 'content_box_icon_bg_outer_border_color' => array('label' => esc_html__('Content Box Icon Background Outer Border Color', 'Avada'), 'description' => esc_html__('Controls the outer border color of the icon background.', 'Avada'), 'id' => 'content_box_icon_bg_outer_border_color', 'default' => 'rgba(255,255,255,0)', 'type' => 'color-alpha'), 'content_box_icon_bg_outer_border_size' => array('label' => esc_html__('Content Box Icon Background Outer Border Size', 'Avada'), 'description' => esc_html__('Controls the outer border size of the icon background', 'Avada'), 'id' => 'content_box_icon_bg_outer_border_size', 'default' => '0', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '20', 'step' => '1')), 'content_box_icon_hover_type' => array('label' => esc_html__('Content Box Hover Animation Type', 'Avada'), 'description' => esc_html__('Controls the hover effect of the icon.', 'Avada'), 'id' => 'content_box_icon_hover_type', 'default' => 'fade', 'type' => 'radio-buttonset', 'choices' => array('none' => esc_html__('None', 'Avada'), 'fade' => esc_html__('Fade', 'Avada'), 'slide' => esc_html__('Slide', 'Avada'), 'pulsate' => esc_html__('Pulsate', 'Avada'))), 'content_box_hover_animation_accent_color' => array('label' => esc_html__('Content Box Hover Animation Accent Color', 'Avada'), 'description' => esc_html__('Controls the accent color for the hover animation.', 'Avada'), 'id' => 'content_box_hover_animation_accent_color', 'default' => isset($settings['primary_color']) ? $settings['primary_color'] : '#a0ce4e', 'type' => 'color-alpha'), 'content_box_link_type' => array('label' => esc_html__('Content Box Link Type', 'Avada'), 'description' => esc_html__('Controls the type of link that displays in the content box.', 'Avada'), 'id' => 'content_box_link_type', 'default' => 'text', 'type' => 'radio-buttonset', 'choices' => array('text' => esc_html__('Text', 'Avada'), 'button-bar' => esc_html__('Button Bar', 'Avada'), 'button' => esc_html__('Button', 'Avada'))), 'content_box_link_area' => array('label' => esc_html__('Content Box Link Area', 'Avada'), 'description' => esc_html__('Controls which area the link will be assigned to.', 'Avada'), 'id' => 'content_box_link_area', 'default' => 'link-icon', 'type' => 'radio-buttonset', 'choices' => array('link-icon' => esc_html__('Link + Icon', 'Avada'), 'box' => esc_html__('Entire Content Box', 'Avada'))), 'content_box_link_target' => array('label' => esc_html__('Content Box Link Target', 'Avada'), 'description' => esc_html__('Controls how the link will open.', 'Avada'), 'id' => 'content_box_link_target', 'default' => '_self', 'type' => 'radio-buttonset', 'choices' => array('_self' => esc_html__('Same Window', 'Avada'), '_blank' => esc_html__('New Window/Tab', 'Avada'))), 'content_box_margin' => array('label' => esc_html__('Content Box Top/Bottom Margins', 'Avada'), 'description' => esc_html__('Controls the top/bottom margin for content boxes.', 'Avada'), 'id' => 'content_box_margin', 'type' => 'spacing', 'choices' => array('top' => true, 'bottom' => true, 'units' => array('px', '%')), 'default' => array('top' => '0px', 'bottom' => '60px')))), 'countdown_shortcode_section' => array('label' => esc_html__('Countdown Shortcode', 'Avada'), 'id' => 'countdown_shortcode_section', 'type' => 'accordion', 'fields' => array('countdown_timezone' => array('label' => esc_html__('Countdown Timezone', 'Avada'), 'description' => esc_html__('Controls the timezone that is used for the countdown calculation.', 'Avada'), 'id' => 'countdown_timezone', 'default' => 'site_time', 'type' => 'radio-buttonset', 'choices' => array('site_time' => esc_html__('Site Timezone', 'Avada'), 'user_time' => esc_html__('User Timezone', 'Avada'))), 'countdown_show_weeks' => array('label' => esc_html__('Countdown Show Weeks', 'Avada'), 'description' => esc_html__('Turn on to display the number of weeks in the countdown.', 'Avada'), 'id' => 'countdown_show_weeks', 'default' => 'no', 'type' => 'radio-buttonset', 'choices' => array('yes' => esc_html__('On', 'Avada'), 'no' => esc_html__('Off', 'Avada'))), 'countdown_background_color' => array('label' => esc_html__('Countdown Background Color', 'Avada'), 'description' => esc_html__('Controls the background color for the countdown box.', 'Avada'), 'id' => 'countdown_background_color', 'default' => '#a0ce4e', 'type' => 'color-alpha'), 'countdown_background_image' => array('label' => esc_html__('Countdown Background Image', 'Avada'), 'description' => esc_html__('Select an image for the countdown box background.', 'Avada'), 'id' => 'countdown_background_image', 'default' => '', 'mod' => '', 'type' => 'media'), 'countdown_background_repeat' => array('label' => esc_html__('Countdown Background Repeat', 'Avada'), 'description' => esc_html__('Controls how the background image repeats.', 'Avada'), 'id' => 'countdown_background_repeat', 'default' => 'no-repeat', 'type' => 'select', 'choices' => array('repeat' => esc_html__('Repeat All', 'Avada'), 'repeat-x' => esc_html__('Repeat Horizontal', 'Avada'), 'repeat-y' => esc_html__('Repeat Vertical', 'Avada'), 'no-repeat' => esc_html__('Repeat None', 'Avada')), 'required' => array(array('setting' => 'countdown_background_image', 'operator' => '!=', 'value' => ''), array('setting' => 'countdown_background_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'countdown_background_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')))), 'countdown_background_position' => array('label' => esc_html__('Countdown Background Position', 'Avada'), 'description' => esc_html__('Controls how the background image is positioned.', 'Avada'), 'id' => 'countdown_background_position', 'default' => 'center center', 'type' => 'select', 'choices' => array('top left' => esc_html__('top left', 'Avada'), 'top center' => esc_html__('top center', 'Avada'), 'top right' => esc_html__('top right', 'Avada'), 'center left' => esc_html__('center left', 'Avada'), 'center center' => esc_html__('center center', 'Avada'), 'center right' => esc_html__('center right', 'Avada'), 'bottom left' => esc_html__('bottom left', 'Avada'), 'bottom center' => esc_html__('bottom center', 'Avada'), 'bottom right' => esc_html__('bottom right', 'Avada')), 'required' => array(array('setting' => 'countdown_background_image', 'operator' => '!=', 'value' => ''), array('setting' => 'countdown_background_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'countdown_background_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')))), 'countdown_counter_box_color' => array('label' => esc_html__('Countdown Counter Box Color', 'Avada'), 'description' => esc_html__('Controls the background color for the counter boxes.', 'Avada'), 'id' => 'countdown_counter_box_color', 'default' => '#333333', 'type' => 'color-alpha'), 'countdown_counter_text_color' => array('label' => esc_html__('Countdown Counter Text Color', 'Avada'), 'description' => esc_html__('Controls the color for the countdown timer text.', 'Avada'), 'id' => 'countdown_counter_text_color', 'default' => '#ffffff', 'type' => 'color'), 'countdown_heading_text_color' => array('label' => esc_html__('Countdown Heading Text Color', 'Avada'), 'description' => esc_html__('Controls the color for the countdown headings.', 'Avada'), 'id' => 'countdown_heading_text_color', 'default' => '#ffffff', 'type' => 'color'), 'countdown_subheading_text_color' => array('label' => esc_html__('Countdown Subheading Text Color', 'Avada'), 'description' => esc_html__('Controls the color for the countdown subheadings.', 'Avada'), 'id' => 'countdown_subheading_text_color', 'default' => '#ffffff', 'type' => 'color'), 'countdown_link_text_color' => array('label' => esc_html__('Countdown Link Text Color', 'Avada'), 'description' => esc_html__('Controls the color for the countdown link text.', 'Avada'), 'id' => 'countdown_link_text_color', 'default' => '#ffffff', 'type' => 'color'), 'countdown_link_target' => array('label' => esc_html__('Countdown Link Target', 'Avada'), 'description' => esc_html__('Controls how the link will open.', 'Avada'), 'id' => 'countdown_link_target', 'default' => '_self', 'type' => 'radio-buttonset', 'choices' => array('_self' => esc_html__('Same Window', 'Avada'), '_blank' => esc_html__('New Window', 'Avada'))))), 'counterb_shortcode_section' => array('label' => esc_html__('Counter Boxes Shortcode', 'Avada'), 'description' => '', 'id' => 'counterb_shortcode_section', 'type' => 'accordion', 'fields' => array('counter_box_speed' => array('label' => esc_html__('Counter Box Speed', 'Avada'), 'description' => esc_html__('Controls the speed of all counter box elements. ex: 1000 = 1 second.', 'Avada'), 'id' => 'counter_box_speed', 'default' => '1000', 'type' => 'slider', 'choices' => array('min' => '500', 'max' => '20000', 'step' => '250')), 'counter_box_color' => array('label' => esc_html__('Counter Box Title Font Color', 'Avada'), 'description' => esc_html__('Controls the color of the counter value and icon.', 'Avada'), 'id' => 'counter_box_color', 'default' => '#a0ce4e', 'type' => 'color-alpha'), 'counter_box_title_size' => array('label' => esc_html__('Counter Box Title Font Size', 'Avada'), 'description' => esc_html__('Controls the size of the counter value and icon.', 'Avada'), 'id' => 'counter_box_title_size', 'default' => '50px', 'type' => 'dimension'), 'counter_box_icon_size' => array('label' => esc_html__('Counter Box Icon Size', 'Avada'), 'description' => esc_html__('Controls the size of the icon.', 'Avada'), 'id' => 'counter_box_icon_size', 'default' => '50px', 'type' => 'dimension'), 'counter_box_body_color' => array('label' => esc_html__('Counter Box Body Font Color', 'Avada'), 'description' => esc_html__('Controls the color of the counter box body text.', 'Avada'), 'id' => 'counter_box_body_color', 'default' => '#747474', 'type' => 'color'), 'counter_box_body_size' => array('label' => esc_html__('Counter Box Body Font Size', 'Avada'), 'description' => esc_html__('Controls the size of the counter box body text.', 'Avada'), 'id' => 'counter_box_body_size', 'default' => '13px', 'type' => 'dimension'), 'counter_box_border_color' => array('label' => esc_html__('Counter Box Border Color', 'Avada'), 'description' => esc_html__('Controls the color of the counter box border.', 'Avada'), 'id' => 'counter_box_border_color', 'default' => '#e0dede', 'type' => 'color-alpha'), 'counter_box_icon_top' => array('label' => esc_html__('Counter Box Icon On Top', 'Avada'), 'description' => esc_html__('Turn on to display the icon on top of the counter value.', 'Avada'), 'id' => 'counter_box_icon_top', 'default' => 'no', 'type' => 'radio-buttonset', 'choices' => array('yes' => esc_html__('On', 'Avada'), 'no' => esc_html__('Off', 'Avada'))))), 'cc_shortcode_section' => array('label' => esc_html__('Counter Circle Shortcode', 'Avada'), 'description' => '', 'id' => 'cc_shortcode_section', 'type' => 'accordion', 'fields' => array('counter_filled_color' => array('label' => esc_html__('Counter Circle Filled Color', 'Avada'), 'description' => esc_html__('Controls the color of the filled circle.', 'Avada'), 'id' => 'counter_filled_color', 'default' => '#a0ce4e', 'type' => 'color-alpha'), 'counter_unfilled_color' => array('label' => esc_html__('Counter Circle Unfilled Color', 'Avada'), 'description' => esc_html__('Controls the color of the unfilled circle.', 'Avada'), 'id' => 'counter_unfilled_color', 'default' => '#f6f6f6', 'type' => 'color-alpha'))), 'dropcap_shortcode_section' => array('label' => esc_html__('Dropcap Shortcode', 'Avada'), 'description' => '', 'id' => 'dropcap_shortcode_section', 'type' => 'accordion', 'fields' => array('dropcap_color' => array('label' => esc_html__('Dropcap Color', 'Avada'), 'description' => esc_html__('Controls the color of the dropcap text, or the dropcap box if a box is used.', 'Avada'), 'id' => 'dropcap_color', 'default' => '#a0ce4e', 'type' => 'color-alpha'))), 'flipb_shortcode_section' => array('label' => esc_html__('Flip Boxes Shortcode', 'Avada'), 'description' => '', 'id' => 'flipb_shortcode_section', 'type' => 'accordion', 'fields' => array('flip_boxes_front_bg' => array('label' => esc_html__('Flip Box Background Color Frontside', 'Avada'), 'description' => esc_html__('Controls the color of the frontside background.', 'Avada'), 'id' => 'flip_boxes_front_bg', 'default' => '#f6f6f6', 'type' => 'color-alpha'), 'flip_boxes_front_heading' => array('label' => esc_html__('Flip Box Heading Color Frontside', 'Avada'), 'description' => esc_html__('Controls the color of the frontside heading.', 'Avada'), 'id' => 'flip_boxes_front_heading', 'default' => '#333333', 'type' => 'color'), 'flip_boxes_front_text' => array('label' => esc_html__('Flip Box Text Color Frontside', 'Avada'), 'description' => esc_html__('Controls the color of the frontside text.', 'Avada'), 'id' => 'flip_boxes_front_text', 'default' => '#747474', 'type' => 'color'), 'flip_boxes_back_bg' => array('label' => esc_html__('Flip Box Background Color Backside', 'Avada'), 'description' => esc_html__('Controls the color of the backside background.', 'Avada'), 'id' => 'flip_boxes_back_bg', 'default' => '#a0ce4e', 'type' => 'color-alpha'), 'flip_boxes_back_heading' => array('label' => esc_html__('Flip Box Heading Color Backside', 'Avada'), 'description' => esc_html__('Controls the color of the backside heading.', 'Avada'), 'id' => 'flip_boxes_back_heading', 'default' => '#eeeded', 'type' => 'color'), 'flip_boxes_back_text' => array('label' => esc_html__('Flip Box Text Color Backside', 'Avada'), 'description' => esc_html__('Controls the color of the backside text.', 'Avada'), 'id' => 'flip_boxes_back_text', 'default' => '#ffffff', 'type' => 'color'), 'flip_boxes_border_size' => array('label' => esc_html__('Flip Box Border Size', 'Avada'), 'description' => esc_html__('Controls the border size of the flip box background.', 'Avada'), 'id' => 'flip_boxes_border_size', 'default' => '1', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '50', 'step' => '1')), 'flip_boxes_border_color' => array('label' => esc_html__('Flip Box Border Color', 'Avada'), 'description' => esc_html__('Controls the border color of flip box background.', 'Avada'), 'id' => 'flip_boxes_border_color', 'default' => 'rgba(0,0,0,0)', 'type' => 'color-alpha'), 'flip_boxes_border_radius' => array('label' => esc_html__('Flip Box Border Radius', 'Avada'), 'description' => esc_html__('Controls the border radius of the flip box background.', 'Avada'), 'id' => 'flip_boxes_border_radius', 'default' => '4px', 'type' => 'dimension', 'choices' => array('px', '%', 'em')))), 'fullwidth_shortcode_section' => array('label' => esc_html__('Full Width Shortcode', 'Avada'), 'description' => '', 'id' => 'fullwidth_shortcode_section', 'type' => 'accordion', 'fields' => array('full_width_bg_color' => array('label' => esc_html__('Full Width Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the full width section.', 'Avada'), 'id' => 'full_width_bg_color', 'default' => 'rgba(255,255,255,0)', 'type' => 'color-alpha'), 'full_width_border_size' => array('label' => esc_html__('Full Width Border Size', 'Avada'), 'description' => esc_html__('Controls the border size of the full width section.', 'Avada'), 'id' => 'full_width_border_size', 'default' => '0', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '50', 'step' => '1')), 'full_width_border_color' => array('label' => esc_html__('Full Width Border Color', 'Avada'), 'description' => esc_html__('Controls the border color of the full width section.', 'Avada'), 'id' => 'full_width_border_color', 'default' => '#eae9e9', 'type' => 'color-alpha'))), 'icon_shortcode_section' => array('label' => esc_html__('Icon Shortcode', 'Avada'), 'description' => '', 'id' => 'icon_shortcode_section', 'type' => 'accordion', 'fields' => array('icon_circle_color' => array('label' => esc_html__('Icon Circle Background Color', 'Avada'), 'description' => esc_html__('Controls the color of the circle background.', 'Avada'), 'id' => 'icon_circle_color', 'default' => '#333333', 'type' => 'color-alpha'), 'icon_border_color' => array('label' => esc_html__('Icon Circle Border Color', 'Avada'), 'description' => esc_html__('Controls the border color of the circle background.', 'Avada'), 'id' => 'icon_border_color', 'default' => '#333333', 'type' => 'color-alpha'), 'icon_color' => array('label' => esc_html__('Icon Color', 'Avada'), 'description' => esc_html__('Controls the color of the icon.', 'Avada'), 'id' => 'icon_color', 'default' => '#ffffff', 'type' => 'color-alpha'))), 'imgf_shortcode_section' => array('label' => esc_html__('Image Frame Shortcode', 'Avada'), 'description' => '', 'id' => 'imgf_shortcode_section', 'type' => 'accordion', 'fields' => array('imgframe_border_color' => array('label' => esc_html__('Image Frame Border Color', 'Avada'), 'description' => esc_html__('Controls the border color of the image frame.', 'Avada'), 'id' => 'imgframe_border_color', 'default' => '#f6f6f6', 'type' => 'color-alpha'), 'imageframe_border_size' => array('label' => esc_html__('Image Frame Border Size', 'Avada'), 'description' => esc_html__('Controls the border size of the image frame.', 'Avada'), 'id' => 'imageframe_border_size', 'default' => '0', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '50', 'step' => '1')), 'imageframe_border_radius' => array('label' => esc_html__('Image Frame Border Radius', 'Avada'), 'description' => esc_html__('Controls the border radius of the image frame.', 'Avada'), 'id' => 'imageframe_border_radius', 'default' => '0px', 'type' => 'dimension', 'choices' => array('px', '%')), 'imgframe_style_color' => array('label' => esc_html__('Image Frame Style Color', 'Avada'), 'description' => esc_html__('Controls the style color of the image frame. Only works for glow and drop shadow style.', 'Avada'), 'id' => 'imgframe_style_color', 'default' => '#000000', 'type' => 'color-alpha'))), 'modal_shortcode_section' => array('label' => esc_html__('Modal Shortcode', 'Avada'), 'description' => '', 'id' => 'modal_shortcode_section', 'type' => 'accordion', 'fields' => array('modal_bg_color' => array('label' => esc_html__('Modal Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the modal popup box.', 'Avada'), 'id' => 'modal_bg_color', 'default' => '#f6f6f6', 'type' => 'color-alpha'), 'modal_border_color' => array('label' => esc_html__('Modal Border Color', 'Avada'), 'description' => esc_html__('Controls the border color of the modal popup box.', 'Avada'), 'id' => 'modal_border_color', 'default' => '#ebebeb', 'type' => 'color-alpha'))), 'person_shortcode_section' => array('label' => esc_html__('Person Shortcode', 'Avada'), 'description' => '', 'id' => 'person_shortcode_section', 'type' => 'accordion', 'fields' => array('person_shortcode_important_note_info' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> The styling options for the social icons used in the person shortcode are controlled through the options under the "Social Icon Shortcodes" section on this tab.', 'Avada') . '</div>', 'id' => 'person_shortcode_important_note_info', 'type' => 'custom'), 'person_background_color' => array('label' => esc_html__('Person Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the person area.', 'Avada'), 'id' => 'person_background_color', 'default' => 'rgba(0,0,0,0)', 'type' => 'color-alpha'), 'person_border_color' => array('label' => esc_html__('Person Border Color', 'Avada'), 'description' => esc_html__('Controls the border color of the person image.', 'Avada'), 'id' => 'person_border_color', 'default' => '#f6f6f6', 'type' => 'color-alpha'), 'person_border_size' => array('label' => esc_html__('Person Border Size', 'Avada'), 'description' => esc_html__('Controls the border size of the person image.', 'Avada'), 'id' => 'person_border_size', 'default' => '0', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '50', 'step' => '1')), 'person_border_radius' => array('label' => esc_html__('Person Border Radius', 'Avada'), 'description' => esc_html__('Controls the border radius of the person image.', 'Avada'), 'id' => 'person_border_radius', 'default' => '0px', 'type' => 'dimension', 'choices' => array('px', '%')), 'person_style_color' => array('label' => esc_html__('Person Style Color', 'Avada'), 'description' => esc_html__('Controls the style color for all style types except border.', 'Avada'), 'id' => 'person_style_color', 'default' => '#000000', 'type' => 'color-alpha'), 'person_alignment' => array('label' => esc_html__('Person Content Alignment', 'Avada'), 'description' => esc_html__('Controls the alignment of the person content.', 'Avada'), 'id' => 'person_alignment', 'default' => 'Left', 'type' => 'radio-buttonset', 'choices' => array('Left' => esc_html__('Left', 'Avada'), 'Center' => esc_html__('Center', 'Avada'), 'Right' => esc_html__('Right', 'Avada'))), 'person_icon_position' => array('label' => esc_html__('Person Social Icon Position', 'Avada'), 'description' => esc_html__('Controls the position of the social icons.', 'Avada'), 'id' => 'person_icon_position', 'default' => 'Top', 'type' => 'radio-buttonset', 'choices' => array('Top' => esc_html__('Top', 'Avada'), 'Bottom' => esc_html__('Bottom', 'Avada'))))), 'popover_shortcode_section' => array('label' => esc_html__('Popover Shortcode', 'Avada'), 'description' => '', 'id' => 'popover_shortcode_section', 'type' => 'accordion', 'fields' => array('popover_heading_bg_color' => array('label' => esc_html__('Popover Heading Background Color', 'Avada'), 'description' => esc_html__('Controls the color of the popover heading background.', 'Avada'), 'id' => 'popover_heading_bg_color', 'default' => '#f6f6f6', 'type' => 'color-alpha'), 'popover_content_bg_color' => array('label' => esc_html__('Popover Content Background Color', 'Avada'), 'description' => esc_html__('Controls the color of popover content background.', 'Avada'), 'id' => 'popover_content_bg_color', 'default' => '#ffffff', 'type' => 'color-alpha'), 'popover_border_color' => array('label' => esc_html__('Popover Border Color', 'Avada'), 'description' => esc_html__('Controls the border color of popover box.', 'Avada'), 'id' => 'popover_border_color', 'default' => '#ebebeb', 'type' => 'color-alpha'), 'popover_text_color' => array('label' => esc_html__('Popover Text Color', 'Avada'), 'description' => esc_html__('Controls the color of the popover text.', 'Avada'), 'id' => 'popover_text_color', 'default' => '#747474', 'type' => 'color'), 'popover_placement' => array('label' => esc_html__('Popover Position', 'Avada'), 'description' => esc_html__('Controls the position of the popover in reference to the triggering element.', 'Avada'), 'id' => 'popover_placement', 'default' => 'Top', 'type' => 'radio-buttonset', 'choices' => array('Top' => esc_html__('Top', 'Avada'), 'Right' => esc_html__('Right', 'Avada'), 'Bottom' => esc_html__('Bottom', 'Avada'), 'Left' => esc_html__('Left', 'Avada'))))), 'pricingtable_shortcode_section' => array('label' => esc_html__('Pricing Table Shortcode', 'Avada'), 'description' => '', 'id' => 'pricingtable_shortcode_section', 'type' => 'accordion', 'fields' => array('full_boxed_pricing_box_heading_color' => array('label' => esc_html__('Pricing Box Style 1 Heading Color', 'Avada'), 'description' => esc_html__('Controls the color of style 1 pricing table headings.', 'Avada'), 'id' => 'full_boxed_pricing_box_heading_color', 'default' => '#333333', 'type' => 'color'), 'sep_pricing_box_heading_color' => array('label' => esc_html__('Pricing Box Style 2 Heading Color', 'Avada'), 'description' => esc_html__('Controls the color of style 2 pricing table headings.', 'Avada'), 'id' => 'sep_pricing_box_heading_color', 'default' => '#333333', 'type' => 'color'), 'pricing_box_color' => array('label' => esc_html__('Pricing Box Color', 'Avada'), 'description' => esc_html__('Controls the color portions of pricing boxes.', 'Avada'), 'id' => 'pricing_box_color', 'default' => '#a0ce4e', 'type' => 'color-alpha'), 'pricing_bg_color' => array('label' => esc_html__('Pricing Box Background Color', 'Avada'), 'description' => esc_html__('Controls the color of the main background and title background.', 'Avada'), 'id' => 'pricing_bg_color', 'default' => '#ffffff', 'type' => 'color-alpha'), 'pricing_border_color' => array('label' => esc_html__('Pricing Box Border Color', 'Avada'), 'description' => esc_html__('Controls the color of the outer border, pricing row and footer row backgrounds.', 'Avada'), 'id' => 'pricing_border_color', 'default' => '#f8f8f8', 'type' => 'color-alpha'), 'pricing_divider_color' => array('label' => esc_html__('Pricing Box Divider Color', 'Avada'), 'description' => esc_html__('Controls the color of the dividers in-between pricing rows.', 'Avada'), 'id' => 'pricing_divider_color', 'default' => '#ededed', 'type' => 'color-alpha'))), 'progressbar_shortcode_section' => array('label' => esc_html__('Progress Bar Shortcode', 'Avada'), 'description' => '', 'id' => 'progressbar_shortcode_section', 'type' => 'accordion', 'fields' => array('progressbar_height' => array('label' => esc_html__('Progress Bar Height', 'Avada'), 'description' => esc_html__('Insert a height for the progress bar.', 'Avada'), 'id' => 'progressbar_height', 'default' => '37px', 'type' => 'dimension'), 'progressbar_text_position' => array('label' => esc_html__('Text Position', 'Avada'), 'description' => esc_html__('Select the position of the progress bar text. Choose "Default" for theme option selection.', 'Avada'), 'id' => 'progressbar_text_position', 'default' => 'on_bar', 'type' => 'radio-buttonset', 'choices' => array('on_bar' => esc_html__('On Bar', 'Avada'), 'above_bar' => esc_html__('Above Bar', 'Avada'), 'below_bar' => esc_html__('Below Bar', 'Avada'))), 'progressbar_filled_color' => array('label' => esc_html__('Progress Bar Filled Color', 'Avada'), 'description' => esc_html__('Controls the color of the progress bar filled area.', 'Avada'), 'id' => 'progressbar_filled_color', 'default' => '#a0ce4e', 'type' => 'color-alpha'), 'progressbar_filled_border_color' => array('label' => esc_html__('Progress Bar Filled Border Color', 'Avada'), 'description' => esc_html__('Controls the border color of the progress bar filled area.', 'Avada'), 'id' => 'progressbar_filled_border_color', 'default' => '#ffffff', 'type' => 'color-alpha'), 'progressbar_filled_border_size' => array('label' => esc_html__('Progress Bar Filled Border Size', 'Avada'), 'description' => esc_html__('Controls the border size of the progress bar filled area.', 'Avada'), 'id' => 'progressbar_filled_border_size', 'default' => '0', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '20', 'step' => '1')), 'progressbar_unfilled_color' => array('label' => esc_html__('Progress Bar Unfilled Color', 'Avada'), 'description' => esc_html__('Controls the color of the progress bar unfilled area.', 'Avada'), 'id' => 'progressbar_unfilled_color', 'default' => '#f6f6f6', 'type' => 'color-alpha'), 'progressbar_text_color' => array('label' => esc_html__('Progress Bar Text Color', 'Avada'), 'description' => esc_html__('Controls the color of the progress bar text.', 'Avada'), 'id' => 'progressbar_text_color', 'default' => '#ffffff', 'type' => 'color-alpha'))), 'sectionseparator_shortcode_section' => array('label' => esc_html__('Section Separator Shortcode', 'Avada'), 'description' => '', 'id' => 'sectionseparator_shortcode_section', 'type' => 'accordion', 'fields' => array('section_sep_border_size' => array('label' => esc_html__('Section Separator Border Size', 'Avada'), 'description' => esc_html__('Controls the border size of the section separator.', 'Avada'), 'id' => 'section_sep_border_size', 'default' => '1', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '50', 'step' => '1')), 'section_sep_bg' => array('label' => esc_html__('Section Separator Divider Candy Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the divider candy.', 'Avada'), 'id' => 'section_sep_bg', 'default' => '#f6f6f6', 'type' => 'color-alpha'), 'section_sep_border_color' => array('label' => esc_html__('Section Separator Border Color', 'Avada'), 'description' => esc_html__('Controls the border color of the separator.', 'Avada'), 'id' => 'section_sep_border_color', 'default' => '#f6f6f6', 'type' => 'color-alpha'))), 'separator_shortcode_section' => array('label' => esc_html__('Separator Shortcode', 'Avada'), 'description' => '', 'id' => 'separator_shortcode_section', 'type' => 'accordion', 'fields' => array('sep_color' => array('label' => esc_html__('Separator Color', 'Avada'), 'description' => esc_html__('Controls the color of all separators, divider lines and borders for meta, previous & next, filters, archive pages, boxes around number pagination, sidebar widgets, accordion divider lines, counter boxes and more.', 'Avada'), 'id' => 'sep_color', 'default' => '#e0dede', 'type' => 'color-alpha'), 'separator_circle' => array('label' => esc_html__('Separator Circle', 'Avada'), 'description' => esc_html__('Turn on if you want to display a circle around the separator icon.', 'Avada'), 'id' => 'separator_circle', 'default' => '1', 'type' => 'switch'), 'separator_border_size' => array('label' => esc_html__('Border Size', 'Avada'), 'description' => esc_html__('Controls the border size of the separator.', 'Avada'), 'id' => 'separator_border_size', 'default' => '1', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '50', 'step' => '1')))), 'sociallinks_shortcode_section' => array('label' => esc_html__('Social Icon Shortcodes', 'Avada'), 'description' => '', 'id' => 'sociallinks_shortcode_section', 'type' => 'accordion', 'fields' => array('social_links_info' => array('id' => 'social_links_info', 'type' => 'raw', 'content' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> These social icon global options control both the social link shortcode and person shortcode.', 'Avada') . '</div>'), 'social_links_font_size' => array('label' => esc_html__('Social Links Icons Font Size', 'Avada'), 'description' => esc_html__('Controls the font size for the social link icons.', 'Avada'), 'id' => 'social_links_font_size', 'default' => '16px', 'type' => 'dimension'), 'social_links_color_type' => array('label' => esc_html__('Social Links Icon Color Type', 'Avada'), 'description' => esc_html__('Custom colors allow you to choose a color for icons and boxes. Brand colors will use the exact brand color of each network for the icons or boxes.', 'Avada'), 'id' => 'social_links_color_type', 'default' => 'custom', 'type' => 'radio-buttonset', 'choices' => array('custom' => esc_html__('Custom Colors', 'Avada'), 'brand' => esc_html__('Brand Colors', 'Avada'))), 'social_links_icon_color' => array('label' => esc_html__('Social Links Custom Icons Color', 'Avada'), 'description' => esc_html__('Controls the color of the custom icons.', 'Avada'), 'id' => 'social_links_icon_color', 'default' => '#bebdbd', 'type' => 'color-alpha', 'required' => array(array('setting' => 'social_links_color_type', 'operator' => '==', 'value' => 'custom'))), 'social_links_boxed' => array('label' => esc_html__('Social Links Icons Boxed', 'Avada'), 'description' => esc_html__('Turn on to have the icon displayed in a small box. Turn off to have the icon displayed with no box.', 'Avada'), 'id' => 'social_links_boxed', 'default' => '0', 'type' => 'switch'), 'social_links_box_color' => array('label' => esc_html__('Social Links Icons Custom Box Color', 'Avada'), 'description' => esc_html__('Select a custom social icon box color.', 'Avada'), 'id' => 'social_links_box_color', 'default' => '#e8e8e8', 'type' => 'color-alpha', 'required' => array(array('setting' => 'social_links_boxed', 'operator' => '==', 'value' => '1'), array('setting' => 'social_links_color_type', 'operator' => '==', 'value' => 'custom'))), 'social_links_boxed_radius' => array('label' => esc_html__('Social Links Icons Boxed Radius', 'Avada'), 'description' => esc_html__('Box radius for the social icons.', 'Avada'), 'id' => 'social_links_boxed_radius', 'default' => '4px', 'type' => 'dimension', 'choices' => array('px', 'em'), 'required' => array(array('setting' => 'social_links_boxed', 'operator' => '==', 'value' => '1'))), 'social_links_boxed_padding' => array('label' => esc_html__('Social Links Icons Boxed Padding', 'Avada'), 'id' => 'social_links_boxed_padding', 'default' => '8px', 'type' => 'dimension', 'required' => array(array('setting' => 'social_links_boxed', 'operator' => '==', 'value' => '1'))), 'social_links_tooltip_placement' => array('label' => esc_html__('Social Links Icons Tooltip Position', 'Avada'), 'description' => esc_html__('Controls the tooltip position of the social links icons.', 'Avada'), 'id' => 'social_links_tooltip_placement', 'default' => 'Top', 'type' => 'radio-buttonset', 'choices' => array('Top' => esc_html__('Top', 'Avada'), 'Right' => esc_html__('Right', 'Avada'), 'Bottom' => esc_html__('Bottom', 'Avada'), 'Left' => esc_html__('Left', 'Avada'), 'None' => esc_html__('None', 'Avada'))))), 'tabs_shortcode_section' => array('label' => esc_html__('Tabs Shortcode', 'Avada'), 'description' => '', 'id' => 'tabs_shortcode_section', 'type' => 'accordion', 'fields' => array('tabs_bg_color' => array('label' => esc_html__('Tabs Background Color + Hover Color', 'Avada'), 'description' => esc_html__('Controls the color of the active tab, tab hover and content background.', 'Avada'), 'id' => 'tabs_bg_color', 'default' => '#ffffff', 'type' => 'color-alpha'), 'tabs_inactive_color' => array('label' => esc_html__('Tabs Inactive Color', 'Avada'), 'description' => esc_html__('Controls the color of the inactive tabs.', 'Avada'), 'id' => 'tabs_inactive_color', 'default' => '#ebeaea', 'type' => 'color-alpha'), 'tabs_border_color' => array('label' => esc_html__('Tabs Border Color', 'Avada'), 'description' => esc_html__('Controls the color of the tab border.', 'Avada'), 'id' => 'tabs_border_color', 'default' => '#ebeaea', 'type' => 'color-alpha'))), 'tagline_shortcode_section' => array('label' => esc_html__('Tagline Shortcode', 'Avada'), 'description' => '', 'id' => 'tagline_shortcode_section', 'type' => 'accordion', 'fields' => array('tagline_bg' => array('label' => esc_html__('Tagline Box Background Color', 'Avada'), 'description' => esc_html__('Controls the color of the tagline box background.', 'Avada'), 'id' => 'tagline_bg', 'default' => '#f6f6f6', 'type' => 'color-alpha'), 'tagline_border_color' => array('label' => esc_html__('Tagline Box Border Color', 'Avada'), 'description' => esc_html__('Controls the border color of the tagline box.', 'Avada'), 'id' => 'tagline_border_color', 'default' => '#f6f6f6', 'type' => 'color-alpha'), 'tagline_margin' => array('label' => esc_html__('Tagline Top/Bottom Margins', 'Avada'), 'description' => esc_html__('Controls the top/bottom margin of the tagline box.', 'Avada'), 'id' => 'tagline_margin', 'default' => array('top' => '0px', 'bottom' => '84px'), 'type' => 'spacing', 'choices' => array('top' => true, 'bottom' => true)))), 'testimonials_shortcode_section' => array('label' => esc_html__('Testimonials Shortcode', 'Avada'), 'description' => '', 'id' => 'testimonials_shortcode_section', 'type' => 'accordion', 'fields' => array('testimonial_bg_color' => array('label' => esc_html__('Testimonial Background Color', 'Avada'), 'description' => esc_html__('Controls the color of the testimonial background.', 'Avada'), 'id' => 'testimonial_bg_color', 'default' => '#f6f6f6', 'type' => 'color-alpha'), 'testimonial_text_color' => array('label' => esc_html__('Testimonial Text Color', 'Avada'), 'description' => esc_html__('Controls the color of the testimonial text.', 'Avada'), 'id' => 'testimonial_text_color', 'default' => '#747474', 'type' => 'color'), 'testimonials_speed' => array('label' => esc_html__('Testimonials Speed', 'Avada'), 'description' => esc_html__('Controls the speed of the testimonial slider. ex: 1000 = 1 second.', 'Avada'), 'id' => 'testimonials_speed', 'default' => '4000', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '20000', 'step' => '250')), 'testimonials_random' => array('label' => esc_html__('Random Order', 'Avada'), 'description' => esc_html__('Turn on to display testimonials in a random order.', 'Avada'), 'id' => 'testimonials_random', 'default' => '0', 'type' => 'switch'))), 'title_shortcode_section' => array('label' => esc_html__('Title Shortcode', 'Avada'), 'description' => '', 'id' => 'title_shortcode_section', 'type' => 'accordion', 'fields' => array('title_style_type' => array('label' => esc_html__('Title Separator', 'Avada'), 'description' => esc_html__('Controls the type of title separator that will display.', 'Avada'), 'id' => 'title_style_type', 'default' => 'double', 'type' => 'select', 'choices' => array('single' => esc_html__('Single', 'Avada'), 'single solid' => esc_html__('Single Solid', 'Avada'), 'single dashed' => esc_html__('Single Dashed', 'Avada'), 'single dotted' => esc_html__('Single Dotted', 'Avada'), 'double' => esc_html__('Double', 'Avada'), 'double solid' => esc_html__('Double Solid', 'Avada'), 'double dashed' => esc_html__('Double Dashed', 'Avada'), 'double dotted' => esc_html__('Double Dotted', 'Avada'), 'underline' => esc_html__('Underline', 'Avada'), 'underline solid' => esc_html__('Underline Solid', 'Avada'), 'underline dashed' => esc_html__('Underline Dashed', 'Avada'), 'underline dotted' => esc_html__('Underline Dotted', 'Avada'), 'none' => esc_html__('None', 'Avada'))), 'title_border_color' => array('label' => esc_html__('Title Separator Color', 'Avada'), 'description' => esc_html__('Controls the color of the title separators.', 'Avada'), 'id' => 'title_border_color', 'default' => '#e0dede', 'type' => 'color-alpha'), 'title_margin' => array('label' => esc_html__('Title Top/Bottom Margins', 'Avada'), 'description' => esc_html__('Controls the top/bottom margin of the title.', 'Avada'), 'id' => 'title_margin', 'default' => array('top' => '0px', 'bottom' => '31px'), 'type' => 'spacing', 'choices' => array('top' => true, 'bottom' => true)))), 'accordion_shortcode_section' => array('label' => esc_html__('Toggles Shortcode', 'Avada'), 'id' => 'accordion_shortcode_section', 'type' => 'accordion', 'fields' => array('accordion_divider_line' => array('label' => esc_html__('Toggle Divider Line', 'Avada'), 'description' => esc_html__('Turn on to display a divider line between each item.', 'Avada'), 'id' => 'accordion_divider_line', 'default' => '1', 'type' => 'switch'), 'accordian_inactive_color' => array('label' => esc_html__('Toggles Inactive Box Color', 'Avada'), 'description' => esc_html__('Controls the color of the inactive toggle box.', 'Avada'), 'id' => 'accordian_inactive_color', 'default' => '#333333', 'type' => 'color-alpha'))), 'user_login_shortcode_section' => array('label' => esc_html__('User Login Shortcode', 'Avada'), 'id' => 'user_login_shortcode_section', 'description' => '', 'type' => 'accordion', 'fields' => array('user_login_text_align' => array('label' => esc_html__('User Login Text Align', 'Avada'), 'description' => esc_html__('Controls the alignment of all user login content. "Text Flow" follows the default text align of the site. "Center" will center all elements.', 'Avada'), 'id' => 'user_login_text_align', 'default' => 'center', 'type' => 'radio-buttonset', 'choices' => array('textflow' => esc_html__('Text Flow', 'Avada'), 'center' => esc_html__('Center', 'Avada'))), 'user_login_form_background_color' => array('label' => esc_html__('User Login Form Backgound Color', 'Avada'), 'description' => esc_html__('Controls the color of the form background.', 'Avada'), 'id' => 'user_login_form_background_color', 'default' => '#f6f6f6', 'type' => 'color-alpha')))));
    return $sections;
}
 public function __construct()
 {
     // An array of all the custom fields we have.
     $this->field_types = array('typography', 'color_alpha', 'spacing', 'dimensions');
     // An array of all our extensions
     $this->extensions = array('search', 'repeater', 'accordion', 'vendorsupport');
     $this->path = dirname(__FILE__);
     foreach ($this->field_types as $field_type) {
         add_action('avadaredux/' . Avada::get_option_name() . '/field/class/' . $field_type, array($this, 'register_' . $field_type));
     }
     foreach ($this->extensions as $extension) {
         if (class_exists('AvadaRedux')) {
             AvadaRedux::setExtensions(Avada::get_option_name(), $this->path . '/extensions/' . $extension . '/extension_' . $extension . '.php');
         }
     }
 }
 public function __construct()
 {
     self::$grid_image_meta = array();
     self::$grid_accepted_widths = array('200', '400', '600', '800', '1200');
     self::$supported_grid_layouts = array('grid', 'timeline', 'large', 'portfolio_full', 'related-posts');
     $options = get_option(Avada::get_option_name());
     if (isset($options['status_lightbox']) && $options['status_lightbox']) {
         add_filter('wp_get_attachment_link', array($this, 'prepare_lightbox_links'));
     }
     add_filter('jpeg_quality', array($this, 'set_jpeg_quality'));
     add_filter('wp_editor_set_quality', array($this, 'set_jpeg_quality'));
     add_filter('max_srcset_image_width', array($this, 'set_max_srcset_image_width'));
     add_filter('wp_calculate_image_srcset', array($this, 'set_largest_image_size'), '10', '5');
     add_filter('wp_calculate_image_srcset', array($this, 'edit_grid_image_srcset'), '15', '5');
     add_filter('wp_calculate_image_sizes', array($this, 'edit_grid_image_sizes'), '10', '5');
     add_filter('post_thumbnail_html', array($this, 'edit_grid_image_src'), '10', '5');
     add_action('delete_attachment', array($this, 'delete_resized_images'));
 }
 /**
  * Send the email
  */
 public function send_email()
 {
     $options = get_option(Avada::get_option_name());
     $name = wp_filter_kses($this->name);
     $email = wp_filter_kses($this->email);
     $subject = wp_filter_kses($this->subject);
     $message = wp_filter_kses($this->message);
     if (function_exists('stripslashes')) {
         $subject = stripslashes($subject);
         $message = stripslashes($message);
     }
     $email_to = $options['email_address'];
     $body = esc_html__('Name:', 'Avada') . " {$name} \n\n";
     $body .= esc_html__('Email:', 'Avada') . " {$email} \n\n";
     $body .= esc_html__('Subject:', 'Avada') . " {$subject} \n\n";
     $body .= esc_html__('Comments:', 'Avada') . "\n {$message}";
     $headers = 'Reply-To: ' . $name . ' <' . $email . '>' . "\r\n";
     wp_mail($email_to, $subject, $body, $headers);
     $this->email_sent = true;
     if (true == $this->email_sent) {
         $_POST['contact_name'] = '';
         $_POST['email'] = '';
         $_POST['url'] = '';
         $_POST['msg'] = '';
     }
 }
 /**
  * When in Polylang on WPML we're using "all" languages,
  * saved options should be copied to ALL languages.
  *
  * @access public
  * @since 4.0.2
  */
 public function save_all_languages()
 {
     // Get the current language.
     $is_all = Avada::get_language_is_all();
     // If not "all", then early exit.
     if (!$is_all) {
         return;
     }
     // Get the options.
     $option_name = Avada::get_option_name();
     $original_option_name = Avada::get_original_option_name();
     $options = get_option($option_name);
     // Get available languages.
     $all_languages = Avada_Multilingual::get_available_languages();
     // Get default language
     $default_language = Avada_Multilingual::get_default_language();
     if ('en' !== $default_language) {
         update_option($original_option_name . '_' . $default_language, $options);
         update_option($original_option_name, $options);
     }
     foreach ($all_languages as $language) {
         // Skip English.
         if ('' === $language || 'en' === $language) {
             continue;
         }
         // Skip the main language if something other than English.
         // We've already handled that above.
         if ('en' !== $default_language && $default_language === $language) {
             continue;
         }
         // Copy options to the new language.
         update_option($original_option_name . '_' . $language, $options);
     }
 }
Exemple #9
0
/**
 * Mobile settings
 *
 * @var  array  	any existing settings
 * @return array 	existing sections + mobile
 *
 */
function avada_options_section_responsive($sections)
{
    $settings = get_option(Avada::get_option_name(), array());
    $sections['mobile'] = array('label' => esc_html__('Responsive', 'Avada'), 'id' => 'responsive', 'priority' => 2, 'icon' => 'el-icon-resize-horizontal', 'fields' => array('responsive' => array('label' => esc_html__('Responsive Design', 'Avada'), 'description' => esc_html__('Turn on to use the responsive design features. If set to off, the fixed layout is used.', 'Avada'), 'id' => 'responsive', 'default' => '1', 'type' => 'switch', 'choices' => array('on' => esc_html__('On', 'Avada'), 'off' => esc_html__('Off', 'Avada'))), 'grid_main_break_point' => array('label' => esc_html__('Grid Responsive Breakpoint', 'Avada'), 'description' => esc_html__('Controls when grid layouts (blog/portfolio) start to break into smaller columns. Further breakpoints are auto calculated.', 'Avada'), 'id' => 'grid_main_break_point', 'default' => '1000', 'type' => 'slider', 'choices' => array('min' => '360', 'max' => '2000', 'step' => '1'), 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'))), 'side_header_break_point' => array('label' => esc_html__('Header Responsive Breakpoint', 'Avada'), 'description' => esc_html__('Controls when the desktop header changes to the mobile header.', 'Avada'), 'id' => 'side_header_break_point', 'default' => '800', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '2000', 'step' => '1', 'edit' => 'yes'), 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'))), 'content_break_point' => array('label' => esc_html__('Site Content Responsive Breakpoint', 'Avada'), 'description' => esc_html__('Controls when the site content area changes to the mobile layout. This includes all content below the header including the footer.', 'Avada'), 'id' => 'content_break_point', 'default' => '800', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '2000', 'step' => '1', 'edit' => 'yes'), 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'))), 'mobile_zoom' => array('label' => esc_html__('Mobile Device Zoom', 'Avada'), 'description' => esc_html__('Turn on to enable pinch to zoom on mobile devices.', 'Avada'), 'id' => 'mobile_zoom', 'default' => '1', 'type' => 'switch', 'choices' => array('on' => esc_html__('On', 'Avada'), 'off' => esc_html__('Off', 'Avada')), 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'))), 'typography_responsive' => array('label' => esc_html__('Responsive Heading Typography', 'Avada'), 'description' => esc_html__('Turn on for headings to change font size responsively.', 'Avada'), 'id' => 'typography_responsive', 'default' => '0', 'choices' => array('on' => esc_html__('On', 'Avada'), 'off' => esc_html__('Off', 'Avada')), 'type' => 'switch', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'))), 'typography_sensitivity' => array('label' => esc_html__('Responsive Typography Sensitivity', 'Avada'), 'description' => esc_html__('Values below 1 decrease rate of resizing, values above 1 increase rate of resizing.', 'Avada'), 'id' => 'typography_sensitivity', 'default' => '0.6', 'type' => 'slider', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'typography_responsive', 'operator' => '!=', 'value' => 0)), 'choices' => array('min' => '0', 'max' => '2', 'step' => '.01')), 'typography_factor' => array('label' => esc_html__('Mininum Font Size Factor', 'Avada'), 'description' => esc_html__('Minimum font factor is used to determine the minimum distance between headings and body font by a multiplying value.', 'Avada'), 'id' => 'typography_factor', 'default' => '1.5', 'type' => 'slider', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'typography_responsive', 'operator' => '!=', 'value' => 0)), 'choices' => array('min' => '0', 'max' => '4', 'step' => '.01'))));
    return $sections;
}
 /**
  * Sets the value of a single setting
  */
 public function set($setting, $value)
 {
     $settings = self::$saved_options;
     $settings[$setting] = $value;
     update_option(Avada::get_option_name(), $settings);
 }
 /**
  * Get column width of the current page
  *
  * @var     $column     integer (0=main, 1=sidebar1, 2-sidebar2)
  * @return  integer
  */
 public function get_content_width($column = 0)
 {
     /**
      * The content width
      */
     $options = get_option(Avada::get_option_name());
     $site_width = isset($options['site_width']) ? $options['site_width'] : '1100px';
     if (intval($site_width)) {
         // Site width is using %
         if (false !== strpos($site_width, '%')) {
             $site_width = Avada_Helper::percent_to_pixels($site_width);
         } elseif (false !== strpos($site_width, 'em')) {
             $site_width = Avada_Helper::ems_to_pixels($site_width);
         }
     } else {
         // fallback to 1100px
         $site_width = 1100;
     }
     /**
      * Sidebars width
      */
     $sidebar_1_width = 0;
     $sidebar_2_width = 0;
     if (Avada()->template->has_sidebar() && !Avada()->template->double_sidebars()) {
         if ('tribe_events' == get_post_type()) {
             $sidebar_1_width = Avada()->settings->get('ec_sidebar_width');
         } else {
             $sidebar_1_width = Avada()->settings->get('sidebar_width');
         }
     } elseif (Avada()->template->double_sidebars()) {
         if ('tribe_events' == get_post_type()) {
             $sidebar_1_width = Avada()->settings->get('ec_sidebar_2_1_width');
             $sidebar_2_width = Avada()->settings->get('ec_sidebar_2_2_width');
         } else {
             $sidebar_1_width = Avada()->settings->get('sidebar_2_1_width');
             $sidebar_2_width = Avada()->settings->get('sidebar_2_2_width');
         }
     } elseif (!Avada()->template->has_sidebar() && (is_page_template('side-navigation.php') || is_singular('tribe_events'))) {
         if ('tribe_events' == get_post_type()) {
             $sidebar_1_width = Avada()->settings->get('ec_sidebar_width');
         } else {
             $sidebar_1_width = Avada()->settings->get('sidebar_width');
         }
     }
     if ($sidebar_1_width) {
         if (false !== strpos($sidebar_1_width, '%')) {
             $sidebar_1_width = Avada_Helper::percent_to_pixels($sidebar_1_width, $site_width);
         } elseif (false !== strpos($sidebar_1_width, 'em')) {
             $sidebar_1_width = Avada_Helper::ems_to_pixels($sidebar_1_width);
         } else {
             $sidebar_1_width = intval($sidebar_1_width);
         }
     }
     if ($sidebar_2_width) {
         if (false !== strpos($sidebar_2_width, '%')) {
             $sidebar_2_width = Avada_Helper::percent_to_pixels($sidebar_2_width, $site_width);
         } elseif (false !== strpos($sidebar_1_width, 'em')) {
             $sidebar_2_width = Avada_Helper::ems_to_pixels($sidebar_2_width);
         } else {
             $sidebar_2_width = intval($sidebar_2_width);
         }
     }
     $columns = 1;
     if ($site_width && $sidebar_1_width && $sidebar_2_width) {
         $columns = 3;
     } elseif ($site_width && $sidebar_1_width) {
         $columns = 2;
     }
     $gutter = 1 < $columns ? 80 : 0;
     // $extra_gutter = ( $columns - 1 ) * $gutter;
     $extra_gutter = $gutter;
     $sidebar_1_width = (int) $sidebar_1_width;
     $sidebar_2_width = (int) $sidebar_2_width;
     $content_width = $site_width - $sidebar_1_width - $sidebar_2_width - $extra_gutter;
     return $content_width;
 }
 /**
  * Runs when all steps have been completed.
  */
 public function finished()
 {
     // Make sure initial values are set without need to save
     $options = get_option(Avada::get_option_name(), array());
     update_option('avada_disable_builder', $options['disable_builder']);
     update_option('avada_disable_encoding', $options['disable_code_block_encoding']);
     // Reset the css
     update_option('avada_dynamic_css_posts', array());
     // update the 'avada_migrations' option
     $migration_run = get_option('avada_migrations', array());
     $migration_run[$this->version]['finished'] = true;
     unset($migration_run['copied']);
     update_option('avada_migrations', $migration_run);
 }
Exemple #13
0
/**
 * Background settings
 *
 * @var  array  	any existing settings
 * @return array 	existing sections + background
 *
 */
function avada_options_section_background($sections)
{
    $settings = get_option(Avada::get_option_name());
    $sections['background'] = array('label' => esc_html__('Background', 'Avada'), 'id' => 'heading_background', 'priority' => 11, 'icon' => 'el-icon-photo', 'fields' => array('main_content_bg_subsection' => array('label' => esc_html__('Main Content Background', 'Avada'), 'description' => '', 'id' => 'main_content_bg_subsection', 'icon' => true, 'type' => 'sub-section', 'fields' => array('content_bg_color' => array('label' => esc_html__('Main Content Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the main content area which is everything below header and above footer.', 'Avada'), 'id' => 'content_bg_color', 'default' => '#ffffff', 'type' => 'color-alpha'), 'content_bg_image' => array('label' => esc_html__('Background Image For Main Content Area', 'Avada'), 'description' => esc_html__('Select an image to use for the main content area background.', 'Avada'), 'id' => 'content_bg_image', 'default' => '', 'mod' => '', 'type' => 'media'), 'content_bg_full' => array('label' => esc_html__('100% Background Image', 'Avada'), 'description' => esc_html__('Turn on to have the main content background image display at 100% in width and height according to the window size.', 'Avada'), 'id' => 'content_bg_full', 'default' => '0', 'type' => 'switch', 'required' => array(array('setting' => 'content_bg_image', 'operator' => '!=', 'value' => ''), array('setting' => 'content_bg_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'content_bg_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')))), 'content_bg_repeat' => array('label' => esc_html__('Background Repeat', 'Avada'), 'description' => esc_html__('Controls how the background image repeats.', 'Avada'), 'id' => 'content_bg_repeat', 'default' => 'no-repeat', 'type' => 'select', 'choices' => array('repeat' => esc_html__('Repeat All', 'Avada'), 'repeat-x' => esc_html__('Repeat Horizontally', 'Avada'), 'repeat-y' => esc_html__('Repeat Vertically', 'Avada'), 'no-repeat' => esc_html__('No Repeat', 'Avada')), 'required' => array(array('setting' => 'content_bg_image', 'operator' => '!=', 'value' => ''), array('setting' => 'content_bg_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'content_bg_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')))))), 'boxed_mode_bg_subsection' => array('label' => esc_html__('Boxed Mode Background', 'Avada'), 'description' => '', 'id' => 'boxed_mode_bg_subsection', 'icon' => true, 'type' => 'sub-section', 'fields' => array('bg_image' => array('label' => esc_html__('Background Image For Outer Areas In Boxed Mode', 'Avada'), 'description' => esc_html__('Select an image to use for the outer background area in boxed mode.', 'Avada'), 'id' => 'bg_image', 'default' => '', 'mod' => '', 'type' => 'media'), 'bg_full' => array('label' => esc_html__('100% Background Image', 'Avada'), 'description' => esc_html__('Turn on to have the outer boxed background image display at 100% in width and height according to the window size.', 'Avada'), 'id' => 'bg_full', 'default' => '0', 'type' => 'switch', 'required' => array(array('setting' => 'bg_image', 'operator' => '!=', 'value' => ''), array('setting' => 'bg_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'bg_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')))), 'bg_repeat' => array('label' => esc_html__('Background Repeat', 'Avada'), 'description' => esc_html__('Controls how the background image repeats.', 'Avada'), 'id' => 'bg_repeat', 'default' => 'no-repeat', 'type' => 'select', 'choices' => array('repeat' => esc_html__('Repeat All', 'Avada'), 'repeat-x' => esc_html__('Repeat Horizontally', 'Avada'), 'repeat-y' => esc_html__('Repeat Vertically', 'Avada'), 'no-repeat' => esc_html__('No Repeat', 'Avada')), 'required' => array(array('setting' => 'bg_image', 'operator' => '!=', 'value' => ''), array('setting' => 'bg_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'bg_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')))), 'bg_color' => array('label' => esc_html__('Background Color For Outer Areas In Boxed Mode', 'Avada'), 'description' => esc_html__('Controls the background color of the outer background area in boxed mode.', 'Avada'), 'id' => 'bg_color', 'default' => '#d7d6d6', 'type' => 'color-alpha'), 'bg_pattern_option' => array('label' => esc_html__('Background Pattern', 'Avada'), 'description' => esc_html__('Turn on to display a pattern in the outer background area in boxed mode.', 'Avada'), 'id' => 'bg_pattern_option', 'default' => '0', 'type' => 'switch'), 'bg_pattern' => array('label' => esc_html__('Select a Background Pattern', 'Avada'), 'id' => 'bg_pattern', 'default' => 'pattern1', 'type' => 'radio-image', 'choices' => array('pattern1' => get_template_directory_uri() . '/assets/images/patterns/pattern1.png', 'pattern2' => get_template_directory_uri() . '/assets/images/patterns/pattern2.png', 'pattern3' => get_template_directory_uri() . '/assets/images/patterns/pattern3.png', 'pattern4' => get_template_directory_uri() . '/assets/images/patterns/pattern4.png', 'pattern5' => get_template_directory_uri() . '/assets/images/patterns/pattern5.png', 'pattern6' => get_template_directory_uri() . '/assets/images/patterns/pattern6.png', 'pattern7' => get_template_directory_uri() . '/assets/images/patterns/pattern7.png', 'pattern8' => get_template_directory_uri() . '/assets/images/patterns/pattern8.png', 'pattern9' => get_template_directory_uri() . '/assets/images/patterns/pattern9.png', 'pattern10' => get_template_directory_uri() . '/assets/images/patterns/pattern10.png', 'pattern11' => get_template_directory_uri() . '/assets/images/patterns/pattern11.png', 'pattern12' => get_template_directory_uri() . '/assets/images/patterns/pattern12.png', 'pattern13' => get_template_directory_uri() . '/assets/images/patterns/pattern13.png', 'pattern14' => get_template_directory_uri() . '/assets/images/patterns/pattern14.png', 'pattern15' => get_template_directory_uri() . '/assets/images/patterns/pattern15.png', 'pattern16' => get_template_directory_uri() . '/assets/images/patterns/pattern16.png', 'pattern17' => get_template_directory_uri() . '/assets/images/patterns/pattern17.png', 'pattern18' => get_template_directory_uri() . '/assets/images/patterns/pattern18.png', 'pattern19' => get_template_directory_uri() . '/assets/images/patterns/pattern19.png', 'pattern20' => get_template_directory_uri() . '/assets/images/patterns/pattern20.png', 'pattern21' => get_template_directory_uri() . '/assets/images/patterns/pattern21.png', 'pattern22' => get_template_directory_uri() . '/assets/images/patterns/pattern22.png'), 'required' => array(array('setting' => 'bg_pattern_option', 'operator' => '==', 'value' => '1')))))));
    return $sections;
}
 /**
  * Actions to run on initial theme activation
  *
  * @since 3.8.0
  */
 public function admin_init()
 {
     if (current_user_can('edit_theme_options')) {
         // Save avada key in a different location
         $avada_key = get_option('Avada_Key');
         if (!is_array($avada_key) && empty($avada_key)) {
             $avada_options = get_option(Avada::get_option_name());
             $tf_username = isset($avada_options['tf_username']) ? $avada_options['tf_username'] : '';
             $tf_api = isset($avada_options['tf_api']) ? $avada_options['tf_api'] : '';
             $tf_purchase_code = isset($avada_options['tf_purchase_code']) ? $avada_options['tf_purchase_code'] : '';
             if ($tf_username && $tf_api && $tf_purchase_code) {
                 update_option('Avada_Key', array('tf_username' => $tf_username, 'tf_api' => $tf_api, 'tf_purchase_code' => $tf_purchase_code));
             }
         }
         if (isset($_GET['avada-deactivate']) && 'deactivate-plugin' == $_GET['avada-deactivate']) {
             check_admin_referer('avada-deactivate', 'avada-deactivate-nonce');
             $plugins = TGM_Plugin_Activation::$instance->plugins;
             foreach ($plugins as $plugin) {
                 if ($plugin['slug'] == $_GET['plugin']) {
                     deactivate_plugins($plugin['file_path']);
                 }
             }
         }
         if (isset($_GET['avada-activate']) && 'activate-plugin' == $_GET['avada-activate']) {
             check_admin_referer('avada-activate', 'avada-activate-nonce');
             $plugins = TGM_Plugin_Activation::$instance->plugins;
             foreach ($plugins as $plugin) {
                 if (isset($_GET['plugin']) && $plugin['slug'] == $_GET['plugin']) {
                     activate_plugin($plugin['file_path']);
                     wp_redirect(admin_url('admin.php?page=avada-plugins'));
                     exit;
                 }
             }
         }
     }
 }
Exemple #15
0
/**
 * Layout
 *
 * @var  array  	any existing settings
 * @return array 	existing sections + layout
 *
 */
function avada_options_section_layout($sections)
{
    $settings = get_option(Avada::get_option_name(), array());
    $sections['layout'] = array('label' => esc_html__('Layout', 'Avada'), 'id' => 'heading_layout', 'priority' => 1, 'icon' => 'el-icon-website', 'fields' => array('layout' => array('label' => esc_html__('Layout', 'Avada'), 'description' => esc_html__('Controls the site layout.', 'Avada'), 'id' => 'layout', 'default' => 'Wide', 'type' => 'radio-buttonset', 'choices' => array('Boxed' => esc_html__('Boxed', 'Avada'), 'Wide' => esc_html__('Wide', 'Avada'))), 'site_width' => array('label' => esc_html__('Site Width', 'Avada'), 'description' => esc_html__('Controls the overall site width.', 'Avada'), 'id' => 'site_width', 'default' => '1100px', 'type' => 'dimension', 'choices' => array('px', '%'), 'transport' => 'postMessage'), 'main_padding' => array('label' => esc_html__('Page Content Padding', 'Avada'), 'description' => esc_html__('Controls the top/bottom padding for page content.', 'Avada'), 'id' => 'main_padding', 'choices' => array('top' => true, 'bottom' => true, 'units' => array('px', '%')), 'default' => array('top' => '55px', 'bottom' => '40px'), 'type' => 'spacing'), 'hundredp_padding' => array('label' => esc_html__('100% Width Left/Right Padding', 'Avada'), 'description' => esc_html__('Controls the left/right padding for page content when using 100% site width or 100% width page template.', 'Avada'), 'id' => 'hundredp_padding', 'default' => '30px', 'type' => 'dimension', 'choices' => array('px', '%')), 'col_margin' => array('label' => esc_html__('Column Margins', 'Avada'), 'description' => esc_html__('Controls the top/bottom margins for all column sizes.', 'Avada'), 'id' => 'col_margin', 'type' => 'spacing', 'choices' => array('top' => true, 'bottom' => true, 'units' => array('px', '%')), 'default' => array('top' => '0px', 'bottom' => '20px')), 'single_sidebar_layouts_info' => array('label' => esc_html__('Single Sidebar Layouts', 'Avada'), 'description' => '', 'id' => 'single_sidebar_layouts_info', 'type' => 'info'), 'sidebar_width' => array('label' => esc_html__('Single Sidebar Width', 'Avada'), 'description' => esc_html__('Controls the width of the sidebar when only one sidebar is present.', 'Avada'), 'id' => 'sidebar_width', 'default' => '23%', 'type' => 'dimension', 'choices' => array('px', '%')), 'dual_sidebar_layouts_info' => array('label' => esc_html__('Dual Sidebar Layouts', 'Avada'), 'description' => '', 'id' => 'dual_sidebar_layouts_info', 'type' => 'info'), 'sidebar_2_1_width' => array('label' => esc_html__('Dual Sidebar Width 1', 'Avada'), 'description' => esc_html__('Controls the width of sidebar 1 when dual sidebars are present.', 'Avada'), 'id' => 'sidebar_2_1_width', 'default' => '21%', 'type' => 'dimension', 'choices' => array('px', '%')), 'sidebar_2_2_width' => array('label' => esc_html__('Dual Sidebar Width 2', 'Avada'), 'description' => esc_html__('Controls the width of sidebar 2 when dual sidebars are present.', 'Avada'), 'id' => 'sidebar_2_2_width', 'default' => '21%', 'type' => 'dimension', 'choices' => array('px', '%')), 'ec_sidebar_layouts_info' => Avada::$is_updating || class_exists('Tribe__Events__Main') ? array('label' => esc_html__('Events Calendar Single Sidebar Layout', 'Avada'), 'description' => '', 'id' => 'ec_sidebar_layouts_info', 'type' => 'info') : array(), 'ec_sidebar_width' => Avada::$is_updating || class_exists('Tribe__Events__Main') ? array('label' => esc_html__('Events Calendar Single Sidebar Width', 'Avada'), 'description' => esc_html__('Controls the width of the sidebar when only one sidebar is present.', 'Avada'), 'id' => 'ec_sidebar_width', 'default' => '32%', 'type' => 'dimension', 'choices' => array('px', '%')) : array(), 'ec_dual_sidebar_layouts_info' => Avada::$is_updating || class_exists('Tribe__Events__Main') ? array('label' => esc_html__('Events Calendar Dual Sidebar Layout', 'Avada'), 'description' => '', 'id' => 'ec_dual_sidebar_layouts_info', 'type' => 'info') : array(), 'ec_sidebar_2_1_width' => Avada::$is_updating || class_exists('Tribe__Events__Main') ? array('label' => esc_html__('Events Calendar Dual Sidebar Width 1', 'Avada'), 'description' => esc_html__('Controls the width of sidebar 1 when dual sidebars are present.', 'Avada'), 'id' => 'ec_sidebar_2_1_width', 'default' => '21%', 'type' => 'dimension', 'choices' => array('px', '%')) : array(), 'ec_sidebar_2_2_width' => Avada::$is_updating || class_exists('Tribe__Events__Main') ? array('label' => esc_html__('Events Calendar Dual Sidebar Width 2', 'Avada'), 'description' => esc_html__('Controls the width of sidebar 2 when dual sidebars are present.', 'Avada'), 'id' => 'ec_sidebar_2_2_width', 'default' => '21%', 'type' => 'dimension', 'choices' => array('px', '%')) : array()));
    return $sections;
}
Exemple #16
0
/**
 * Menu
 *
 * @var  array  	any existing settings
 * @return array 	existing sections + menu
 *
 */
function avada_options_section_menu($sections)
{
    $settings = get_option(Avada::get_option_name(), array());
    $sections['menu'] = array('label' => esc_html__('Menu', 'Avada'), 'id' => 'heading_menu_section', 'priority' => 1, 'icon' => 'el-icon-lines', 'fields' => array('heading_menu' => array('label' => esc_html__('Main Menu', 'Avada'), 'id' => 'heading_menu', 'priority' => 6, 'type' => 'sub-section', 'fields' => array('nav_height' => array('label' => esc_html__('Main Menu Height', 'Avada'), 'description' => esc_html__('Controls the menu height.', 'Avada'), 'id' => 'nav_height', 'default' => '83', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '300', 'step' => '1'), 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'nav_highlight_border' => array('label' => esc_html__('Main Menu Highlight Bar Size', 'Avada'), 'description' => esc_html__('Controls the size of the menu highlight bar.', 'Avada'), 'id' => 'nav_highlight_border', 'default' => '3', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '20', 'step' => '1')), 'nav_padding' => array('label' => esc_html__('Main Menu Item Padding', 'Avada'), 'description' => esc_html__('Controls the right padding for menu text (left on RTL).', 'Avada'), 'id' => 'nav_padding', 'default' => '45', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '200', 'step' => '1'), 'required' => array(array('setting' => 'header_position', 'operator' => '==', 'value' => 'Top'))), 'megamenu_shadow' => array('label' => esc_html__('Main Menu Drop Shadow', 'Avada'), 'description' => esc_html__('Turn on to display a drop shadow on menu dropdowns.', 'Avada'), 'id' => 'megamenu_shadow', 'default' => '1', 'type' => 'switch', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'dropdown_menu_width' => array('label' => esc_html__('Main Menu Dropdown Width', 'Avada'), 'description' => esc_html__('Controls the width of the dropdown.', 'Avada'), 'id' => 'dropdown_menu_width', 'default' => '180', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '500', 'step' => '1'), 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mainmenu_dropdown_vertical_padding' => array('label' => esc_html__('Main Menu Dropdown Item Padding', 'Avada'), 'description' => esc_html__('Controls the top/bottom padding for dropdown menu items.', 'Avada'), 'id' => 'mainmenu_dropdown_vertical_padding', 'default' => '7', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '50', 'step' => '1'), 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mainmenu_dropdown_display_divider' => array('label' => esc_html__('Main Menu Dropdown Divider', 'Avada'), 'description' => esc_html__('Turn on to display a divider line on dropdown menu items.', 'Avada'), 'id' => 'mainmenu_dropdown_display_divider', 'default' => '1', 'type' => 'switch', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'menu_display_dropdown_indicator' => array('label' => esc_html__('Main Menu Dropdown Indicator', 'Avada'), 'description' => esc_html__('Turn on to display arrow indicators next to parent level menu items.', 'Avada'), 'id' => 'menu_display_dropdown_indicator', 'default' => '0', 'type' => 'switch', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'main_nav_search_icon' => array('label' => esc_html__('Main Menu Search Icon', 'Avada'), 'description' => esc_html__('Turn on to display the search icon in the main menu.', 'Avada'), 'id' => 'main_nav_search_icon', 'default' => '1', 'type' => 'switch'), 'main_nav_icon_circle' => array('label' => esc_html__('Main Menu Icon Circle Borders', 'Avada'), 'description' => esc_html__('Turn on to display a circle border on the cart and search icons.', 'Avada'), 'id' => 'main_nav_icon_circle', 'default' => '0', 'type' => 'switch'), 'menu_sub_bg_color' => array('label' => esc_html__('Main Menu Dropdown Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the main menu dropdown.', 'Avada'), 'id' => 'menu_sub_bg_color', 'default' => '#f2efef', 'type' => 'color-alpha', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'menu_bg_hover_color' => array('label' => esc_html__('Main Menu Dropdown Background Hover Color', 'Avada'), 'description' => esc_html__('Controls the background hover color of the main menu dropdown.', 'Avada'), 'id' => 'menu_bg_hover_color', 'default' => '#f8f8f8', 'type' => 'color-alpha', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'menu_sub_sep_color' => array('label' => esc_html__('Main Menu Dropdown Separator Color', 'Avada'), 'description' => esc_html__('Controls the color of the separators in the main menu dropdown.', 'Avada'), 'id' => 'menu_sub_sep_color', 'default' => '#dcdadb', 'type' => 'color-alpha', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'menu_h45_bg_color' => array('label' => esc_html__('Main Menu Background Color For Header 4 & 5', 'Avada'), 'description' => esc_html__('Controls the background color of the main menu when using header 4 or 5.', 'Avada'), 'id' => 'menu_h45_bg_color', 'default' => '#ffffff', 'type' => 'color-alpha', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_layout', 'operator' => '==', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '==', 'value' => 'v5'))), 'main_menu_typography_info' => array('label' => esc_html__('Main Menu Typography', 'Avada'), 'description' => '', 'id' => 'main_menu_typography_info', 'type' => 'info'), 'nav_typography' => array('id' => 'nav_typography', 'label' => esc_html__('Menus Typography', 'Avada'), 'description' => esc_html__('These settings control the typography for all menus.', 'Avada'), 'type' => 'typography', 'class' => 'avada-no-fontsize', 'choices' => array('font-family' => true, 'font-weight' => true, 'letter-spacing' => true), 'default' => array('font-family' => 'Antic Slab', 'font-weight' => '400', 'letter-spacing' => '0')), 'nav_font_size' => array('label' => esc_html__('Main Menu Font Size', 'Avada'), 'description' => esc_html__('Controls the font size for main menu text.', 'Avada'), 'id' => 'nav_font_size', 'default' => '14px', 'type' => 'dimension', 'choices' => array('units' => array('px', 'em'))), 'nav_dropdown_font_size' => array('label' => esc_html__('Main Menu Dropdown Font Size', 'Avada'), 'description' => esc_html__('Controls the font size for main menu dropdown text.', 'Avada'), 'id' => 'nav_dropdown_font_size', 'default' => '13px', 'type' => 'dimension', 'choices' => array('units' => array('px', 'em')), 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'side_nav_font_size' => array('label' => esc_html__('Side Navigation Font Size', 'Avada'), 'description' => esc_html__('Controls the font size for the menu text when using the side navigation page template.', 'Avada'), 'id' => 'side_nav_font_size', 'default' => '14px', 'type' => 'dimension', 'choices' => array('units' => array('px', 'em'))), 'menu_text_align' => array('label' => esc_html__('Main Menu Text Align', 'Avada'), 'description' => esc_html__('Controls the main menu text alignment for top headers 4-5 and side headers.', 'Avada'), 'id' => 'menu_text_align', 'default' => 'center', 'choices' => array('left' => esc_html__('Left', 'Avada'), 'center' => esc_html__('Center', 'Avada'), 'right' => esc_html__('Right', 'Avada')), 'type' => 'radio-buttonset', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_layout', 'operator' => '==', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '==', 'value' => 'v5'), array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'))), 'menu_first_color' => array('label' => esc_html__('Main Menu Font Color', 'Avada'), 'description' => esc_html__('Controls the color for main menu text.', 'Avada'), 'id' => 'menu_first_color', 'default' => '#333333', 'type' => 'color'), 'menu_hover_first_color' => array('label' => esc_html__('Main Menu Font Hover Color', 'Avada'), 'description' => esc_html__('Controls the color for main menu text hover, highlight bar and dropdown border.', 'Avada'), 'id' => 'menu_hover_first_color', 'default' => '#a0ce4e', 'type' => 'color'), 'menu_sub_color' => array('label' => esc_html__('Main Menu Dropdown Font Color', 'Avada'), 'description' => esc_html__('Controls the color for main menu dropdown text.', 'Avada'), 'id' => 'menu_sub_color', 'default' => '#333333', 'type' => 'color', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))))), 'flyout_menu_subsection' => array('label' => esc_html__('Flyout Menu', 'Avada'), 'id' => 'flyout_menu_subsection', 'type' => 'sub-section', 'fields' => array('flyout_menu_important_note_info' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong>  Flyout Menu Options are only available when using Header Layout #6. Your current Header Layout does not utilize the flyout menu.', 'Avada') . '</div>', 'id' => 'flyout_menu_important_note_info', 'type' => 'custom', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'flyout_menu_icon_font_size' => array('label' => esc_html__('Flyout Menu Icon Font Size', 'Avada'), 'description' => esc_html__('Controls the font size for the flyout menu icons.', 'Avada'), 'id' => 'flyout_menu_icon_font_size', 'default' => '20px', 'type' => 'dimension', 'choices' => array('units' => array('px', 'em')), 'required' => array(array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v6'), array('setting' => 'header_position', 'operator' => '=', 'value' => 'Top'))), 'flyout_menu_icon_color' => array('label' => esc_html__('Flyout Menu Icon Color', 'Avada'), 'description' => esc_html__('Controls the color of the flyout menu icons.', 'Avada'), 'id' => 'flyout_menu_icon_color', 'default' => '#333333', 'type' => 'color', 'required' => array(array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v6'), array('setting' => 'header_position', 'operator' => '=', 'value' => 'Top'))), 'flyout_menu_icon_hover_color' => array('label' => esc_html__('Flyout Menu Icon Hover Color', 'Avada'), 'description' => esc_html__('Controls the hover color of the flyout menu icons.', 'Avada'), 'id' => 'flyout_menu_icon_hover_color', 'default' => '#a0ce4e', 'type' => 'color', 'required' => array(array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v6'), array('setting' => 'header_position', 'operator' => '=', 'value' => 'Top'))), 'flyout_menu_background_color' => array('label' => esc_html__('Flyout Menu Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the flyout menu', 'Avada'), 'id' => 'flyout_menu_background_color', 'default' => 'rgba(255,255,255,0.95)', 'type' => 'color-alpha', 'required' => array(array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v6'), array('setting' => 'header_position', 'operator' => '=', 'value' => 'Top'))), 'flyout_menu_direction' => array('label' => esc_html__('Flyout Menu Direction', 'Avada'), 'description' => esc_html__('Controls the direction the flyout menu starts from.', 'Avada'), 'id' => 'flyout_menu_direction', 'default' => 'fade', 'type' => 'select', 'choices' => array('fade' => esc_html__('Fade', 'Avada'), 'left' => esc_html__('Left', 'Avada'), 'right' => esc_html__('Right', 'Avada'), 'bottom' => esc_html__('Bottom', 'Avada'), 'top' => esc_html__('Top', 'Avada')), 'required' => array(array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v6'), array('setting' => 'header_position', 'operator' => '=', 'value' => 'Top'))))), 'heading_secondary_top_menu' => array('label' => esc_html__('Secondary Top Menu', 'Avada'), 'id' => 'heading_secondary_top_menu', 'priority' => 6, 'type' => 'sub-section', 'fields' => array('no_secondary_menu_note' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> Secondary Top Menu Options are only available when using Header Layouts #2-5. Your current Header Layout does not utilize the secondary top menu.', 'Avada') . '</div>', 'id' => 'no_secondary_menu_note', 'type' => 'custom', 'required' => array(array('setting' => 'header_position', 'operator' => '==', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v5'))), 'topmenu_dropwdown_width' => array('label' => esc_html__('Secondary Menu Dropdown Width', 'Avada'), 'description' => esc_html__('Controls the width of the secondary menu dropdown.', 'Avada'), 'id' => 'topmenu_dropwdown_width', 'default' => '180', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '500', 'step' => '1'), 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'header_top_first_border_color' => array('label' => esc_html__('Secondary Menu Divider Color', 'Avada'), 'description' => esc_html__('Controls the divider color of the first level secondary menu.', 'Avada'), 'id' => 'header_top_first_border_color', 'default' => '#e5e5e5', 'type' => 'color-alpha', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'header_top_sub_bg_color' => array('label' => esc_html__('Secondary Menu Dropdown Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the secondary menu dropdown.', 'Avada'), 'id' => 'header_top_sub_bg_color', 'default' => '#ffffff', 'type' => 'color-alpha', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'header_top_menu_bg_hover_color' => array('label' => esc_html__('Secondary Menu Dropdown Background Hover Color', 'Avada'), 'description' => esc_html__('Controls the background hover color of the secondary menu dropdown.', 'Avada'), 'id' => 'header_top_menu_bg_hover_color', 'default' => '#fafafa', 'type' => 'color-alpha', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'header_top_menu_sub_sep_color' => array('label' => esc_html__('Secondary Menu Dropdown Separator Color', 'Avada'), 'description' => esc_html__('Controls the color of the separators in the secondary menu dropdown.', 'Avada'), 'id' => 'header_top_menu_sub_sep_color', 'default' => '#e5e5e5', 'type' => 'color-alpha', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'secondary_menu_typography_info' => array('label' => '', 'description' => esc_html__('Secondary Top Menu Typography', 'Avada'), 'id' => 'secondary_menu_typography_info', 'type' => 'custom', 'style' => 'heading', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'snav_font_size' => array('label' => esc_html__('Secondary Menu Font Size', 'Avada'), 'description' => esc_html__('Controls the font size for secondary menu text.', 'Avada'), 'id' => 'snav_font_size', 'default' => '12px', 'type' => 'dimension', 'choices' => array('units' => array('px', 'em')), 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'sec_menu_lh' => array('label' => esc_html__('Secondary Menu Line Height', 'Avada'), 'description' => esc_html__('Controls the line height for secondary menu.', 'Avada'), 'id' => 'sec_menu_lh', 'default' => '44px', 'type' => 'dimension', 'choices' => array('units' => array('px', 'em')), 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'snav_color' => array('label' => esc_html__('Secondary Menu Font Color', 'Avada'), 'description' => esc_html__('Controls the color for secondary menu text.', 'Avada'), 'id' => 'snav_color', 'default' => '#747474', 'type' => 'color', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'header_top_menu_sub_color' => array('label' => esc_html__('Secondary Menu Dropdown Font Color', 'Avada'), 'description' => esc_html__('Controls the color for secondary menu dropdown text.', 'Avada'), 'id' => 'header_top_menu_sub_color', 'default' => '#747474', 'type' => 'color', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))), 'header_top_menu_sub_hover_color' => array('label' => esc_html__('Secondary Menu Dropdown Font Hover Color', 'Avada'), 'description' => esc_html__('Controls the hover color for secondary menu dropdown text.', 'Avada'), 'id' => 'header_top_menu_sub_hover_color', 'default' => '#333333', 'type' => 'color', 'class' => 'avada-or-gutter', 'required' => array(array('setting' => 'header_position', 'operator' => '!=', 'value' => 'Top'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v2'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v3'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v4'), array('setting' => 'header_layout', 'operator' => '=', 'value' => 'v5'))))), 'heading_mobile_menu' => array('label' => esc_html__('Mobile Menu', 'Avada'), 'id' => 'heading_mobile_menu', 'priority' => 6, 'type' => 'sub-section', 'fields' => array('no_responsive_mode_info_1' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> Please enable responsive mode. Mobile menus are only available when you\'re using the responsive mode. To enable it please go to the "Responsive" section and set the "Responsive Design" option to ON.', 'Avada') . '</div>', 'id' => 'no_responsive_mode_info_1', 'type' => 'custom', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '0'))), 'no_mobile_menu_note' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> "Mobile Header Background Color" is the only option available for your Header Layout #6, the other options are only available when using Header Layouts #1-5. The rest of the options for Header #6 are on the Flyout Menu and Main Menu tab. ', 'Avada') . '</div>', 'id' => 'no_mobile_menu_note', 'type' => 'custom', 'required' => array(array('setting' => 'header_layout', 'operator' => '==', 'value' => 'v6'))), 'mobile_menu_design' => array('label' => esc_html__('Mobile Menu Design Style', 'Avada'), 'description' => esc_html__('Controls the design of the mobile menu. ', 'Avada'), 'id' => 'mobile_menu_design', 'default' => 'modern', 'type' => 'radio-buttonset', 'choices' => array('classic' => esc_html__('Classic', 'Avada'), 'modern' => esc_html__('Modern', 'Avada')), 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_nav_padding' => array('label' => esc_html__('Mobile Menu Item Padding', 'Avada'), 'description' => esc_html__('Controls the right padding for mobile menu text (left on RTL) when the normal desktop menu is used on mobile devices.', 'Avada'), 'id' => 'mobile_nav_padding', 'default' => '25', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '200', 'step' => '1'), 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_menu_icons_top_margin' => array('label' => esc_html__('Mobile Menu Icons Top Margin', 'Avada'), 'description' => esc_html__('Controls the top margin for the icons in the modern mobile menu design.', 'Avada'), 'id' => 'mobile_menu_icons_top_margin', 'default' => '0', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '200', 'step' => '1'), 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'mobile_menu_design', 'operator' => '==', 'value' => 'modern'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_menu_nav_height' => array('label' => esc_html__('Mobile Menu Dropdown Item Height', 'Avada'), 'description' => esc_html__('Controls the height of each dropdown menu item.', 'Avada'), 'id' => 'mobile_menu_nav_height', 'default' => '35', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '200', 'step' => '1'), 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_nav_submenu_slideout' => array('label' => esc_html__('Mobile Menu Dropdown Slide Outs', 'Avada'), 'description' => esc_html__('Turn on to allow dropdown sections to slide out when tapped.', 'Avada'), 'id' => 'mobile_nav_submenu_slideout', 'default' => '1', 'type' => 'switch', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_header_bg_color' => array('label' => esc_html__('Mobile Header Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the header on mobile devices.', 'Avada'), 'id' => 'mobile_header_bg_color', 'default' => '#ffffff', 'type' => 'color-alpha', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'))), 'mobile_menu_background_color' => array('label' => esc_html__('Mobile Menu Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the mobile menu dropdown and classic mobile menu box.', 'Avada'), 'id' => 'mobile_menu_background_color', 'default' => '#f9f9f9', 'type' => 'color-alpha', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_menu_hover_color' => array('label' => esc_html__('Mobile Menu Background Hover Color', 'Avada'), 'description' => esc_html__('Controls the background hover color of the mobile menu dropdown.', 'Avada'), 'id' => 'mobile_menu_hover_color', 'default' => '#f6f6f6', 'type' => 'color-alpha', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_menu_border_color' => array('label' => esc_html__('Mobile Menu Border Color', 'Avada'), 'description' => esc_html__('Controls the border and divider colors of the mobile menu dropdown and classic mobile menu box.', 'Avada'), 'id' => 'mobile_menu_border_color', 'default' => '#dadada', 'type' => 'color-alpha', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_menu_toggle_color' => array('label' => esc_html__('Mobile Menu Toggle Color', 'Avada'), 'description' => esc_html__('Controls the color of the mobile menu toggle icon.', 'Avada'), 'id' => 'mobile_menu_toggle_color', 'default' => isset($settings['mobile_menu_border_color']) ? $settings['mobile_menu_border_color'] : '#dadada', 'type' => 'color-alpha', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_menu_typography_info' => array('label' => esc_html__('Mobile Menu Typography', 'Avada'), 'description' => '', 'id' => 'mobile_menu_typography_info', 'type' => 'info', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_menu_font_size' => array('label' => esc_html__('Mobile Menu Font Size', 'Avada'), 'description' => esc_html__('Controls the font size for mobile menu text.', 'Avada'), 'id' => 'mobile_menu_font_size', 'default' => '12px', 'type' => 'dimension', 'choices' => array('units' => array('px', 'em')), 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_menu_text_align' => array('label' => esc_html__('Mobile Menu Text Align', 'Avada'), 'description' => esc_html__('Controls the mobile menu text alignment.', 'Avada'), 'id' => 'mobile_menu_text_align', 'default' => 'left', 'choices' => array('left' => esc_html__('Left', 'Avada'), 'center' => esc_html__('Center', 'Avada'), 'right' => esc_html__('Right', 'Avada')), 'type' => 'radio-buttonset', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))), 'mobile_menu_font_color' => array('label' => esc_html__('Mobile Menu Font Color', 'Avada'), 'description' => esc_html__('Controls the text color of mobile menu text.', 'Avada'), 'id' => 'mobile_menu_font_color', 'default' => '#333333', 'type' => 'color', 'required' => array(array('setting' => 'responsive', 'operator' => '==', 'value' => '1'), array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'))))), 'mega_menu_subsection' => array('label' => esc_html__('Mega Menu', 'Avada'), 'id' => 'mega_menu_subsection', 'type' => 'sub-section', 'fields' => array('header_v6_used_note' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> Mega Menu Options are only available when using Header Layouts #1-5. Your current Header Layout #6 does not utilize the mega menu.', 'Avada') . '</div>', 'id' => 'header_v6_used_note', 'type' => 'custom', 'required' => array(array('setting' => 'header_layout', 'operator' => '==', 'value' => 'v6'))), 'megamenu_disabled_note' => array('label' => '', 'description' => '<div class="avada-avadaredux-important-notice">' . __('<strong>IMPORTANT NOTE:</strong> Mega Menu is disabled in Advanced > Theme Features section. Please enable it to see the options.', 'Avada') . '</div>', 'id' => 'megamenu_disabled_note', 'type' => 'custom', 'required' => array(array('setting' => 'disable_megamenu', 'operator' => '=', 'value' => '0'))), 'megamenu_max_width' => array('label' => esc_html__('Mega Menu Max-Width', 'Avada'), 'description' => esc_html__('Controls the max width of the mega menu.', 'Avada'), 'id' => 'megamenu_max_width', 'default' => '1100', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '4096', 'step' => '1'), 'required' => array(array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'), array('setting' => 'disable_megamenu', 'operator' => '=', 'value' => '1'))), 'megamenu_title_size' => array('label' => esc_html__('Mega Menu Column Title Size', 'Avada'), 'description' => esc_html__('Controls the font size for mega menu column titles.', 'Avada'), 'id' => 'megamenu_title_size', 'default' => '18px', 'type' => 'dimension', 'required' => array(array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'), array('setting' => 'disable_megamenu', 'operator' => '=', 'value' => '1'))), 'megamenu_item_vertical_padding' => array('label' => esc_html__('Mega Menu Dropdown Item Padding', 'Avada'), 'description' => esc_html__('Controls the font size for mega menu column titles.', 'Avada'), 'id' => 'megamenu_item_vertical_padding', 'default' => '5', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '50', 'step' => '1'), 'required' => array(array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'), array('setting' => 'disable_megamenu', 'operator' => '=', 'value' => '1'))), 'megamenu_item_display_divider' => array('label' => esc_html__('Mega Menu Item Divider', 'Avada'), 'description' => esc_html__('Turn on to display a divider between mega menu dropdown items.', 'Avada'), 'id' => 'megamenu_item_display_divider', 'default' => '0', 'type' => 'switch', 'required' => array(array('setting' => 'header_layout', 'operator' => '!=', 'value' => 'v6'), array('setting' => 'disable_megamenu', 'operator' => '=', 'value' => '1')))))));
    return $sections;
}
Exemple #17
0
/**
 * Compatibility tweak:
 * We were previously using SMOF.
 * Some plugins use $smof_data to get the Avada options
 * so we'll be re-creating it here for the sake of those plugins.
 */
function avada_smof_compatibility()
{
    $options = get_option(Avada::get_option_name(), array());
    $fields = Avada_Options::get_option_fields();
    foreach ($fields as $field_id => $field_args) {
        if (!isset($options[$field_id])) {
            if (isset($field_args['default'])) {
                $options[$field_id] = $field_args['default'];
            }
        }
        if (isset($options[$field_id]) && is_array($options[$field_id])) {
            if (isset($field_args['default']) && is_array($field_args['default'])) {
                foreach ($field_args['default'] as $key => $value) {
                    if (!isset($options[$field_id][$key])) {
                        if ('top' == $key && !isset($options[$field_id]['top'])) {
                            if (isset($options[$field_id]['margin-top'])) {
                                $options[$field_id]['top'] = $options[$field_id]['margin-top'];
                            } elseif (isset($options[$field_id]['padding-top'])) {
                                $options[$field_id]['top'] = $options[$field_id]['padding-top'];
                            } elseif (isset($options[$field_id]['top'])) {
                                $options[$field_id]['top'] = $field_args['default']['top'];
                            } else {
                                $options[$field_id]['top'] = Avada()->settings->get($field_id, 'top');
                            }
                        } elseif ('bottom' == $key) {
                            if (isset($options[$field_id]['margin-bottom'])) {
                                $options[$field_id]['bottom'] = $options[$field_id]['margin-bottom'];
                            } elseif (isset($options[$field_id]['padding-bottom'])) {
                                $options[$field_id]['bottom'] = $options[$field_id]['padding-bottom'];
                            } elseif (isset($options[$field_id]['bottom'])) {
                                $options[$field_id]['bottom'] = $field_args['default']['bottom'];
                            } else {
                                $options[$field_id]['bottom'] = Avada()->settings->get($field_id, 'bottom');
                            }
                        } else {
                            if (!isset($options[$field_id][$key])) {
                                $options[$field_id][$key] = $field_args['default'][$key];
                            }
                        }
                    }
                }
            }
            if ('color-alpha' == $field_args['type']) {
                if (isset($options[$field_id]) && !empty($options[$field_id])) {
                    if (is_array($options[$field_id])) {
                        if (isset($options[$field_id]['rgba']) && !empty($options[$field_id]['rgba'])) {
                            $options[$field_id] = $options[$field_id]['rgba'];
                        } elseif (isset($options[$field_id]['color']) && !empty($options[$field_id]['rgba'])) {
                            $options[$field_id] = $options[$field_id]['color'];
                        }
                    }
                } else {
                    if (isset($field_args['default'])) {
                        if (is_array($field_args['default'])) {
                            if (isset($field_args['default']['rgba']) && !empty($field_args['default']['rgba'])) {
                                $options[$field_id] = $field_args['default']['rgba'];
                            } elseif (isset($field_args['default']['color']) && !empty($field_args['default']['color'])) {
                                $options[$field_id] = $field_args['default']['color'];
                            }
                        } else {
                            $options[$field_id] = $field_args['default'];
                        }
                    }
                }
                if (!empty($options[$field_id])) {
                    $options[$field_id] = Avada_Sanitize::color($options[$field_id]);
                }
            }
        }
    }
    return $options;
}
 private function localizeStdFonts()
 {
     if (false == $this->user_fonts) {
         if (isset($this->parent->fonts['std']) && !empty($this->parent->fonts['std'])) {
             return;
         }
         $this->parent->font_groups['std'] = array('text' => __('Standard Fonts', 'avadaredux-framework'), 'children' => array());
         foreach ($this->field['fonts'] as $font => $extra) {
             $this->parent->font_groups['std']['children'][] = array('id' => $font, 'text' => $font, 'data-google' => 'false');
         }
     }
     // Get Custom fonts
     $options = get_option(Avada::get_option_name(), array());
     if (isset($options['custom_fonts'])) {
         $custom_fonts = $options['custom_fonts'];
         // Check if there's at least one custom font set
         if (isset($custom_fonts['name']) && is_array($custom_fonts['name']) && !empty($custom_fonts['name'][0])) {
             // Add Custom Fonts group
             $this->parent->font_groups['customfonts'] = array('text' => __('Custom Fonts', 'avadaredux-framework'), 'children' => array());
             // Add custom fonts
             foreach ($custom_fonts['name'] as $key => $label) {
                 $this->parent->font_groups['customfonts']['children'][] = array('id' => esc_attr($label), 'text' => esc_attr($label), 'data-google' => 'false');
             }
         }
     }
 }
Exemple #19
0
/**
 * Footer settings
 *
 * @var  array  	any existing settings
 * @return array 	existing sections + footer
 *
 */
function avada_options_section_footer($sections)
{
    $settings = get_option(Avada::get_option_name(), array());
    $sections['footer'] = array('label' => esc_html__('Footer', 'Avada'), 'id' => 'heading_footer', 'priority' => 9, 'icon' => 'el-icon-arrow-down', 'class' => 'hidden-section-heading', 'fields' => array('footer_content_options_subsection' => array('label' => esc_html__('Footer Content', 'Avada'), 'id' => 'footer_content_options_subsection', 'icon' => true, 'type' => 'sub-section', 'fields' => array('footer_widgets' => array('label' => esc_html__('Footer Widgets', 'Avada'), 'description' => esc_html__('Turn on to display footer widgets.', 'Avada'), 'id' => 'footer_widgets', 'default' => '1', 'type' => 'switch'), 'footer_widgets_columns' => array('label' => esc_html__('Number of Footer Columns', 'Avada'), 'description' => esc_html__('Controls the number of columns in the footer.', 'Avada'), 'id' => 'footer_widgets_columns', 'default' => '4', 'choices' => array('min' => '1', 'max' => '6', 'step' => '1'), 'type' => 'slider', 'required' => array(array('setting' => 'footer_widgets', 'operator' => '==', 'value' => '1'))), 'footer_widgets_center_content' => array('label' => esc_html__('Center Footer Widgets Content', 'Avada'), 'description' => esc_html__('Turn on to center the footer widget content.', 'Avada'), 'id' => 'footer_widgets_center_content', 'default' => '0', 'type' => 'switch', 'required' => array(array('setting' => 'footer_widgets', 'operator' => '==', 'value' => '1'))), 'footer_special_effects' => array('label' => 'Footer Special Effects', 'description' => esc_html__('Select a special effect for the footer area.', 'Avada'), 'id' => 'footer_special_effects', 'default' => 'none', 'type' => 'radio', 'choices' => array('none' => esc_html__('None', 'Avada'), 'footer_parallax_effect' => array(esc_html__('Footer Parallax Effect', 'Avada'), esc_html__('This enables a fixed footer with parallax scrolling effect.', 'Avada')), 'footer_area_bg_parallax' => array(esc_html__('Parallax Background Image', 'Avada'), esc_html__('This enables a parallax effect on the background image selected in "Background Image For Footer Widget Area" field.', 'Avada')), 'footer_sticky' => array(esc_html__('Sticky Footer', 'Avada'), esc_html__('This enables a sticky footer. The entire footer area will always be "below the fold". On very short pages, it makes sure that the footer sticks at the bottom, just above the fold. IMPORTANT: "Sticky Footer Height" field must be filled in.', 'Avada')), 'footer_sticky_with_parallax_bg_image' => array(esc_html__('Sticky Footer and Parallax Background Image', 'Avada'), esc_html__('This enables a sticky footer together with a parallax effect on the background image. The entire footer area will always be "below the fold". IMPORTANT: "Sticky Footer Height" field must be filled in.', 'Avada')))), 'footer_sticky_height' => array('label' => esc_html__('Sticky Footer Height', 'Avada'), 'description' => sprintf(esc_html__('The entire height of the footer area (widgets + copyright) %1s View tutorial here %2s. Set a static height in px to enable sticky footer effect. Set to 0 to disable.', 'Avada'), '<a href="https://theme-fusion.com/avada-doc/footer-special-effects/" target="_blank">', '</a>'), 'id' => 'footer_sticky_height', 'default' => '0', 'type' => 'slider', 'choices' => array('min' => '0', 'step' => '1', 'max' => '700', 'edit' => 'yes'), 'required' => array(array('setting' => 'footer_special_effects', 'operator' => '!=', 'value' => 'none'), array('setting' => 'footer_special_effects', 'operator' => '!=', 'value' => 'footer_parallax_effect'), array('setting' => 'footer_special_effects', 'operator' => '!=', 'value' => 'footer_area_bg_parallax'))), 'footer_copyright' => array('label' => esc_html__('Copyright Bar', 'Avada'), 'description' => esc_html__('Turn on to display the copyright bar.', 'Avada'), 'id' => 'footer_copyright', 'default' => '1', 'type' => 'switch'), 'footer_copyright_center_content' => array('label' => esc_html__('Center Copyright Content', 'Avada'), 'description' => esc_html__('Turn on to center the copyright bar content.', 'Avada'), 'id' => 'footer_copyright_center_content', 'default' => '0', 'type' => 'switch', 'required' => array(array('setting' => 'footer_copyright', 'operator' => '==', 'value' => '1'))), 'footer_text' => array('label' => esc_html__('Copyright Text', 'Avada'), 'description' => esc_html__('Enter the text that displays in the copyright bar. HTML markup can be used.', 'Avada'), 'id' => 'footer_text', 'default' => sprintf(esc_html__('Copyright %1s Avada | All Rights Reserved | Powered by %2s | %3s', 'Avada'), '2012 - ' . date('Y'), '<a href="http://wordpress.org">WordPress</a>', '<a href="http://theme-fusion.com">Theme Fusion</a>'), 'type' => 'textarea', 'sanitize_callback' => array('Kirki_Sanitize', 'unfiltered'), 'required' => array(array('setting' => 'footer_copyright', 'operator' => '==', 'value' => '1'))))), 'footer_background_image_options_subsection' => array('label' => esc_html__('Footer Background Image', 'Avada'), 'id' => 'footer_background_image_options_subsection', 'icon' => true, 'type' => 'sub-section', 'fields' => array('footerw_bg_image' => array('label' => esc_html__('Background Image For Footer Widget Area', 'Avada'), 'description' => esc_html__('Select an image for the footer widget background. If left empty, the footer background color will be used.', 'Avada'), 'id' => 'footerw_bg_image', 'default' => '', 'mod' => '', 'type' => 'media', 'required' => array(array('setting' => 'footer_widgets', 'operator' => '==', 'value' => '1'))), 'footerw_bg_full' => array('label' => esc_html__('100% Background Image', 'Avada'), 'description' => esc_html__('Turn on to have the footer background image display at 100% in width and height according to the window size.', 'Avada'), 'id' => 'footerw_bg_full', 'default' => '0', 'type' => 'switch', 'required' => array(array('setting' => 'footerw_bg_image', 'operator' => '!=', 'value' => ''), array('setting' => 'footerw_bg_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'footerw_bg_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')), array('setting' => 'footer_widgets', 'operator' => '==', 'value' => '1'))), 'footerw_bg_repeat' => array('label' => esc_html__('Background Repeat', 'Avada'), 'description' => esc_html__('Controls how the background image repeats.', 'Avada'), 'id' => 'footerw_bg_repeat', 'default' => 'no-repeat', 'type' => 'select', 'choices' => array('repeat' => esc_html__('Repeat All', 'Avada'), 'repeat-x' => esc_html__('Repeat Horizontally', 'Avada'), 'repeat-y' => esc_html__('Repeat Vertically', 'Avada'), 'no-repeat' => esc_html__('No Repeat', 'Avada')), 'required' => array(array('setting' => 'footerw_bg_image', 'operator' => '!=', 'value' => ''), array('setting' => 'footerw_bg_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'footerw_bg_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')), array('setting' => 'footer_widgets', 'operator' => '==', 'value' => '1'))), 'footerw_bg_pos' => array('label' => esc_html__('Background Position', 'Avada'), 'description' => esc_html__('Controls how the background image is positioned.', 'Avada'), 'id' => 'footerw_bg_pos', 'default' => 'center center', 'type' => 'select', 'choices' => array('top left' => esc_html__('top left', 'Avada'), 'top center' => esc_html__('top center', 'Avada'), 'top right' => esc_html__('top right', 'Avada'), 'center left' => esc_html__('center left', 'Avada'), 'center center' => esc_html__('center center', 'Avada'), 'center right' => esc_html__('center right', 'Avada'), 'bottom left' => esc_html__('bottom left', 'Avada'), 'bottom center' => esc_html__('bottom center', 'Avada'), 'bottom right' => esc_html__('bottom right', 'Avada')), 'required' => array(array('setting' => 'footerw_bg_image', 'operator' => '!=', 'value' => ''), array('setting' => 'footerw_bg_image', 'operator' => '!=', 'value' => array('url' => '')), array('setting' => 'footerw_bg_image', 'operator' => '!=', 'value' => array('url' => '', 'id' => '', 'height' => '', 'width' => '', 'thumbnail' => '')), array('setting' => 'footer_widgets', 'operator' => '==', 'value' => '1'))))), 'footer_styling_options_subsection' => array('label' => esc_html__('Footer Styling', 'Avada'), 'id' => 'footer_styling_options_subsection', 'icon' => true, 'type' => 'sub-section', 'fields' => array('footer_100_width' => array('label' => esc_html__('100% Footer Width', 'Avada'), 'description' => esc_html__('Turn on to have the footer area display at 100% width according to the window size. Turn off to follow site width.', 'Avada'), 'id' => 'footer_100_width', 'default' => '0', 'type' => 'switch'), 'footer_area_padding' => array('label' => esc_html__('Footer Padding', 'Avada'), 'description' => esc_html__('Controls the top/right/bottom/left padding for the footer.', 'Avada'), 'id' => 'footer_area_padding', 'choices' => array('top' => true, 'bottom' => true, 'left' => true, 'right' => true, 'units' => array('px', '%')), 'default' => array('top' => '43px', 'bottom' => '40px', 'left' => '0px', 'right' => '0px'), 'type' => 'spacing'), 'footer_bg_color' => array('label' => esc_html__('Footer Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the footer.', 'Avada'), 'id' => 'footer_bg_color', 'default' => '#363839', 'type' => 'color-alpha'), 'footer_border_size' => array('label' => esc_html__('Footer Border Size', 'Avada'), 'description' => esc_html__('Controls the size of the top footer border.', 'Avada'), 'id' => 'footer_border_size', 'default' => '12', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '50', 'step' => '1')), 'footer_border_color' => array('label' => esc_html__('Footer Border Color', 'Avada'), 'description' => esc_html__('Controls the border colors of the footer.', 'Avada'), 'id' => 'footer_border_color', 'default' => '#e9eaee', 'type' => 'color-alpha'), 'footer_divider_color' => array('label' => esc_html__('Footer Widget Divider Color', 'Avada'), 'description' => esc_html__('Controls the divider color in the footer widgets.', 'Avada'), 'id' => 'footer_divider_color', 'default' => '#505152', 'type' => 'color-alpha'), 'copyright_padding' => array('label' => esc_html__('Copyright Padding', 'Avada'), 'description' => esc_html__('Controls the top/bottom padding for the copyright area.', 'Avada'), 'id' => 'copyright_padding', 'default' => array('top' => '18px', 'bottom' => '16px'), 'choices' => array('top' => true, 'bottom' => true), 'type' => 'spacing', 'required' => array(array('setting' => 'footer_copyright', 'operator' => '==', 'value' => '1'))), 'copyright_bg_color' => array('label' => esc_html__('Copyright Background Color', 'Avada'), 'description' => esc_html__('Controls the background color of the footer copyright area.', 'Avada'), 'id' => 'copyright_bg_color', 'default' => '#282a2b', 'type' => 'color-alpha', 'required' => array(array('setting' => 'footer_copyright', 'operator' => '==', 'value' => '1'))), 'copyright_border_size' => array('label' => esc_html__('Copyright Border Size', 'Avada'), 'description' => esc_html__('Controls the size of the top copyright border.', 'Avada'), 'id' => 'copyright_border_size', 'default' => '1', 'type' => 'slider', 'choices' => array('min' => '0', 'max' => '50', 'step' => '1')), 'copyright_border_color' => array('label' => esc_html__('Copyright Border Color', 'Avada'), 'description' => esc_html__('Controls the border colors for the footer copyright area.', 'Avada'), 'id' => 'copyright_border_color', 'default' => '#4b4c4d', 'type' => 'color-alpha', 'required' => array(array('setting' => 'footer_copyright', 'operator' => '==', 'value' => '1'))), 'footer_typography_info' => array('label' => esc_html__('Footer Typography', 'Avada'), 'description' => '', 'id' => 'footer_typography_info', 'type' => 'info'), 'footer_headings_typography' => array('id' => 'footer_headings_typography', 'label' => esc_html__('Footer Headings Typography', 'Avada'), 'description' => esc_html__('These settings control the typography for the footer headings.', 'Avada'), 'type' => 'typography', 'choices' => array('font-family' => true, 'font-size' => true, 'font-weight' => true, 'line-height' => true, 'letter-spacing' => true, 'color' => true), 'default' => array('font-family' => 'PT Sans', 'font-size' => '13px', 'font-weight' => '400', 'line-height' => '1.5', 'letter-spacing' => '0', 'color' => '#dddddd')), 'footer_text_color' => array('label' => esc_html__('Footer Font Color', 'Avada'), 'description' => esc_html__('Controls the text color of the footer font.', 'Avada'), 'id' => 'footer_text_color', 'default' => '#8C8989', 'type' => 'color'), 'footer_link_color' => array('label' => esc_html__('Footer Link Color', 'Avada'), 'description' => esc_html__('Controls the text color of the footer link font.', 'Avada'), 'id' => 'footer_link_color', 'default' => '#BFBFBF', 'type' => 'color'), 'copyright_font_size' => array('label' => esc_html__('Copyright Font Size', 'Avada'), 'description' => esc_html__('Controls the font size for the copyright text.', 'Avada'), 'id' => 'copyright_font_size', 'default' => '12px', 'type' => 'dimension', 'choices' => array('units' => array('px', 'em')))))));
    return $sections;
}
 private function debug($debug_mode = FALSE)
 {
     if ($debug_mode) {
         global $current_user;
         delete_user_meta($current_user->ID, 'avada_update_notice');
         delete_option('avada_version');
         update_option('avada_version', '3.9');
         delete_option('avada_previous_version');
         delete_option(Avada::get_option_name());
         var_dump("Current Version: " . Avada::$version);
         var_dump("DB Version: " . get_option('avada_version', false));
         var_dump("Previous Version: " . get_option('avada_previous_version', false));
         var_dump("Update Notice: " . get_user_meta($current_user->ID, 'avada_update_notice', TRUE));
     }
     return;
 }
/**
 * Takes care of adding custom fonts using @font-face
 */
function avada_custom_fonts_font_faces($css = '')
{
    // Get the options
    $options = get_option(Avada::get_option_name(), array());
    $font_face = '';
    // Make sure 'custom_fonts' are defined
    if (isset($options['custom_fonts'])) {
        $custom_fonts = $options['custom_fonts'];
        // Make sure we have titles for our fonts
        if (isset($custom_fonts['name']) && is_array($custom_fonts['name'])) {
            foreach ($custom_fonts['name'] as $key => $label) {
                $label = trim($label);
                // Make sure we have some files to work with
                if (isset($custom_fonts['woff']) && isset($custom_fonts['woff'][$key]) || isset($custom_fonts['woff2']) && isset($custom_fonts['woff2'][$key]) || isset($custom_fonts['ttf']) && isset($custom_fonts['ttf'][$key]) || isset($custom_fonts['svg']) && isset($custom_fonts['svg'][$key]) || isset($custom_fonts['eot']) && isset($custom_fonts['eot'][$key])) {
                    $firstfile = true;
                    $font_face .= '@font-face{';
                    $font_face .= 'font-family:';
                    // If font-name has a space, then it must be wrapped in double-quotes
                    if (false !== strpos($label, ' ')) {
                        $font_face .= '"' . $label . '";';
                    } else {
                        $font_face .= $label . ';';
                    }
                    // Start adding sources
                    $font_face .= 'src:';
                    // Add .eot file
                    if (isset($custom_fonts['eot']) && isset($custom_fonts['eot'][$key]) && $custom_fonts['eot'][$key]['url']) {
                        $font_face .= 'url("' . str_replace(array('http://', 'https://'), '//', $custom_fonts['eot'][$key]['url']) . '?#iefix") format("embedded-opentype")';
                        $firstfile = false;
                    }
                    // Add .woff file
                    if (isset($custom_fonts['woff']) && isset($custom_fonts['woff'][$key]) && $custom_fonts['woff'][$key]['url']) {
                        $font_face .= $firstfile ? '' : ',';
                        $font_face .= 'url("' . str_replace(array('http://', 'https://'), '//', $custom_fonts['woff'][$key]['url']) . '") format("woff")';
                        $firstfile = false;
                    }
                    // Add .woff2 file
                    if (isset($custom_fonts['woff2']) && isset($custom_fonts['woff2'][$key]['url']) && $custom_fonts['woff2'][$key]['url']) {
                        $font_face .= $firstfile ? '' : ',';
                        $font_face .= 'url("' . str_replace(array('http://', 'https://'), '//', $custom_fonts['woff2'][$key]['url']) . '") format("woff2")';
                        $firstfile = false;
                    }
                    // Add .ttf file
                    if (isset($custom_fonts['ttf']) && isset($custom_fonts['ttf'][$key]) && $custom_fonts['ttf'][$key]['url']) {
                        $font_face .= $firstfile ? '' : ',';
                        $font_face .= 'url("' . str_replace(array('http://', 'https://'), '//', $custom_fonts['ttf'][$key]['url']) . '") format("truetype")';
                        $firstfile = false;
                    }
                    // Add .svg file
                    if (isset($custom_fonts['svg']) && isset($custom_fonts['svg'][$key]) && $custom_fonts['svg'][$key]['url']) {
                        $font_face .= $firstfile ? '' : ',';
                        $font_face .= 'url("' . str_replace(array('http://', 'https://'), '//', $custom_fonts['svg'][$key]['url']) . '") format("svg")';
                        $firstfile = false;
                    }
                    $font_face .= ';font-weight: normal;font-style: normal;';
                    $font_face .= '}';
                }
            }
        }
    }
    return $font_face . $css;
}