add_panel('blog_karo_theme_options',array( 'panel'=>'blog_karo_theme_options', 'title'=>__('Theme Options', 'blog-karo'), 'priority'=>20, )); // Theme Settings - General Section $wp_customize->add_section( 'general_section' , array( 'panel' => 'blog_karo_theme_options', 'title' => __( 'General', 'blog-karo' ), 'priority' => 10, ) ); //THEME COLOR // Theme Settings // Color setting $wp_customize->add_setting( 'theme_color_settings', array( 'default' => '#ca2129', 'sanitize_callback' => 'sanitize_text' ) ); // Theme color control $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'theme_color', array( 'label' => 'Theme Color', 'section' => 'general_section', 'settings' => 'theme_color_settings' ))); //Hero Section Toggle //add setting $wp_customize->add_setting( 'hero_section_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'hero_section_control', array( 'label' => 'Hide Hero Banner Section', 'description' => 'Check to hide hero banner section on front page.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'general_section', 'settings' => 'hero_section_settings' )); //Top Bar Section $wp_customize->add_section( 'top_bar_section' , array( 'panel' => 'blog_karo_theme_options', 'title' => __( 'Top Bar', 'blog-karo' ), 'priority' => 10, ) ); //Top Bar Toggle //add setting $wp_customize->add_setting( 'topbar_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'topbar_control', array( 'label' => 'Hide Top Bar', 'description' => 'Enable to hide top bar.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'top_bar_section', 'settings' => 'topbar_settings', 'priority' => 5, )); //Dark Mode Toggle //add setting $wp_customize->add_setting( 'darkmode_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'darkmode_control', array( 'label' => 'Hide Dark Mode', 'description' => 'Enable to hide dark mode option.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'top_bar_section', 'settings' => 'darkmode_settings', 'priority' => 5, )); //Social Media Toggle //add setting $wp_customize->add_setting( 'social_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'social_control', array( 'label' => 'Hide Social Media', 'description' => 'Enable to hide social media icons.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'top_bar_section', 'settings' => 'social_settings', 'priority' => 5, )); //Facebook Toggle //add setting $wp_customize->add_setting( 'facebook_toggle_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'fb_control', array( 'label' => 'Hide Facebook', 'description' => 'Enable to hide Facebook.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'top_bar_section', 'settings' => 'facebook_toggle_settings', 'priority' => 5, )); //Facebook $wp_customize->add_setting( 'facebook_settings', array( 'default' => __( '#', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'facebook_control', array( 'label' => __( 'Facebook Url', 'blog-karo' ), 'section' => 'top_bar_section', 'settings' => 'facebook_settings', 'type' => 'text', 'priority' => 5, ) ) ); //Instagram Toggle //add setting $wp_customize->add_setting( 'instagram_toggle_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'instagram_control', array( 'label' => 'Hide Instagram', 'description' => 'Enable to hide Instagram.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'top_bar_section', 'settings' => 'instagram_toggle_settings', 'priority' => 5, )); //Facebook $wp_customize->add_setting( 'instagram_settings', array( 'default' => __( '#', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'insta_control', array( 'label' => __( 'Instagram Url', 'blog-karo' ), 'section' => 'top_bar_section', 'settings' => 'instagram_settings', 'type' => 'text', 'priority' => 5, ) ) ); //twitter Toggle //add setting $wp_customize->add_setting( 'twitter_toggle_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'twitter_control', array( 'label' => 'Hide Twitter', 'description' => 'Enable to hide Twitter.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'top_bar_section', 'settings' => 'twitter_toggle_settings', 'priority' => 5, )); //Facebook $wp_customize->add_setting( 'twitter_settings', array( 'default' => __( '#', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'twit_control', array( 'label' => __( 'Twitter Url', 'blog-karo' ), 'section' => 'top_bar_section', 'settings' => 'twitter_settings', 'type' => 'text', 'priority' => 5, ) ) ); //youtube Toggle //add setting $wp_customize->add_setting( 'youtube_toggle_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'youtube_control', array( 'label' => 'Hide Youtube', 'description' => 'Enable to hide Youtube.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'top_bar_section', 'settings' => 'youtube_toggle_settings', 'priority' => 5, )); //Facebook $wp_customize->add_setting( 'youtube_settings', array( 'default' => __( '#', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'you_control', array( 'label' => __( 'YouTube Url', 'blog-karo' ), 'section' => 'top_bar_section', 'settings' => 'youtube_settings', 'type' => 'text', 'priority' => 5, ) ) ); //linkedin Toggle //add setting $wp_customize->add_setting( 'linkedin_toggle_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'linkedin_control', array( 'label' => 'Hide LinkedIn', 'description' => 'Enable to hide LinkedIn.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'top_bar_section', 'settings' => 'linkedin_toggle_settings', 'priority' => 5, )); //Facebook $wp_customize->add_setting( 'linkedin_settings', array( 'default' => __( '#', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lin_control', array( 'label' => __( 'LinkedIn Url', 'blog-karo' ), 'section' => 'top_bar_section', 'settings' => 'linkedin_settings', 'type' => 'text', 'priority' => 5, ) ) ); //Pinterest Toggle //add setting $wp_customize->add_setting( 'pinterest_toggle_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'pinterest_control', array( 'label' => 'Hide Pinterest', 'description' => 'Enable to hide Pinterest.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'top_bar_section', 'settings' => 'pinterest_toggle_settings', 'priority' => 5, )); //Facebook $wp_customize->add_setting( 'pinterest_settings', array( 'default' => __( '#', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'pin_control', array( 'label' => __( 'Pinterest Url', 'blog-karo' ), 'section' => 'top_bar_section', 'settings' => 'pinterest_settings', 'type' => 'text', 'priority' => 5, ) ) ); //Hero Section $wp_customize->add_section( 'hero_section' , array( 'panel' => 'blog_karo_theme_options', 'title' => __( 'Banner Section', 'blog-karo' ), 'description' => __( 'Front Page', 'blog-karo' ), 'priority' => 10, ) ); //Hero Heading Text $wp_customize->add_setting( 'hero_heading_settings', array( 'default' => __( 'Hello this is text area of blog karo.', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hero_heading_control', array( 'label' => __( 'Banner Heading', 'blog-karo' ), 'section' => 'hero_section', 'settings' => 'hero_heading_settings', 'type' => 'text', 'priority' => 5, ) ) ); //Hero Description $wp_customize->add_setting( 'hero_description_settings', array( 'default' => __( 'Lorem ipsum dolor sit amet. Cum galisum eligendi ut recusandae deleniti non tempora provident est tempora delectus rem dicta velit. Aut eligendi internos nam blanditiis suscipit eos veritatis magnam sed molestias pariatur.', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hero_description_control', array( 'label' => __( 'Banner Description', 'blog-karo' ), 'section' => 'hero_section', 'settings' => 'hero_description_settings', 'type' => 'text', 'priority' => 5, ) ) ); //Hero Button 1 Text $wp_customize->add_setting( 'hero_button_one_settings', array( 'default' => __( 'Explore Crazy Deals', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hero_button_one_control', array( 'label' => __( 'Primary Button Text', 'blog-karo' ), 'section' => 'hero_section', 'settings' => 'hero_button_one_settings', 'type' => 'text', 'priority' => 5, ) ) ); //Hero Button 1 url $wp_customize->add_setting( 'hero_button_one_url_settings', array( 'default' => __( '#', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hero_button_one_url_control', array( 'label' => __( 'Primary Button Link', 'blog-karo' ), 'section' => 'hero_section', 'settings' => 'hero_button_one_url_settings', 'type' => 'text', 'priority' => 5, ) ) ); //Hero Button 2 text $wp_customize->add_setting( 'hero_button_two_text_settings', array( 'default' => __( 'Learn More', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hero_button_two_text_control', array( 'label' => __( 'Secondary Button text', 'blog-karo' ), 'section' => 'hero_section', 'settings' => 'hero_button_two_text_settings', 'type' => 'text', 'priority' => 5, ) ) ); //Hero Button 2 url $wp_customize->add_setting( 'hero_button_two_url_settings', array( 'default' => __( '#', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hero_button_two_url_control', array( 'label' => __( 'Secondary Button Link', 'blog-karo' ), 'section' => 'hero_section', 'settings' => 'hero_button_two_url_settings', 'type' => 'text', 'priority' => 5, ) ) ); //Hero Banner Image $wp_customize->add_setting( 'hero_image_settings', array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'hero_image_control', array( 'label' => 'Banner Image', 'priority' => 20, 'section' => 'hero_section', 'settings' => 'hero_image_settings', 'button_labels' => array(// All These labels are optional 'select' => 'Select Image', 'remove' => 'Remove Image', 'change' => 'Change Image', ) ))); //Recent Posts Section $wp_customize->add_section( 'posts_section' , array( 'panel' => 'blog_karo_theme_options', 'title' => __( 'Latest Posts Section', 'blog-karo' ), 'description' => __( 'Front Page', 'blog-karo' ), 'priority' => 10, ) ); //Posts Primary Heading Text $wp_customize->add_setting( 'posts_main_heading_settings', array( 'default' => __( 'Choose your topic from trending list', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'posts_primary_heading_control', array( 'label' => __( 'Posts Primary Heading', 'blog-karo' ), 'section' => 'posts_section', 'settings' => 'posts_main_heading_settings', 'type' => 'text', 'priority' => 5, ) ) ); //Posts Secondary Heading $wp_customize->add_setting( 'posts_secondary_heading_settings', array( 'default' => __( 'Currently Trending', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'posts_secondary_heading_control', array( 'label' => __( 'Posts Secondary Heading', 'blog-karo' ), 'section' => 'posts_section', 'settings' => 'posts_secondary_heading_settings', 'type' => 'text', 'priority' => 5, ) ) ); // latest Posts Count // Add Setting $wp_customize->add_setting( 'posts_count_settings', array( 'default' => __( '6', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'posts_count_control', array( 'label' => __( 'Posts Count', 'blog-karo' ), 'section' => 'posts_section', 'settings' => 'posts_count_settings', 'type' => 'select', 'choices' => array( '3' => '3', '6' => '6', '9' => '9', '12' => '12', '15' => '15' ), 'priority' => 5, ) ) ); //Single Post Section $wp_customize->add_section( 'single_section' , array( 'panel' => 'blog_karo_theme_options', 'title' => __( 'Single Post Section', 'blog-karo' ), 'description' => __( 'Front Page', 'blog-karo' ), 'priority' => 10, ) ); //featured Image Toggle //add setting $wp_customize->add_setting( 'featured_toggle_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'featured_control', array( 'label' => 'Hide Featured Image', 'description' => 'Enable to hide featured image.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'single_section', 'settings' => 'featured_toggle_settings', 'priority' => 5, )); //Post Views Toggle //add setting $wp_customize->add_setting( 'views_count_toggle_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'views_control', array( 'label' => 'Hide Views Count', 'description' => 'Enable to hide views count.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'single_section', 'settings' => 'views_count_toggle_settings', 'priority' => 5, )); //Read Time Toggle //add setting $wp_customize->add_setting( 'read_time_toggle_settings', array( 'default' => '', 'sanitize_callback' => 'sanitize_text' )); //add control $wp_customize->add_control( 'read_control', array( 'label' => 'Hide Read Time', 'description' => 'Enable to hide read time.', 'type' => 'checkbox', // this indicates the type of control 'section' => 'single_section', 'settings' => 'read_time_toggle_settings', 'priority' => 5, )); //Copyright Section $wp_customize->add_section( 'copyright_section' , array( 'panel' => 'blog_karo_theme_options', 'title' => __( 'Copyright Section', 'blog-karo' ), 'description' => __( 'Front Page', 'blog-karo' ), 'priority' => 10, ) ); //Posts Primary Heading Text $wp_customize->add_setting( 'copyright_settings', array( 'default' => __( '© Copyright 2023 Blog Karo', 'blog-karo' ), 'sanitize_callback' => 'sanitize_text' ) ); // Add control $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'copyright_control', array( 'label' => __( 'Copyright Text', 'blog-karo' ), 'section' => 'copyright_section', 'settings' => 'copyright_settings', 'type' => 'text', 'priority' => 5, ) ) ); $wp_customize->add_setting( 'dark_logo', array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'dark_logo_control', array( 'label' => 'Logo for Dark Mode', 'priority' => 20, 'section' => 'title_tagline', 'settings' => 'dark_logo', 'button_labels' => array(// All These labels are optional 'select' => 'Select Logo', 'remove' => 'Remove Logo', 'change' => 'Change Logo', ) ))); // Sanitize text function sanitize_text( $text ) { return sanitize_text_field( $text ); } } add_action( 'customize_register', 'blog_karo_customize_register' ); ?>