Current path: home/webdevt/www/wdp/wp-content/themes/quadric/framework/admin/options/general/
?? Go up: /home/webdevt/www/wdp/wp-content/themes/quadric/framework/admin/options
<?php
if ( ! function_exists('edgtf_quadric_general_options_map') ) {
/**
* General options page
*/
function edgtf_quadric_general_options_map() {
edgtf_quadric_add_admin_page(
array(
'slug' => '',
'title' => esc_html__( 'General', 'quadric' ),
'icon' => 'fa fa-institution'
)
);
$panel_design_style = edgtf_quadric_add_admin_panel(
array(
'page' => '',
'name' => 'panel_design_style',
'title' => esc_html__( 'Design Style', 'quadric' )
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'google_fonts',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Font Family', 'quadric' ),
'description' => esc_html__( 'Choose a default Google font for your site', 'quadric' ),
'parent' => $panel_design_style
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'additional_google_fonts',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Additional Google Fonts', 'quadric' ),
'description' => '',
'parent' => $panel_design_style,
'args' => array(
"dependence" => true,
"dependence_hide_on_yes" => "",
"dependence_show_on_yes" => "#edgtf_additional_google_fonts_container"
)
)
);
$additional_google_fonts_container = edgtf_quadric_add_admin_container(
array(
'parent' => $panel_design_style,
'name' => 'additional_google_fonts_container',
'hidden_property' => 'additional_google_fonts',
'hidden_value' => 'no'
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'additional_google_font1',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Font Family', 'quadric' ),
'description' => esc_html__( 'Choose additional Google font for your site', 'quadric' ),
'parent' => $additional_google_fonts_container
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'additional_google_font2',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Font Family', 'quadric' ),
'description' => esc_html__( 'Choose additional Google font for your site', 'quadric' ),
'parent' => $additional_google_fonts_container
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'additional_google_font3',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Font Family', 'quadric' ),
'description' => esc_html__( 'Choose additional Google font for your site', 'quadric' ),
'parent' => $additional_google_fonts_container
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'additional_google_font4',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Font Family', 'quadric' ),
'description' => esc_html__( 'Choose additional Google font for your site', 'quadric' ),
'parent' => $additional_google_fonts_container
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'additional_google_font5',
'type' => 'font',
'default_value' => '-1',
'label' => esc_html__( 'Font Family', 'quadric' ),
'description' => esc_html__( 'Choose additional Google font for your site', 'quadric' ),
'parent' => $additional_google_fonts_container
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'first_color',
'type' => 'color',
'label' => esc_html__( 'First Main Color', 'quadric' ),
'description' => esc_html__( 'Choose the most dominant theme color. Default color is #fb3644', 'quadric' ),
'parent' => $panel_design_style
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'page_background_color',
'type' => 'color',
'label' => esc_html__( 'Page Background Color', 'quadric' ),
'description' => esc_html__( 'Choose the background color for page content. Default color is #ffffff', 'quadric' ),
'parent' => $panel_design_style
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'selection_color',
'type' => 'color',
'label' => esc_html__( 'Text Selection Color', 'quadric' ),
'description' => esc_html__( 'Choose the color users see when selecting text', 'quadric' ),
'parent' => $panel_design_style
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'boxed',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Boxed Layout', 'quadric' ),
'description' => '',
'parent' => $panel_design_style,
'args' => array(
"dependence" => true,
"dependence_hide_on_yes" => "",
"dependence_show_on_yes" => "#edgtf_boxed_container"
)
)
);
$boxed_container = edgtf_quadric_add_admin_container(
array(
'parent' => $panel_design_style,
'name' => 'boxed_container',
'hidden_property' => 'boxed',
'hidden_value' => 'no'
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'page_background_color_in_box',
'type' => 'color',
'label' => esc_html__( 'Page Background Color', 'quadric' ),
'description' => esc_html__( 'Choose the page background color outside box.', 'quadric' ),
'parent' => $boxed_container
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'boxed_background_image',
'type' => 'image',
'label' => esc_html__( 'Background Image', 'quadric' ),
'description' => esc_html__( 'Choose an image to be displayed in background', 'quadric' ),
'parent' => $boxed_container
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'boxed_pattern_background_image',
'type' => 'image',
'label' => esc_html__( 'Background Pattern', 'quadric' ),
'description' => esc_html__( 'Choose an image to be used as background pattern', 'quadric' ),
'parent' => $boxed_container
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'boxed_background_image_attachment',
'type' => 'select',
'default_value' => 'fixed',
'label' => esc_html__( 'Background Image Attachment', 'quadric' ),
'description' => esc_html__( 'Choose background image attachment', 'quadric' ),
'parent' => $boxed_container,
'options' => array(
'fixed' => esc_html__( 'Fixed', 'quadric' ),
'scroll' => esc_html__( 'Scroll', 'quadric' )
)
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'initial_content_width',
'type' => 'select',
'default_value' => '',
'label' => esc_html__( 'Initial Width of Content', 'quadric' ),
'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"', 'quadric' ),
'parent' => $panel_design_style,
'options' => array(
"" => esc_html__( "1100px - default", 'quadric' ),
"grid-1300" => esc_html__( "1300px", 'quadric' ),
"grid-1200" => esc_html__( "1200px", 'quadric' ),
"grid-1000" => esc_html__( "1000px", 'quadric' ),
"grid-800" => esc_html__( "800px", 'quadric' )
)
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'preload_pattern_image',
'type' => 'image',
'label' => esc_html__( 'Preload Pattern Image', 'quadric' ),
'description' => esc_html__( 'Choose preload pattern image to be displayed until images are loaded ', 'quadric' ),
'parent' => $panel_design_style
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'element_appear_amount',
'type' => 'text',
'label' => esc_html__( 'Element Appearance', 'quadric' ),
'description' => esc_html__( 'For animated elements, set distance (related to browser bottom) to start the animation', 'quadric' ),
'parent' => $panel_design_style,
'args' => array(
'col_width' => 2,
'suffix' => 'px'
)
)
);
$panel_settings = edgtf_quadric_add_admin_panel(
array(
'page' => '',
'name' => 'panel_settings',
'title' => esc_html__( 'Settings', 'quadric' )
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'smooth_scroll',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Smooth Scroll', 'quadric' ),
'description' => esc_html__( 'Enabling this option will perform a smooth scrolling effect on every page (except on Mac and touch devices)', 'quadric' ),
'parent' => $panel_settings
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'smooth_page_transitions',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Page Transition Effect', 'quadric' ),
'description' => esc_html__( 'Enabling this option will perform a fade out transition between pages when clicking on links.', 'quadric' ),
'parent' => $panel_settings
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'elements_animation_on_touch',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Elements Animation on Mobile/Touch Devices', 'quadric' ),
'description' => esc_html__( 'Enabling this option will allow elements (shortcodes) to animate on mobile / touch devices', 'quadric' ),
'parent' => $panel_settings
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'show_back_button',
'type' => 'yesno',
'default_value' => 'yes',
'label' => esc_html__( 'Show "Back To Top Button"', 'quadric' ),
'description' => esc_html__( 'Enabling this option will display a Back to Top button on every page', 'quadric' ),
'parent' => $panel_settings
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'responsiveness',
'type' => 'yesno',
'default_value' => 'yes',
'label' => esc_html__( 'Responsiveness', 'quadric' ),
'description' => esc_html__( 'Enabling this option will make all pages responsive', 'quadric' ),
'parent' => $panel_settings
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'favicon',
'type' => 'image',
'label' => esc_html__( 'Favicon', 'quadric' ),
'description' => esc_html__( 'Choose a favicon image to be displayed', 'quadric' ),
'default_value' => EDGE_ASSETS_ROOT.'/img/favicon.ico',
'parent' => $panel_design_style
)
);
$panel_custom_code = edgtf_quadric_add_admin_panel(
array(
'page' => '',
'name' => 'panel_custom_code',
'title' => esc_html__( 'Custom Code', 'quadric' )
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'custom_css',
'type' => 'textarea',
'label' => esc_html__( 'Custom CSS', 'quadric' ),
'description' => esc_html__( 'Enter your custom CSS here', 'quadric' ),
'parent' => $panel_custom_code
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'custom_js',
'type' => 'textarea',
'label' => esc_html__( 'Custom JS', 'quadric' ),
'description' => esc_html__( 'Enter your custom Javascript here', 'quadric' ),
'parent' => $panel_custom_code
)
);
$panel_google_maps_api = edgtf_quadric_add_admin_panel(
array(
'page' => '',
'name' => 'panel_google_maps_api',
'title' => esc_html__( 'Google Maps API key', 'quadric' )
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'google_maps_api_key',
'type' => 'text',
'label' => esc_html__( 'Google Maps API key', 'quadric' ),
'description' => esc_html__( 'Enter your Google Maps API key here', 'quadric' ),
'parent' => $panel_google_maps_api
)
);
$panel_seo = edgtf_quadric_add_admin_panel(
array(
'page' => '',
'name' => 'panel_seo',
'title' => esc_html__( 'Seo', 'quadric' )
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'disable_seo',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Disable SEO', 'quadric' ),
'description' => esc_html__( 'Enabling this option will turn off SEO', 'quadric' ),
'parent' => $panel_seo,
'args' => array(
"dependence" => true,
"dependence_hide_on_yes" => "#edgtf_disable_seo_container",
"dependence_show_on_yes" => ""
)
)
);
$disable_seo_container = edgtf_quadric_add_admin_container(
array(
'parent' => $panel_seo,
'name' => 'disable_seo_container',
'hidden_property' => 'disable_seo',
'hidden_value' => 'yes'
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'meta_keywords',
'type' => 'textarea',
'label' => esc_html__( 'Meta Keywords', 'quadric' ),
'description' => esc_html__( 'Add relevant keywords separated with commas to improve SEO', 'quadric' ),
'parent' => $disable_seo_container
)
);
edgtf_quadric_add_admin_field(
array(
'name' => 'meta_description',
'type' => 'textarea',
'label' => esc_html__( 'Meta Description', 'quadric' ),
'description' => esc_html__( 'Enter a short description of the website for SEO', 'quadric' ),
'parent' => $disable_seo_container
)
);
$edgtf_pages = array();
$pages = get_posts(array(
'post_type' => 'page',
'meta_key' => '_wp_page_template',
'meta_value' => 'landing-page.php'
));
foreach($pages as $page) {
$edgtf_pages[$page->ID] = $page->post_title;
}
$panel_maintenance = edgtf_quadric_add_admin_panel(array(
'page' => '',
'name' => 'panel_maintenance',
'title' => esc_html__( 'Settings', 'quadric' )
));
edgtf_quadric_add_admin_field(array(
'parent' => $panel_maintenance,
'name' => 'maintenance_mode_yesno',
'type' => 'yesno',
'default_value' => 'no',
'label' => esc_html__( 'Maintenance Mode', 'quadric' ),
'description' => esc_html__( 'Turn on this option if you want to enable maintenance mode on your site', 'quadric' ),
'args' => array(
'dependence' => true,
'dependence_hide_on_yes' => '',
'dependence_show_on_yes' => '#edgtf_maintenance_container'
)
));
$maintenance_container = edgtf_quadric_add_admin_container(array(
'parent' => $panel_maintenance,
'name' => 'maintenance_container',
'hidden_property' => 'maintenance_mode_yesno',
'hidden_value' => 'no'
));
edgtf_quadric_add_admin_field(array(
'parent' => $maintenance_container,
'name' => 'maintenance_page',
'type' => 'selectblank',
'label' => esc_html__( 'Maintenance Page', 'quadric' ),
'description' => esc_html__( 'Choose maintenance page to display for visitors', 'quadric' ),
'default_value' => '',
'options' => $edgtf_pages
));
}
add_action( 'edgtf_quadric_options_map', 'edgtf_quadric_general_options_map', 1);
}