| Server IP : 146.59.209.152 / Your IP : 216.73.216.46 Web Server : Apache System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : infrafs ( 43850) PHP Version : 8.2.29 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/infrafs/www/wp-content/themes/trackstore/framework/admin/options/general/ |
Upload File : |
<?php
if ( ! function_exists( 'trackstore_elated_general_options_map' ) ) {
/**
* General options page
*/
function trackstore_elated_general_options_map() {
trackstore_elated_add_admin_page(
array(
'slug' => '',
'title' => esc_html__( 'General', 'trackstore' ),
'icon' => 'fa fa-institution'
)
);
$panel_design_style = trackstore_elated_add_admin_panel(
array(
'page' => '',
'name' => 'panel_design_style',
'title' => esc_html__( 'Design Style', 'trackstore' )
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'google_fonts',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Google Font Family', 'trackstore' ),
'description' => esc_html__( 'Choose a default Google font for your site', 'trackstore' ),
'parent' => $panel_design_style
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'additional_google_fonts',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Additional Google Fonts', 'trackstore' ),
'parent' => $panel_design_style,
'args' => array(
"dependence" => true,
"dependence_hide_on_yes" => "",
"dependence_show_on_yes" => "#eltd_additional_google_fonts_container"
)
)
);
$additional_google_fonts_container = trackstore_elated_add_admin_container(
array(
'parent' => $panel_design_style,
'name' => 'additional_google_fonts_container',
'hidden_property' => 'additional_google_fonts',
'hidden_value' => 'no'
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'additional_google_font1',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Font Family', 'trackstore' ),
'description' => esc_html__( 'Choose additional Google font for your site', 'trackstore' ),
'parent' => $additional_google_fonts_container
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'additional_google_font2',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Font Family', 'trackstore' ),
'description' => esc_html__( 'Choose additional Google font for your site', 'trackstore' ),
'parent' => $additional_google_fonts_container
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'additional_google_font3',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Font Family', 'trackstore' ),
'description' => esc_html__( 'Choose additional Google font for your site', 'trackstore' ),
'parent' => $additional_google_fonts_container
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'additional_google_font4',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Font Family', 'trackstore' ),
'description' => esc_html__( 'Choose additional Google font for your site', 'trackstore' ),
'parent' => $additional_google_fonts_container
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'additional_google_font5',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Font Family', 'trackstore' ),
'description' => esc_html__( 'Choose additional Google font for your site', 'trackstore' ),
'parent' => $additional_google_fonts_container
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'google_font_weight',
'type' => 'checkboxgroup',
'default_value' => '',
'label' => esc_html__( 'Google Fonts Style & Weight', 'trackstore' ),
'description' => esc_html__( 'Choose a default Google font weights for your site. Impact on page load time', 'trackstore' ),
'parent' => $panel_design_style,
'options' => array(
'100' => esc_html__( '100 Thin', 'trackstore' ),
'100i' => esc_html__( '100 Thin Italic', 'trackstore' ),
'200' => esc_html__( '200 Extra-Light', 'trackstore' ),
'200i' => esc_html__( '200 Extra-Light Italic', 'trackstore' ),
'300' => esc_html__( '300 Light', 'trackstore' ),
'300i' => esc_html__( '300 Light Italic', 'trackstore' ),
'400' => esc_html__( '400 Regular', 'trackstore' ),
'400i' => esc_html__( '400 Regular Italic', 'trackstore' ),
'500' => esc_html__( '500 Medium', 'trackstore' ),
'500i' => esc_html__( '500 Medium Italic', 'trackstore' ),
'600' => esc_html__( '600 Semi-Bold', 'trackstore' ),
'600i' => esc_html__( '600 Semi-Bold Italic', 'trackstore' ),
'700' => esc_html__( '700 Bold', 'trackstore' ),
'700i' => esc_html__( '700 Bold Italic', 'trackstore' ),
'800' => esc_html__( '800 Extra-Bold', 'trackstore' ),
'800i' => esc_html__( '800 Extra-Bold Italic', 'trackstore' ),
'900' => esc_html__( '900 Ultra-Bold', 'trackstore' ),
'900i' => esc_html__( '900 Ultra-Bold Italic', 'trackstore' )
)
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'google_font_subset',
'type' => 'checkboxgroup',
'default_value' => '',
'label' => esc_html__( 'Google Fonts Subset', 'trackstore' ),
'description' => esc_html__( 'Choose a default Google font subsets for your site', 'trackstore' ),
'parent' => $panel_design_style,
'options' => array(
'latin' => esc_html__( 'Latin', 'trackstore' ),
'latin-ext' => esc_html__( 'Latin Extended', 'trackstore' ),
'cyrillic' => esc_html__( 'Cyrillic', 'trackstore' ),
'cyrillic-ext' => esc_html__( 'Cyrillic Extended', 'trackstore' ),
'greek' => esc_html__( 'Greek', 'trackstore' ),
'greek-ext' => esc_html__( 'Greek Extended', 'trackstore' ),
'vietnamese' => esc_html__( 'Vietnamese', 'trackstore' )
)
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'first_color',
'type' => 'color',
'label' => esc_html__( 'First Main Color', 'trackstore' ),
'description' => esc_html__( 'Choose the most dominant theme color. Default color is #00bbb3', 'trackstore' ),
'parent' => $panel_design_style
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'page_background_color',
'type' => 'color',
'label' => esc_html__( 'Page Background Color', 'trackstore' ),
'description' => esc_html__( 'Choose the background color for page content. Default color is #ffffff', 'trackstore' ),
'parent' => $panel_design_style
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'selection_color',
'type' => 'color',
'label' => esc_html__( 'Text Selection Color', 'trackstore' ),
'description' => esc_html__( 'Choose the color users see when selecting text', 'trackstore' ),
'parent' => $panel_design_style
)
);
/***************** Passepartout Layout - begin **********************/
trackstore_elated_add_admin_field(
array(
'name' => 'boxed',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Boxed Layout', 'trackstore' ),
'parent' => $panel_design_style,
'args' => array(
"dependence" => true,
"dependence_hide_on_yes" => "",
"dependence_show_on_yes" => "#eltd_boxed_container"
)
)
);
$boxed_container = trackstore_elated_add_admin_container(
array(
'parent' => $panel_design_style,
'name' => 'boxed_container',
'hidden_property' => 'boxed',
'hidden_value' => 'no'
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'page_background_color_in_box',
'type' => 'color',
'label' => esc_html__( 'Page Background Color', 'trackstore' ),
'description' => esc_html__( 'Choose the page background color outside box', 'trackstore' ),
'parent' => $boxed_container
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'boxed_background_image',
'type' => 'image',
'label' => esc_html__( 'Background Image', 'trackstore' ),
'description' => esc_html__( 'Choose an image to be displayed in background', 'trackstore' ),
'parent' => $boxed_container
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'boxed_pattern_background_image',
'type' => 'image',
'label' => esc_html__( 'Background Pattern', 'trackstore' ),
'description' => esc_html__( 'Choose an image to be used as background pattern', 'trackstore' ),
'parent' => $boxed_container
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'boxed_background_image_attachment',
'type' => 'select',
'default_value' => '',
'label' => esc_html__( 'Background Image Attachment', 'trackstore' ),
'description' => esc_html__( 'Choose background image attachment', 'trackstore' ),
'parent' => $boxed_container,
'options' => array(
'' => esc_html__( 'Default', 'trackstore' ),
'fixed' => esc_html__( 'Fixed', 'trackstore' ),
'scroll' => esc_html__( 'Scroll', 'trackstore' )
)
)
);
/***************** Boxed Layout - end **********************/
/***************** Passepartout Layout - begin **********************/
trackstore_elated_add_admin_field(
array(
'name' => 'paspartu',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Passepartout', 'trackstore' ),
'description' => esc_html__( 'Enabling this option will display passepartout around site content', 'trackstore' ),
'parent' => $panel_design_style,
'args' => array(
"dependence" => true,
"dependence_hide_on_yes" => "",
"dependence_show_on_yes" => "#eltd_paspartu_container"
)
)
);
$paspartu_container = trackstore_elated_add_admin_container(
array(
'parent' => $panel_design_style,
'name' => 'paspartu_container',
'hidden_property' => 'paspartu',
'hidden_value' => 'no'
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'paspartu_color',
'type' => 'color',
'label' => esc_html__( 'Passepartout Color', 'trackstore' ),
'description' => esc_html__( 'Choose passepartout color, default value is #ffffff', 'trackstore' ),
'parent' => $paspartu_container
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'paspartu_width',
'type' => 'text',
'label' => esc_html__( 'Passepartout Size', 'trackstore' ),
'description' => esc_html__( 'Enter size amount for passepartout', 'trackstore' ),
'parent' => $paspartu_container,
'args' => array(
'col_width' => 2,
'suffix' => 'px or %'
)
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'paspartu_responsive_width',
'type' => 'text',
'label' => esc_html__( 'Responsive Passepartout Size', 'trackstore' ),
'description' => esc_html__( 'Enter size amount for passepartout for smaller screens (tablets and mobiles view)', 'trackstore' ),
'parent' => $paspartu_container,
'args' => array(
'col_width' => 2,
'suffix' => 'px or %'
)
)
);
trackstore_elated_add_admin_field(
array(
'parent' => $paspartu_container,
'type' => 'yesno',
'default_value' => 'no',
'name' => 'disable_top_paspartu',
'label' => esc_html__( 'Disable Top Passepartout', 'trackstore' )
)
);
/***************** Passepartout Layout - end **********************/
/***************** Content Layout - begin **********************/
trackstore_elated_add_admin_field(
array(
'name' => 'initial_content_width',
'type' => 'select',
'default_value' => '',
'label' => esc_html__( 'Initial Width of Content', 'trackstore' ),
'description' => esc_html__( 'Choose the initial width of content which is in grid (Applies to pages set to "Default Template" and rows set to "In Grid")', 'trackstore' ),
'parent' => $panel_design_style,
'options' => array(
'eltd-grid-1100' => esc_html__( '1100px - default', 'trackstore' ),
'eltd-grid-1300' => esc_html__( '1300px', 'trackstore' ),
'eltd-grid-1200' => esc_html__( '1200px', 'trackstore' ),
'eltd-grid-1000' => esc_html__( '1000px', 'trackstore' ),
'eltd-grid-800' => esc_html__( '800px', 'trackstore' )
)
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'preload_pattern_image',
'type' => 'image',
'label' => esc_html__( 'Preload Pattern Image', 'trackstore' ),
'description' => esc_html__( 'Choose preload pattern image to be displayed until images are loaded', 'trackstore' ),
'parent' => $panel_design_style
)
);
/***************** Content Layout - end **********************/
$panel_settings = trackstore_elated_add_admin_panel(
array(
'page' => '',
'name' => 'panel_settings',
'title' => esc_html__( 'Settings', 'trackstore' )
)
);
/***************** Smooth Scroll Layout - begin **********************/
trackstore_elated_add_admin_field(
array(
'name' => 'page_smooth_scroll',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Smooth Scroll', 'trackstore' ),
'description' => esc_html__( 'Enabling this option will perform a smooth scrolling effect on every page (except on Mac and touch devices)', 'trackstore' ),
'parent' => $panel_settings
)
);
/***************** Smooth Scroll Layout - end **********************/
/***************** Smooth Page Transitions Layout - begin **********************/
trackstore_elated_add_admin_field(
array(
'name' => 'smooth_page_transitions',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Smooth Page Transitions', 'trackstore' ),
'description' => esc_html__( 'Enabling this option will perform a smooth transition between pages when clicking on links', 'trackstore' ),
'parent' => $panel_settings,
'args' => array(
"dependence" => true,
"dependence_hide_on_yes" => "",
"dependence_show_on_yes" => "#eltd_page_transitions_container"
)
)
);
$page_transitions_container = trackstore_elated_add_admin_container(
array(
'parent' => $panel_settings,
'name' => 'page_transitions_container',
'hidden_property' => 'smooth_page_transitions',
'hidden_value' => 'no'
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'page_transition_preloader',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Enable Preloading Animation', 'trackstore' ),
'description' => esc_html__( 'Enabling this option will display an animated preloader while the page content is loading', 'trackstore' ),
'parent' => $page_transitions_container,
'args' => array(
"dependence" => true,
"dependence_hide_on_yes" => "",
"dependence_show_on_yes" => "#eltd_page_transition_preloader_container"
)
)
);
$page_transition_preloader_container = trackstore_elated_add_admin_container(
array(
'parent' => $page_transitions_container,
'name' => 'page_transition_preloader_container',
'hidden_property' => 'page_transition_preloader',
'hidden_value' => 'no'
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'smooth_pt_bgnd_color',
'type' => 'color',
'label' => esc_html__( 'Page Loader Background Color', 'trackstore' ),
'parent' => $page_transition_preloader_container
)
);
$group_pt_spinner_animation = trackstore_elated_add_admin_group(
array(
'name' => 'group_pt_spinner_animation',
'title' => esc_html__( 'Loader Style', 'trackstore' ),
'description' => esc_html__( 'Define styles for loader spinner animation', 'trackstore' ),
'parent' => $page_transition_preloader_container
)
);
$row_pt_spinner_animation = trackstore_elated_add_admin_row(
array(
'name' => 'row_pt_spinner_animation',
'parent' => $group_pt_spinner_animation
)
);
trackstore_elated_add_admin_field(
array(
'type' => 'selectsimple',
'name' => 'smooth_pt_spinner_type',
'default_value' => '',
'label' => esc_html__( 'Spinner Type', 'trackstore' ),
'parent' => $row_pt_spinner_animation,
'options' => array(
'trackstore' => esc_html__( 'Trackstore', 'trackstore' ),
'rotate_circles' => esc_html__( 'Rotate Circles', 'trackstore' ),
'pulse' => esc_html__( 'Pulse', 'trackstore' ),
'double_pulse' => esc_html__( 'Double Pulse', 'trackstore' ),
'cube' => esc_html__( 'Cube', 'trackstore' ),
'rotating_cubes' => esc_html__( 'Rotating Cubes', 'trackstore' ),
'stripes' => esc_html__( 'Stripes', 'trackstore' ),
'wave' => esc_html__( 'Wave', 'trackstore' ),
'two_rotating_circles' => esc_html__( '2 Rotating Circles', 'trackstore' ),
'five_rotating_circles' => esc_html__( '5 Rotating Circles', 'trackstore' ),
'atom' => esc_html__( 'Atom', 'trackstore' ),
'clock' => esc_html__( 'Clock', 'trackstore' ),
'mitosis' => esc_html__( 'Mitosis', 'trackstore' ),
'lines' => esc_html__( 'Lines', 'trackstore' ),
'fussion' => esc_html__( 'Fussion', 'trackstore' ),
'wave_circles' => esc_html__( 'Wave Circles', 'trackstore' ),
'pulse_circles' => esc_html__( 'Pulse Circles', 'trackstore' )
)
)
);
trackstore_elated_add_admin_field(
array(
'type' => 'colorsimple',
'name' => 'smooth_pt_spinner_color',
'default_value' => '',
'label' => esc_html__( 'Spinner Color', 'trackstore' ),
'parent' => $row_pt_spinner_animation
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'page_transition_fadeout',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Enable Fade Out Animation', 'trackstore' ),
'description' => esc_html__( 'Enabling this option will turn on fade out animation when leaving page', 'trackstore' ),
'parent' => $page_transitions_container
)
);
/***************** Smooth Page Transitions Layout - end **********************/
trackstore_elated_add_admin_field(
array(
'name' => 'show_back_button',
'type' => 'yesno',
'default_value' => 'yes',
'label' => esc_html__( 'Show "Back To Top Button"', 'trackstore' ),
'description' => esc_html__( 'Enabling this option will display a Back to Top button on every page', 'trackstore' ),
'parent' => $panel_settings
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'responsiveness',
'type' => 'yesno',
'default_value' => 'yes',
'label' => esc_html__( 'Responsiveness', 'trackstore' ),
'description' => esc_html__( 'Enabling this option will make all pages responsive', 'trackstore' ),
'parent' => $panel_settings
)
);
$panel_custom_code = trackstore_elated_add_admin_panel(
array(
'page' => '',
'name' => 'panel_custom_code',
'title' => esc_html__( 'Custom Code', 'trackstore' )
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'custom_css',
'type' => 'textarea',
'label' => esc_html__( 'Custom CSS', 'trackstore' ),
'description' => esc_html__( 'Enter your custom CSS here', 'trackstore' ),
'parent' => $panel_custom_code
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'custom_js',
'type' => 'textarea',
'label' => esc_html__( 'Custom JS', 'trackstore' ),
'description' => esc_html__( 'Enter your custom Javascript here', 'trackstore' ),
'parent' => $panel_custom_code
)
);
$panel_google_api = trackstore_elated_add_admin_panel(
array(
'page' => '',
'name' => 'panel_google_api',
'title' => esc_html__( 'Google API', 'trackstore' )
)
);
trackstore_elated_add_admin_field(
array(
'name' => 'google_maps_api_key',
'type' => 'text',
'label' => esc_html__( 'Google Maps Api Key', 'trackstore' ),
'description' => esc_html__( 'Insert your Google Maps API key here. For instructions on how to create a Google Maps API key, please refer to our to our documentation.', 'trackstore' ),
'parent' => $panel_google_api
)
);
}
add_action( 'trackstore_elated_options_map', 'trackstore_elated_general_options_map', 1 );
}
if ( ! function_exists( 'trackstore_elated_page_general_style' ) ) {
/**
* Function that prints page general inline styles
*/
function trackstore_elated_page_general_style( $style ) {
$current_style = '';
$page_id = trackstore_elated_get_page_id();
$class_prefix = trackstore_elated_get_unique_page_class( $page_id );
$boxed_background_style = array();
$boxed_page_background_color = trackstore_elated_get_meta_field_intersect( 'page_background_color_in_box', $page_id );
if ( ! empty( $boxed_page_background_color ) ) {
$boxed_background_style['background-color'] = $boxed_page_background_color;
}
$boxed_page_background_image = trackstore_elated_get_meta_field_intersect( 'boxed_background_image', $page_id );
if ( ! empty( $boxed_page_background_image ) ) {
$boxed_background_style['background-image'] = 'url(' . esc_url( $boxed_page_background_image ) . ')';
$boxed_background_style['background-position'] = 'center 0px';
$boxed_background_style['background-repeat'] = 'no-repeat';
}
$boxed_page_background_pattern_image = trackstore_elated_get_meta_field_intersect( 'boxed_pattern_background_image', $page_id );
if ( ! empty( $boxed_page_background_pattern_image ) ) {
$boxed_background_style['background-image'] = 'url(' . esc_url( $boxed_page_background_pattern_image ) . ')';
$boxed_background_style['background-position'] = '0px 0px';
$boxed_background_style['background-repeat'] = 'repeat';
}
$boxed_page_background_attachment = trackstore_elated_get_meta_field_intersect( 'boxed_background_image_attachment', $page_id );
if ( ! empty( $boxed_page_background_attachment ) ) {
$boxed_background_style['background-attachment'] = $boxed_page_background_attachment;
}
$boxed_background_selector = $class_prefix . '.eltd-boxed .eltd-wrapper';
if ( ! empty( $boxed_background_style ) ) {
$current_style .= trackstore_elated_dynamic_css( $boxed_background_selector, $boxed_background_style );
}
$paspartu_style = array();
$paspartu_res_style = array();
$paspartu_res_start = '@media only screen and (max-width: 1024px) {';
$paspartu_res_end = '}';
$paspartu_color = trackstore_elated_get_meta_field_intersect( 'paspartu_color', $page_id );
if ( ! empty( $paspartu_color ) ) {
$paspartu_style['background-color'] = $paspartu_color;
}
$paspartu_width = trackstore_elated_get_meta_field_intersect( 'paspartu_width', $page_id );
if ( $paspartu_width !== '' ) {
if ( trackstore_elated_string_ends_with( $paspartu_width, '%' ) || trackstore_elated_string_ends_with( $paspartu_width, 'px' ) ) {
$paspartu_style['padding'] = $paspartu_width;
} else {
$paspartu_style['padding'] = $paspartu_width . 'px';
}
}
$paspartu_selector = $class_prefix . '.eltd-paspartu-enabled .eltd-wrapper';
if ( ! empty( $paspartu_style ) ) {
$current_style .= trackstore_elated_dynamic_css( $paspartu_selector, $paspartu_style );
}
$paspartu_responsive_width = trackstore_elated_get_meta_field_intersect( 'paspartu_responsive_width', $page_id );
if ( $paspartu_responsive_width !== '' ) {
if ( trackstore_elated_string_ends_with( $paspartu_responsive_width, '%' ) || trackstore_elated_string_ends_with( $paspartu_responsive_width, 'px' ) ) {
$paspartu_res_style['padding'] = $paspartu_responsive_width;
} else {
$paspartu_res_style['padding'] = $paspartu_responsive_width . 'px';
}
}
if ( ! empty( $paspartu_res_style ) ) {
$current_style .= $paspartu_res_start . trackstore_elated_dynamic_css( $paspartu_selector, $paspartu_res_style ) . $paspartu_res_end;
}
$current_style = $current_style . $style;
return $current_style;
}
add_filter( 'trackstore_elated_add_page_custom_style', 'trackstore_elated_page_general_style' );
}