add_setting('logo_width', array(
'default' => '150',
'transport' => 'refresh',
'sanitize_callback' => 'absint',
));
$wp_customize->add_control('logo_width', array(
'label' => __('Logo Width (px)', 'application-guy-professional'),
'section' => 'title_tagline', // Native section for Site Identity
'type' => 'number',
'input_attrs' => array(
'min' => '50',
'max' => '500',
'step' => '1',
),
));
// Show Logo on Desktop
$wp_customize->add_setting('show_logo_desktop', array(
'default' => true,
'sanitize_callback' => 'application_guy_sanitize_checkbox',
));
$wp_customize->add_control('show_logo_desktop', array(
'label' => __('Show Logo on Desktop', 'application-guy-professional'),
'section' => 'title_tagline',
'type' => 'checkbox',
));
// Show Site Title on Desktop
$wp_customize->add_setting('show_title_desktop', array(
'default' => true,
'sanitize_callback' => 'application_guy_sanitize_checkbox',
));
$wp_customize->add_control('show_title_desktop', array(
'label' => __('Show Site Title on Desktop', 'application-guy-professional'),
'section' => 'title_tagline',
'type' => 'checkbox',
));
// --- 2. Theme Colors ---
$wp_customize->add_section('application_guy_colors', array(
'title' => __('Theme Colors', 'application-guy-professional'),
'priority' => 30,
'description' => __('Customize the look and feel of your site.', 'application-guy-professional'),
));
// Primary Color
$wp_customize->add_setting('primary_color', array(
'default' => '#3b82f6',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'primary_color', array(
'label' => __('Primary Color', 'application-guy-professional'),
'section' => 'application_guy_colors',
)));
// Secondary Color
$wp_customize->add_setting('secondary_color', array(
'default' => '#1e293b',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'secondary_color', array(
'label' => __('Secondary Color', 'application-guy-professional'),
'section' => 'application_guy_colors',
)));
// Gradient Start
$wp_customize->add_setting('gradient_start', array(
'default' => '#3b82f6',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'gradient_start', array(
'label' => __('Gradient Start Color', 'application-guy-professional'),
'section' => 'application_guy_colors',
)));
// Gradient End
$wp_customize->add_setting('gradient_end', array(
'default' => '#8b5cf6',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'gradient_end', array(
'label' => __('Gradient End Color', 'application-guy-professional'),
'section' => 'application_guy_colors',
)));
// Heading Color
$wp_customize->add_setting('heading_color', array(
'default' => '#1e293b',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'heading_color', array(
'label' => __('Heading Color', 'application-guy-professional'),
'section' => 'application_guy_colors',
)));
// Text Color
$wp_customize->add_setting('text_color_global', array(
'default' => '#475569',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'text_color_global', array(
'label' => __('Body Text Color', 'application-guy-professional'),
'section' => 'application_guy_colors',
)));
// --- 6. Section Backgrounds ---
$wp_customize->add_section('application_guy_bg_colors', array(
'title' => __('Section Backgrounds', 'application-guy-professional'),
'priority' => 35, // Right after Theme Colors
));
// Helper to add bg color control
$sections = array(
'hero_bg_color' => array('label' => 'Hero Section', 'default' => '#f8fafc'),
'services_bg_color' => array('label' => 'Services Section', 'default' => '#f8fafc'),
'process_bg_color' => array('label' => 'Process Section', 'default' => '#ffffff'),
'team_bg_color' => array('label' => 'Team Section', 'default' => '#f8fafc'),
'testimonials_bg_color' => array('label' => 'Testimonials Section', 'default' => '#ffffff'),
'contact_bg_color' => array('label' => 'Contact Section', 'default' => '#f8fafc'),
'cta_bg_color' => array('label' => 'CTA Section', 'default' => '#2563eb'), // Default is primary color
);
foreach ($sections as $id => $args) {
$wp_customize->add_setting($id, array(
'default' => $args['default'],
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, $id, array(
'label' => $args['label'],
'section' => 'application_guy_bg_colors',
)));
}
// --- 4. Header & Navigation ---
$wp_customize->add_section('application_guy_header', array(
'title' => __('Header Settings', 'application-guy-professional'),
'priority' => 40,
));
$wp_customize->add_setting('header_btn_text', array(
'default' => 'Get Started',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('header_btn_text', array(
'label' => __('Nav Button Text', 'application-guy-professional'),
'section' => 'application_guy_header',
'type' => 'text',
));
$wp_customize->add_setting('header_btn_url', array(
'default' => '#contact',
'sanitize_callback' => 'esc_url_raw',
));
$wp_customize->add_control('header_btn_url', array(
'label' => __('Nav Button Link', 'application-guy-professional'),
'section' => 'application_guy_header',
'type' => 'url',
));
// --- 4. Hero Section ---
$wp_customize->add_panel('application_guy_hero_panel', array(
'title' => __('Hero Section', 'application-guy-professional'),
'priority' => 50,
));
$wp_customize->add_section('application_guy_hero_content', array(
'title' => __('Hero Content', 'application-guy-professional'),
'panel' => 'application_guy_hero_panel',
));
// Background Image
$wp_customize->add_setting('hero_bg_image', array(
'default' => '',
'sanitize_callback' => 'esc_url_raw',
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'hero_bg_image', array(
'label' => 'Hero Background Image',
'section' => 'application_guy_hero_content',
)));
// Tag
$wp_customize->add_setting('hero_tag', array(
'default' => '🎓 Study Abroad Made Simple',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('hero_tag', array('label' => 'Hero Tag', 'section' => 'application_guy_hero_content'));
// Headline Parts
$wp_customize->add_setting('hero_headline_1', array(
'default' => 'Your Journey to',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('hero_headline_1', array('label' => 'Headline Part 1', 'section' => 'application_guy_hero_content'));
$wp_customize->add_setting('hero_headline_2', array(
'default' => 'Global Education',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('hero_headline_2', array('label' => 'Headline Part 2 (Gradient)', 'section' => 'application_guy_hero_content'));
$wp_customize->add_setting('hero_headline_3', array(
'default' => 'Starts Here',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('hero_headline_3', array('label' => 'Headline Part 3', 'section' => 'application_guy_hero_content'));
// Headline Colors
$wp_customize->add_setting('hero_headline_1_color', array(
'default' => '#1e293b',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'hero_headline_1_color', array(
'label' => 'Headline Part 1 Color',
'section' => 'application_guy_hero_content',
)));
$wp_customize->add_setting('hero_headline_3_color', array(
'default' => '#1e293b',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'hero_headline_3_color', array(
'label' => 'Headline Part 3 Color',
'section' => 'application_guy_hero_content',
)));
// Description
$wp_customize->add_setting('hero_description', array(
'default' => 'Expert guidance from application to arrival. We\'ve helped 500+ students secure admissions and scholarships to their dream universities worldwide.',
'sanitize_callback' => 'sanitize_textarea_field',
));
$wp_customize->add_control('hero_description', array('label' => 'Description', 'section' => 'application_guy_hero_content', 'type' => 'textarea'));
// Booking Modal Toggle (New)
$wp_customize->add_setting('hero_booking_modal_enable', array(
'default' => true,
'sanitize_callback' => 'application_guy_sanitize_checkbox',
));
$wp_customize->add_control('hero_booking_modal_enable', array(
'label' => 'Enable Booking Modal for Button 1',
'section' => 'application_guy_hero_content',
'type' => 'checkbox',
));
// Buttons
$wp_customize->add_setting('hero_btn_1_text', array(
'default' => 'Book Free Consultation',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('hero_btn_1_text', array('label' => 'Button 1 Text', 'section' => 'application_guy_hero_content'));
$wp_customize->add_setting('hero_btn_1_url', array(
'default' => '#contact',
'sanitize_callback' => 'esc_url_raw',
));
$wp_customize->add_control('hero_btn_1_url', array('label' => 'Button 1 URL', 'section' => 'application_guy_hero_content'));
// Button 2 (New)
$wp_customize->add_setting('hero_btn_2_text', array(
'default' => 'Explore Services',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('hero_btn_2_text', array('label' => 'Button 2 Text', 'section' => 'application_guy_hero_content'));
$wp_customize->add_setting('hero_btn_2_url', array(
'default' => '#services',
'sanitize_callback' => 'esc_url_raw',
));
$wp_customize->add_control('hero_btn_2_url', array('label' => 'Button 2 URL', 'section' => 'application_guy_hero_content'));
// --- 10. Section Captions (Subheaders) ---
$wp_customize->add_section('application_guy_captions', array(
'title' => __('Section Captions (Subheaders)', 'application-guy-professional'),
'priority' => 32,
));
$captions = array(
'services_caption' => array('label' => 'Services Section Tag', 'default' => 'What We Offer'),
'process_caption' => array('label' => 'Process Section Tag', 'default' => 'How It Works'),
'team_caption' => array('label' => 'Team Section Tag', 'default' => 'Our Experts'),
'testimonials_caption' => array('label' => 'Testimonials Section Tag', 'default' => 'Success Stories'),
'blog_caption' => array('label' => 'Blog Section Tag', 'default' => 'Latest News'),
'partners_caption' => array('label' => 'Partners Section Tag', 'default' => 'Our Partners'),
'contact_caption' => array('label' => 'Contact Section Tag', 'default' => 'Get in Touch'),
);
foreach ($captions as $id => $args) {
$wp_customize->add_setting($id, array(
'default' => $args['default'],
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control($id, array(
'label' => $args['label'],
'section' => 'application_guy_captions',
'type' => 'text',
));
}
// --- 11. Section Headlines ---
$wp_customize->add_section('application_guy_headlines', array(
'title' => __('Section Headlines', 'application-guy-professional'),
'priority' => 31,
));
$section_headlines = array(
'services' => array('h1' => 'Comprehensive Support for Your', 'h2' => 'Study Abroad Journey'),
'process' => array('h1' => 'Your Path to', 'h2' => 'Success'),
'team' => array('h1' => 'Meet Your', 'h2' => 'Success Team'),
'testimonials' => array('h1' => 'What Our', 'h2' => 'Students Say'),
'partners' => array('h1' => 'Trusted By', 'h2' => 'Top Universities'),
'blog' => array('h1' => 'Insights &', 'h2' => 'Updates'),
'contact' => array('h1' => 'Contact', 'h2' => 'Us'),
);
foreach ($section_headlines as $id => $heads) {
$wp_customize->add_setting("{$id}_headline_1", array(
'default' => $heads['h1'],
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control("{$id}_headline_1", array(
'label' => ucfirst($id) . ' Headline Part 1',
'section' => 'application_guy_headlines',
'type' => 'text',
));
$wp_customize->add_setting("{$id}_headline_2", array(
'default' => $heads['h2'],
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control("{$id}_headline_2", array(
'label' => ucfirst($id) . ' Headline Part 2 (Gradient)',
'section' => 'application_guy_headlines',
'type' => 'text',
));
}
// --- 9. CTA Section (Meeting Scheduling) ---
$wp_customize->add_section('application_guy_cta', array(
'title' => __('CTA / Meeting Section', 'application-guy-professional'),
'priority' => 110,
));
$wp_customize->add_setting('cta_enable', array(
'default' => true,
'sanitize_callback' => 'application_guy_sanitize_checkbox',
));
$wp_customize->add_control('cta_enable', array(
'label' => 'Enable CTA Section',
'section' => 'application_guy_cta',
'type' => 'checkbox',
));
$wp_customize->add_setting('cta_headline', array(
'default' => 'Ready to Start Your Journey?',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('cta_headline', array('label' => 'Headline', 'section' => 'application_guy_cta'));
$wp_customize->add_setting('cta_description', array(
'default' => 'Book a free consultation today and take the first step toward your dream university',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('cta_description', array('label' => 'Description', 'section' => 'application_guy_cta', 'type' => 'textarea'));
$wp_customize->add_setting('cta_btn_text', array(
'default' => 'Schedule Free Consultation',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('cta_btn_text', array('label' => 'Button Text', 'section' => 'application_guy_cta'));
$wp_customize->add_setting('cta_note', array(
'default' => '💬 Available via WhatsApp, Email, or Video Call',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('cta_note', array('label' => 'CTA Note', 'section' => 'application_guy_cta'));
// Stats Section in Hero
$wp_customize->add_section('application_guy_hero_stats', array(
'title' => __('Hero Stats', 'application-guy-professional'),
'panel' => 'application_guy_hero_panel',
));
$stats_defaults = array(
1 => array('number' => '500+', 'label' => 'Successful Students'),
2 => array('number' => '25+', 'label' => 'Countries Reached'),
3 => array('number' => '98%', 'label' => 'Visa Success Rate'),
4 => array('number' => '10+', 'label' => 'Years Experience'),
);
for ($i = 1; $i <= 4; $i++) {
$wp_customize->add_setting("hero_stat_{$i}_number", array(
'default' => $stats_defaults[$i]['number'],
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control("hero_stat_{$i}_number", array('label' => "Stat {$i} Number", 'section' => 'application_guy_hero_stats'));
$wp_customize->add_setting("hero_stat_{$i}_label", array(
'default' => $stats_defaults[$i]['label'],
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control("hero_stat_{$i}_label", array('label' => "Stat {$i} Label", 'section' => 'application_guy_hero_stats'));
}
// --- 5. Footer & Contact ---
$wp_customize->add_section('application_guy_footer', array(
'title' => __('Footer Settings', 'application-guy-professional'),
'priority' => 100,
));
$wp_customize->add_setting('footer_copyright', array(
'default' => 'Application Guy. All rights reserved.',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('footer_copyright', array('label' => 'Copyright Text', 'section' => 'application_guy_footer'));
$wp_customize->add_setting('social_facebook', array(
'default' => '#',
'sanitize_callback' => 'esc_url_raw',
));
$wp_customize->add_control('social_facebook', array('label' => 'Facebook URL', 'section' => 'application_guy_footer'));
$wp_customize->add_setting('social_instagram', array(
'default' => '#',
'sanitize_callback' => 'esc_url_raw',
));
$wp_customize->add_control('social_instagram', array('label' => 'Instagram URL', 'section' => 'application_guy_footer'));
$wp_customize->add_setting('social_linkedin', array(
'default' => '#',
'sanitize_callback' => 'esc_url_raw',
));
$wp_customize->add_control('social_linkedin', array('label' => 'LinkedIn URL', 'section' => 'application_guy_footer'));
// Footer Widgets Toggle
$wp_customize->add_setting('footer_widgets_enable', array(
'default' => true,
'sanitize_callback' => 'application_guy_sanitize_checkbox',
));
$wp_customize->add_control('footer_widgets_enable', array(
'label' => 'Enable 3-Column Footer Widgets',
'section' => 'application_guy_footer',
'type' => 'checkbox',
));
// Footer Branding Controls
$wp_customize->add_setting('footer_show_logo', array(
'default' => true,
'transport' => 'refresh',
'sanitize_callback' => 'application_guy_sanitize_checkbox',
));
$wp_customize->add_control('footer_show_logo', array(
'label' => 'Show Logo in Footer',
'section' => 'application_guy_footer',
'type' => 'checkbox',
));
$wp_customize->add_setting('footer_show_title', array(
'default' => true,
'transport' => 'refresh',
'sanitize_callback' => 'application_guy_sanitize_checkbox',
));
$wp_customize->add_control('footer_show_title', array(
'label' => 'Show Title in Footer',
'section' => 'application_guy_footer',
'type' => 'checkbox',
));
$wp_customize->add_setting('footer_show_tagline', array(
'default' => true,
'transport' => 'refresh',
'sanitize_callback' => 'application_guy_sanitize_checkbox',
));
$wp_customize->add_control('footer_show_tagline', array(
'label' => 'Show Tagline in Footer',
'section' => 'application_guy_footer',
'type' => 'checkbox',
));
// --- 7. Form Settings ---
$wp_customize->add_section('application_guy_forms', array(
'title' => __('Form Settings', 'application-guy-professional'),
'priority' => 120,
));
$wp_customize->add_setting('contact_recipient_email', array(
'default' => get_option('admin_email'),
'sanitize_callback' => 'sanitize_email',
));
$wp_customize->add_control('contact_recipient_email', array(
'label' => __('Contact Form Recipient Email', 'application-guy-professional'),
'description' => __('Where should contact form submissions be sent?', 'application-guy-professional'),
'section' => 'application_guy_forms',
'type' => 'email',
));
$wp_customize->add_setting('booking_recipient_email', array(
'default' => get_option('admin_email'),
'sanitize_callback' => 'sanitize_email',
));
$wp_customize->add_control('booking_recipient_email', array(
'label' => __('Booking Form Recipient Email', 'application-guy-professional'),
'description' => __('Where should consultation bookings be sent?', 'application-guy-professional'),
'section' => 'application_guy_forms',
'type' => 'email',
));
// --- 8. Section Toggles & Settings (Blog/Partners) ---
$wp_customize->add_section('application_guy_sections', array(
'title' => __('Section Settings & Visibility', 'application-guy-professional'),
'priority' => 30, // High priority to be visible
));
// Helper to add Toggle
$toggle_sections = array(
'hero' => 'Hero Section',
'services' => 'Services Section',
'process' => 'Process Section',
'team' => 'Team Section',
'testimonials' => 'Testimonials Section',
'blog' => 'Blog Section',
'partners' => 'Partners Section',
'contact' => 'Contact Section',
'cta' => 'CTA Section',
);
foreach ($toggle_sections as $id => $label) {
$wp_customize->add_setting("{$id}_enable", array(
'default' => true,
'transport' => 'refresh',
'sanitize_callback' => 'application_guy_sanitize_checkbox',
));
$wp_customize->add_control("{$id}_enable", array(
'label' => "Enable $label",
'section' => 'application_guy_sections',
'type' => 'checkbox',
));
}
// Dynamic Section Order (Improved for UX)
$wp_customize->add_setting('homepage_sections_order', array(
'default' => 'hero,services,process,team,testimonials,partners,blog,contact,cta',
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'refresh',
));
$wp_customize->add_control('homepage_sections_order', array(
'label' => '⭐ Home Page Section Order',
'description' => 'Rearrange sections by moving their names. (Copy/Paste this list and move things around):
hero, services, process, team, testimonials, partners, blog, contact, cta',
'section' => 'application_guy_sections',
'type' => 'text',
));
// Blog Specifics
$wp_customize->add_setting('blog_category', array(
'default' => 0,
'sanitize_callback' => 'absint',
));
$wp_customize->add_control('blog_category', array(
'label' => 'Blog Category to Display',
'section' => 'application_guy_sections',
'type' => 'select',
'choices' => application_guy_get_categories(),
));
// --- 9. Typography ---
$wp_customize->add_section('application_guy_typography', array(
'title' => __('Typography', 'application-guy-professional'),
'priority' => 25,
));
$fonts = array(
'Inter' => 'Inter',
'Roboto' => 'Roboto',
'Poppins' => 'Poppins',
'Open Sans' => 'Open Sans',
'Lato' => 'Lato',
'Montserrat' => 'Montserrat',
'Playfair Display' => 'Playfair Display',
);
$wp_customize->add_setting('heading_font', array(
'default' => 'Inter',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('heading_font', array(
'label' => 'Heading Font',
'section' => 'application_guy_typography',
'type' => 'select',
'choices' => $fonts,
));
$wp_customize->add_setting('body_font', array(
'default' => 'Inter',
'transport' => 'refresh',
'sanitize_callback' => 'sanitize_text_field',
));
$wp_customize->add_control('body_font', array(
'label' => 'Body Font',
'section' => 'application_guy_typography',
'type' => 'select',
'choices' => $fonts,
));
}
// Helper to get categories
function application_guy_get_categories() {
$cats = array('0' => 'All Categories');
$categories = get_categories(array('hide_empty' => 0));
foreach ($categories as $category) {
$cats[$category->term_id] = $category->name;
}
return $cats;
}
/**
* Sanitize Checkbox
*/
function application_guy_sanitize_checkbox($input) {
return (isset($input) && true == $input ? true : false);
}
add_action('customize_register', 'application_guy_customize_register');